Making sense of Scorsese with FastAI. Help me improve Conv. Net accuracy of 85%

I have a hard time telling apart three famous actors: Leonardo DiCaprio, Matt Damon and Mark Wahlberg. As you can imagine, the Scorsese film The Departed was a wash-out for me. Could I put AI to the task and help restore my enjoyment of the critically acclaimed Crime Thriller?

Pre-Cleaning

I pulled together 200 images of each actor from Google Images.


While Google Images is a great resource for quickly assembling a set of images for training AI, the images are noisy. I have illustrated some problems with a random sample. Proceeding to train with this set, the strategy based on fast.ai’s approach to Transfer Learning is:

  1. Fit the model classifier starting with ResNet34 trained on ImageNet data and using One Cycle policy for training the fully-connected layer over a few (e.g. 8) epochs
  2. Unfreeze the layers and explore the learning rate to select the min-max range
  3. Continue fitting the model with the One Cycle policy to train all layers with the range of learning rates.

With 3 classes, 469 images in training set and 117 in validation set, this gives:

  1. The Stage-I accuracy after 8 epochs (in 2 runs of 4 each) is roughly 76%. TheDeparted_StageI_preClean

  2. The learning rate range-finder gives the min. as 1e-6 and max as 1e-3. TheDeparted_findLR_preClean

  3. The Stage-II accuracy has improved to roughly 82%. TheDeparted_StageII_preClean

Post-Cleaning

After cleaning the dataset and removing duplicates, the data look much cleaner.

TheDeparted

With 3 classes, 333 images in training set and 89 in validation set, this gives:

  1. The Stage-I accuracy after 8 epochs (in 2 runs of 4 each) is roughly 72%. TheDeparted_StageI_postClean

  2. The learning rate range-finder gives the min. as 7e-6 and max. as 2e-3. TheDeparted_findLR_postClean

  3. The Stage-II accuracy has improved to roughly 86%. TheDeparted_StageII_postClean

Summary

The confusion matrix with the “as-is” image set is shown on the left and with the clean image set on the right.
TheDeparted_confusionMatrix_preCleanTheDeparted_confusionMatrix_postClean

One the one hand, I am kicked at the results in a weekend’s worth of work. On the other hand, the error rates seem much higher compared to the examples in the lectures and results posted by peers. Suggestions?

3 Likes

Hi sanjaybhatikar hope your having a wonderful day.

You may need to research Fine-Grained classification which is for classifying categories that are similar.

Cheers mrfabulous1 :smiley::smiley: