diff --git a/.gitignore b/.gitignore index 7a3a492..bfaaac7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,10 +15,16 @@ wheels/ .idea/ .vscode/ -# Local datasets and training outputs +# Local datasets and generated training outputs data/* -# Model artifacts +# Model artifacts: ignore checkpoints and downloaded base weights; +# trained best.pt under any runs/*/weights/ stays trackable +*.pt +!**/weights/best.pt *.onnx *.engine *.torchscript + +# Logs +*.log \ No newline at end of file diff --git a/docs/model_comparison.md b/docs/model_comparison.md new file mode 100644 index 0000000..d4a961c --- /dev/null +++ b/docs/model_comparison.md @@ -0,0 +1,38 @@ +# Model Training Comparison + +This repository includes the best available smoke and fire detection weights and the evaluation artifacts needed to inspect the completed run. Trained weights are committed as regular files (only `best.pt`, no checkpoints or pretrained base models). + +## Available runs + +| Model | Run | Best epoch | Precision | Recall | mAP50 | mAP50-95 | Best weight | +| --- | --- | ---: | ---: | ---: | ---: | ---: | --- | +| YOLO11s | `smoke_fire_yolo11s_v1-4` | 84 | 0.77349 | 0.72164 | 0.77499 | 0.45688 | `runs/detect/smoke_fire_yolo11s_v1-4/weights/best.pt` | +| YOLO26n | `smoke_fire_yolo26n_v2-3` | Not available | Not available | Not available | Not available | Not available | `runs/detect/smoke_fire_yolo26n_v2-3/weights/best.pt` | + +The YOLO11s row uses epoch 84 from `results.csv`, selected by the highest `metrics/mAP50-95(B)`. Training completed 124 epochs before early stopping. The best observed mAP50 was 0.77720 at epoch 90, while the selected checkpoint maximizes mAP50-95. + +The YOLO26n directory currently contains only `best.pt`; its `args.yaml` and `results.csv` are unavailable. Its detection quality therefore cannot be compared fairly with YOLO11s yet. The weight is included as a deployment-size baseline only. + +## Included evidence + +The YOLO11s run includes: + +- Full epoch metrics in `results.csv` +- Training and validation summary in `results.png` +- Precision, recall, F1, and PR curves +- Raw and normalized confusion matrices +- Validation label and prediction previews +- Effective training parameters in `args.yaml` +- Best-checkpoint metadata in `best_point.json` + +Periodic `epoch*.pt` checkpoints, `last.pt`, training batch previews, runtime server logs, and manual audit preview images are intentionally excluded. They are either reproducible intermediates or unrelated to comparing the best models. + +## Reproducing evaluation + +Run validation against the configured smoke/fire dataset: + +```powershell +uv run fire-yolo val --weights runs/detect/smoke_fire_yolo11s_v1-4/weights/best.pt +``` + +To complete the YOLO26n comparison, rerun validation with its best weight and retain the generated `args.yaml`, `results.csv`, plots, and confusion matrices beside the checkpoint. \ No newline at end of file diff --git a/models/pretrained/yolo11s.pt b/models/pretrained/yolo11s.pt deleted file mode 100644 index d4bcb83..0000000 Binary files a/models/pretrained/yolo11s.pt and /dev/null differ diff --git a/models/pretrained/yolo26s.pt b/models/pretrained/yolo26s.pt deleted file mode 100644 index 44f6ba0..0000000 Binary files a/models/pretrained/yolo26s.pt and /dev/null differ diff --git a/models/pretrained/yolov8n.pt b/models/pretrained/yolov8n.pt deleted file mode 100644 index 0db4ca4..0000000 Binary files a/models/pretrained/yolov8n.pt and /dev/null differ diff --git a/models/pretrained/yolov8s.pt b/models/pretrained/yolov8s.pt deleted file mode 100644 index 90b4a2c..0000000 Binary files a/models/pretrained/yolov8s.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch0.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch0.pt deleted file mode 100644 index 4b9b9b1..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch0.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch10.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch10.pt deleted file mode 100644 index 75a07eb..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch10.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch100.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch100.pt deleted file mode 100644 index 1e004aa..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch100.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch110.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch110.pt deleted file mode 100644 index 498b10a..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch110.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch120.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch120.pt deleted file mode 100644 index d79e906..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch120.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch20.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch20.pt deleted file mode 100644 index 24da9d6..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch20.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch30.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch30.pt deleted file mode 100644 index b802589..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch30.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch40.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch40.pt deleted file mode 100644 index 42d6fd9..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch40.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch50.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch50.pt deleted file mode 100644 index 797a786..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch50.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch60.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch60.pt deleted file mode 100644 index 31c93dc..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch60.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch70.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch70.pt deleted file mode 100644 index 214dda3..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch70.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch80.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch80.pt deleted file mode 100644 index eb3582b..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch80.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch90.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch90.pt deleted file mode 100644 index 5064a64..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/epoch90.pt and /dev/null differ diff --git a/runs/detect/smoke_fire_yolo11s_v1-4/weights/last.pt b/runs/detect/smoke_fire_yolo11s_v1-4/weights/last.pt deleted file mode 100644 index 5612083..0000000 Binary files a/runs/detect/smoke_fire_yolo11s_v1-4/weights/last.pt and /dev/null differ diff --git a/runs/detect/runs/detect/smoke_fire_yolo26n_v2-3/weights/best.pt b/runs/detect/smoke_fire_yolo26n_v2-3/weights/best.pt similarity index 100% rename from runs/detect/runs/detect/smoke_fire_yolo26n_v2-3/weights/best.pt rename to runs/detect/smoke_fire_yolo26n_v2-3/weights/best.pt diff --git a/server.stderr.log b/server.stderr.log deleted file mode 100644 index 9eaaefe..0000000 --- a/server.stderr.log +++ /dev/null @@ -1,4 +0,0 @@ -INFO: Started server process [23096] -INFO: Waiting for application startup. -INFO: Application startup complete. -INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) diff --git a/server.stdout.log b/server.stdout.log deleted file mode 100644 index 0d434a7..0000000 --- a/server.stdout.log +++ /dev/null @@ -1,4 +0,0 @@ -INFO: 127.0.0.1:53092 - "GET /api/health HTTP/1.1" 200 OK -INFO: 127.0.0.1:53092 - "GET /api/robots HTTP/1.1" 200 OK -INFO: 127.0.0.1:53092 - "GET /api/dashboard HTTP/1.1" 200 OK -INFO: 127.0.0.1:53092 - "POST /api/robots/wechat/test HTTP/1.1" 400 Bad Request diff --git a/yolo26n.pt b/yolo26n.pt deleted file mode 100644 index be48188..0000000 Binary files a/yolo26n.pt and /dev/null differ