correction suppression modele yolo

This commit is contained in:
streaper2
2026-04-29 10:12:29 +02:00
parent fba3b41f2f
commit 105eb1cab0
9 changed files with 4 additions and 397 deletions

View File

@@ -363,47 +363,6 @@ class AnalysisProvider extends ChangeNotifier {
return detectedImpacts.length;
}
/// Auto-detect impacts using YOLOv8 model
Future<int> autoDetectImpactsWithYOLO({bool clearExisting = false}) async {
if (_imagePath == null || _targetType == null) return 0;
try {
final detectedImpacts = await _detectionService.detectImpactsWithYOLO(
_imagePath!,
_targetType!,
_targetCenterX,
_targetCenterY,
_targetRadius,
_ringCount,
);
if (clearExisting) {
_shots.clear();
}
// Add detected impacts as shots
for (final impact in detectedImpacts) {
final shot = Shot(
id: _uuid.v4(),
x: impact.x,
y: impact.y,
score: impact.suggestedScore,
sessionId: '',
);
_shots.add(shot);
}
_recalculateScores();
_recalculateGrouping();
notifyListeners();
return detectedImpacts.length;
} catch (e) {
print('Error in YOLO auto-detection: $e');
return 0;
}
}
/// Detect impacts with OpenCV using reference points
Future<int> detectFromReferencesWithOpenCV({
double tolerance = 2.0,