Closed mwitiderrick closed 1 year ago
Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.
@onuralpszr if you do not mind then I would like to tackle this one as I may have an idea.
@hardikdava I already figure out
[[3.3687255859375003, -1.2968627929687502, 254.718115234375, 257.9044921875]] [[23.821523666381836, 317.9492492675781, 32.71510696411133, 319.9894714355469]] []
It was empty result we need skip or handle it. I also found couple more docs errors so I am going to open a PR If you don't mind :)
@hardikdava I wanted to learn more and tackle more so I would like to finish this one
I am already about to finish. I found that the original issue is with sv.Detections.from_deepsparse()
function. It has nothing to do with sv.InferenceSlicer()
@hardikdava yeah same ?
I found the issue in from_deepsparse as well
def callback(image_slice: np.ndarray) -> sv.Detections:
result = yolo_pipeline(images=image_slice, iou_thres=0.6, conf_thres=0.001)
print(result.boxes[0])
return sv.Detections.from_deepsparse(result)
I tested like this and see that empty array
Can you test with this callback?
def callback(image_slice: np.ndarray) -> sv.Detections:
pipeline_outputs = yolo_pipeline(images=image_slice, iou_thres=0.6, conf_thres=0.001)
if np.asarray(pipeline_outputs.boxes[0]).shape[0]>0:
return sv.Detections.from_deepsparse(pipeline_outputs)
else:
return sv.Detections.empty()
@hardikdava it works.
would you like to submit a PR or should I?
The bug is fixed in #348 PR. Closing as it is finished.
@hardikdava and @onuralpszr, awesome work guys! 🔥 @mwitiderrick, did you have a chance to take a look at the current version in develop
? Does it solve your issue?
Search before asking
Bug
Getting the following error with
InferenceSlicer
when usingfrom_deepsparse
with a video frame but it works with a normal imageEnvironment
Minimal Reproducible Example