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

AttributeError: 'ConfigDict' object has no attribute 'test_pipeline' #13

Closed
palinorz opened this issue Jul 16, 2020 · 1 comment · Fixed by #14
Closed

AttributeError: 'ConfigDict' object has no attribute 'test_pipeline' #13

palinorz opened this issue Jul 16, 2020 · 1 comment · Fixed by #14

Comments

@palinorz
Copy link

palinorz commented Jul 16, 2020

excuse me, there's some error when i try to use demo/img_demo.py
would you please give me some advices, thank you very very much.
truly sorry for wasting your time.

  1. use hrnet_w32_coco_384x288.py
    + hrnet_w32_coco_384x288-d9f0d786_20200708.pth
    on coco2017val

(mmpose) :/work/wjw_2020/app/mmpose-master_20200716/mmpose$ python demo/img_demo.py
configs/top_down/hrnet/coco/hrnet_w32_coco_384x288.py
work/hrnet_w32_coco_384x288-d9f0d786_20200708.pth
--img-root data/coco/val2017/
--json-file data/coco/annotations/person_keypoints_val2017.json
--show

loading annotations into memory...
Done (t=0.24s)
creating index...
index created!
Traceback (most recent call last):
File "demo/img_demo.py", line 91, in
main()
File "demo/img_demo.py", line 72, in main
pose_model, image_name, person_bboxes, format='xywh')
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmpose/apis/inference.py", line 230, in inference_pose_model
pose = _inference_single_pose_model(model, img_or_path, bbox)
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmpose/apis/inference.py", line 151, in _inference_single_pose_model
test_pipeline = [LoadImage()] + cfg.test_pipeline[1:]
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmcv/mmcv/utils/config.py", line 349, in getattr
return getattr(self._cfg_dict, name)
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmcv/mmcv/utils/config.py", line 37, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'test_pipeline'


  1. use hrnet_w32_coco_384x288.py
    + hrnet_w32_coco_384x288-d9f0d786_20200708.pth
    on test folder

(mmpose):/work/wjw_2020/app/mmpose-master_20200716/mmpose$ python demo/img_demo.py \
configs/top_down/hrnet/coco/hrnet_w32_coco_384x288.py
work/hrnet_w32_coco_384x288-d9f0d786_20200708.pth
--img-root tests/data/
--json-file tests/data/test_coco.json
--show

loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
Traceback (most recent call last):
File "demo/img_demo.py", line 91, in
main()
File "demo/img_demo.py", line 72, in main
pose_model, image_name, person_bboxes, format='xywh')
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmpose/apis/inference.py", line 230, in inference_pose_model
pose = _inference_single_pose_model(model, img_or_path, bbox)
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmpose/apis/inference.py", line 151, in _inference_single_pose_model
test_pipeline = [LoadImage()] + cfg.test_pipeline[1:]
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmcv/mmcv/utils/config.py", line 349, in getattr
return getattr(self._cfg_dict, name)
File "/home/gy/work/wjw_2020/app/mmpose-master_20200716/mmpose/mmcv/mmcv/utils/config.py", line 37, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'test_pipeline'


3-1.configs/bottom_up/higherhrnet/coco/higher_hrnet32_coco_512x512.py
+ higher_hrnet32_coco_512x512-8ae85183_20200713.pth
same error: AttributeError: 'ConfigDict' object has no attribute 'test_pipeline'

3-2.configs/top_down/resnet/coco
+ res50_coco_256x192-ec54d7f3_20200709.pth
same error: AttributeError: 'ConfigDict' object has no attribute 'test_pipeline'

4.other infomations:
4-1.ubuntu16.04, 1080Ti, Python 3.7.7, pytorch 1.5.1, GCC 7.3.0, mmcv 1.0.2, numpy 1.16.4, opencv 4.3.0, json_tricks 3.15.2
4-2.CUDA Version: 10.1 Driver Version: 418.87.00
4-3.get mmpose at 2020.07.16 by: git clone https://github.com/open-mmlab/mmpose.git
4-4.get mmcv at 2020.07.16 by: pip install mmcv
same error after try to uninstall and 'pip install mmcv-full';
same error after try to uninstall and 'pip install mmcv-full==latest+torch1.5.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html' command in https://github.com/open-mmlab/mmcv,
same error after try to uninstall and 'git clone https://github.com/open-mmlab/mmcv.git && cd mmcv && pip install -e .'
same error after try to uninstall and 'git clone https://github.com/open-mmlab/mmcv.git && cd mmcv && MMCV_WITH_OPS=1 pip install -e .'

