Open
Description
I have Picked an image, then pass it to yolo model like below:
final model = LocalYoloModel(
id: "yolo",
task: Task.detect,
format: Format.tflite,
modelPath: modelPath,
metadataPath: metadataPath,
);
final objectDetector = ObjectDetector(model: model);
await objectDetector.loadModel();
print('Model loaded successfully');
objectDetector.setConfidenceThreshold(0.4);
objectDetector.setIouThreshold(0.4);
objectDetector.setNumItemsThreshold(2);
if (!File(imgPath).existsSync()) {
print("Error: Image file does not exist at path: $imgPath");
return;
}
print("Image file exists, starting detection...");
final xresult = await objectDetector.detect(imagePath: imgPath);
but showing the error mentioned in title on the last line during detection. I haven't found anything to close..