Original Dataset |
New Dataset |
A ResNet50 model is utilized to identify products across 15 retail products within 3 categories. This model processes the images provided by users through the frontend.
Below are the visualized examples of the model's training metrics:
Precision - 98.08% |
Recall - 98.02% |
F1 Score - 98.01% |
Train vs. Validation Loss |
The frontend is developed using ReactJS, providing functionality to upload an image and receive the top 3 predictions for that image. It includes the product category, exact product name, and classification confidence.
The backend is developed with Python and FastAPI. It initializes the model and exposes the prediction API to the frontend. When a user uploads an image, the frontend relays it to the backend via FastAPI, which handles product classification. Finally, the backend forwards the predictions back to the frontend.
- Frontend: http://<machine_ip>:3000
- Backend: http://<machine_ip>:8000
- Prediction Endpoint: http://<machine_ip>:3000/predict/ (POST) - Used through the frontend
- Ensure you are using an x86_64 machine.
- Make sure you have Docker and Docker Compose installed.
- Clone the repository with the following command:
git clone <repository_url> cd <repository_name>
- Build and run the application using Docker Compose:
docker compose build docker compose up -d
- Open your browser:
- Frontend (React): http://<machine_ip>:3000 - (IMPORTANT: Use CORS blocker extension for your browser)
- Backend (FastAPI): http://<machine_ip>:8000
- Stopping the Project. To stop the project, run:
docker-compose down