Menu

1 / 4

An image classifier you can trust 80% of the time: confidence gating and Grad-CAM

DEV Community: tensorflow·Omar Essam El Sherbiny·about 12 hours ago
#4738MF6U
#devtotensorflow#devto#dev#model#deep
Reading 0:00
15s threshold

This was my final project for IBM's Deep Learning and Reinforcement Learning course. Fashion-MNIST is a familiar benchmark, so I framed it as a business task instead of a leaderboard entry: an online shop wants product photos tagged into ten categories automatically, and a person reviews whatever the model is unsure about.

That framing changes the question. "How accurate is the model?" becomes "what share of images can it tag on its own, and how accurate is it on those?"

Four architectures, one budget

All four models used the same split (54,000 train, 6,000 validation, 10,000 test), the same optimiser, early stopping on validation loss and a 40-epoch cap.

Model Parameters Test accuracy Macro F1 Train time (CPU)

Dense network (MLP) 235k 89.3% 0.893 1 min

Small CNN 422k 91.6% 0.916 2 min

Deep CNN, BatchNorm + Dropout 289k 93.7% 0.937 24 min

Deep CNN + augmentation 289k 92.6% 0.926 33 min

The deep CNN is the best model with fewer parameters than the small CNN: three convolutional blocks with batch…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.