We are trying to build a system with ZED 2i camera to detect tea buds. The camera is attached to a Jetson Orin nano with the latest jetpack, pytorch-nvidia version and ultralytics yolov8 package. When we run the custom object detection yolov8 python sample, it works well. But when we changed the weight file to one of our yolov8 weight file trained previously (which works fine on yolov8 inference with other cameras like Orbbec Astra, Logitech Webcam input). But when we run the detector.py with the new weight file (attached for your reference in the following link), there is no detection. It will produce a detection if we put a bud in a white background, but not when we show a tea field.
Any clue on solving this ? Tried retraining several times.
Sorry to hear that. Can you send me a picture from any other cameras that produce detection, and an image from the ZED that should produce detection so that I can investigate ?
Thank you !
Senior Developer - ZED SDK
As shown, Zed 2i can detect the bud only when the bud is in white background and we place the camera very close to the bud. This is just one example, we tries several images, several printed versions and even a test run in an actual tea field, the result is same. Realsense, Orbbec and others are able to detect multiple buds (bottom image) while zed doesn’t detect even a single one (top image).
Any guidance on correcting this behavior ?
Posting the detection on zed camera on white background
In the detector.py script from the custom object dector yolov8, the left image is retrieved, and sent in a model.predict(). In your tests with the other cameras, make sure the structure is the same. Then, you have to compare the image sent to the model.predict() in both cases. Does it have the same resolution, ratio, is it in the same RGB convention, are the image similar… The solution is here. If the image are different, you might have to retrain or modify the input data at least. As you have shown, detection works with your custom weights, in some cases, so the issue is more of a training/data format issue than a SDK issue.