This is my latest kernel on classifying Audio using Deep Learning. Found an Interesting Technique on Converting Audio to Spectrogram and to my surprise trained a model with 97% Accuracy. Do check this out if you’re working in the audio space.
Augmentation is one route and an interesting idea. But another approach is just to ensure that the test set includes dinosaurs drawn in different ways. My training set did have a few dinosaurs with hair and feathers, so it should perform well with them. Unfortunately all of the images I’ve found to test it are already in my training set.
Getting a representative test set is just to ensure you are measuring the accuracy well., but don’t think it will improve performance of your system.
It is considered cheating if some of your exact test images are also in the training set. So hope you didn’t do that. I think u mean same distribution, i.e. other haired ones but not the exact one.but doing this way, overall isn’t interesting…
The data aug route is the one that will interest. Cos it now becomes slightly more practical. I.e. if you have a sample of clean faces and never bearded faces, can you still recognize the person if he grows beard. Doing it with Dino is a bit odd, but may still yield some interesting insight.
Yes, that’s what I was trying to say. Your comment prompted me to search for a few "hairy"dinosaur pictures to test with, but the first hits all looked familiar from the set I used for training and validation. They wouldn’t be a true test of the model’s ability to generalize.
So far I have been using images of my kid’s toys to test, and have asked friends with kids to do the same.
I set up a resnet34 learner to distinguish between photos of my identical twin sons – it didn’t work. Both training and validation losses were persistently high. The photo quality is pretty variable and there were only 50 photos of each. I subsequently tried resnet50, which also didn’t work.
I decided that I wanted some positive results, so I set up a photo dataset of sons vs. daughter, which I thought would be easier to learn. I started with resnet50 on this set, and after 10 epochs the training loss had decreased but the validation loss had increased. So I tried unfreezing and running 10 more epochs. At the very end, the validation loss started to decrease, so I ran 10 more, and that worked (resnet50, unfrozen, w/20 epochs). Great! But I wonder how it would perform now on an independent test set…
Thanks, @muhajir. You can find the notebook here, the code is the same just the dataset is now different. Basically you can experiment with any data you want it just requires you to provide text files with image urls.
I just finished the first lesson and as part of the exercise made a simple classifier that differentiates images of my favorite football team Manchester United FC and our rivals Liverpool FC.
I created the dataset myself via Google images and achieved an accuracy of about 95% after about an hour’s worth of tinkering with it.
Hi everyone,
I did a presentation on image augmentations where I had presented the various transforms supported by the library, at a meetup hosted by @aakashns
I hope @sgugger will excuse me for using doggy images this time
I have uploaded the Ancient Language data set on Kaggle. Check it out here:
It contains a total of 400 images of 8 languages with approximately 50 images for each. I had to write a script to split the images into train, valid and test data sets. Here is it is:
Here is the kernel for the ancient language classifier made using fast.ai: https://www.kaggle.com/nitron/ancient-language-classifier
It was an amazing experience to work on this! I will further improve the classifier after completing the next fast.ai lessons.
I will now move on to fast.ai lesson 2
I helped with catching and fixing a bug with a transform called dihedral_affine (and dihedral), which flip/rotate image resulting in 8 orientations. If you used get_transforms(…) with flip_vert=True, then you would have used this function.
The fix is very simple, and it’s here:
Now, i think the sampling is uniformly distributed for all 8-orientations. I haven’t tried it on a wide variety of image recognition task.
If you have the chance or curiosity, I would really like to know if this makes things better or worse for you. You can post what you find in that git Issue page, so developers of fastai can see the feedback as well.
I’m 2 weeks into the course and I took part in this online hackathon and with the help of the fastai library I quickly got into the top 2%. Find my article about the same here.
I’m rather humbled by some of the clever uses folk here have managed to build with CNNs right out of the gate. Me? I built a Japanese noodles classifier.
Granted, it’s probably not going to change the world, but it might help you decide on lunch? (within a very limited domain).
I am taking the course online and finished lesson 1 the last week. I decided to give it a try in a dataset that collaborators and I compiled of insect eggs to study their evolution, recently published as a preprint and currently in press:
Church SH, Donoughe S, de Medeiros BAS, Extavour CG. 2018 . A database of egg size and shape from more than 6,700 insect species. bioRxiv: 471953. doi:10.1101/471953.
Eggs are probably one of the less studied life stages in insects and it is hard even for insect experts to tell to which kind of bug most eggs belong. We built a visualization of egg shapes and images based on information in the literature (available at https://shchurch.github.io/dataviz/index.html) and now I used the images available there to build a classifier of insect orders. Orders are very large taxonomic groups, so this is something like telling apart a beetle from a moth, or a dragonfly from a cricket, based on the eggs. The images are highly heterogeneous, with some being color photographs, others line drawings and some microscopy. I did not filter the data and really did not expect much, but turns out the classifier could reach almost 80% accuracy just by adapting lesson 1 code for dog and cat breeds. Really exciting, looking forward to learn more.
I’ve been working this week on using fast.ai to enhance my app, Magic Sudoku, which scans and solves Sudoku puzzles and displays that solution over the top of the real one in AR.
When I made the app in 2017 (my writeup is on Medium here) I didn’t really understand how the ML part worked – I just bumbled through adapting a Keras MNIST tutorial to train my on my own dataset of scanned puzzles.
Now that I’ve been watching the fast.ai videos, I feel like I have a much better understanding of what’s going on and am starting to customize my model to do new things.
One of the things I’ve wanted to do for a while now is expand my model from 10 classes to 20 to allow it to read (and differentiate between) handwritten and computer digits. This will let me expand the capabilities of the app beyond just solving empty puzzles to letting people scan their completed puzzles to check their work and scan their in-progress puzzles to see if they are on the right track and get hints without having to look at the full solution in the back of the book (spoilers!).
So far the hardest part has been getting my new model to play nicely with Apple’s CoreML and Vision libraries. I finally got that working this weekend though and am finally seeing the results! Here’s a puzzle I scanned with my newly-improved fast.ai-trained model.
Writing the actual app features that use the new data from the model
Speeding up inference (right now it’s doing 1 square at a time)
Better data augmentation (right now it’s not doing any)
Trying other model architectures (currently using resnet34 starting from pre-trained weights but thinking that may be overkill for such small images)
And possibly collecting more real-world data depending on how it does with some random guinea pigs’ handwriting (may end up using MNIST data in my model as well but the format is slightly different).
I’m excited to keep working on more projects with fast.ai. I’ve got about a hundred ideas… but I already know the next 2 projects I’m going to be working on this spring!
This is pretty cool!
i note you’re recognising the characters and then using a recursive algorithm to solve the puzzle before projecting the solution via AR. I’m mentally trying to work out whether it’d actually be possible to solve sudoku puzzles with a NN via multi-label classification alone, given enough layers and a gargantuan amount of training data (a crazy idea, but part of me wonders if it’s actually possible).
I just completed fast.ai lesson 1 and decided to make a car identifying DL model. I used a Kaggle Kernel to train a model from a dataset comprised of google images of 6 different cars (accord, civic, altima, corolla, models, and charger).