Skip to content

LabelBOT #1012

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

Open
wants to merge 194 commits into
base: master
Choose a base branch
from
Open

LabelBOT #1012

wants to merge 194 commits into from

Conversation

gkourie
Copy link
Contributor

@gkourie gkourie commented Dec 12, 2024

TODO v3 (#988)

Backend

  • Handle the case when LabelBOT returns no result because there are no annotations are associated with any labels of the project.
  • A migration file for the HNSW index with progress bar.
  • There is a limit of up to 5 pending LabelBOT requests per user. This limit can be tracked in a cache variable like the video tracking.

Frontend

  • Fix drawing start point of line feature of the popup for line annotation shapes.
  • The LabelBOT button has to be disabled if a remote image without proper CORS configuration is loaded.
  • Draggable popup with dashed line connected to the annotation for better visibility when multiple popups are close to each other.
  • (later) If computing the feature vector client-side takes a significant amount of time, we could try to compute vectors at fixed intervals already while the user draws the annotation. If the final annotation is reasonably contained in the vector bounding box that was previously computed, immediately send the vector to the backend instead of computing it only after the annotation was finished.
  • (later) Implement the ONNX inference as a web worker so the UI does not block while inference is running
  • (later) When the random/regular sampling mode is active, LabelBOT should immediately suggest a label for the currently active point. When the label is confirmed with Enter or a click, the annotation mode advances to the next point. The LabelBOT timeout is disabled here, i.e. users always have to confirm the chosen labels. The suggested label for the next point could even be prefetched while the user is still looking at the current point.
  • (later) Point to shape conversion with SAM or PTP.

@gkourie gkourie linked an issue Dec 12, 2024 that may be closed by this pull request
@gkourie gkourie requested a review from mzur December 12, 2024 14:59
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't implement all the logic as helper methods. Since the logic is used only in the single controller (for now), implement it as (protected) controller methods there.

Also please us camelCase for variable names.

Finally, please fix the failing checks (except the test-current check which fails because biigle/largo is not there). The lint checks can be run locally with composer lint and composer fix.

@gkourie gkourie requested a review from mzur December 19, 2024 16:32
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor comments left now. We have to make sure that we get the exact queries here. Maybe you can dump the two queries as I explained below and post them here for comparison?

@gkourie gkourie requested a review from mzur December 20, 2024 16:19
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine so far (ignoring the missing TODOs). Please go ahead 😉

mzur added 8 commits July 8, 2025 16:17
These are used by the new biigle/metrics module.
Long blocking migrations are unusual so I chose the console command
instead. LabelBOT will also work without the index, only slower.
Also I added CONCURRENTLY so the create index operation does not
create a write lock. Finally, the index for video annotations is
already created, too, in preparation for LabelBOT in the video
annotation tool.
@mzur mzur marked this pull request as ready for review July 9, 2025 14:23
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.

LabelBOT for images
2 participants