145 lines
3.6 KiB
Markdown
145 lines
3.6 KiB
Markdown
# 📁 Project Structure
|
|
|
|
## Clean Organization
|
|
|
|
```
|
|
Driver_DSMS_ADAS/
|
|
│
|
|
├── 📂 src/ # Source code
|
|
│ ├── poc_demo.py # ⭐ Main POC application (World-Class Demo)
|
|
│ └── check_dependencies.py # Dependency checker
|
|
│
|
|
├── 📂 config/ # Configuration files
|
|
│ └── poc_config.yaml # POC configuration
|
|
│
|
|
├── 📂 models/ # ML Models
|
|
│ ├── yolov8n.pt # YOLO PyTorch model
|
|
│ └── yolov8n.onnx # YOLO ONNX model (optimized)
|
|
│
|
|
├── 📂 logs/ # Application logs
|
|
│ ├── poc_demo.log # POC demo logs
|
|
│ └── predictions.log # Prediction logs
|
|
│
|
|
├── 📂 docs/ # Documentation
|
|
│ ├── ASSESSMENT_REPORT.md # Comprehensive assessment
|
|
│ ├── BUG_FIX_SUMMARY.md # Bug fixes documentation
|
|
│ ├── QUICK_START.md # Quick start guide
|
|
│ ├── RASPBERRY_PI_GUIDE.md # Raspberry Pi deployment
|
|
│ └── README.md # Original README
|
|
│
|
|
├── 📂 assets/ # Media assets (images, videos)
|
|
│
|
|
├── 📂 venv/ # Virtual environment (gitignored)
|
|
│
|
|
├── 📄 requirements.txt # Python dependencies
|
|
├── 📄 run_poc.sh # Quick start script
|
|
├── 📄 POC_README.md # POC documentation
|
|
├── 📄 PROJECT_STRUCTURE.md # This file
|
|
│
|
|
├── 📄 track_drive.py # Original full version (legacy)
|
|
└── 📄 track_drive copy.py # Backup copy
|
|
```
|
|
|
|
## File Purposes
|
|
|
|
### 🎯 POC Demo (`src/poc_demo.py`)
|
|
**Purpose**: World-class, production-ready demo with only reliable features
|
|
|
|
**Features**:
|
|
- Drowsiness (PERCLOS)
|
|
- Distraction (Head Pose)
|
|
- Driver Absent
|
|
- Phone/Vehicle/Pedestrian Detection
|
|
|
|
**Optimized for**: Raspberry Pi, low-spec CPUs
|
|
|
|
### ⚙️ Configuration (`config/poc_config.yaml`)
|
|
**Purpose**: Centralized configuration for POC
|
|
|
|
**Contains**:
|
|
- Model paths
|
|
- Thresholds
|
|
- Performance settings
|
|
- Feature toggles
|
|
|
|
### 📊 Models (`models/`)
|
|
**Purpose**: Store ML models
|
|
|
|
**Files**:
|
|
- `yolov8n.pt` - PyTorch model (auto-downloaded)
|
|
- `yolov8n.onnx` - ONNX optimized model (auto-exported)
|
|
|
|
### 📝 Logs (`logs/`)
|
|
**Purpose**: Application logging
|
|
|
|
**Files**:
|
|
- `poc_demo.log` - POC application logs
|
|
- `predictions.log` - Prediction history
|
|
|
|
### 📚 Documentation (`docs/`)
|
|
**Purpose**: All project documentation
|
|
|
|
**Files**:
|
|
- Assessment reports
|
|
- Guides
|
|
- README files
|
|
|
|
## Quick Navigation
|
|
|
|
### To Run POC:
|
|
```bash
|
|
./run_poc.sh
|
|
# or
|
|
streamlit run src/poc_demo.py
|
|
```
|
|
|
|
### To Configure:
|
|
Edit `config/poc_config.yaml`
|
|
|
|
### To Check Logs:
|
|
```bash
|
|
tail -f logs/poc_demo.log
|
|
```
|
|
|
|
### To View Documentation:
|
|
- POC: `POC_README.md`
|
|
- Full Guide: `docs/README.md`
|
|
- Raspberry Pi: `docs/RASPBERRY_PI_GUIDE.md`
|
|
|
|
## Best Practices
|
|
|
|
1. **Keep `src/` clean** - Only production code
|
|
2. **Config in `config/`** - Never hardcode settings
|
|
3. **Models in `models/`** - Centralized model storage
|
|
4. **Logs in `logs/`** - All logging centralized
|
|
5. **Docs in `docs/`** - All documentation organized
|
|
|
|
## Git Ignore Recommendations
|
|
|
|
Add to `.gitignore`:
|
|
```
|
|
venv/
|
|
__pycache__/
|
|
*.pyc
|
|
*.log
|
|
models/*.pt
|
|
models/*.onnx
|
|
*.pt
|
|
*.onnx
|
|
.DS_Store
|
|
```
|
|
|
|
## Migration from Old Structure
|
|
|
|
Old files are preserved:
|
|
- `track_drive.py` - Original full version
|
|
- `track_drive copy.py` - Backup
|
|
|
|
New structure is in:
|
|
- `src/poc_demo.py` - Streamlined POC
|
|
|
|
---
|
|
|
|
**Clean. Organized. Professional.** 🚀
|
|
|