ONNX-YOLOv8-Instance-Segmentation icon indicating copy to clipboard operation
ONNX-YOLOv8-Instance-Segmentation copied to clipboard

yolov8n-seg onnx value error

Open apanand14 opened this issue 8 months ago • 3 comments

Hello,

I would like to run inference using my converted onnx model but somehow I'm getting this error. Can you please look into it if possible? Thank you in advance

C:\AI\yolo\ONNX-YOLOv8-Instance-Segmentation\yoloseg\utils.py:49: RuntimeWarning: invalid value encountered in divide
  iou = intersection_area / union_area
Traceback (most recent call last):
  File "C:\AI\yolo\ONNX-YOLOv8-Instance-Segmentation\image_instance_segmentation.py", line 15, in <module>
    boxes, scores, class_ids, masks = yoloseg(img)
  File "C:\AI\yolo\ONNX-YOLOv8-Instance-Segmentation\yoloseg\YOLOSeg.py", line 21, in __call__
    return self.segment_objects(image)
  File "C:\AI\yolo\ONNX-YOLOv8-Instance-Segmentation\yoloseg\YOLOSeg.py", line 38, in segment_objects
    self.mask_maps = self.process_mask_output(mask_pred, outputs[1])
  File "C:\AI\yolo\ONNX-YOLOv8-Instance-Segmentation\yoloseg\YOLOSeg.py", line 99, in process_mask_output
    num_mask, mask_height, mask_width = mask_output.shape  # CHW
ValueError: not enough values to unpack (expected 3, got 2)

apanand14 avatar Oct 19 '23 16:10 apanand14