Open lyk595 opened 1 year ago
We recommend using English or English & Chinese for issues so that we could have broader discussion.
Hi @lyk595, 可以看一下怎么配置的吗?
same issue, did you sovle this?
I have also encountered the same issue.
My solution was to upgrade mmseg to version 1.1.0
or higher.
version <= v1.0.0rc6
version >= v1.0.0
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug /home/lyk/lyk/mmsegmentation-1.0.0rc6/mmseg/datasets/transforms/loading.py:78: UserWarning:", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mmseg.datasets.samplers'
reduce_zero_label
will be deprecated, if you would like to ignore the zero label, please setreduce_zero_label=True
when dataset initialized warnings.warn('reduce_zero_label
will be deprecated, ' Traceback (most recent call last): File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 122, in build_from_cfg obj = obj_cls(*args) # type: ignore File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/runner/loops.py", line 219, in init super().init(runner, dataloader) File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/runner/base_loop.py", line 26, in init self.dataloader = runner.build_dataloader( File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1358, in build_dataloader sampler = DATA_SAMPLERS.build( File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/registry.py", line 548, in build return self.build_func(cfg, args, **kwargs, registry=self) File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 98, in build_from_cfg obj_cls = registry.get(obj_type) File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/registry.py", line 442, in get self.import_from_location() File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/registry.py", line 376, in import_from_location import_module(loc) File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "train.py", line 101, in
main()
File "train.py", line 97, in main
runner.train()
File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1687, in train
self._train_loop = self.build_train_loop(
File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1479, in build_train_loop
loop = LOOPS.build(
File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/registry.py", line 548, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/lyk/anaconda3/envs/mmseg106/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 144, in build_from_cfg
raise type(e)(
ModuleNotFoundError: class
IterBasedTrainLoop
in mmengine/runner/loops.py: No module named 'mmseg.datasets.samplers'Reproduction
python tools/train.py
Did you make any modifications on the code or config? Did you understand what you have modified? 我只是在根据教程配置mmseg。
What dataset did you use? voc2012和ade20都出现这种情况。
Environment
sys.platform: linux Python: 3.8.16 | packaged by conda-forge | (default, Feb 1 2023, 16:01:55) [GCC 11.3.0] CUDA available: True numpy_random_seed: 2147483648 GPU 0,1: NVIDIA GeForce RTX 4090 CUDA_HOME: /usr/local/cuda-11.3 NVCC: Cuda compilation tools, release 11.3, V11.3.109 GCC: gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026 PyTorch: 1.9.0+cu111 PyTorch compiling details: PyTorch built with:
TorchVision: 0.10.0+cu111 OpenCV: 4.7.0 MMEngine: 0.7.4 MMSegmentation: 1.0.0rc6+