Open m-naeem66622 opened 1 month ago
Have you tried using String instead of String? here:
String? _imagePath;
I am also facing same issue
this is my code just like you mentioned @pderrenger i tried same
void scan() async {
final objectDetector = ObjectDetector(
model: LoaderController.model!,
);
await objectDetector.loadModel(useGpu: true);
final detectedObjects = await objectDetector.detect(imagePath: imagePath);
if (detectedObjects is Map<Object?, Object?>) {
print('Detected objects: $detectedObjects');
} else {
print('Type mismatch: ${detectedObjects.runtimeType}');
}
}
}
@m-naeem66622 did you found any solutions?
i fixed this issue, @pderrenger . can i create PR to this repo?
Problem Description
I had used the example which is prefectly with my model. Now I have tried to feed a single image using camera to take a picture or image picker to get the image from the gallery. but somehow it's not working throwing an error. the issue is coming from here https://github.com/ultralytics/yolo-flutter-app/blob/6ef5571270c5d5229ca20c9c4502010863bb7898/lib/ultralytics_yolo_platform_channel.dart#L152
Reproducible Code