Flower Image Classifier
Two pretrained image models were fine-tuned on 2,744 flower photos. I recommended MobileNetV3 at 92.72% test accuracy on a Colab T4 GPU, because it is 5.5x smaller and faster per image than ResNet50 at 91.99%.
The question
Two well-known models can both tell flowers apart. The question was which one should power a lightweight flower identification feature that may run on a CPU or a phone.
Cleaning the data first
Every image was checked and none was unreadable. Three groups of exact duplicates turned up, and one pair was the same picture filed under both rose and tulip, so those two were removed, leaving 2,744 usable images. The dataset's own test folder has no labels, so a test set was made from the labeled images.
Keeping the comparison fair
- One stratified split, 70/15/15: 1,920 training, 412 validation, and 412 test images, with no image shared between sets.
- Both models used the same seed, loss, optimizer, learning rate, batch size, and 3 epochs. Only the new final layer was trained.
- Augmentation was applied only to training images.
- The decision rule was written before the test set was touched, and the test set was used once.
Results on a Colab T4 GPU
| Measure | ResNet50 | MobileNetV3 Large |
|---|---|---|
| Test accuracy | 91.99% | 92.72% |
| Test errors, of 412 | 33 | 30 |
| Parameters | 23.5 M | 4.2 M |
| Saved model size | 94.4 MB | 17.0 MB |
| Time per image, batch of 32 | 3.38 ms | 0.74 ms |
| Training time, 3 epochs | 61.9 s | 46.1 s |

The accuracy gap is about 3 images out of 412, which is within normal variation for one split, so it was not treated as a real win. The decision came from size and speed. Both models confuse tulips and roses most.
Knowing when to ask a person
The inference function returns the prediction, confidence, top guesses, and a review flag. Images go to human review when confidence is under 0.80. On validation data that threshold caught 38 of the model's 41 mistakes.
Limits
Only the final layer was trained for 3 epochs, the photos come from public web sources, and timing was measured on one GPU runtime, so it only shows the relative speed.