ninja990621 commited on
Commit
d7df189
·
verified ·
1 Parent(s): a12c568

scorevision: push artifact

Browse files
Files changed (1) hide show
  1. README.md +15 -25
README.md CHANGED
@@ -1,5 +1,6 @@
1
  ---
2
  license: agpl-3.0
 
3
  tags:
4
  - object-detection
5
  - onnx
@@ -8,7 +9,7 @@ tags:
8
  - scorevision
9
  ---
10
 
11
- # Room-dirtiness detector v3 (Score / SN44)
12
 
13
  Detector for the Score element `manako/Detect-room-dirtiness-detection`.
14
 
@@ -20,36 +21,25 @@ Detector for the Score element `manako/Detect-room-dirtiness-detection`.
20
  | 3 | mould |
21
  | 4 | stain |
22
 
 
 
 
 
23
  ## How it runs
24
- - `model.onnx` is a YOLO11n detector with a 640x640 input and a box-only head.
25
- - `miner.py` letterbox-resizes the frame and runs onnxruntime on CPU with 2 threads. Everything is plain numpy/OpenCV, so the chute and Score's CPU compliance run give the same boxes.
26
- - Score thresholds are 0.25 for every class except stain, which uses 0.35. Boxes then go through per-class NMS.
27
- - **One box per object.** A box is dropped when it lies at least 70% inside a bigger box of the same class whose score is at least 0.9 times its own. Score's labeller gives each object a single box, so such a box is usually one piece of a larger object, for example one item of a litter pile.
28
 
29
- ## How it was made
30
- The weights are a weight-space ensemble (WiSE-FT) of two public models that share the same starting point:
31
 
32
- | weight | model | license |
33
- |---|---|---|
34
- | 0.25 | [manako/Detect-room-dirtiness-detection](https://huggingface.co/manako/Detect-room-dirtiness-detection), the Manako baseline (YOLO11n-seg) | AGPL-3.0 |
35
- | 0.75 | [Targaryen101/dirtiness_01](https://huggingface.co/Targaryen101/dirtiness_01), a full fine-tune of that baseline | AGPL-3.0 |
36
 
37
- - **Rebuilding and blending.** Both ONNX files were rebuilt as PyTorch checkpoints that reproduce them exactly. Every Conv+BN pair was then blended in its fused (folded) form, as θ = θ_baseline + 0.75 · (θ_finetune − θ_baseline).
38
- - **Spill row.** In the final classification conv, the row for liquid spillage is taken 50/50 from the baseline and the blend.
 
39
 
40
  ## Results
41
- Scores below use Score's own per-image scorer. The public test images are scored against answer keys rebuilt from Score's published per-miner verdicts.
42
-
43
- | | 14 well-pinned public tests | all 31 public tests | 962 of our own generated images (SAM3 labels) |
44
- |---|---|---|---|
45
- | baseline, run the way public copies run it | 0.533 | 0.460 | 0.324 |
46
- | v2 (blend, plain 0.25 threshold) | 0.551 | 0.502 | 0.368 |
47
- | **v3 (this release)** | **0.567** | **0.515** | **0.373** |
48
 
49
- - **The one-box-per-object rule** was also checked on the 962 generated images, which had no part in tuning it. It improved 103 images and worsened 14.
50
- - **No Score test images were used for training.** The public test images were used only to choose the blend ratio and the two thresholds, and to check the result.
51
 
52
- Thanks to Manako for the baseline and to Targaryen101 for publishing their fine-tune.
53
 
54
- ## License
55
- AGPL-3.0. Both source ONNX files carry Ultralytics' AGPL-3.0 notice in their metadata, and this derived model keeps it.
 
1
  ---
2
  license: agpl-3.0
3
+ base_model: crimedetector/room-dirtinessR
4
  tags:
5
  - object-detection
6
  - onnx
 
9
  - scorevision
10
  ---
11
 
12
+ # Room-dirtiness detector, YOLO11n at 640 px (Score / SN44)
13
 
14
  Detector for the Score element `manako/Detect-room-dirtiness-detection`.
15
 
 
21
  | 3 | mould |
22
  | 4 | stain |
23
 
24
+ ## Base model
25
+
26
+ This model is a fine-tune of [crimedetector/room-dirtinessR](https://huggingface.co/crimedetector/room-dirtinessR) (revision `cb11ab1bb19d3b3f51a70f0567bc19c92f27fd89`), a public Ultralytics YOLO11n detector for the same element. Credit for the base weights goes to its author.
27
+
28
  ## How it runs
 
 
 
 
29
 
30
+ - `model.onnx` is a YOLO11n detector with a 640x640 input. For each of 8,400 anchors it gives one box (centre, width and height) and 5 class scores. There is no NMS inside the graph.
31
+ - `miner.py` letterbox-resizes the frame to 640x640 (centred, grey 114 border) and runs onnxruntime on CPU with 2 threads. Per anchor it keeps the best class, keeps scores of at least 0.25, maps the boxes back to picture pixels, clips them, runs class-wise NMS at IoU 0.5 and returns at most 100 boxes.
32
 
33
+ ## Training
 
 
 
34
 
35
+ - The base model's exported weights (convolution and batch-norm folded together) were rebuilt into a trainable Ultralytics YOLO11n. The rebuilt network reproduces the base model's raw outputs (largest score difference 4e-6 on test pictures).
36
+ - It was fine-tuned for 20 epochs with SGD (lr0 0.002, cosine schedule, batch 32, 640 px, Ultralytics' default augmentation with mosaic). All batch-norm layers stayed frozen.
37
+ - Training data: Score's public test pictures for this element. The 20 most recent tests up to block 9432300 were used, each 20 times, when their reconstructed answer key reproduces reference miners' published scores (13 tests). 132 older test pictures were used twice each. The labels are those reconstructed answer keys.
38
 
39
  ## Results
 
 
 
 
 
 
 
40
 
41
+ No result on tests after training exists yet. Score's own records will show how it does on new tests.
 
42
 
43
+ ## Licence
44
 
45
+ The base model's ONNX file carries Ultralytics' AGPL-3.0 licence notice. This model, a derivative of it, and the `miner.py` in this repository are released under the GNU Affero General Public License v3.0 (AGPL-3.0): https://www.gnu.org/licenses/agpl-3.0.html