Skip to content

Fix deprecated supervision library API in docstrings#443

Open
Mr-Neutr0n wants to merge 1 commit intoIDEA-Research:mainfrom
Mr-Neutr0n:fix/supervision-api-update
Open

Fix deprecated supervision library API in docstrings#443
Mr-Neutr0n wants to merge 1 commit intoIDEA-Research:mainfrom
Mr-Neutr0n:fix/supervision-api-update

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Updates docstring examples in inference.py to use the new supervision library API
  • BoxAnnotator.annotate() no longer accepts a labels parameter as of supervision 0.16+
  • Labels should now be added using a separate LabelAnnotator

Changes

  • Added LabelAnnotator usage to the predict_with_caption docstring example
  • Added LabelAnnotator usage to the predict_with_classes docstring example

Test plan

  • Verify docstring examples follow the current supervision API
  • No functional code changes, only documentation updates

Fixes #408

🤖 Generated with Claude Code

Update docstring examples to use the new supervision API where
BoxAnnotator.annotate() no longer accepts a labels parameter.
Labels should now be added using a separate LabelAnnotator.

Fixes IDEA-Research#408

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Mr-Neutr0n
Copy link
Author

hi, any thoughts on this? the supervision library renamed a few methods and the docstring examples were broken. just updated them to match the current API

@Mr-Neutr0n
Copy link
Author

Friendly bump! Let me know if there's anything I should update or improve to help move this forward.

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.

TypeError: BoxAnnotator.annotate() got an unexpected keyword argument 'labels'

1 participant