diff --git a/README.md b/README.md index 28b2232..5728dc2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ python3 test_api.py ``` ds_task_recycling_project/ -├── main.py # Flask API application +├── main.py # Flask API application (main interface) +├── api_docs.py # Swagger UI API documentation (developer only) ├── train.py # YOLOv8 training script ├── inference_utils.py # Detection and visualization utilities ├── prepare_dataset.py # Dataset preparation script @@ -57,24 +58,58 @@ ds_task_recycling_project/ ├── setup.py # Automated setup script ├── requirements.txt # Python dependencies ├── dataset.yaml # YOLO dataset configuration +├── .gitignore # Git ignore file for ML projects +├── VALIDATION_CHECKLIST.md # Project validation checklist ├── templates/ # Frontend templates │ └── index.html # QA testing web interface ├── static/ # Frontend assets │ ├── style.css # Styling for web interface │ └── script.js # JavaScript for web interface +├── venv/ # Virtual environment (created by user) ├── training/ # Dataset directory -│ ├── memory/ # Images with memory modules + labels +│ ├── memory/ # Images with memory modules + YOLO labels +│ │ ├── out1.png # Sample motherboard image with memory +│ │ ├── out1.txt # YOLO format annotation file +│ │ └── ... # 19 more image/label pairs │ ├── no_memory/ # Images without memory modules -│ ├── train/ # Training split (80%) -│ └── val/ # Validation split (20%) +│ │ ├── out21.png # Sample motherboard image without memory +│ │ └── ... # 19 more images (no labels needed) +│ ├── train/ # Training split (80% = 32 images) +│ │ ├── images/ # Training images +│ │ └── labels/ # Training labels +│ └── val/ # Validation split (20% = 8 images) +│ ├── images/ # Validation images +│ └── labels/ # Validation labels +├── uploads/ # Temporary upload directory (created at runtime) └── runs/ # Training outputs (created after training) └── detect/ └── memory_module_detection/ - └── weights/ - ├── best.pt # Best model weights - └── last.pt # Last epoch weights + ├── weights/ + │ ├── best.pt # Best model weights + │ └── last.pt # Last epoch weights + ├── train_batch*.jpg # Training visualization + ├── val_batch*.jpg # Validation visualization + ├── confusion_matrix.png # Model performance metrics + ├── results.png # Training curves + └── args.yaml # Training arguments ``` +### **📁 Key Files Description** + +| File/Directory | Purpose | Usage | +|----------------|---------|-------| +| `main.py` | Main Flask API application | `python3 main.py` | +| `api_docs.py` | Swagger UI documentation (developer only) | `python3 api_docs.py` | +| `train.py` | YOLOv8 model training | `python3 train.py` | +| `inference_utils.py` | Detection utilities and classes | Imported by other scripts | +| `test_api.py` | Comprehensive API testing | `python3 test_api.py` | +| `setup.py` | Automated project setup | `python3 setup.py` | +| `templates/index.html` | Web interface for QA testing | Served by Flask | +| `static/` | CSS, JavaScript, and assets | Served by Flask | +| `training/` | Complete dataset with annotations | Used by training script | +| `runs/` | Model training outputs | Created after training | +| `venv/` | Python virtual environment | Created by user | + ## 🤖 Algorithm Choice & Technical Decisions ### 1. **Algorithm Choice: YOLOv8 Nano** diff --git a/requirements.txt b/requirements.txt index f6f5a3b..d5fd903 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ Pillow==10.0.1 # Web Framework Flask==2.3.3 Flask-CORS==4.0.0 +Flask-RESTX==1.3.0 Werkzeug==2.3.7 # Data Processing