Hacker News new | comments | show | ask | jobs | submit login
Show HN: Transfer, easy transfer learning for image classification (github.com)
34 points by msochor 4 months ago | hide | past | web | favorite | 3 comments



Nice work! I love transfer learning and how easy it makes creating binary (two categories) image classifiers that perform well with very little training.

The new Kaggle Deep Learning lessons (https://www.kaggle.com/learn/deep-learning) show how to apply this approach, using Jupyter Notebook, which is a more traditional data science tool.

To give one more performance datapoint, applying all the tricks taught in the Kaggle DL classes to finetuning the last layer of resnet50 allows getting 95%+ accuracy. You can get this on classes such as rural/urban, or horse/donkey (much more finegrained) with just a few minutes (2 epochs) of training over a dataset of 400 images (which is very small by image recognition dataset standards).

This compares favourably with the out-of-the-box accuracy of a resnet pretrained on imagenet, which is about 80%. And the out-of-the-box accuracy implies you can only classify classes of objects from the imagenet dataset. Finetuning allows any classes.

I also feel we need a more precise word for this approach of retraining just the final layer. Maybe finaltuning ? It's not finetuning per se, because we do not touch the other layers.


Thanks, I appreciate the encouragement! Also, this extends beyond two categories, it will train as many categories as you supply.

Part of what I wanted to tackle with this project is moving beyond the Jupyter Notebook where its very ad hoc to something more complete. For example, I'm working with a local park group on a trail cam identification project (what does the trail cam see? a deer? a dog? or is the frame empty?) and I needed to not only train but to also hand off the model to a moderately tech-savvy person. This was my attempt to wrap up the training, prediction and sharing of models in one (relatively) easy to install package.


This is pretty awesome! Does anyone know how difficult it is to do transfer learning on GAN? I've always been curious whether transfer learning would create decent results on pre-trained GAN models.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: