Can a small edge AI model learn to recognize colors on clothing items just from a webcam feed โ with no cloud, no heavy hardware, and a small custom dataset? Clothing Color Classifier answers that question with a resounding yes.
This project uses Edge Impulse Studio to train an Object Detection model that locates a clothing item's colored area (in this case, the chest/bib section of small kitty toy used as color samples) and classifies its color into one of four categories: Red, Magenta, Pink, and Sky Blue. The final model reached a 94.7% F1 score, with real-time detection tested live through a browser webcam โ no software installation required.
- USB Webcam connected to a laptop โ the only hardware needed for data collection and live testing
- Edge Impulse Studio โ for data labeling, model design, training, and browser-based live classification
- No microcontroller deployment was required for this version; everything runs directly through the browser
Data was collected directly through Edge Impulse's Data Acquisition tool, connected to the webcam. Each sample captured a small object with a distinctly colored section, later labeled by color.
Final dataset:
- 146 images total (120 training / 26 test)
- 4 balanced classes: Magenta (30), Pink (37), Red (30), Sky Blue (37)
- Images captured with varied angles, distances, and differnet backgrounds.
Using Object Detection labeling, each image received a tight bounding box drawn strictly around the colored region (the chest/bib area), deliberately excluding unrelated parts of the object (like the white body or decorative bow). This precision mattered a lot: boxes that were too loose picked up background color and blurred the distinction between similar shades; boxes that were too tight lost enough pixel information for the model to learn from. Finding that balance was key to final accuracy.
๐ง Impulse DesignFinal training configuration:
- Training cycles: 100
- Learning rate: 0.001
- Data augmentation: enabled
- Training processor: CPU
FOMO (Faster Objects, More Objects) is Edge Impulse's ultra-lightweight object detection algorithm, built on a truncated MobileNetV2 0.35 backbone. Instead of predicting full bounding boxes like YOLO, it locates objects by predicting just their center point on a grid โ using up to 30ร less memory and compute, enabling real-time inference even on tiny microcontrollers. This efficiency made it the ideal choice for a small, single-object-per-image classification task like this one.
F1 Score: 94.7%
Getting here required iterating on both dataset balance and bounding box precision โ particularly for the lighter shades, which initially struggled to stand out from light backgrounds and were confused with each other.
The trained model was tested directly in the browser using Edge Impulse's Live Classification feature โ no downloads, no firmware flashing.
๐ก Key Takeaways- Bounding box precision has a sweet spot โ too loose or too tight both hurt accuracy
- FOMO is a strong choice for small, custom Object Detection datasets compared to heavier models like YOLOv5
- A fully functional Edge AI pipeline โ from data collection to real-time inference โ is achievable entirely through the browser, with no dedicated hardware deployment needed
- Deploy the trained model to an edge device for standalone, offline color detection
- Expand the color palette and test on real fabric/clothing items instead of toy samples
- Explore combining this with a "outfit matching" recommendation feature
- Explore printable paper templates: instead of relying only on physical plush toys, a simple black-and-white template of the object could be printed multiple times and hand-colored in different shades, offering a fast, low-cost way to expand color variety in the dataset without needing more physical items
๐ Try the live model :













Comments