This commit is contained in:
Jan Pleterski
2026-11-13 09:15:17 +01:00
parent d3927aac8a
commit d4bc01f202
21 changed files with 294 additions and 1148 deletions
-7
View File
@@ -43,9 +43,6 @@ class YOLODetector {
final inputShape = inputTensor.shape;
inputHeight = inputShape[1];
inputWidth = inputShape[2];
print("📐 Model input shape: $inputShape");
print("📦 Model input type: ${inputTensor.type}");
}
Future<List<DetectionResult>> detect(File imageFile) async {
@@ -66,8 +63,6 @@ class YOLODetector {
final numDetections = outputShape[1];
final outputBuffer = List.generate(1, (_) =>
List.generate(numDetections, (_) => List.filled(6, 0.0)));
print("🚀 Running inference...");
_interpreter.run(inputBuffer, outputBuffer);
final rawDetections = outputBuffer[0];
@@ -102,8 +97,6 @@ class YOLODetector {
classId,
));
}
print("🎯 Detections found: ${results.length}");
return results;
}