Skip to content

Conversation

@SkepticRaven
Copy link
Contributor

@SkepticRaven SkepticRaven commented Nov 26, 2025

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:

  1. classification thread in UI between making predictions and saving them
  2. classification logic in cli between making predictions and saving them

Blanking predictions after these changes is now owned by the classifier's predict and predict_proba methods.

@gbeane
Copy link
Collaborator

gbeane commented Nov 26, 2025

This is failing our ruff format and linting checks

@SkepticRaven please run
ruff check src and fix any issues followed by ruff format src

@SkepticRaven SkepticRaven marked this pull request as ready for review November 28, 2025 14:37
@gbeane gbeane requested a review from Copilot December 31, 2025 20:33
Copy link
Contributor

Copilot AI left a 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 predict and predict_proba methods to accept optional frame_indexes parameter and handle invalid frames internally
  • Removed frame_indexes tracking and filtering logic from UI classification thread and CLI classification script
  • Simplified save_predictions method 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.

gbeane added 2 commits January 9, 2026 11:01
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.
@gbeane gbeane merged commit 146bd5a into main Jan 9, 2026
2 checks passed
@gbeane gbeane deleted the move-no-prediction branch January 9, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants