Open misza222 opened 1 year ago
The problem is with sahi library - they have changed the interface between version 0.10 and 0.11 and icevision 0.12 (most recent version on pip) relies on things that are only present in <= sahi 0.10.*
Hi,
I Encounter the same issue,
The Issue occurred when I tried to import --> from icevision.all import *
[/usr/local/lib/python3.8/dist-packages/icevision/models/inference_sahi.py](https://localhost:8080/#) in <module>
---> 14 from sahi.model import DetectionModel
15 from sahi.prediction import ObjectPrediction
16 from sahi.predict import get_sliced_prediction as sahi_get_sliced_prediction
ModuleNotFoundError: No module named 'sahi.model'
My Installation followed :
# # Torch - Torchvision - IceVision - IceData - MMDetection - YOLOv5 - EfficientDet Installation
!wget https://raw.githubusercontent.com/airctic/icevision/master/icevision_install.sh
# # Choose your installation target: cuda11 or cuda10 or cpu
!bash icevision_install.sh cuda11
then installed sahi
!pip install sahi -U
then I checked the versions of Icevision and sahi.
icedata 0.5.1 icevision 0.12.0 sahi 0.11.6
As the error is pointing to the icevision/models/inference_sahi.py file, I looked into it and modified as below:
from sahi import DetectionModel
instead from sahi.model import DetectionModel
This solved the issue.
🐛 Bug
Hi there, when I import icevision in colab I get an error:
ModuleNotFoundError: No module named 'sahi.model'
To Reproduce Steps to reproduce the behavior:
!pip install icevision[all]
from icevision.all import *
Screenshots
Where it happens: