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

ModuleNotFoundError: No module named 'segmentation_models_pytorch.unetplusplus' #853

Open
ShroukMansour opened this issue Feb 26, 2024 · 2 comments

Comments

@ShroukMansour
Copy link

I was using an older version from segmentation models and everything was working fine, when i've upgraded to the latest version i got this error message

 barcode_det_model_path =  os.path.join("passport_barcode_det_UnetPlusPlus_resnext50_32x4d_e39_lv0.026_ltr0.014_ltest0.038_iv0.95_itr0.973_itest0.932.pth")

self.barcode_det_model = torch.load(barcode_det_model_path, map_location=torch.device('cpu') if device.type == 'cpu' else None)
  File "/data2/home/development/anaconda3/envs/ovr3.10/lib/python3.10/site-packages/torch/serialization.py", line 809, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/data2/home/development/anaconda3/envs/ovr3.10/lib/python3.10/site-packages/torch/serialization.py", line 1172, in _load
    result = unpickler.load()
  File "/data2/home/development/anaconda3/envs/ovr3.10/lib/python3.10/site-packages/torch/serialization.py", line 1165, in find_class
    return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'segmentation_models_pytorch.unetplusplus'

here is the ouput of pip show segmentation-models-pytorch

ame: segmentation-models-pytorch
Version: 0.3.3
Summary: Image segmentation models with pre-trained backbones. PyTorch.
Home-page: https://github.com/qubvel/segmentation_models.pytorch
Author: Pavel Iakubovskii
Author-email: qubvel@gmail.com
License: MIT
Location: /data2/home/development/anaconda3/envs/ovr3.10/lib/python3.10/site-packages
Requires: efficientnet-pytorch, pillow, pretrainedmodels, timm, torchvision, tqdm

how can i fix this issue?

Copy link

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 github-actions bot added the Stale label Apr 27, 2024
@qubvel
Copy link
Owner

qubvel commented Apr 27, 2024

It is now under segmentation_models_pytorch.encoders.unetplusplus

@github-actions github-actions bot removed the Stale label Apr 28, 2024
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