Closed derow0208 closed 1 week ago
pip install -v -e .
pip install -v -e .
i've already tried, but it still ''ChangeCLIP is not in the mmseg::model registry'
(changeclip) (base) pengyw@zkyd:~/ChangeCLIP/mmsegmentation$ pip install -v -e .
Using pip 24.2 from /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/pip (python 3.8)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///home/pengyw/ChangeCLIP/mmsegmentation
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-la2ivcp5/mmsegmentation.egg-info
writing manifest file '/tmp/pip-pip-egg-info-la2ivcp5/mmsegmentation.egg-info/SOURCES.txt'
writing manifest file '/tmp/pip-pip-egg-info-la2ivcp5/mmsegmentation.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Requirement already satisfied: matplotlib in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from mmsegmentation==1.2.2) (3.7.5)
Requirement already satisfied: numpy in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from mmsegmentation==1.2.2) (1.24.1)
Requirement already satisfied: packaging in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from mmsegmentation==1.2.2) (24.1)
Requirement already satisfied: prettytable in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from mmsegmentation==1.2.2) (3.11.0)
Requirement already satisfied: scipy in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from mmsegmentation==1.2.2) (1.10.1)
Requirement already satisfied: contourpy>=1.0.1 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (1.1.1)
Requirement already satisfied: cycler>=0.10 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (4.54.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (1.4.7)
Requirement already satisfied: pillow>=6.2.0 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (10.2.0)
Requirement already satisfied: pyparsing>=2.3.1 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (3.1.4)
Requirement already satisfied: python-dateutil>=2.7 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (2.9.0.post0)
Requirement already satisfied: importlib-resources>=3.2.0 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from matplotlib->mmsegmentation==1.2.2) (6.4.5)
Requirement already satisfied: wcwidth in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from prettytable->mmsegmentation==1.2.2) (0.2.13)
Requirement already satisfied: zipp>=3.1.0 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from importlib-resources>=3.2.0->matplotlib->mmsegmentation==1.2.2) (3.20.2)
Requirement already satisfied: six>=1.5 in /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib->mmsegmentation==1.2.2) (1.16.0)
Installing collected packages: mmsegmentation
Attempting uninstall: mmsegmentation
Found existing installation: mmsegmentation 1.2.2
Uninstalling mmsegmentation-1.2.2:
Removing file or directory /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/mmsegmentation.egg-link
Removing pth entries from /home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/easy-install.pth:
Removing entry: /home/pengyw/ChangeCLIP/mmsegmentation
Successfully uninstalled mmsegmentation-1.2.2
DEPRECATION: Legacy editable install of mmsegmentation==1.2.2 from file:///home/pengyw/ChangeCLIP/mmsegmentation (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
Running setup.py develop for mmsegmentation
Running command python setup.py develop
running develop
running egg_info
writing manifest file 'mmsegmentation.egg-info/SOURCES.txt'
running build_ext
/home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Successfully installed mmsegmentation
(changeclip) (base) pengyw@zkyd:~/ChangeCLIP/mmsegmentation$ cd ..
(changeclip) (base) pengyw@zkyd:~/ChangeCLIP$ python tools/inference_img.py --device cuda:3 /home/pengyw/ChangeCLIP/configs/0cd_ce/changeclip_sysu_vit.py /home/pengyw/ChangeCLIP/ckpt/best_mIoU_iter_8000.pth
Traceback (most recent call last):
File "tools/inference_img.py", line 218, in <module>
main()
File "tools/inference_img.py", line 52, in main
model = init_model(args.config, args.checkpoint, device=args.device)
File "/home/pengyw/ChangeCLIP/mmsegmentation/mmseg/apis/inference.py", line 58, in init_model
model = MODELS.build(config.model)
File "/home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/pengyw/anaconda3/envs/changeclip/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 100, in build_from_cfg
raise KeyError(
KeyError: 'ChangeCLIP is not in the mmseg::model registry. Please check whether the value of `ChangeCLIP` is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module'
here is my terminal output, i have tried recreate my conda environment , but it still didn't work
I have tried to reinstall the mmsegmentation from source, but it still break down with 'KeyError: 'ChangeCLIP is not in the mmseg::model registry. Please check whether the value of
ChangeCLIP
is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module'