Fixed check for nesting level of colors array
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
4fc8bb6f8c
commit
5f7870b92f
|
@ -150,7 +150,7 @@ def _draw_bboxes(instances: Sequence[np.ndarray], axis: pyplot.Axes,
|
|||
if class_id == 0:
|
||||
continue
|
||||
|
||||
if type(colors) is float:
|
||||
if len(np.shape(colors)) == 1:
|
||||
color = colors
|
||||
else:
|
||||
color = colors[class_id]
|
||||
|
|
Loading…
Reference in New Issue