Skip to content

W/System ( 6588): A resource failed to call close. #82

Open
@mamun01714

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..

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdetectObject Detection issues, PR's

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions