airctic / icevision

An Agnostic Computer Vision Framework - Pluggable to any Training Library: Fastai, Pytorch-Lightning with more to come
https://airctic.github.io/icevision/
Apache License 2.0
845 stars 149 forks source link

Icevision models not supporting fastai learner. #1143

Closed lakpa-tamang9 closed 2 years ago

lakpa-tamang9 commented 2 years ago

I am following the same tutorial from icevision documentation here. Everything is fine until i define the leaner with fastai, the following error occurs. I have tried with other models such as yolox too, the error still perceives.

AttributeError: module 'icevision.models.mmdet.models.ssd' has no attribute 'fastai'

I can see that the fastai is imported from soft_dependencies.SoftDependencies which is triggered by the flag here. https://github.com/airctic/icevision/blob/fc19096eb6104b34e5b209d09c174660f6140e8f/icevision/models/mmdet/common/mask/__init__.py#L9

However, the flag is False in my case. I reckon, in order to import fastai learner this flag must be True. How to solve this issue?

lakpa-tamang9 commented 2 years ago

Issue resolved by reinstalling icevision with pip install icevision[all]. Previously, it was installed with pip install icevision. Therefore, learner packages were not installed properly.