This project implements a smart vision technology solution for quality control in e-commerce product management. It utilizes advanced image processing and artificial intelligence (AI) to compare product information extracted from images against user-provided data, ensuring that the products listed on e-commerce platforms meet quality standards.
.
├── static
│ ├── css
│ │ └── style.css
│ ├── img
│ └── upload
├── templates
│ └── bill.html
├── app.py
├── camera.py
├── compare_info.py
└── README.md
app.py: Flask application for web interface.camera.py: Handles image capture functionality.compare_info.py: Main script for comparing extracted information with user data.static/css/style.css: CSS styles for the web interface.static/upload/: Directory for storing product images captured from thecamera.py.templates/bill.html: HTML template for displaying results.
- Image capture and processing
- Text extraction from images using AI
- Comparison of extracted data with user-provided information
- MongoDB integration for data storage
- Web interface for displaying results
The vision model extracts the following information from product images:
- Product Name
- Packaging Material
- Brand Name
- Pack Size
- Expiry Date
- Expiry Date Status (valid/expired)
- Count Confirmation
- Maximum Retail Price (MRP)
- Shelf Life Prediction (if applicable)
- Python: The primary programming language used for scripting and implementation.
- OpenCV: A computer vision library used for image processing and capturing images.
- Groq: A machine learning model provider used for product information extraction and comparison. In this project, the following models are employed:
- Llama-3.2-11b-vision-preview: Used for extracting product information from images.
- Gemma-7b-it: Used for comparing product information based on extracted and user-provided details.
- MongoDB: A NoSQL database used for storing extracted data, user information, and comparison results.
- Langchain: A framework that facilitates the integration of various components, allowing for easier interaction with the Groq API.
- Flask: A lightweight web framework used for creating the user interface and handling web requests.
- Clone the repository
- Install required dependencies:
pip install -r requirements.txt - Set up MongoDB and update the connection string in
compare_info.py - Obtain a Groq API key and update it in
compare_info.py
- Run
app.pyto start the Flask server - Upload product images through the web interface
- Enter product information for comparison
- View results of the quality control check
Ensure that the Groq API key and MongoDB connection details are kept secure and not shared publicly.