π Description
The application crashes at runtime due to an import error from the supervision library.
The module supervision.detection.annotate is no longer available in recent versions.
β Error Trace
ModuleNotFoundError: No module named 'supervision.detection.annotate'
Traceback:
File "/home/hatem/PerceptionMetrics/app.py", line 385, in <module>
dataset_viewer_tab()
File "/home/hatem/PerceptionMetrics/tabs/dataset_viewer.py", line 13, in dataset_viewer_tab
from supervision.detection.annotate import BoxAnnotator
Root Cause
Recent versions of supervision introduced a breaking API change and removed:
supervision.detection.annotate
Classes like BoxAnnotator were moved to the top-level module.
π§ Suggested Fix
Update the import statement:
Old (deprecated / broken)
from supervision.detection.annotate import BoxAnnotator
New (supported)
from supervision import BoxAnnotator
or:
import supervision as sv
box_annotator = sv.BoxAnnotator()
Workaround
Pin an older version of the library:
pip install supervision==0.6.0
π Description
The application crashes at runtime due to an import error from the
supervisionlibrary.The module
supervision.detection.annotateis no longer available in recent versions.β Error Trace
ModuleNotFoundError: No module named 'supervision.detection.annotate'Traceback:
Root Cause
Recent versions of supervision introduced a breaking API change and removed:
supervision.detection.annotateClasses like BoxAnnotator were moved to the top-level module.
π§ Suggested Fix
Update the import statement:
Old (deprecated / broken)
from supervision.detection.annotate import BoxAnnotatorNew (supported)
from supervision import BoxAnnotatoror:
import supervision as sv
box_annotator = sv.BoxAnnotator()Workaround
Pin an older version of the library:
pip install supervision==0.6.0