nightey3s commited on
Commit
9b1358e
Β·
verified Β·
1 Parent(s): c78bb66

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -0
README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ title: FoodVision
2
+ emoji: πŸ“ˆ
3
+ colorFrom: purple
4
+ colorTo: pink
5
+ sdk: streamlit
6
+ sdk_version: 1.40.2
7
+ app_file: app.py
8
+ pinned: false
9
+ short_description: sch proj
10
+
11
+ # FoodVision: Automated Food Detection Using YOLOv8
12
+
13
+ ## Project Overview
14
+ FoodVision is a deep learning-based food detection system that utilizes YOLOv8 to identify and classify various food items in images. The system is capable of detecting 55 different food classes with a focus on fruits and vegetables, making it useful for dietary monitoring and nutritional analysis.
15
+
16
+ ## Features
17
+ - Real-time food detection using YOLOv8
18
+ - Support for 55 different food classes
19
+ - Calorie estimation per 100g of detected food items
20
+ - Web interface using Streamlit
21
+ - Support for both image upload and camera capture
22
+ - Bounding box visualization with confidence scores
23
+
24
+ ## Model Architecture
25
+ - Base model: YOLOv8n (nano version)
26
+ - Input size: 640x640 pixels
27
+ - Batch size: 32
28
+ - Learning rate: 3e-4
29
+ - Training epochs: 45
30
+
31
+ ## Performance Metrics
32
+ - mAP50: ~0.8 (80% accuracy at 50% IoU)
33
+ - Precision: ~0.8
34
+ - Recall: ~0.75
35
+
36
+ ## Installation
37
+
38
+ 1. Clone the repository:
39
+ ```bash
40
+ git clone [email protected]:2302660/aai3001_final_project.git
41
+ cd aai3001_final_project
42
+ ```
43
+
44
+ 2. Install the required dependencies:
45
+ ```bash
46
+ pip install -r requirements.txt
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ 1. Run the Streamlit application:
52
+ ```bash
53
+ streamlit run Sapp.py
54
+ ```
55
+
56
+ 2. Use the web interface to:
57
+ - Upload images or capture them using your camera
58
+ - View detected food items with bounding boxes
59
+ - See confidence scores and calorie information
60
+
61
+ ## Project Structure
62
+ ```
63
+ .
64
+ β”œβ”€β”€ Model.ipynb # Notebook for model training and evaluation
65
+ β”œβ”€β”€ cal.py # Core calorie calculation and detection functions
66
+ β”œβ”€β”€ Sapp.py # Streamlit web application
67
+ β”œβ”€β”€ best.pt # Trained model weights (not included in repo)
68
+ └── README.md # Project documentation
69
+ ```
70
+
71
+ ## Supported Food Classes
72
+ The model can detect 55 different food items including:
73
+ - Green foods: asparagus, avocados, broccoli, cabbage, etc.
74
+ - White/Beige foods: banana, cauliflower, garlic, mushroom, etc.
75
+ - Purple/Red foods: beetroot, blackberry, cherry, eggplant, etc.
76
+ - Orange/Yellow foods: apricot, carrot, corn, mango, etc.
77
+
78
+ ## Live Demo
79
+ You can try out the live demo at:
80
+ - [Hugging Face Space](https://nightey3s-aai3001-final-project.hf.space/)
81
+ - [Project Files](https://huggingface.co/spaces/nightey3s/aai3001_final_project/tree/main)
82
+
83
+ ## Team Members
84
+ - Brian Tham
85
+ - Hong Ziyang
86
+ - Javier Si Zhao Hong
87
+ - Timothy Zoe Delaya
88
+
89
+ ## Course Information
90
+ AAI3001 Deep Learning and Computer Vision, Trimester 1, 2024
91
+ Singapore Institute of Technology
92
+
93
+ ## Future Work
94
+ - Expand the dataset to include more food categories.
95
+ - Implement portion size estimation.
96
+ - Compare uploaded food images with dietary recommendations.