Upload GOAL_TRACKING.md with huggingface_hub
Browse files- GOAL_TRACKING.md +94 -0
GOAL_TRACKING.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Performance Goals and Tracking
|
| 2 |
+
|
| 3 |
+
This document describes the performance goals for the soccer object detection model and how they are tracked in MLflow.
|
| 4 |
+
|
| 5 |
+
## Performance Goals
|
| 6 |
+
|
| 7 |
+
### Player Detection Goals
|
| 8 |
+
- **Player Detection Recall**: > 95% (IoU ≥ 0.5) - Must detect players even in clusters
|
| 9 |
+
- **Player Detection Precision**: > 80% (IoU ≥ 0.5) - Balance with recall to reduce false positives
|
| 10 |
+
- **Player Detection mAP@0.5**: > 85% - Mean Average Precision at IoU 0.5
|
| 11 |
+
- **Player Detection mAP@0.75**: > 70% - Stricter localization quality
|
| 12 |
+
|
| 13 |
+
### Ball Detection Goals
|
| 14 |
+
- **Ball Detection Recall**: ~80% (IoU ≥ 0.5) - Allowing for motion blur/occlusion (to be fixed by interpolation later)
|
| 15 |
+
- **Ball Detection Precision**: > 70% (IoU ≥ 0.5) - Reduce false positives
|
| 16 |
+
- **Ball Detection mAP@0.5**: > 70% - Mean Average Precision at IoU 0.5
|
| 17 |
+
- **Ball Detection Count**: > 0 predictions per validation image with balls - Diagnostic metric
|
| 18 |
+
|
| 19 |
+
## MLflow Tracking
|
| 20 |
+
|
| 21 |
+
### Goal Parameters
|
| 22 |
+
Goals are logged as parameters at the start of each training run:
|
| 23 |
+
- `goal_player_recall_05`: 0.95
|
| 24 |
+
- `goal_player_precision_05`: 0.80
|
| 25 |
+
- `goal_player_map_05`: 0.85
|
| 26 |
+
- `goal_player_map_75`: 0.70
|
| 27 |
+
- `goal_ball_recall_05`: 0.80
|
| 28 |
+
- `goal_ball_precision_05`: 0.70
|
| 29 |
+
- `goal_ball_map_05`: 0.70
|
| 30 |
+
- `goal_ball_avg_predictions_per_image`: 1.0
|
| 31 |
+
|
| 32 |
+
### Goal Achievement Metrics
|
| 33 |
+
Logged every validation epoch (every 10 epochs):
|
| 34 |
+
- `goal_player_recall_05_achieved`: 1.0 if achieved, 0.0 if not
|
| 35 |
+
- `goal_player_precision_05_achieved`: 1.0 if achieved, 0.0 if not
|
| 36 |
+
- `goal_player_map_05_achieved`: 1.0 if achieved, 0.0 if not
|
| 37 |
+
- `goal_player_map_75_achieved`: 1.0 if achieved, 0.0 if not
|
| 38 |
+
- `goal_ball_recall_05_achieved`: 1.0 if achieved, 0.0 if not
|
| 39 |
+
- `goal_ball_precision_05_achieved`: 1.0 if achieved, 0.0 if not
|
| 40 |
+
- `goal_ball_map_05_achieved`: 1.0 if achieved, 0.0 if not
|
| 41 |
+
- `goal_ball_avg_predictions_achieved`: 1.0 if achieved, 0.0 if not
|
| 42 |
+
|
| 43 |
+
### Goal Progress Metrics
|
| 44 |
+
Logged every validation epoch, showing percentage progress toward each goal:
|
| 45 |
+
- `goal_player_recall_05_progress`: 0-100% (capped at 100%)
|
| 46 |
+
- `goal_player_precision_05_progress`: 0-100%
|
| 47 |
+
- `goal_player_map_05_progress`: 0-100%
|
| 48 |
+
- `goal_player_map_75_progress`: 0-100%
|
| 49 |
+
- `goal_ball_recall_05_progress`: 0-100%
|
| 50 |
+
- `goal_ball_precision_05_progress`: 0-100%
|
| 51 |
+
- `goal_ball_map_05_progress`: 0-100%
|
| 52 |
+
- `goal_ball_avg_predictions_progress`: 0-100%
|
| 53 |
+
|
| 54 |
+
## Using Goal Tracking in MLflow
|
| 55 |
+
|
| 56 |
+
### Viewing Goals
|
| 57 |
+
1. Open MLflow UI: `mlflow ui --backend-store-uri file:./mlruns`
|
| 58 |
+
2. Select a run
|
| 59 |
+
3. Go to "Parameters" tab to see goal values
|
| 60 |
+
4. Go to "Metrics" tab to see goal achievement and progress
|
| 61 |
+
|
| 62 |
+
### Filtering by Goal Achievement
|
| 63 |
+
You can filter runs in MLflow UI by goal achievement:
|
| 64 |
+
- Search for runs where `goal_player_recall_05_achieved = 1.0`
|
| 65 |
+
- Compare progress metrics across runs
|
| 66 |
+
- Identify which hyperparameters lead to goal achievement
|
| 67 |
+
|
| 68 |
+
### Monitoring Progress
|
| 69 |
+
- Watch `goal_*_progress` metrics over time to see improvement
|
| 70 |
+
- Goal achievement metrics (0.0 or 1.0) show when goals are met
|
| 71 |
+
- Progress metrics show how close you are to each goal
|
| 72 |
+
|
| 73 |
+
## Metrics Calculated
|
| 74 |
+
|
| 75 |
+
### mAP Calculation
|
| 76 |
+
- **mAP@0.5**: Mean Average Precision at IoU threshold 0.5 (standard)
|
| 77 |
+
- **mAP@0.75**: Mean Average Precision at IoU threshold 0.75 (stricter)
|
| 78 |
+
|
| 79 |
+
### Ball Count Metric
|
| 80 |
+
- **ball_avg_predictions_per_image**: Average number of ball predictions per image that contains balls
|
| 81 |
+
- Helps diagnose if the model is making any ball predictions at all
|
| 82 |
+
- Goal: > 1.0 (at least one prediction per image with balls)
|
| 83 |
+
|
| 84 |
+
## Implementation Details
|
| 85 |
+
|
| 86 |
+
The evaluator now:
|
| 87 |
+
1. Calculates metrics separately at IoU 0.5 and 0.75
|
| 88 |
+
2. Tracks ball predictions per image with balls
|
| 89 |
+
3. Returns all metrics in a single dictionary
|
| 90 |
+
|
| 91 |
+
The trainer:
|
| 92 |
+
1. Logs goals as parameters at run start
|
| 93 |
+
2. Logs goal achievement status (0/1) after each validation
|
| 94 |
+
3. Logs goal progress (percentage) after each validation
|