ayoolaolafenwa / PixelLib

Visit PixelLib's official documentation https://pixellib.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

> Overload resolution failed:

MfonobongIme opened this issue Β· comments

Hi, I am getting this error only when I try running on videos
image = cv2.rectangle(image, (x1, y1), (x2, y2), color_rec, box_thickness)
cv2.error: OpenCV(4.5.3) πŸ‘Ž error: (-5:Bad argument) in function 'rectangle'

Overload resolution failed:

  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'rec'. Expected sequence length 4, got 2
  • Can't parse 'rec'. Expected sequence length 4, got 2

my code:
import pixellib
from pixellib.torchbackend.instance import instanceSegmentation

ins = instanceSegmentation()
ins.load_model("models/pointrend_resnet50.pkl")
ins.process_video("elon.mp4", show_bboxes=True, frames_per_second=3, output_video_name="output_video.mp4")

@MfonobongIme I have added new updates to this Library. Upgrade to the latest version using:

pip3 install pixellib --upgrade