Fix visualizer._create_text_labels if classes is None
Summary: Pull Request resolved:
@@ -191,7 +191,7 @@ def _create_text_labels(classes, scores, class_names):
list[str] or None
"""
labels = None
- if class_names is not None and len(class_names) > 1:
+ if classes is not None and class_names is not None and len(class_names) > 1:
labels = [class_names[i] for i in classes]
if scores is not None:
if labels is None:
