-
Notifications
You must be signed in to change notification settings - Fork 4
Move no prediction #242
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
Move no prediction #242
Conversation
|
This is failing our ruff format and linting checks @SkepticRaven please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the handling of "no prediction" cases by moving the logic from post-processing locations (UI classification thread and CLI) into the classifier's predict and predict_proba methods. This centralizes the responsibility of blanking predictions for invalid poses into the classifier itself.
Key changes:
- Updated
predictandpredict_probamethods to accept optionalframe_indexesparameter and handle invalid frames internally - Removed
frame_indexestracking and filtering logic from UI classification thread and CLI classification script - Simplified
save_predictionsmethod by removing frame index-based filtering
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/jabs/classifier/classifier.py | Added frame_indexes parameter to predict and predict_proba methods; added logic to insert -1 for predictions and 0 for probabilities at invalid frame positions |
| src/jabs/ui/classification_thread.py | Removed frame_indexes tracking; passed frame_indexes to classifier methods instead of filtering afterward |
| src/jabs/ui/central_widget.py | Removed _frame_indexes from classification thread output handling |
| src/jabs/scripts/classify.py | Removed frame-based filtering logic; passed frame_indexes to classifier methods; simplified result copying |
| src/jabs/project/project.py | Removed frame_indexes parameter and related filtering logic from save_predictions method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Resolved conflicts in classifier.py by combining: - frame_indexes parameter support from move-no-prediction branch - CatBoost classifier support from main branch Both features are now integrated in predict() and predict_proba() methods.
Moves the location of where "no prediction" is applied.
Handling of removing predictions when poses are invalid prior to these changes was applied in 2 separate locations:
Blanking predictions after these changes is now owned by the classifier's
predictandpredict_probamethods.