Borda / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend) a successor of qqwweee/keras-yolo3
MIT License
31 stars 10 forks source link

IndexError: bytearray index out of range #32

Open masterhimanshupoddar opened 4 years ago

masterhimanshupoddar commented 4 years ago

This is what I ran

python scripts/detection.py --path_weights ./model_data/yolo_weights_full.h5 --path_anchors ./model_data/yolo_anchors.csv --path_classes ./model_data/coco_classes.txt --path_output ./results --path_image C:\Users\HPO2KOR\Desktop\Work\venv\Patent\Labelled_Dataset\Dataset\train\text\FFDDAPMDD1.png

But I am getting an error

Traceback (most recent call last):
  File "scripts/detection.py", line 198, in <module>
    _main(**arg_params)
  File "scripts/detection.py", line 185, in _main
    predict_image(yolo, path_img, path_output)
  File "scripts/detection.py", line 94, in predict_image
    image_pred, pred_items = yolo.detect_image(image)
  File "C:\Users\HPO2KOR\Desktop\Work\venv\Patent\Dataset\Dataset\keras-yolo3-master\keras_yolo3\yolo.py", line 202, in detect_image
    out_scores[i], self.colors[c], thickness)
  File "C:\Users\HPO2KOR\Desktop\Work\venv\Patent\Dataset\Dataset\keras-yolo3-master\keras_yolo3\visual.py", line 56, in draw_bounding_box
    outline=color)
  File "C:\Users\HPO2KOR\Desktop\Work\venv\virtualenv\lib\site-packages\PIL\ImageDraw.py", line 246, in rectangle
    ink, fill = self._getink(outline, fill)
  File "C:\Users\HPO2KOR\Desktop\Work\venv\virtualenv\lib\site-packages\PIL\ImageDraw.py", line 112, in _getink
    ink = self.palette.getcolor(ink)
  File "C:\Users\HPO2KOR\Desktop\Work\venv\virtualenv\lib\site-packages\PIL\ImagePalette.py", line 109, in getcolor
    self.palette[index + 256] = color[1]
IndexError: bytearray index out of range

How do I resolve this?