🧠 Amazon – Explainable Product Image Classifier with LIME
AI-powered e-commerce tagging with transparency, speed, and $125K+ annual savings potential
Classifies Amazon fashion products (boots, shoes, shirts, bags, heels) with 85%+ accuracy and provides LIME visual explanations so every prediction is auditable and trustworthy.
📌 Inspiration
- E-commerce giants like Amazon, Walmart, and Shein onboard thousands of new products weekly. Manual product tagging is not only expensive and error-prone, but also lacks transparency and explainability, which are now critical under emerging AI regulations like the EU AI Act.
- I wanted to solve a real-world problem: automating product classification with a focus on explainability so that every prediction is auditable and trustworthy—especially for high-volume platforms handling sensitive product categories.
🛠️ What it does
This AI-powered web app allows users to:
- Upload or select a real product image (e.g., shoes, bags, shirts, heels)
- Predict the product category using a custom CNN baseline model
- Visualize the model’s reasoning via LIME (Local Interpretable Model-Agnostic Explanations) heatmaps
- Enable non-technical users (like product managers, catalog teams, QA teams) to instantly audit AI decisions
- Ideal for e-commerce platforms aiming to automate tagging, reduce manual costs, and comply with AI transparency mandates.
🧱 How I built it
1.Model Architecture:
- Custom Convolutional Neural Network (CNN) built using Keras and TensorFlow
- Structure: Conv2D → MaxPooling → Dropout → Dense
- Achieved 85.20% validation accuracy on 5-class Amazon fashion product classification
- Input: 224×224×3 RGB images
- Optimizer: Adam | Loss: Categorical Crossentropy
2.Explainability Integration:
- Implemented LIME to generate per-image heatmaps highlighting influential pixels.
3.Frontend Deployment:
- Streamlit frontend hosted on Hugging Face Spaces
- Integrated with image selection, upload, and model prediction
- SHAP-like heatmap visuals through LIME
4.Dataset:
- Fashion Product Images Dataset on Kaggle
- 44,450 labeled fashion items, rich metadata (styles.csv, images, etc.)
🧗♀️ Challenges I ran into
1.Performance vs Explainability Tradeoff:
- Pretrained models like ResNet50 and EfficientNetB0 yielded less consistent results due to data domain mismatch. I had to build and fine-tune a custom CNN from scratch to balance accuracy and explainability.
2.LIME Complexity:
- Integrating LIME with image models is compute-intensive and unstable on some samples. I optimized image preprocessing and overlay steps for better speed and interpretability.
3.UI for Non-Technical Users:
- Designing a UX that shows both prediction and clear, understandable explanations was crucial. I simplified the app layout using Streamlit, so even non-ML teams could use it confidently.
🏆 Accomplishments that I'm proud of
- Built a custom CNN model that outperformed pretrained architectures in this use case
- Achieved 85.47% validation accuracy without overfitting
- Integrated LIME for real-time explainability
- Created a fully deployed, interactive Streamlit app on Hugging Face
- Developed a business-ready, compliant, and scalable solution with ~$125K/year cost-saving potential
- Made explainable AI accessible to business stakeholders, not just data scientists
📚 What I learned
- Explainability isn’t optional anymore—it’s the bridge between AI models and business trust
- Custom solutions can outperform generalized pretrained models when aligned with real-world data
- Building for non-technical end users requires more than ML—it demands UI empathy and clarity
- Tools like Streamlit and LIME, when combined thoughtfully, can transform AI from black box to business asset
🚀 What's next for Amazon – Explainable Product Image Classifier with LIME
- Upgrade the current baseline model with ensemble or attention-based architectures
- Expand categories to support multi-label classification (e.g., tags like gender, season, sleeve style)
- Integrate SHAP-based global explanations for model auditing and compliance
- Offer batch classification for enterprise-scale uploads (e.g., 10,000+ images at once)
- Build a dashboard for business teams showing accuracy trends, tagging speed, and audit logs
>> This project is a step toward trustworthy, human-aligned AI for the real-world e-commerce supply chain.
👩💼 About the Author
Sweety Seelam | Business Analyst | Aspiring Data Scientist | Passionate about building end-to-end ML solutions for real-world problems
Email: sweetyseelam2@gmail.com
LinkedIn
GitHub
Medium
My Portfolio
🔐 Proprietary & All Rights Reserved
© 2025 Sweety Seelam. All rights reserved.
This project, including its source code, trained models, datasets (where applicable), visuals, and dashboard assets, is protected under copyright and made available for educational and demonstrative purposes only.
Unauthorized commercial use, redistribution, or duplication of any part of this project is strictly prohibited.
Built With
- aiexplainability
- deeplearning-cnn
- huggingfacedeployment
- lime
- machine-learning
- python
Log in or sign up for Devpost to join the conversation.