Chris Leo commited on
scorevision: push artifact
Browse files- detect_crime_ops/README.md +77 -0
detect_crime_ops/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Detect Crime Ops Toolkit
|
| 2 |
+
|
| 3 |
+
Personal operations toolkit for improving your own `Detect-crime` miner.
|
| 4 |
+
|
| 5 |
+
This folder implements the 8 focus areas:
|
| 6 |
+
|
| 7 |
+
1. Live challenge intelligence
|
| 8 |
+
2. Per-class score attribution
|
| 9 |
+
3. Runtime/latency telemetry
|
| 10 |
+
4. Gold personal eval set
|
| 11 |
+
5. A/B inference harness
|
| 12 |
+
6. Data provenance + quality tracking
|
| 13 |
+
7. Confidence calibration table
|
| 14 |
+
8. Deploy journal
|
| 15 |
+
|
| 16 |
+
## Folder layout
|
| 17 |
+
|
| 18 |
+
- `templates/challenge_log.csv` - one row per challenge (you + king + score + failure tags)
|
| 19 |
+
- `templates/deploy_journal.md` - deployment decision log
|
| 20 |
+
- `config/confidence_thresholds.yaml` - class thresholds to tune weekly
|
| 21 |
+
- `config/failure_tags.yaml` - canonical failure taxonomy
|
| 22 |
+
- `gold_eval/manifest.csv` - fixed personal eval set manifest
|
| 23 |
+
- `gold_eval/images.txt` - image list consumed by A/B script
|
| 24 |
+
- `scripts/log_challenge.py` - append normalized challenge rows
|
| 25 |
+
- `scripts/summarize_challenges.py` - aggregate trends and regressions
|
| 26 |
+
- `scripts/ab_compare.py` - compare two ONNX models on same image list
|
| 27 |
+
|
| 28 |
+
## Quick start
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
cd /root/turbovision_crime/scratch/crime_miner/detect_crime_ops
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
### 1) Log challenge outcomes (items 1,2,3,6)
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
python3 scripts/log_challenge.py \
|
| 38 |
+
--csv templates/challenge_log.csv \
|
| 39 |
+
--challenge-id "2026-05-06T06:00Z_abcd" \
|
| 40 |
+
--scene "night_outdoor" \
|
| 41 |
+
--my-model-id "crime_a_from_best_ep29" \
|
| 42 |
+
--my-score 0.58 \
|
| 43 |
+
--king-model-id "alfred8995/crime001" \
|
| 44 |
+
--king-score 0.56 \
|
| 45 |
+
--my-preds 8 \
|
| 46 |
+
--king-preds 6 \
|
| 47 |
+
--p50-ms 95 --p95-ms 142 --p99-ms 181 \
|
| 48 |
+
--tags missed_balaclava_small,hoodie_fp_dark \
|
| 49 |
+
--data-sources "manako_distilled,roboflow_balaclava" \
|
| 50 |
+
--notes "dim frame, glove missed near bat"
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
### 2) Weekly summary (items 1,2,3,6)
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
python3 scripts/summarize_challenges.py --csv templates/challenge_log.csv
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
### 3) A/B check before deploy (item 5)
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
python3 scripts/ab_compare.py \
|
| 63 |
+
--a /root/turbovision_crime/scratch/crime_miner/weights.onnx \
|
| 64 |
+
--b /root/turbovision_crime/king_models/alfred8995_crime001/weights.onnx \
|
| 65 |
+
--images-file gold_eval/images.txt \
|
| 66 |
+
--imgsz 1280 --device 0
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
### 4) Gold set maintenance (item 4)
|
| 70 |
+
|
| 71 |
+
- Add hard/rare examples to `gold_eval/manifest.csv`
|
| 72 |
+
- Keep labels manually verified
|
| 73 |
+
|
| 74 |
+
### 5) Confidence tune + deploy journal (items 7,8)
|
| 75 |
+
|
| 76 |
+
- Update `config/confidence_thresholds.yaml`
|
| 77 |
+
- Record each deploy in `templates/deploy_journal.md`
|