Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

run infer_simple ValueError: too many values to unpack #809

Closed
anlianglu opened this issue Jan 23, 2019 · 3 comments
Closed

run infer_simple ValueError: too many values to unpack #809

anlianglu opened this issue Jan 23, 2019 · 3 comments

Comments

@anlianglu
Copy link

anlianglu commented Jan 23, 2019

python tools/infer_simple.py --cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml --output-dir /tmp/detectron-visualizations --image-ext jpg --wts https://dl.fbaipublicfiles.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl demo/17790319373_bd19b24cfc_k.jpg
/usr/local/lib/python2.7/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Found Detectron ops lib: /home/ubuntu/ai/facebook/pytorchtem/pytorch/build/lib/libcaffe2_detectron_ops_gpu.so
[E init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
WARNING cnn.py: 25: [====DEPRECATE WARNING====]: you are creating an object from CNNModelHelper class which will be deprecated soon. Please use ModelHelper object with brew module. For more information, please refer to caffe2.ai and python/brew.py, python/brew_test.py for more information.
INFO net.py: 51: Loading weights from: /tmp/detectron-download-cache/model_final.pkl
[I net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 0.00017763 secs
[I net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 0.00015202 secs
[I net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 1.4268e-05 secs
INFO infer_simple.py: 147: Processing demo/17790319373_bd19b24cfc_k.jpg -> /tmp/detectron-visualizations/17790319373_bd19b24cfc_k.jpg.pdf
[I net_async_base.h:211] Using specified CPU pool size: 4; device id: -1
[I net_async_base.h:216] Created new CPU pool, size: 4; device id: -1
[I net_async_base.h:211] Using specified CPU pool size: 4; device id: -1
[I net_async_base.h:216] Created new CPU pool, size: 4; device id: -1
Traceback (most recent call last):
File "tools/infer_simple.py", line 185, in
main(args)
File "tools/infer_simple.py", line 153, in main
model, im, None, timers=timers
ValueError: too many values to unpack

@sairams-intel
Copy link

For me, I found that using opencv-python 3.2.0.7 fixed the issue.

@darianfrajberg
Copy link

I had the same problem with the docker image and solved it with:
pip install opencv-python==3.2.0.7

@ir413
Copy link
Contributor

ir413 commented Apr 1, 2019

Hi all, as @sairams-intel and @darianfrajberg suggested, the issue is likely caused by different findContours signatures across OpenCV versions. This compatibility issue was addressed recently in b052093. Please retry with latest master and reopen the issue if the problem is still present.

@ir413 ir413 closed this as completed Apr 1, 2019
neixlo added a commit to neixlo/Detectron that referenced this issue Aug 15, 2019
pyyaml is not build as V3.12 in docker its: PyYAML (5.1.2), so I try to install it at last.
fix of facebookresearch#809 not working for me so I set opencv-python==3.2.0.7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants