-
Notifications
You must be signed in to change notification settings - Fork 21
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
Regarding the issue of not being able to run the code. #19
Comments
Hi @9527950 ,
Test:
|
Where is the instantiation of the entire network implemented in the code? I couldn't find the specific instantiation operation in the build function. |
build model: SeaFormer/seaformer-seg/tools/train.py Line 136 in cd1d009
model type config:
class EncoderDecoder:
build backbone:
build head:
|
I'm sorry for the confusion. Could you please provide me with a brief explanation of the build process here? Additionally, does the Encoder-Decoder file combine the backbone and the decode_head together? Thank you very much. “ MODELS = Registry('models', parent=MMCV_MODELS) BACKBONES = MODELS def build_segmentor(cfg, train_cfg=None, test_cfg=None): |
I've tried running this code but it returns: During handling of the above exception, another exception occurred:
I wanna know why this eccors since SeaFormer should have been registerd into backbone, have you ever got this error before cuz I didn't change a line of code so far. my environment: |
I'm not sure how this error was caused, but I deleted many unnecessary modules, and now it can run successfully.
笛卡尔式的梦
***@***.***
Original Email
Sender:"Katono"< ***@***.*** >;
Sent Time:2023/8/16 22:08
To:"fudan-zvg/SeaFormer"< ***@***.*** >;
Cc recipient:"9527950"< ***@***.*** >;"Mention"< ***@***.*** >;
Subject:Re: [fudan-zvg/SeaFormer] Regarding the issue of not being able torun the code. (Issue #19)
build model:
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/tools/train.py#L136
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/mmseg/models/builder.py#L38
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/mmseg/models/builder.py#L48
model type config:
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/local_configs/seaformer/seaformer_base.py#L29
class EncoderDecoder:
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/mmseg/models/segmentors/encoder_decoder.py#L14
build backbone:
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/mmseg/models/segmentors/encoder_decoder.py#L36
build head:
https://github.com/fudan-zvg/SeaFormer/blob/cd1d0092503215349ae4670aa80b03dee4d9a385/seaformer-seg/mmseg/models/segmentors/encoder_decoder.py#L49
I've tried running this code but it returns:
2023-08-16 22:02:45,352 - mmseg - INFO - Set random seed to 1704611828, deterministic: False
Traceback (most recent call last):
File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\utils\registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "E:\Miniconda\envs\sea\lib\site-packages\mmseg\models\segmentors\encoder_decoder.py", line 36, in init
self.backbone = builder.build_backbone(backbone)
File "E:\Miniconda\envs\sea\lib\site-packages\mmseg\models\builder.py", line 20, in build_backbone
return BACKBONES.build(cfg)
File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\utils\registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\utils\registry.py", line 44, in build_from_cfg
raise KeyError(
KeyError: 'SeaFormer is not in the models registry'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "tools/train.py", line 182, in <module> main() File "tools/train.py", line 137, in main model = build_segmentor( File "E:\Miniconda\envs\sea\lib\site-packages\mmseg\models\builder.py", line 48, in build_segmentor return SEGMENTORS.build( File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\utils\registry.py", line 212, in build return self.build_func(*args, **kwargs, registry=self) File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "E:\Miniconda\envs\sea\lib\site-packages\mmcv\utils\registry.py", line 55, in build_from_cfg raise type(e)(f'{obj_cls.__name__}: {e}') KeyError: "EncoderDecoder: 'SeaFormer is not in the models registry'"
I wanna know why this eccors since SeaFormer should have been registerd into backbone, have you ever got this error before cuz I didn't change a line of code so far.
my environment:
pytorch==1.9.1
cuda==11.1
mmcv-full==1.3.16
mmsegmentation==1.0.0
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Just reproduced this error on my linux computer, I follow the readme step by step only one different step: I directly use python tools/train.py instead of using the dist_train.sh since I only have one gpu, would that be the cause of the problem? If so how can I not using distribute train when using the .sh file. Thx for replying tho, I would be really grateful if you could generously gimme a help. Appreciate your work! |
(1)I have installed mmcv=1.4.1 and mmcv-full=1.4.0 versions, but I still encounter errors. I have tried multiple versions, but the errors persist. I would like to ask you about the specific version you have installed.
"
ext_module = ext_loader.load_ext(
File "/root/miniconda3/envs/YHG/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/root/miniconda3/envs/YHG/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
"
(2)In the seaFormer/mmseg/models directory, I cannot find the file that corresponds to the overall network depicted in Figure 2 of the paper.
(3)Additionally, I may need to upscale the segmentation results, which are 1/8 of the original size, back to the original size. How should I handle this?
The text was updated successfully, but these errors were encountered: