Instructions to use fiacecson20/cctv-ai-ppe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use fiacecson20/cctv-ai-ppe with ultralytics:
from ultralytics import YOLOvv8 model = YOLOvv8.from_pretrained("fiacecson20/cctv-ai-ppe") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
cctv-ai · ppe · YOLOv8n round-1
YOLOv8n trained on CPU for the CCTV-AI
project. Round-1 baseline — see docs/TRAINING_REPORT.md
in the upstream repo for full eval details.
Files
| File | Purpose |
|---|---|
best.onnx |
ONNX export (opset 12), drop-in for onnxruntime / OpenVINO / TensorRT. |
args.yaml |
Full training arguments (reproducibility). |
results.csv |
Per-epoch metrics. |
confusion_matrix.png |
Validation confusion matrix. |
BoxPR_curve.png |
Precision-recall curve (per class). |
BoxF1_curve.png |
F1 curve (per class). |
results.png |
Training curves (loss + metrics across epochs). |
val_batch0_pred.jpg / val_batch0_labels.jpg |
Sample predictions vs. ground truth. |
The .pt weights live inside the upstream repo at
weights/ppe-yolov8n-v0.pt
via Git LFS — .onnx lives here because it exceeds the 10 MB LFS threshold
we picked for in-repo storage.
Eval (val split)
- Classes:
helmet, head, vest - Overall val mAP@0.5: 0.876
- Inference: ~44 ms / frame on 2-core AMD EPYC CPU (≈22 FPS)
| class | precision | recall | mAP@0.5 |
|---|---|---|---|
| helmet | 0.939 | 0.806 | 0.905 |
| head | 0.860 | 0.785 | 0.847 |
| vest | 0.000 | 0.000 | 0.000 |
Training config
- Model:
yolov8n.pt(Ultralytics) imgsz=320,batch=8,epochs=12,patience=4,cos_lr=true- Optimizer: AdamW (auto)
- Hardware: 2-core CPU, no GPU;
OMP_NUM_THREADS=2 - Seed: 0
- See
args.yamlfor full args.
Dataset
CC-BY 4.0 dataset, downloaded at training time via
scripts/download_dataset.py.
Source images are NOT redistributed here.
Usage
import onnxruntime as ort
sess = ort.InferenceSession("best.onnx", providers=["CPUExecutionProvider"])
# input: (1, 3, 320, 320) float32 RGB, normalised to [0,1]
# output: (1, N, 84) or YOLOv8 detection head — see Ultralytics docs.
Or via Ultralytics:
from ultralytics import YOLO
model = YOLO("best.onnx")
results = model("image.jpg", imgsz=320)
Caveat (round-1, fixed in round-2)
Vest class had 0 instances in the alphabetical 1200-image subset (all ds1_* files are helmet/head only). Round-2 will use class-balanced sampling.
License
MIT for these weights. Source dataset CC-BY 4.0 (see upstream TRAINING_REPORT.md
for attribution). Ultralytics base model is AGPL-3.0 — using these weights in a
hosted service may require AGPL compliance; see Ultralytics License.
- Downloads last month
- -
Model tree for fiacecson20/cctv-ai-ppe
Base model
Ultralytics/YOLOv8