weecology / DeepForest

Python Package for Airborne RGB machine learning
https://deepforest.readthedocs.io/
MIT License
524 stars 176 forks source link

Multi-color plotting length error #790

Closed bw4sz closed 1 month ago

bw4sz commented 2 months ago

I'll find a reproducible example, but looks like the multi-class color isn't quite right, introduced in #789

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "/blue/ewhite/b.weinstein/miniconda3/envs/AirborneFieldGuide/lib/python3.10/site-packages/deepforest/visualize.py", line 405, in plot_results
    if num_labels > 1 and len(results_color_sv) != num_labels:
TypeError: object of type 'Color' has no len()
image_annotations = read_file(image_annotations, root_dir=train_image_dir)
visualize.plot_results(image_annotations, res)
image_annotations.iloc[0]
xmin                                                      804.0
ymin                                                       23.0
xmax                                                      854.0
ymax                                                       73.0
label                                                White Ibis
image_path               C4_L24_F873_T20240417_075715_656_7.png
annotator                 Brier Klossing b.klossing@ufl.edu, 20
geometry      POLYGON ((854 23, 854 73, 804 73, 804 23, 854 ...
Name: 256, dtype: object

We'll need another look at this.

ethanwhite commented 1 month ago

Closed by #791