Skip to content

Commit 6213567

Browse files
author
Aditya Jain
committed
Add order classifier in ML API
1 parent f9f637f commit 6213567

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

trapdata/api/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
MothClassifierTuringAnguilla,
2323
MothClassifierTuringCostaRica,
2424
MothClassifierUKDenmark,
25+
InsectOrderClassifier
2526
)
2627
from .models.localization import APIMothDetector
2728
from .schemas import (
@@ -47,6 +48,7 @@
4748
"anguilla_moths_turing_2024": MothClassifierTuringAnguilla,
4849
"global_moths_2024": MothClassifierGlobal,
4950
"moth_binary": MothClassifierBinary,
51+
"insect_orders_2025": InsectOrderClassifier
5052
}
5153
_classifier_choices = dict(
5254
zip(CLASSIFIER_CHOICES.keys(), list(CLASSIFIER_CHOICES.keys()))
@@ -57,7 +59,7 @@
5759

5860

5961
def should_filter_detections(Classifier: type[APIMothClassifier]) -> bool:
60-
if Classifier == MothClassifierBinary:
62+
if Classifier in [MothClassifierBinary, InsectOrderClassifier]:
6163
return False
6264
else:
6365
return True

0 commit comments

Comments
 (0)