preparation du modele yolo

This commit is contained in:
2026-03-12 22:03:40 +01:00
parent d4cb179fde
commit e32833e366
13 changed files with 727 additions and 24 deletions

View File

@@ -523,6 +523,20 @@ class AnalysisProvider extends ChangeNotifier {
if (_imagePath == null) return false;
try {
// 1. Attempt to correct perspective/distortion first
final correctedPath = await _distortionService
.correctPerspectiveWithConcentricMesh(_imagePath!);
if (correctedPath != _imagePath) {
_imagePath = correctedPath;
_correctedImagePath = correctedPath;
_distortionCorrectionEnabled = true;
_imageAspectRatio =
1.0; // The corrected image is always square (side x side)
notifyListeners();
}
// 2. Detect the target on the straight/corrected image
final result = await _opencvTargetService.detectTarget(_imagePath!);
if (result.success) {