facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.22k stars 5.45k forks source link

How can i run the keypoint demo? #902

Closed bruce2k closed 5 years ago

bruce2k commented 5 years ago

Hi, I run the mask demo, the model response perfect result, but when I want to run the keypoint demo, i got an error. big thank for any help!

script: python3 tools/infer_simple.py demo \ --cfg configs/12_2017_baselines/e2e_keypoint_rcnn_R-101-FPN_s1x.yaml \ --output-dir /tmp/detectron-visualizations \ --image-ext jpg \ --wts https://dl.fbaipublicfiles.com/detectron/37731079/12_2017_baselines/keypoint_rcnn_X-101-64x4d-FPN_1x.yaml.16_40_56.wj7Hg7lX/output/train/keypoints_coco_2014_train%3Akeypoints_coco_2014_valminusminival/generalized_rcnn/model_final.pkl

ERROR [I net_async_base.h:211] Created new CPU pool, size: 4; device id: -1 [E net_async_base.cc:382] [enforce fail at conv_opcudnn.cc:554] filter.dim32(1) == C / group. 4 vs 256 Error from operator: input: "gpu_0/res2_0_branch2a" input: "gpu_0/res2_0_branch2b_w" output: "gpu_0/res2_0_branch2b" name: "" type: "Conv" arg { name: "kernel" i: 3 } arg { name: "order" s: "NCHW" } arg { name: "stride" i: 1 } arg { name: "pad" i: 1 } arg { name: "dilation" i: 1 } arg { name: "exhaustive_search" i: 0 } device_option { device_type: 1 device_id: 0 } engine: "CUDNN"frame #0: c10::ThrowEnforceNotMet(char const, int, char const, std::string const&, void const) + 0x59 (0x7f8c9f1b28a9 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libc10.so) frame #1: + 0x3ca7299 (0x7f8c56b17299 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #2: + 0x3c940d0 (0x7f8c56b040d0 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #3: + 0x3c10df5 (0x7f8c56a80df5 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #4: caffe2::AsyncNetBase::run(int, int) + 0x144 (0x7f8c557e8604 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #5: + 0x297f1ea (0x7f8c557ef1ea in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #6: c10::ThreadPool::main_loop(unsigned long) + 0x2a3 (0x7f8c9f1aca63 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libc10.so) frame #7: + 0xc8421 (0x7f8ca463c421 in /home/bruce/miniconda3/envs/maskrcnn/bin/../lib/libstdc++.so.6) frame #8: + 0x77fc (0x7f8caafe57fc in /lib/x86_64-linux-gnu/libpthread.so.0) frame #9: clone + 0x3f (0x7f8caad12b5f in /lib/x86_64-linux-gnu/libc.so.6) , op Conv [E net_async_base.cc:134] Rethrowing exception from the run of 'generalized_rcnn' WARNING workspace.py: 222: Original python traceback for operator 7 in network generalized_rcnn in exception above (most recent call last): WARNING workspace.py: 227: File "tools/infer_simple.py", line 186, in WARNING workspace.py: 227: File "tools/infer_simple.py", line 136, in main WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/core/test_engine.py", line 327, in initialize_model_from_cfg WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/model_builder.py", line 124, in create WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/model_builder.py", line 89, in generalized_rcnn WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/model_builder.py", line 229, in build_generic_detection_model WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/optimizer.py", line 54, in build_data_parallel_model WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/model_builder.py", line 169, in _single_gpu_build_func WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/FPN.py", line 63, in add_fpn_ResNet101_conv5_body WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/FPN.py", line 104, in add_fpn_onto_conv_body WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/ResNet.py", line 48, in add_ResNet101_conv5_body WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/ResNet.py", line 103, in add_ResNet_convX_body WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/ResNet.py", line 85, in add_stage WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/ResNet.py", line 183, in add_residual_block WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/ResNet.py", line 316, in bottleneck_transformation WARNING workspace.py: 227: File "/home/bruce/detectron/detectron/modeling/detector.py", line 437, in ConvAffine WARNING workspace.py: 227: File "/home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/cnn.py", line 97, in Conv WARNING workspace.py: 227: File "/home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/brew.py", line 108, in scope_wrapper WARNING workspace.py: 227: File "/home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/helpers/conv.py", line 186, in conv WARNING workspace.py: 227: File "/home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/helpers/conv.py", line 139, in _ConvBase Traceback (most recent call last): File "tools/infer_simple.py", line 186, in main(args) File "tools/infer_simple.py", line 154, in main model, im, None, timers=timers File "/home/bruce/detectron/detectron/core/test.py", line 66, in im_detect_all model, im, cfg.TEST.SCALE, cfg.TEST.MAX_SIZE, boxes=box_proposals File "/home/bruce/detectron/detectron/core/test.py", line 158, in im_detect_bbox workspace.RunNet(model.net.Proto().name) File "/home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/workspace.py", line 254, in RunNet StringifyNetName(name), num_iter, allow_fail, File "/home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/workspace.py", line 215, in CallWithExceptionIntercept return func(args, *kwargs) RuntimeError: [enforce fail at conv_opcudnn.cc:554] filter.dim32(1) == C / group. 4 vs 256 Error from operator: input: "gpu_0/res2_0_branch2a" input: "gpu_0/res2_0_branch2b_w" output: "gpu_0/res2_0_branch2b" name: "" type: "Conv" arg { name: "kernel" i: 3 } arg { name: "order" s: "NCHW" } arg { name: "stride" i: 1 } arg { name: "pad" i: 1 } arg { name: "dilation" i: 1 } arg { name: "exhaustive_search" i: 0 } device_option { device_type: 1 device_id: 0 } engine: "CUDNN"frame #0: c10::ThrowEnforceNotMet(char const, int, char const, std::string const&, void const) + 0x59 (0x7f8c9f1b28a9 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libc10.so) frame #1: + 0x3ca7299 (0x7f8c56b17299 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #2: + 0x3c940d0 (0x7f8c56b040d0 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #3: + 0x3c10df5 (0x7f8c56a80df5 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #4: caffe2::AsyncNetBase::run(int, int) + 0x144 (0x7f8c557e8604 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #5: + 0x297f1ea (0x7f8c557ef1ea in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libtorch.so) frame #6: c10::ThreadPool::main_loop(unsigned long) + 0x2a3 (0x7f8c9f1aca63 in /home/bruce/miniconda3/envs/maskrcnn/lib/python3.6/site-packages/caffe2/python/../../torch/lib/libc10.so) frame #7: + 0xc8421 (0x7f8ca463c421 in /home/bruce/miniconda3/envs/maskrcnn/bin/../lib/libstdc++.so.6) frame #8: + 0x77fc (0x7f8caafe57fc in /lib/x86_64-linux-gnu/libpthread.so.0) frame #9: clone + 0x3f (0x7f8caad12b5f in /lib/x86_64-linux-gnu/libc.so.6)

System information

Operating system: ubuntu  17.10

Compiler version: gcc 7.3.0

CUDA Version 9.0.176
CUDA Patch Version 9.0.176.1
CUDA Patch Version 9.0.176.2
CUDA Patch Version 9.0.176.3
CUDA Patch Version 9.0.176.4
CUDNN_MAJOR 7
CUDNN_MINOR 0
CUDNN_PATCHLEVEL 5

NVIDIA-SMI 430.26       Driver Version: 430.26       CUDA Version: 10.2

GPU: 1080 Ti

python --version output: Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
Anything else that seems relevant: ?
bruce2k commented 5 years ago

use model zoo instructions solve my problem