hanyangclarence / SILT

12 stars 2 forks source link

hi, can you provide the link of trained weights or the predicted maps? #1

Closed Xiaoqi-Zhao-DLUT closed 4 months ago

hanyangclarence commented 1 year ago

Thanks for your interest, and we will provide those in a few days.

Xiaoqi-Zhao-DLUT commented 1 year ago

@Cralence Thanks, can you open the permission for your updated weights (google drive)

2 1
hanyangclarence commented 1 year ago

Hmm I think it would work now?

heorhiikalaichev commented 1 year ago

Faced with issue during running inference.py

Screenshot 2023-08-30 at 16 53 38
hanyangclarence commented 1 year ago

Oh I think that you have entered the path to the checkpoint of the backbone encoder

heorhiikalaichev commented 1 year ago

I have downloaded the PVT v2-B5 weights (that you provide) and put the path to this .pth file. Do I need to have both - model weights and backbone weights?

Are you going to share model weights? I hope you are going to)

hanyangclarence commented 1 year ago

Hmm maybe the readme file is a bit confusing. You just downloaded the pretrained backbone (i.e., the weight for PVT b5). For doing inference, you need to click the "4.19" hyperlink to download the weight for the whole model.

hanlinm2 commented 11 months ago

Hi, I am getting an issue with loading the model weights as well. I ran python infer.py --dataset SBU --ckpt ./model/PVTb5_SBU.pth and got this error:

Traceback (most recent call last):
  File "infer.py", line 179, in <module>
    main(args_from_parser)
  File "infer.py", line 44, in main
    net = Network(
  File "/home/hanlinm2/SILT/model/network.py", line 288, in __init__
    self.encoder.load_state_dict(torch.load(backbone_ckpt))
  File "/home/hanlinm2/miniconda3/envs/silt/lib/python3.8/site-packages/torch/serialization.py", line 579, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/home/hanlinm2/miniconda3/envs/silt/lib/python3.8/site-packages/torch/serialization.py", line 230, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/home/hanlinm2/miniconda3/envs/silt/lib/python3.8/site-packages/torch/serialization.py", line 211, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/home/wangty/Projects/Shadow/shadow_detection/SILT_v1/model/backbone/PVT/pvt_v2_b5.pth'

I printed out the backbone=args_model['training_config']['backbone'], and backbone_ckpt=args_model['pretrained_encoder_dir'][args_model['training_config']['backbone']] and it printed PVT-b5 and /home/wangty/Projects/Shadow/shadow_detection/SILT_v1/model/backbone/PVT/pvt_v2_b5.pth

I think this absolute path is saved into the .pth files, which has a different path than my file set up.

hanyangclarence commented 11 months ago

@hanlinm2 Oh that's my problem. I've fixed that. Try it now?