Open smallsnailrunning opened 2 years ago
The original Potsdam image is large, so it is needed to be clipped to patches. For preparing the Potsdam dataset, you can refer to https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#prepare-datasets. Note there are some differences. We use '3_Ortho_IRRG.zip' and '5_Labels_all.zip'.
For reproduction, we have provided the command lines, config files, training logs, and saved model weights in the readme.md of https://github.com/ViTAE-Transformer/ViTAE-Transformer-Remote-Sensing/tree/main/Semantic%20Segmentation.
As I know, the default mmsegmentation adopts the distributed training. It doesn't affect the final result.
Thank you, I have a try as you say. Hope to see the amazing results. your jop is very meaning.
I tried the proiect in the windows, not in the linux, Did you have a try in the windows?It semms to be the problem about the path '\' in windows '/' in the linux, except the problem, I am not sure if there will have other problems between the difference in th windows and linux system, do you have a project with the windows edition?
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation>python tools\test.py configs\swin\upernet_swin_tiny_patch4_window7_512x512_80k_potsdam.py --show-dir data\te
st --eval mIoU 'mFscore'
usage: test.py [-h] [--work-dir WORK_DIR] [--aug-test] [--out OUT] [--format-only] [--eval EVAL [EVAL ...]] [--show] [--show-dir SHOW_DIR] [--gpu-collect] [--gpu-id GPU_ID] [--tmpdir TMPDIR]
[--options OPTIONS [OPTIONS ...]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--eval-options EVAL_OPTIONS [EVAL_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--opacity OPACITY]
[--local_rank LOCAL_RANK]
config checkpoint
test.py: error: the following arguments are required: checkpoint
I directly adjusted the configuration file according to the file structure of my computer under the windows system: configs, I used the pre-trained model you uploaded for the inference test, the above error occurred, and the checkpoint was missing. I don't know where to find this. checkpoint? I need your help very much, thank you very much, there may be trouble in the future, and I am trying to reproduce the whole project myself.
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation>python tools\test.py configs\swin\upernet_swin_tiny_patch4_window7_512x512_80k_potsdam.py --show-dir data\te
st --eval mIoU 'mFscore'
usage: test.py [-h] [--work-dir WORK_DIR] [--aug-test] [--out OUT] [--format-only] [--eval EVAL [EVAL ...]] [--show] [--show-dir SHOW_DIR] [--gpu-collect] [--gpu-id GPU_ID] [--tmpdir TMPDIR]
[--options OPTIONS [OPTIONS ...]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--eval-options EVAL_OPTIONS [EVAL_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--opacity OPACITY]
[--local_rank LOCAL_RANK]
config checkpoint
test.py: error: the following arguments are required: checkpoint
I directly adjusted the configuration file according to the file structure of my computer under the windows system: configs, I used the pre-trained model you uploaded for the inference test, the above error occurred, and there are some problems. I don't know how to fix the problem? I need your help very much, thank you very much, there may be trouble in the future, and I am trying to reproduce the whole project myself. thank you very much
Sorry, we have not tried it on the windows yet.
I think you can try “\\" in shell, but I'm not sure whether it works
If the path is in python, you can try r'C:\Users\ly\PycharmProjects\xxxx'
Also, you can search for similar problems in the mmsegmentation issue.
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation>python tools\test.py configs\swin\upernet_swin_tiny_patch4_window7_512x512_80k_potsdam.py --show-dir data\test\
--eval mIoU 'mFscore'
usage: test.py [-h] [--work-dir WORK_DIR] [--aug-test] [--out OUT] [--format-only] [--eval EVAL [EVAL ...]] [--show] [--show-dir SHOW_DIR] [--gpu-collect] [--gpu-id GPU_ID] [--tmpdir TMPDIR]
[--options OPTIONS [OPTIONS ...]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--eval-options EVAL_OPTIONS [EVAL_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--opacity OPACITY]
[--local_rank LOCAL_RANK]
config checkpoint
test.py: error: the following arguments are required: checkpoint
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation>
File "C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation\tools\test.py", line 303, in
I tried,have the problem ,can you have a look ,thanks, I do not knows why I clone the project , swin is not in the models registry? very thanks if you know the reason, tell me how to solve the problem
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation>python tools\test.py configs\swin\upernet_swin_tiny_patch4_window7_512x512_80k_potsdam.py --show-dir data\te st --eval mIoU 'mFscore' usage: test.py [-h] [--work-dir WORK_DIR] [--aug-test] [--out OUT] [--format-only] [--eval EVAL [EVAL ...]] [--show] [--show-dir SHOW_DIR] [--gpu-collect] [--gpu-id GPU_ID] [--tmpdir TMPDIR] [--options OPTIONS [OPTIONS ...]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--eval-options EVAL_OPTIONS [EVAL_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--opacity OPACITY] [--local_rank LOCAL_RANK] config checkpoint test.py: error: the following arguments are required: checkpoint
I directly adjusted the configuration file according to the file structure of my computer under the windows system: configs, I used the pre-trained model you uploaded for the inference test, the above error occurred, and there are some problems. I don't know how to fix the problem? I need your help very much, thank you very much, there may be trouble in the future, and I am trying to reproduce the whole project myself. thank you very much
I know I miss the .pth file
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation>python tools\test.py configs\swin\upernet_swin_tiny_patch4_window7_512x512_80k_potsdam.py --show-dir data\test\ --eval mIoU 'mFscore' usage: test.py [-h] [--work-dir WORK_DIR] [--aug-test] [--out OUT] [--format-only] [--eval EVAL [EVAL ...]] [--show] [--show-dir SHOW_DIR] [--gpu-collect] [--gpu-id GPU_ID] [--tmpdir TMPDIR] [--options OPTIONS [OPTIONS ...]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--eval-options EVAL_OPTIONS [EVAL_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--opacity OPACITY] [--local_rank LOCAL_RANK] config checkpoint test.py: error: the following arguments are required: checkpoint
(rs) C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation> File "C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation\tools\test.py", line 303, in main() File "C:\Users\ly\PycharmProjects\ViTAE-Transformer-Remote-Sensing-main\Semantic Segmentation\tools\test.py", line 203, in main model = build_segmentor(cfg.model, test_cfg=cfg.get('test_cfg')) File "C:\Users\ly\anaconda3\envs\rs\lib\site-packages\mmseg\models\builder.py", line 48, in build_segmentor return SEGMENTORS.build( File "C:\Users\ly\anaconda3\envs\rs\lib\site-packages\mmcv\utils\registry.py", line 234, in build return self.build_func(*args, kwargs, registry=self) File "C:\Users\ly\anaconda3\envs\rs\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "C:\Users\ly\anaconda3\envs\rs\lib\site-packages\mmcv\utils\registry.py", line 69, in build_from_cfg raise type(e)(f'{obj_cls.name**}: {e}') KeyError: "EncoderDecoder: 'swin is not in the models registry'"
I tried,have the problem ,can you have a look ,thanks, I do not knows why I clone the project , swin is not in the models registry? very thanks if you know the reason, tell me how to solve the problem
'swin' is already contained in __init__.py
, so can you post the commands?
Hello, I am interested in the remote sensing semantic segmentation of this project. I have downloaded all the relevant Potsdam datasets and configured the program running environment, but the reproduction steps of the entire training are still unclear. The downloaded public datasets Whether preprocessing is required, images and label images need to be cut into small pieces. If you don't do distributed training, you can simply remove the distributed settings when training on one card. Do you have a more detailed description of the training steps? The description of the training parameter configuration config file allows us to reproduce the model training. Thank you.