KeyError: ''
SikangSHU opened this issue · comments
Hello, I run the program in windows. And an error occurred that
D:\Download\anaconda\anaconda\envs\learn\python.exe E:/Learning/Graduate/segmenter/segmenter-master/segm/train.py
Starting process with rank 0...
Process 0 is connected.
All processes are connected.
Traceback (most recent call last):
File "E:\Learning\Graduate\segmenter\segmenter-master\segm\train.py", line 304, in <module>
main()
File "D:\Download\anaconda\anaconda\envs\learn\lib\site-packages\click\core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "D:\Download\anaconda\anaconda\envs\learn\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "D:\Download\anaconda\anaconda\envs\learn\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "D:\Download\anaconda\anaconda\envs\learn\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "E:\Learning\Graduate\segmenter\segmenter-master\segm\train.py", line 76, in main
model_cfg = cfg["model"][backbone]
KeyError: ''
Do you know how to solve it? Thank you!
Hi @SikangSHU ,
It seems you are not passing any arguments to train.py, try with the command from the readme:
python -m segm.train --log-dir seg_tiny_mask --dataset ade20k \
--backbone vit_tiny_patch16_384 --decoder mask_transformer
Please try to carefully read the readme before opening an issue.
Hi @SikangSHU , It seems you are not passing any arguments to train.py, try with the command from the readme:
python -m segm.train --log-dir seg_tiny_mask --dataset ade20k \ --backbone vit_tiny_patch16_384 --decoder mask_transformerPlease try to carefully read the readme before opening an issue.
OK. I'm sorry for that. Thank you!
Alright, I will close this issue then. Good luck with your work!
Hello. I have read readme and installed all the requirement. But there is still an error that
(learn2) E:\Learning\Graduate\segmenter\segmenter-master>python -m segm.eval.miou seg_tiny_mask/checkpoint.pth ade20k --singlescale
Starting process with rank 0...
Process 0 is connected.
All processes are connected.
D:\Download\anaconda\anaconda\envs\learn2\lib\site-packages\torch\nn\functional.py:3613: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
Use normalization: {'mean': (127.5, 127.5, 127.5), 'std': (127.5, 127.5, 127.5)}
2022-03-09 19:06:05,775 - mmseg - INFO - Loaded 2000 images
D:\Download\anaconda\anaconda\envs\learn2\lib\site-packages\torch\utils\data\dataloader.py:481: UserWarning: This DataLoader will create 10 worker processes in total. Our suggested max number of worker in current system is 8 (`cpuset` is not taken into account), which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
cpuset_checked))
Traceback (most recent call last):
File "<string>", line 1, in <module>
Exception ignored in: <function _MultiProcessingDataLoaderIter.__del__ at 0x000001B89AFA2318>
Traceback (most recent call last):
File "D:\Download\anaconda\anaconda\envs\learn2\lib\multiprocessing\spawn.py", line 105, in spawn_main
File "D:\Download\anaconda\anaconda\envs\learn2\lib\site-packages\torch\utils\data\dataloader.py", line 1328, in __del__
exitcode = _main(fd)
File "D:\Download\anaconda\anaconda\envs\learn2\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
self._shutdown_workers() File "D:\Download\anaconda\anaconda\envs\learn2\lib\multiprocessing\spawn.py", line 223, in prepare
_fixup_main_from_name(data['init_main_from_name'])
File "D:\Download\anaconda\anaconda\envs\learn2\lib\site-packages\torch\utils\data\dataloader.py", line 1295, in _shutdown_workers
File "D:\Download\anaconda\anaconda\envs\learn2\lib\multiprocessing\spawn.py", line 249, in _fixup_main_from_name
alter_sys=True)
File "D:\Download\anaconda\anaconda\envs\learn2\lib\runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
if self._persistent_workers or self._workers_status[worker_id]: File "D:\Download\anaconda\anaconda\envs\learn2\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
AttributeError File "D:\Download\anaconda\anaconda\envs\learn2\lib\runpy.py", line 85, in _run_code
: exec(code, run_globals)
'_MultiProcessingDataLoaderIter' object has no attribute '_workers_status' File "E:\Learning\Graduate\segmenter\segmenter-master\segm\eval\miou.py", line 9, in <module>
import torch
File "D:\Download\anaconda\anaconda\envs\learn2\lib\site-packages\torch\__init__.py", line 124, in <module>
raise err
OSError: [WinError 1455] Error loading "D:\Download\anaconda\anaconda\envs\learn2\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.
Hi,
The error seems related to torch
and its installation rather than this repository.
Is it not necessary to install torch
that it may cause inconsistency when installing timm
?
Hi @SikangSHU ,
The purpose of issues in this repository is not to fix setup related issues. I am not using windows and cannot figure out the details for you. I am trying to help on Segmenter related issues.