Upload STRATEGY_REVISION_COMPLETE.md with huggingface_hub
Browse files
STRATEGY_REVISION_COMPLETE.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Strategy Revision Complete
|
| 2 |
+
|
| 3 |
+
## Summary
|
| 4 |
+
|
| 5 |
+
Based on the comprehensive analysis identifying the **Sim2Real domain gap** as the root cause (not just scale/resolution), the strategy has been revised to address:
|
| 6 |
+
|
| 7 |
+
1. **0% SAHI Recall**: Feature mismatch between clean synthetic data and noisy real video
|
| 8 |
+
2. **Motion Blur Physics**: Balls at 100km/h appear as streaks, not spheres
|
| 9 |
+
3. **Underutilized Hardware**: RTX 5090 capabilities not fully leveraged
|
| 10 |
+
4. **Inference Thresholds**: Too high (0.5) for small objects (avg confidence ~0.140)
|
| 11 |
+
|
| 12 |
+
## Files Created
|
| 13 |
+
|
| 14 |
+
### Strategy Documents
|
| 15 |
+
1. **`SMALL_OBJECT_OPTIMIZATION_STRATEGY_REVISED.md`** - Complete revised strategy with physics-aware approach
|
| 16 |
+
2. **`STRATEGY_UPDATE_SUMMARY.md`** - Quick comparison of original vs revised
|
| 17 |
+
3. **`IMPLEMENTATION_GUIDE.md`** - Step-by-step implementation instructions
|
| 18 |
+
|
| 19 |
+
### Configuration Files
|
| 20 |
+
1. **`configs/resume_with_domain_adaptation.yaml`** - Phase 1: Domain adaptation augmentations
|
| 21 |
+
2. **`configs/resume_with_highres_gradaccum.yaml`** - Phase 1.5: High-res with gradient accumulation
|
| 22 |
+
|
| 23 |
+
## Key Changes from Original Strategy
|
| 24 |
+
|
| 25 |
+
| Aspect | Original | Revised |
|
| 26 |
+
|--------|----------|---------|
|
| 27 |
+
| **Phase 1** | Continue current training | **Domain adaptation immediately** |
|
| 28 |
+
| **Resolution** | Phase 3 (High Risk) | **Phase 1.5 (Low Risk with grad accum)** |
|
| 29 |
+
| **Multi-scale** | Phase 2 (Highest Priority) | Phase 3 (After domain adapt) |
|
| 30 |
+
| **Inference** | Not addressed | **Phase 2 (Critical - fixes 0% SAHI)** |
|
| 31 |
+
| **Root Cause** | Scale/resolution | **Sim2Real domain gap** |
|
| 32 |
+
|
| 33 |
+
## Immediate Actions Required
|
| 34 |
+
|
| 35 |
+
### 1. Fix Inference Thresholds (5 minutes)
|
| 36 |
+
**File**: `src/perception/local_detector.py`
|
| 37 |
+
**Change**: `confidence_threshold: 0.5` → `0.05`
|
| 38 |
+
|
| 39 |
+
### 2. Verify RF-DETR Augmentation Support
|
| 40 |
+
**Action**: Check if RF-DETR's `train()` function accepts augmentation parameters
|
| 41 |
+
- If yes: Configs are ready to use
|
| 42 |
+
- If no: Need to preprocess dataset or modify data loader
|
| 43 |
+
|
| 44 |
+
### 3. After Epoch 40: Start Phase 1
|
| 45 |
+
**Config**: `configs/resume_with_domain_adaptation.yaml`
|
| 46 |
+
**Expected**: 0.598 → 0.63-0.65
|
| 47 |
+
|
| 48 |
+
### 4. After Epoch 45: Start Phase 1.5
|
| 49 |
+
**Config**: `configs/resume_with_highres_gradaccum.yaml`
|
| 50 |
+
**Expected**: 0.63 → 0.65-0.66
|
| 51 |
+
|
| 52 |
+
## Expected Results
|
| 53 |
+
|
| 54 |
+
**Original Strategy**: 0.598 → 0.67-0.69 (over 20 epochs)
|
| 55 |
+
**Revised Strategy**: 0.598 → 0.67-0.70 (over 20 epochs, but addresses root cause)
|
| 56 |
+
|
| 57 |
+
**Key Difference**: Revised strategy fixes **0% SAHI recall** and addresses the physics of high-velocity ball detection.
|
| 58 |
+
|
| 59 |
+
## Next Steps
|
| 60 |
+
|
| 61 |
+
1. ✅ Review revised strategy documents
|
| 62 |
+
2. ⏳ Fix inference confidence thresholds
|
| 63 |
+
3. ⏳ Verify RF-DETR augmentation handling
|
| 64 |
+
4. ⏳ After epoch 40: Start Phase 1 training
|
| 65 |
+
5. ⏳ Monitor progress and adjust as needed
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
**Status**: Strategy revision complete. Ready for implementation after epoch 40.
|