This project demonstrates the power of transfer learning in computer vision by applying it to identifying soda bottles. We fine-tune a pre-trained Xception model to achieve high accuracy in recognizing various soda bottle brands.
-
Deep Learning in Computer Vision: Uses advanced techniques to accurately recognize soda bottle images.
-
Transfer Learning Approach: Applies the Xception model, enhanced through transfer learning, to identify soda bottles.
-
Kaggle Dataset: Trains and evaluates the model using the Cola Bottle Identification Dataset from Kaggle.
/app
: Web interface for image upload and prediction./code/conv_net_comparison.ipynb
: Documentation of neural network comparisons./data/soda_bottles
: Dataset for model training and validation./other_files
: Supplementary resources, including weights and test photos.
- Clone the repository:
git clone https://github.com/vdrvar/comp_vision_for_soda_bottles.git
- Navigate to the Project Directory:
cd comp_vision_for_soda_bottles/app
- Set Up the Virtual Environment (Optional but recommended):
- For Windows:
python -m venv env env\Scripts\activate
- For macOS and Linux:
python3 -m venv env source env/bin/activate
- Install Dependencies:
pip install -r requirements.txt
- Run the Application:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
Replace app.main:app
with the appropriate module path if your FastAPI app instance is defined elsewhere.
- Access the Web Service: Open your browser and visit http://localhost:8000 to interact with the application.
- The
--reload
flag in the uvicorn command enables automatic reloading of the server when changes are detected in the code. It is useful for development but should be omitted in a production environment.
-
Results: Displays predictions with recognized soda bottle types.
-
More Info: Insights on recognized classes and prediction statistics.
Tweak, expand, and use this project as a base for further computer vision and transfer learning experiments.
For development only. Check conv_net_comparison.ipynb
for model insights.