Bravado Solutions is an AI consulting and software development company specializing in building scalable AI systems for enterprise and retail applications. This repository provides an enterprise-grade solution for predictive retail product classification. It leverages a hybrid approach using Azure Custom Vision for niche product identification, Pre-built AI models for general classification, and OCR for label text extraction.
retail-product-classification/
├── training-images/ # Organized product images for custom training
│ ├── product1/
│ ├── product2/
│ └── product3/
├── custom_model/ # Custom model orchestration
│ ├── train_classifier.py # Training logic & Azure communication
│ └── utils.py # Image upload & status polling utilities
├── prebuilt_model/ # General-purpose AI classification
│ └── classify_prebuilt.py # Script for fallback/general tagging
├── ocr/ # Optical Character Recognition
│ └── read_text.py # Extracts text labels from product packaging
├── api/ # Production API Layer
│ └── app.py # FastAPI implementation for /train & /predict
├── test-images/ # Sample images for inference testing
├── requirements.txt # Python dependencies
└── README.md # Project documentation
-
Programmatic Ingestion: Automatically uploads and tags datasets to Azure Custom Vision for rapid model iteration.
-
Automated Training Pipelines: Triggers training iterations and publishes high-precision models via the Azure SDK.
-
Performance Analytics: Generates detailed evaluation metrics, including Precision, Recall, and Accuracy, to ensure enterprise-grade reliability.
-
Label Parsing: Utilizes Azure AI Vision to read printed text on complex, reflective, or curved product packaging.
-
Context Enrichment: Extracts critical brand names, batch numbers, and label details to provide a deeper layer of metadata beyond simple classification.
-
Hybrid Prediction: Combines specialized custom identification for unique SKUs with Pre-built Azure models for general object tagging when custom data is unavailable.
-
Enterprise Gateway: A robust FastAPI backend designed for seamless connectivity with existing retail ERP, WMS, or POS systems.
-
Production-Ready Endpoints: Standardized
/trainand/predictroutes allow for easy integration into mobile apps or handheld scanners. -
Headless Architecture: Optimized for high performance and low cloud resource consumption, perfect for automated warehouse robotics.
-
Python 3.9+
-
An Azure Subscription with the following resources:
-
Custom Vision (Both Training and Prediction resources).
-
Azure AI Vision resource (specifically for OCR/Read capabilities).
# Clone the repository
git clone [https://github.com/bravado-solutions/retail-product-classification.git](https://github.com/bravado-solutions/retail-product-classification.git)
cd retail-product-classification
pip install -r requirements.txt
Create a .env file in the root directory (referencing .env.example):
CUSTOM_VISION_TRAINING_KEY=your_key
CUSTOM_VISION_PREDICTION_KEY=your_key
CUSTOM_VISION_TRAINING_ENDPOINT=your_endpoint
CUSTOM_VISION_PROJECT_ID=your_id
AZURE_AI_VISION_KEY=your_vision_key
AZURE_AI_VISION_ENDPOINT=your_vision_endpoint
To upload images from the training-images/ folder and initiate the training process:
python custom_model/train_classifier.py
Start the FastAPI server for production-style inference:
uvicorn api.app:app --reload
-
POST
/train: Triggers the Custom Vision training and publication pipeline. -
POST
/predict: Accepts an image file and returns a JSON payload containing predictions (class/confidence) and text_labels (OCR).
Bravado Solutions is an AI consulting and software development company specializing in building scalable AI systems for enterprise and retail applications. We transform complex data into autonomous, high-performance workflows that drive business value.
This project demonstrates our expertise in orchestrating Azure AI Cognitive Services for real-world retail product classification, combining custom vision models with intelligent OCR to bridge the gap between physical inventory and digital intelligence.
-
🌐 Website: https://bravadosolutions.com
-
📧 Email: contact@bravadosolutions.com
License: MIT License © 2026 Bravado Solutions