Closed ethanlee928 closed 4 months ago
@ethanlee928
It seems there's been some confusion with version updates and the renaming of classes. Based latest information,
BoundingBoxAnnotator
has been renamed toBoxAnnotator
and will be removed in future versions. Therefore, you should useBoxAnnotator
instead ofBoundingBoxAnnotator
. Here is the corrected code:bbox_annotator = sv.BoxAnnotator(color_lookup=sv.ColorLookup.INDEX)
With this update, your code will comply with the latest library standards, ensuring backward compatibility.
This PR can fix the following error:
TypeError: BoxAnnotator.annotate() got an unexpected keyword argument 'labels'
Thank you for your PR.
@pg56714 Thanks for providing the latest information, I've updated the PR based on your suggestion.
@SkalskiP Friendly ping to see if you had a chance to look at this PR related to Supervision. Appreciate any feedback when you get a moment. Thanks!
Hi @ethanlee928 👋🏻, I did not know this PR existed. Looks good. Thanks a lot for the help in migrating from the old to the new supervision API.
Saw a warning when calling
annotate
:SupervisionWarnings: annotate is deprecated: BoxAnnotator is deprecated and will be removed in supervision-0.22.0. Use BoundingBoxAnnotator and LabelAnnotator instead
Fixed by removing
BoxAnnotator
and useBoundingBoxAnnotator
andLabelAnnotator
as instructed by the warning. And based onsupervision
release note,BoundingBoxAnnotator
is added in version0.15.0
.Please review. Thank you!