mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 22:51:58 +02:00
Fix numpy exception handling
This commit is contained in:
parent
3744709c97
commit
68351d2224
@ -242,7 +242,7 @@ def format_single_result(
|
|||||||
)
|
)
|
||||||
class_name = class_names[np.argmax(class_overall)]
|
class_name = class_names[np.argmax(class_overall)]
|
||||||
annotations = get_annotations_from_preds(predictions, class_names)
|
annotations = get_annotations_from_preds(predictions, class_names)
|
||||||
except (np.AxisError, ValueError):
|
except (np.exceptions.AxisError, ValueError):
|
||||||
# No detections
|
# No detections
|
||||||
class_overall = np.zeros(len(class_names))
|
class_overall = np.zeros(len(class_names))
|
||||||
class_name = "None"
|
class_name = "None"
|
||||||
|
Loading…
Reference in New Issue
Block a user