This project is a web application that uses a deep learning model (ResNet) to recognize food items from images. The frontend is built with React.js, and the backend is powered by Flask. The application allows users to upload an image of food, and the model predicts the name of the food item.
You can visit the deployed application by clicking the link above.
Sample image of the Food Recognition web application interface.
- Upload an image of food.
- Predict the food item using a deep learning model (ResNet).
- Display the predicted name of the food item.
- Responsive web design.
The project is organized as follows:
- Python 3.6+
- Node.js
- npm (Node Package Manager)
- Model Used: ResNet
- The ResNet (Residual Network) model is a powerful deep learning model known for its ability to train very deep neural networks effectively. In this project, ResNet is used to identify and classify food items from images.
- Training: The model was trained on a comprehensive dataset of food images to accurately recognize various food items.
- Saved Model: The trained ResNet model is saved in the files
food_saved_model.h5
andfoods_saved_model.h5
.
-
Clone the repository:
git clone https://github.com/yourusername/your-repository.git cd your-repository
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required Python packages:
pip install -r requirements.txt
-
Run the Flask backend:
python src/backend/app.py
-
Navigate to the frontend directory:
cd src
-
Install the Node.js packages:
npm install
-
Start the React development server:
npm start
-
Access the application: Open your browser and go to
http://localhost:3000
.
- Upload an image of food through the web interface.
- The backend (Flask) processes the image and uses the ResNet model to predict the food item.
- The predicted name of the food is displayed on the frontend.
- Model Used: ResNet
- Training: The model was trained on a dataset of food images.
- Saved Model: The model is saved in
food_saved_model.h5
andfoods_saved_model.h5
.
Contributions are welcome! Please fork this repository and submit a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.