qubvel / segmentation_models.pytorch

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

SSL: CERTIFICATE_VERIFY_FAILED error #875

Closed chahatsagarmain closed 1 week ago

chahatsagarmain commented 1 month ago

model = smp.Unet( encoder_name="vgg19", # choose encoder, e.g. mobilenet_v2 or efficientnet-b7 encoder_weights="imagenet", # useimagenetpre-trained weights for encoder initialization in_channels=3, # model input channels (1 for gray-scale images, 3 for RGB, etc.) classes=1, activation='sigmoid' # model output channels (number of classes in your dataset) )

I am facing URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)> error when trying to download a new model .

remipIGN commented 1 month ago

Same issue here. As a workaround, I downloaded the PTH file manually to torch cache directory (in my case, I needed senet154) :

wget --no-check-certificate https://data.lip6.fr/cadene/pretrainedmodels/senet154-c7b49a05.pth -O $HOME/.cache/torch/hub/checkpoints/senet154-c7b49a05.pth