WongKinYiu / yolov9

Implementation of paper - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information
GNU General Public License v3.0
8.98k stars 1.42k forks source link

Boolean index did not match indexed array along dimension 0;dimension is 0 but corresponding boolean dimension is 5 #354

Open asdfzxcvfdsa opened 7 months ago

asdfzxcvfdsa commented 7 months ago

图片

fukingbus commented 5 months ago

新手踩了同樣的坑 希望能幫到同坑人 錯誤原因:直接把訓練 yolo detection的資料集丟進segmentaion ,由於 detection的bounding box 格式跟segmentation用的 coordinates 格式(<class-index> <x1> <y1> <x2> <y2> ... <xn> <yn>)並不兼容,所以會報錯 解決方法:重新以COCO Segmentation格式做一次labeling ,再 轉為 Yolo segmentation 格式

Facing the same problem, hope the solution below could help you guys too.

HOW: You just accidentally put yolo object detection dataset straight into segmentation training, which would not work because the annotation format are different. Object detection uses bounding box and segmentation uses coordinates (<class-index> <x1> <y1> <x2> <y2> ... <xn> <yn>),which led to an exception.

SOLUTION: Please re-label the dataset using COCO segmentation annotation format and translate into Yolo segmentation