AI-powered veterinary care for Uganda pet owners
# πΎ PetCheck β AI-Powered Veterinary Web App
**UICT Group 46 | Final Year Project | Diploma in Computer Science**
---
## Project Structure
```
petcheck/
βββ app.py β Main Flask application
βββ schema.sql β MySQL database setup
βββ requirements.txt β Python dependencies
βββ .env β Environment variables (edit this!)
βββ model/
β βββ predict.py β AI prediction logic
β βββ train.py β Model training script
β βββ petcheck_model.pth β Trained model (generated after training)
βββ templates/
β βββ base.html β Base layout
β βββ index.html β Home page
β βββ upload.html β Upload & diagnose page
β βββ results.html β Diagnosis results page
β βββ vets.html β Vet finder page
βββ static/
β βββ css/style.css β All styles
β βββ js/main.js β Frontend JavaScript
βββ uploads/ β Uploaded pet images (auto-created)
```
---
## βοΈ Setup Instructions
### Step 1 β Create & activate virtual environment
```bash
python -m venv venv
venv\Scripts\Activate.ps1 # Windows PowerShell
# OR
source venv/bin/activate # Mac/Linux
```
### Step 2 β Install dependencies
```bash
pip install -r requirements.txt
```
### Step 3 β Set up MySQL database
1. Open MySQL Workbench or phpMyAdmin
2. Run the contents of `schema.sql`
3. Edit `.env` with your MySQL password
### Step 4 β Run the app
```bash
python app.py
```
Open your browser at: **
http://127.0.0.1:5000**
---
## π€ Training the AI Model
### Step 1 β Collect images
Create this folder structure and add pet images:
```
dataset/
train/
Healthy/ β at least 50 images per class
Skin Infection/
Eye Infection/
Ear Infection/
Ringworm/
Wounds/
Obesity/
Dental Disease/
val/
Healthy/ β about 20% of your total images
Skin Infection/
...
```
### Step 2 β Train the model
```bash
python model/train.py
```
This will train for 20 epochs and save the best mod β¦