File size: 3,835 Bytes
dd085d7
52b0c09
 
 
 
dd085d7
531469c
dd085d7
 
52b0c09
dd085d7
 
52b0c09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
title: BarkScan - Pet Food Safety Analyzer
emoji: 🐾
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.9.1
app_file: app.py
pinned: false
license: mit
---

# 🐾 BarkScan - Pet Food Safety Analyzer

**Scan pet food barcodes to check ingredient safety instantly!**

BarkScan is an AI-powered pet food ingredient analyzer that helps pet owners make informed decisions about their pets' nutrition and safety.

## Features

- πŸ“± **Mobile-Friendly**: Works on any device with camera support
- πŸ” **Barcode Scanner**: Automatic barcode detection from images
- ⚠️ **Harmful Substance Detection**: Identifies 10+ dangerous ingredients
- 🎯 **Safety Grading**: A+ to F rating system (0-100 score)
- 🌐 **Multilingual**: Supports English and Korean products
- πŸ“Š **Nutritional Analysis**: Protein, fat, fiber breakdown

## How to Use

1. **Upload a photo** of the pet food barcode or **use your camera** (mobile devices automatically use rear camera)
2. Click **"Scan & Analyze"**
3. View the **safety grade**, **harmful substances**, and **nutritional information**

## Sample Test Barcodes

Try these barcodes to see how BarkScan works:

- **8801234567890** - Royal Canin Mini Adult (Grade A - High quality)
- **8801234567898** - Budget Dog Food (Grade D - ⚠️ Contains BHA & Ethoxyquin)
- **8801234567899** - Orijen Original Dog (Grade A+ - Premium quality)

## Detected Harmful Substances

BarkScan identifies:

- **BHA/BHT** (Preservatives - Potential carcinogens)
- **Ethoxyquin** (Pesticide - Banned in human food)
- **Propylene Glycol** (May cause anemia in cats)
- **Artificial Colors** (Allergic reaction risk)
- **Meat By-Products** (Low-quality protein)
- **Carrageenan** (Digestive inflammation)
- And more...

## Safety Grading System

| Grade | Score | Description |
|-------|-------|-------------|
| A+ | 90-100 | Excellent - Premium quality ingredients |
| A | 80-89 | Very Good - High quality with minor concerns |
| B | 70-79 | Good - Acceptable quality |
| C | 60-69 | Fair - Some concerns |
| D | 50-59 | Poor - Multiple harmful substances |
| F | 0-49 | Very Poor - Avoid |

## Technology Stack

- **Frontend**: Gradio 4.44.0 (2025 latest)
- **Computer Vision**: OpenCV + ZBar/Pyzbar
- **Barcode Detection**: Pyzbar
- **Data Source**: Open Pet Food Facts, Korea Food Safety Database

## Data Sources

- [Open Pet Food Facts](https://world.openpetfoodfacts.org/) - 13,000+ international products
- Korea Food Safety Database (μ‹ν’ˆμ•ˆμ „λ‚˜λΌ) - Korean market products
- Veterinary research on harmful pet food ingredients

## Local Development

```bash
# Clone the repository
git clone https://huggingface.co/spaces/YOUR_USERNAME/barkscan
cd barkscan

# Install dependencies
pip install -r requirements.txt

# Run the app
python app.py
```

## Project Structure

```
huggingface/
β”œβ”€β”€ app.py              # Main Gradio application
β”œβ”€β”€ requirements.txt    # Python dependencies
└── README.md          # This file
```

## Roadmap

- [ ] Real-time API integration with backend database
- [ ] OCR for ingredient list scanning
- [ ] AI-powered personalized recommendations
- [ ] Price comparison with online stores
- [ ] Community reviews and ratings
- [ ] Vet consultation integration

## Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

## License

MIT License - see LICENSE file for details

## Disclaimer

BarkScan is designed to help pet owners make informed decisions, but it should not replace professional veterinary advice. Always consult with your veterinarian about your pet's diet and health.

## Contact

- **Project**: [BarkScan GitHub](https://github.com/YOUR_USERNAME/BarkScan)
- **Dataset**: [Open Pet Food Facts](https://world.openpetfoodfacts.org/)

---

**Made with ❀️ for pet safety**

*Version 1.0 (2025)*