Image Classifier: Deployed on Heroku Using FastAI, Flask, and Node JS
The code below is a boilerplate of image classification models seen elsewhere and has been retooled specifically for this dataset. For the dataset, I have built a web scraper using Beautiful Soup to download the images of top 50 dog breeds as reported in American Kennel Club. In total, there were 5000 images, 100 images per breed, allowing us to maintain the same distrubtion of training and validation dataset between classes. I have chosen ResNet34 over ResNet101, ResNet50 and ResNet18 as the model architecture here because of its optimal performance metrics (speed and accuracy). To faciltate model generalization, default data augmentation was applied to the training dataset using a batch size of 8. I have used a batch size of 8 here because of an'out of memory' error when 32 or 64 were used in AWS SageMaker notebook instance.
Aug-24-2021, 07:25:12 GMT
- Technology: