Skip to content
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

SAN model extension to image_demo.py code. init_model should be able to accomodate the side-adapter-network(SAN model) #3384

Closed
akshay25vyas opened this issue Oct 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@akshay25vyas
Copy link

Describe the feature

Motivation
A clear and concise description of the motivation of the feature.
Ex1. I want to to use init_model function generically to call all the segmentor models.

init_model(config_file, checkpoint_file, device='cuda:0')

However I am facing issue while doing that it says

Traceback (most recent call last):
File "/home/akshay/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/config/config.py", line 107, in getattr
value = super().getattr(name)
File "/home/akshay/anaconda3/envs/openmmlab/lib/python3.8/site-packages/addict/addict.py", line 67, in getattr
return self.getitem(item)
File "/home/akshay/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/config/config.py", line 136, in getitem
return self.build_lazy(super().getitem(key))
File "/home/akshay/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/config/config.py", line 103, in missing
raise KeyError(name)
KeyError: 'backbone'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "just_testing_mmseg_san.py", line 10, in
segmentor_model = init_model(config_file, checkpoint_file, device='cuda:0')
File "/home/akshay/work/colorformer_allcode/ColorFormer_SegFormer/mmsegmentation/mmseg/apis/inference.py", line 47, in init_model
elif 'init_cfg' in config.model.backbone:
File "/home/akshay/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/config/config.py", line 111, in getattr
raise AttributeError(f"'{self.class.name}' object has no "
AttributeError: 'ConfigDict' object has no attribute 'backbone'

@xiexinch xiexinch added the bug Something isn't working label Oct 16, 2023
xiexinch added a commit that referenced this issue Oct 16, 2023
## Motivation

#3384

## Modification

- mmseg/apis/inference.py
emily-lin pushed a commit to emily-lin/mmsegmentation that referenced this issue Nov 18, 2023
## Motivation

open-mmlab#3384

## Modification

- mmseg/apis/inference.py
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this issue Apr 5, 2024
## Motivation

open-mmlab#3384

## Modification

- mmseg/apis/inference.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants