weecology / DeepForest-pytorch

Pytorch implementation of the deepforest model for tree crown RGB detection.
MIT License
17 stars 9 forks source link

Color picker doesn't work after selected colors. #74

Closed bw4sz closed 3 years ago

bw4sz commented 3 years ago
    image = visualize.plot_predictions(image, df)
  File "/home/b.weinstein/miniconda3/envs/Zooniverse_pytorch/lib/python3.8/site-packages/deepforest/visualize.py", line 118, in plot_predictions
    cv2.rectangle(image, (int(row["xmin"]), int(row["ymin"])), (int(row["xmax"]), int(row["ymax"])), color=color, thickness=1, lineType=cv2.LINE_AA)
cv2.error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
>  - Scalar value for argument 'color' is not numeric
>  - Scalar value for argument 'color' is not numeric
>  - argument for rectangle() given by name ('color') and position (3)
>  - argument for rectangle() given by name ('color') and position (3)
bw4sz commented 3 years ago

corrected.