-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add Mothbot YOLO11m detection pipeline #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 15 commits
0810ed9
fca35e9
12a53fa
a582457
d1c6394
9ea2310
3d91f4d
37c1ef8
406e58a
e26b973
aba15b3
3665064
36fc00d
9f2b5f9
0df47bf
7edc9d9
68e0c16
f5f7534
0726b23
1057b8a
2a33a05
59ea781
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |||||||||||||||
| from trapdata.antenna.datasets import CUDAPrefetcher, get_rest_dataloader | ||||||||||||||||
| from trapdata.antenna.result_posting import ResultPoster | ||||||||||||||||
| from trapdata.antenna.schemas import AntennaTaskResult, AntennaTaskResultError | ||||||||||||||||
| from trapdata.api.api import CLASSIFIER_CHOICES, should_filter_detections | ||||||||||||||||
| from trapdata.api.api import PIPELINE_CHOICES, should_filter_detections | ||||||||||||||||
| from trapdata.api.models.classification import MothClassifierBinary | ||||||||||||||||
| from trapdata.api.models.localization import APIMothDetector | ||||||||||||||||
| from trapdata.api.schemas import ( | ||||||||||||||||
|
|
@@ -425,7 +425,7 @@ def _process_job( | |||||||||||||||
| detector = None | ||||||||||||||||
|
|
||||||||||||||||
| # Check if binary filtering is needed once for the entire job | ||||||||||||||||
| classifier_class = CLASSIFIER_CHOICES[pipeline] | ||||||||||||||||
| classifier_class = PIPELINE_CHOICES[pipeline] | ||||||||||||||||
| use_binary_filter = should_filter_detections(classifier_class) | ||||||||||||||||
|
Comment on lines
+450
to
451
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guard unknown pipeline slugs before classifier resolution. Line 428 can throw Suggested resilience fix- classifier_class = PIPELINE_CHOICES[pipeline]
+ classifier_class = PIPELINE_CHOICES.get(pipeline)
+ if classifier_class is None:
+ logger.error(f"Unknown pipeline slug received from queue: {pipeline}")
+ return False📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Claude says: Valid concern but deferring — this behavior is pre-existing (same code as pre-rename There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Would you like me to open a follow-up GitHub issue to track this, so it doesn't get lost? |
||||||||||||||||
| binary_filter = None | ||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -464,7 +464,7 @@ def _process_job( | |||||||||||||||
| # Defer instantiation of poster, detector and classifiers until we have data | ||||||||||||||||
| if not classifier: | ||||||||||||||||
| classifier = classifier_class(source_images=[], detections=[]) | ||||||||||||||||
| detector = APIMothDetector([]) | ||||||||||||||||
| detector = classifier_class.detector_cls([]) | ||||||||||||||||
| result_poster = ResultPoster(max_pending=MAX_PENDING_POSTS) | ||||||||||||||||
|
|
||||||||||||||||
| if use_binary_filter: | ||||||||||||||||
|
|
||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.