Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mamun01714 opened this issue Dec 18, 2024 · 3 comments
Open

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

mamun01714 opened this issue Dec 18, 2024 · 3 comments
Labels
bug Something isn't working detect Object Detection issues, PR's

Comments

@mamun01714
Copy link

mamun01714 commented Dec 18, 2024

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

@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working detect Object Detection issues, PR's labels Dec 18, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @mamun01714, thank you for submitting a yolo-flutter-app 🚀 issue! This is an automated response to help address your concern as efficiently as possible. An Ultralytics engineer will also assist you soon 😊.

To better understand and resolve the issue you're encountering, could you please provide more details? Specifically:

  1. A minimum reproducible example (MRE): This will help us reproduce the error on our side. See the MRE guide for tips on creating one.
  2. Your environment details:
    • OS and version
    • Flutter version
    • Relevant package/plugin versions
  3. A detailed explanation of:
    • What you expected to happen vs. what actually occurred
    • Error messages or logs beyond the "A resource failed to call close" message, if available
  4. Confirmation that the issue has not already been addressed in the documentation or by searching through existing issues in this repository.

The information you've already shared is helpful, but the additional context above will ensure we can pinpoint and resolve the issue accurately.

Thank you for your contribution to improving our repository! 🌟 If you have more details to add, feel free to comment below.

@mamun01714
Copy link
Author

Window 11 V23H2
Flutter 3.27.0
ultralytics_yolo: ^0.0.3

I've checked yolo other version also.. My best_float32.tflite model from Yolov8

@pderrenger
Copy link
Member

@mamun01714 the error suggests a potential resource management issue, possibly related to file or model handling. Ensure you're closing file streams or explicitly disposing of unused resources. Also, confirm you're using the latest version of ultralytics_yolo and that your .tflite model is compatible with TensorFlow Lite. If the issue persists, please consider testing with a simpler setup or a different model format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working detect Object Detection issues, PR's
Projects
None yet
Development

No branches or pull requests

3 participants