Traceback (most recent call last):
File "test_images_output.py", line 41, in
result = inference_segmentor(model, img)
File "/mmsegmentation/mmseg/apis/inference.py", line 84, in inference_segmentor
test_pipeline = [LoadImage()] + cfg.data.test.pipeline[1:]
File "/mmcv/mmcv/utils/config.py", line 50, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'test'
Checklist
Describe the bug AttributeError: 'ConfigDict' object has no attribute 'test'
What command or script did you run?
result = inference_segmentor(model, img)
Did you make any modifications on the code or config? Did you understand what you have modified?
As the demo. Yes.
custom dataset
Environment
sys.platform: linux Python: 3.8.13 (default, Mar 28 2022, 11:38:47) [GCC 7.5.0] CUDA available: True GPU 0: NVIDIA A100-SXM4-40GB CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 11.2, V11.2.67 GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 PyTorch: 1.12.1+cu116 PyTorch compiling details: PyTorch built with:
TorchVision: 0.13.1+cu116 OpenCV: 4.5.5 MMCV: 1.6.1 MMCV Compiler: GCC 9.4 MMCV CUDA Compiler: 11.2 MMSegmentation: 0.27.0+dd42fa8
Error traceback
Traceback (most recent call last): File "test_images_output.py", line 41, in
result = inference_segmentor(model, img)
File "/mmsegmentation/mmseg/apis/inference.py", line 84, in inference_segmentor
test_pipeline = [LoadImage()] + cfg.data.test.pipeline[1:]
File "/mmcv/mmcv/utils/config.py", line 50, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'test'
Any help is appreciated!