qubvel-org / segmentation_models.pytorch

Semantic segmentation models with 500+ pretrained convolutional and transformer-based backbones.
https://smp.readthedocs.io/
MIT License
9.58k stars 1.67k forks source link

UNet++ is not working PyTorch =: module 'segmentation_models_pytorch' has no attribute 'UnetPlusPlus' #320

Closed m-aliabbas closed 2 years ago

m-aliabbas commented 3 years ago

AttributeError Traceback (most recent call last)

in () 2 3 # We will use Feature Pyramid Network with pre-trained ResNeXt50 backbone ----> 4 net = smp.UnetPlusPlus( 5 encoder_name="resnet18", # choose encoder, e.g. mobilenet_v2 or efficientnet-b7 6 encoder_weights="imagenet", # use `imagenet` pretrained weights for encoder initialization AttributeError: module 'segmentation_models_pytorch' has no attribute 'UnetPlusPlus'
JulienMaille commented 3 years ago

you probably need to update smp

m-aliabbas commented 3 years ago

I did update but same error

m-aliabbas commented 3 years ago

!pip install -U git+https://github.com/qubvel/segmentation_models.pytorch

I use this to install the latest version

azkalot1 commented 3 years ago

It means you have a problem with the system python\python you use - pip installs it to the wrong path.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 7 days with no activity.