4-6.conda list (it's too long, sorry!):
Name Version Build Channel
_libgcc_mutex 0.1 main
addict 2.2.1
albumentations 0.4.6
appdirs 1.4.4
blas 1.0 mkl
ca-certificates 2020.6.24 0
certifi 2020.6.20 py37_0
cityscapesScripts 1.5.0
clang-format 9.0.0
cudatoolkit 10.1.243 h6bb024c_0
cycler 0.10.0
Cython 0.29.21
decorator 4.4.2
freetype 2.10.2 h5ab3b9f_0
future 0.18.2
imagecorruptions 1.1.0
imageio 2.9.0
imgaug 0.4.0
intel-openmp 2020.1 217
jpeg 9b 0
json-tricks 3.15.2
kiwisolver 1.2.0
ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20191231 h7b6447c_0
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libgfortran-ng 7.3.0 hdf63c60_0
libpng 1.6.37 hbc83047_0
libstdcxx-ng 9.1.0 hdf63c60_0
libtiff 4.1.0 h2733197_1
lz4-c 1.9.2 he6710b0_0
matplotlib 3.2.2
mkl 2020.1 217
mkl_fft 1.0.12 py37ha843d7b_0
mkl_random 1.1.1 py37h0573a6f_0
mmcv 1.0.2
mmcv-full 1.0.2
mmcv-nightly 1.0rc0.dev20200630
mmdet 2.3.0rc0+5f2cded
mmpose 0.1.0+unknown
munkres 1.0.7 py_1
ncurses 6.2 he6710b0_1
networkx 2.4
ninja 1.7.2 0
numpy 1.16.4 py37h7e9f1db_0
numpy-base 1.16.4 py37hde5b4d6_0
olefile 0.46 py_0
opencv-python 4.3.0.36
openssl 1.1.1g h7b6447c_0
Pillow 6.2.2
pillow 7.1.2 py37hb39fc2d_0
pip 20.1.1 py37_1
pycocotools 2.0
pyparsing 2.4.7
python 3.7.7 hcff3b4d_5
python-dateutil 2.8.1
pytorch 1.5.1 py3.7_cuda10.1.243_cudnn7.6.3_0 pytorch
PyWavelets 1.1.1
PyYAML 5.3.1
readline 8.0 h7b6447c_0
scikit-image 0.17.2
scipy 1.5.1
setuptools 47.3.1 py37_0
Shapely 1.7.0
six 1.15.0
sqlite 3.32.3 h62c20be_0
terminaltables 3.1.0
tifffile 2020.7.4
tk 8.6.10 hbc83047_0
torchvision 0.6.1 py37_cu101 pytorch
wheel 0.34.2 py37_0
xz 5.2.5 h7b6447c_0
yapf 0.30.0
zlib 1.2.11 0
zstd 1.4.4 h0b5b093_3

4-7.one of the config i use,P.S.: have not do any change:
hrnet_w32_coco_384x288.py.txt

4-8.one of the weights i use,
hrnet_w32_coco_384x288-d9f0d786_20200708.pth from https://mmpose.readthedocs.io/en/latest/model_zoo.html
tp1
md5: 105a8076e55599d9e7ab0026eb894326

4-9.other infomation:
this enviroment running mmdet normally/ok;
i have search 'AttributeError: 'ConfigDict' object has no attribute 'test_pipeline'' with bing; then found 2 issue in mmdetection's issues, it said that the issue-asker's config is too old and git lastest mmdet can solve his problem.


maybe i did some wrong operation on enviroment...
look forward to reply,thankyou very much

innerlee pushed a commit that referenced this issue Jul 16, 2020
innerlee pushed a commit that referenced this issue Jul 16, 2020
@santhosh-inno
Copy link

Hi, the error is definitely resolved for COCO configs(mmpose) but same error still exists when testing on MPII configs(mmpose).

Here is the setting I used:

python $PATH_MMPOSE/demo/top_down_img_demo_with_mmdet.py $PATH_MMDET/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py
$PATH_MMDET_WEIGHTS/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
$PATH_MMPOSE/configs/top_down/hrnet/mpii/hrnet_w48_mpii_256x256.py
$PATH_MMPOSE_WEIGHTS/hrnet_w48_mpii_256x256-92cab7bd_20200812.pth
--img-root $IMG_ROOT
--img demo.jpg
--out-img-root vis_results

shuheilocale pushed a commit to shuheilocale/mmpose that referenced this issue May 6, 2023
HAOCHENYE pushed a commit to HAOCHENYE/mmpose that referenced this issue Jun 27, 2023
* tmp

* add scheduler unit test

* disable yapf

* add more test

* add more test

* not use torch test case

* solve comments

* update file

* add more unit tests

* resolve comments

* update cosine ut

* fix typo

* solve comments

* solve comments

* resolve comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants