Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'torchvision.models.segmentation' #159

Open
mayanktiwariiiitdmj opened this issue Oct 4, 2021 · 1 comment
Open

No module named 'torchvision.models.segmentation' #159

mayanktiwariiiitdmj opened this issue Oct 4, 2021 · 1 comment

Comments

@mayanktiwariiiitdmj
Copy link

Hello,

When I am running the inference_webcam.py file the I am getting the following exception.

Traceback (most recent call last):
  File "inference_webcam.py", line 29, in <module>
    from model import MattingBase, MattingRefine
  File "F:\PycharmProjects\init_BackgroundMattingV2\model\__init__.py", line 1, in <module>
    from .model import Base, MattingBase, MattingRefine
  File "F:\PycharmProjects\init_BackgroundMattingV2\model\model.py", line 4, in <module>
    from torchvision.models.segmentation.deeplabv3 import ASPP
ModuleNotFoundError: No module named 'torchvision.models.segmentation'

I have used the following commands in anaconda to install the packages

conda install pytorch==1.7.0 torchvision==0.8.1 torchaudio==0.7.0 cudatoolkit=10.1 -c pytorch

pip install kornia==0.4.1
pip install tensorboard==2.3.0
pip install tqdm==4.51.0
pip install opencv-python==4.4.0.44
pip install onnxruntime==1.6.0

Please help me in solving the error.

@yoyoyin0902
Copy link

pytorch==1.7.0 好像是要使用cuda 11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants