How davidbriandimapilis/cpecogfinalproj works
This repository is a motorcycle helmet-detection experiment: it converts annotation classes, trains YOLO models, evaluates predictions, and runs frame-by-frame video detection with optional image capture. The README identifies the source dataset but does not describe the application workflow. Source excerpts support the training, evaluation, and capture paths; dataset contents and the referenced run outputs are not present in the tree, so their internal wiring is shown only where explicit.
Main entry points: train_median.py Median preprocessing · testYolo.py Test evaluation · captureanddetect.py Video detection · data.yaml Dataset config
Components 14
Dataset preparation
- Helmet dataset
- Merge classes
merge_classes.py - Dataset config
data.yaml
Model training
- Median preprocessing
train_median.py - Bilateral preprocessing
train_bilateral.py - YOLO training
trainYolo.py - Saved model weights
models
Evaluation
- Test evaluation
testYolo.py - Annotated predictions
Video detection
- Video detection
captureanddetect.py - Captured frames
Other components
- Dataset maintainer
- Ultralytics YOLO
- Video input
Connections 14
- Dataset maintainer → Helmet dataset: provides
- Merge classes → Helmet dataset: rewrites labels
- Median preprocessing → Helmet dataset: reads images
- Median preprocessing → Dataset config: trains with
- Median preprocessing → Ultralytics YOLO: trains model
- YOLO training → Dataset config: trains with
- YOLO training → Ultralytics YOLO: trains model
- Bilateral preprocessing → Ultralytics YOLO: trains model
- Test evaluation → Ultralytics YOLO: validates and predicts
- Test evaluation → Dataset config: evaluates with
- Test evaluation → Annotated predictions: saves results
- Video input → Video detection: provides frames
- Video detection → Ultralytics YOLO: runs inference
- Video detection → Captured frames: saves frames