smhassanerfani / atlantis

A Benchmark for Semantic Segmentation of Waterbody Images
38 stars 11 forks source link

I'd like to try a model. #6

Closed L22AR5N closed 1 year ago

L22AR5N commented 2 years ago

This kind of problem has occurred. Where are the models you have learned? Or do I have to communicate with other sharing?

[err] /content/drive/MyDrive/git/atlantis PSPNet is deployed on Tesla K80 Traceback (most recent call last): File "/content/drive/MyDrive/git/atlantis/train.py", line 196, in main(args) File "/content/drive/MyDrive/git/atlantis/train.py", line 93, in main saved_state_dict = torch.load(args.restore_from) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 231, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 212, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'snapshots/resnet101-imagenet.pth'

smhassanerfani commented 2 years ago

Hi Thanks for asking. I would add .pth file for the trained weights of resnet101 which is the feature extractor part of pspnet. Regarding the trained weight of semantic segmentation models, I didn't upload those. Let me know which model you need, I would give it to you if I have it.

L22AR5N commented 2 years ago

Thank you for your quick reply. If you are possible, could you share all .pth files of every network. I want to test the atlantis library in my working area. My email is dldkfhs8@naver.com. Also, I have an additional question: is there any document to explain how to create .pth files? I have some experience with machine learning algorithms for time series, however I don't have any experience in image analysis. I'm curious why Atlantis requires a .pth file for training. My basic knowledge is that we can create a .pth file through the training step, then we can load the created .pth file for the testing step. But your train.py in the atlantis library required a .pth file. Thank you for taking the time out of me. :)

smhassanerfani commented 2 years ago

.pth file that you need to start training is for ResNet101, the feature extractor for all semantic segmentation networks that we have used in this repository. This .pth file is in fact a trained weights of ResNet101 on ImageNet. Let's say you want to run PSPNet as your semantic segmentation model, you first need to read .pth file for feature extractor part of the PSPNet (which is ResNet101), then start training the the whole network, i.e., both feature extractor part and decoder part for semantic segmentation. In this way, feature extractor part is fine tuned for ATLANTIS, and decoder part is trained for ATLANTIS.