Training a model from photos
Tools to sort a large photo collection, then train an image classification model that files new photos into the right folder by itself.
- 491characters recognised
- 27,516training photos
- 98.3%right on the first guess
- 0photos sent off the computer
The approach
-
Preparing the data
Cleaning each new batch: duplicates removed, videos set aside, group photos detected automatically.
-
Training the model
A classifier trained on the photos already sorted, starting from a pre-trained vision model (SigLIP 2), fully fine-tuned.
-
Review and repeat
The model suggests a folder for each new photo; I accept or correct it on a review page, then train again. Every move is logged and can be undone.
The model
The model tells which character a cosplayer is dressed as, from a photo, among 491 characters from anime, games, comics and films. It recognises the costume, never the person.
Checked on 7,023 photos held out from training: 98.3% right on the first guess, 99.5% within the top three, and 97.1% macro-F1, a measure where every character counts the same. The model is openly available on Hugging Face under the Apache 2.0 licence.
The tools, published on GitHub under the GPL v3 licence, do not depend on cosplay: they work for any collection where each photo belongs in one named folder (pets by breed, plants by species, products by model).
A role or an assignment in mind? Let's talk.
