Migrating from SAHI or supervision¶
Both libraries keep their place in a pipeline: only the slicing and merging step changes, and
the output converts back to a supervision Detections.
Coming from obss/sahi¶
# from sahi.predict import get_sliced_prediction
from easi.compat import get_sliced_prediction
result = get_sliced_prediction("image.jpg", detection_model, slice_height=640, slice_width=640)
result.object_prediction_list
detection_model can be a sahi UltralyticsDetectionModel or any EASI detector; the
module docstring lists the differences from sahi.
Coming from supervision's InferenceSlicer¶
Replace the slicer and its callback with easi.predict(image, model) (or an adapter plus
EASI) and convert with det.to_supervision() to keep the rest of a supervision pipeline.