SUYEgit / Surgery-Robot-Detection-Segmentation

Object detection and segmentation for a surgery robot using Mask-RCNN on Python 3, Keras, and TensorFlow..
Other
181 stars 83 forks source link

Assertion error when inferencing on videos #15

Closed nirajvermafcb closed 5 years ago

nirajvermafcb commented 5 years ago

I have trained the model on cars dataset and the prediction works fine on Images.However when trying it out on mp4 videos there is Assertion error:

assert boxes.shape[0] == masks.shape[-1] == class_ids.shape[0]

AssertionError

Here is the traceback:

OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
frame:  0
Traceback (most recent call last):
  File "clearquote.py", line 561, in <module>
    video_path=args.video)
  File "clearquote.py", line 361, in detect_and_color_splash
    class_names, r['scores'], colors=colors, making_video=True)
  File "/content/drive/My Drive/Google_colab/MaskRCNN-video/mrcnn/visualize.py", line 109, in display_instances
    assert boxes.shape[0] == masks.shape[-1] == class_ids.shape[0]
AssertionError
Gauravi24 commented 4 years ago

how was it solved