Skip to content

Your Own Photos

You'll label a few hundred pictures from your own camera roll, train a model on your laptop that sorts them into categories you chose, and read the confusion matrix for where it fails.

About

A model trained on a clean benchmark is a demo; one trained on your own camera roll, with its blurry frames, bad lighting and ambiguous shots, is machine learning. Pick three to five categories that matter to you (your dog versus the neighbor's, receipts versus whiteboards versus everything else, three trails you keep going back to), label at least 100 photos per class, and fine-tune a small pretrained image network, which a laptop CPU does in under an hour with most of the network frozen (the free tier of a hosted notebook works too). What counts is a confusion matrix on a held-out set you labeled before training and an honest look at the mistakes. If your photos include other people, ask before you post them, and crop or blur faces that aren't yours.

At a glance

Per requirement
35 XP
Completion bonus
300 XP
Requirements
6
Takes
Two or three weekends
Skill level
Intermediate (months of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own
Locked for now
Earn two more Uncommon badges in Machine Learning to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Choose three to five categories and label at least 100 of your own photos per class. Make a folder per class and drag photos in. Keep a 'none of these' class if the real world will hand your model things outside the categories, because it will. Label fast and don't agonize; if a photo is truly ambiguous, put it aside in a separate folder for later. Take a screenshot of the folder tree with the counts. Photo
  2. 2
    Split off a test fifth and a validation tenth before you train, keeping near-duplicates on one side. Burst shots and photos taken seconds apart are near-duplicates, and if one lands in training and its twin in test, your score is inflated and you won't know by how much. Sort by timestamp and put whole sessions on one side or the other. Set aside a fifth of each class as the test set you won't touch until the confusion matrix, then a tenth of what's left as a validation slice to score each epoch. Write down the counts per split and per class. Take a screenshot of the counts. Photo
  3. 3
    Fine-tune a small pretrained network with the backbone frozen. MobileNet, ResNet-18 or EfficientNet-B0 with pretrained weights from your library's model zoo. Replace the last layer with one output per class, freeze everything else, and train for five to ten epochs at 224 by 224 pixels. On a laptop CPU this is minutes per epoch. Plot training and validation loss per epoch. Take a screenshot of the curves. Photo
  4. 4
    Print the confusion matrix on the held-out set and name the worst pair. Rows are true classes, columns are predictions. The biggest off-diagonal number is the pair your model confuses most, and it's usually the pair you'd confuse too in a thumbnail. Report overall accuracy next to the majority baseline. Take a screenshot of the matrix with the worst pair circled. Photo
  5. 5
    Show the twelve most confident mistakes and say what the model is really looking at. Sort the misclassified held-out photos by the model's confidence and display the top twelve with the true and predicted labels. Look for a pattern: it's often a background, a color cast or a time of day rather than the thing you meant. Take a screenshot of the grid and write what you think the model learned instead. Photo
  6. 6
    Fix the biggest failure with data, not code, and retrain. Add 30 or more photos of the confused pair taken on purpose to break the pattern (different backgrounds, lighting, angles), retrain, and compare the two confusion matrices on the held-out set. That's your second and last look at it, so stop there. Then run the model on 20 brand new photos from this week and show its guesses. Post both matrices and the new photos with their labels. Photo