facebookresearch / Detectron

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

Using convert_pkl_topb.py #877

Open satyajithj opened 5 years ago

satyajithj commented 5 years ago
...

Fusing affine channel...
Loading test file test/data/akvjocfxbvxldnuj.png...
Checking models...
Running the first model...
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.
WARNING model_builder.py: 138: Remapping old function name: mask_rcnn_heads.ResNet_mask_rcnn_fcn_head_v1up4convs -> mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs
INFO net.py:  60: Loading weights from: ./models/20190419_model_final.pkl
^[[AINFO net.py:  96: conv1_w loaded from weights file into gpu_0/conv1_w: (64, 3, 7, 7)
INFO net.py:  96: res_conv1_bn_s loaded from weights file into gpu_0/res_conv1_bn_s: (64,)
INFO net.py:  96: res_conv1_bn_b loaded from weights file into gpu_0/res_conv1_bn_b: (64,)
INFO net.py:  96: res2_0_branch2a_w loaded from weights file into gpu_0/res2_0_branch2a_w: (64, 64, 1, 1)
INFO net.py:  96: res2_0_branch2a_bn_s loaded from weights file into gpu_0/res2_0_branch2a_bn_s: (64,)
INFO net.py:  96: res2_0_branch2a_bn_b loaded from weights file into gpu_0/res2_0_branch2a_bn_b: (64,)
INFO net.py:  96: res2_0_branch2b_w loaded from weights file into gpu_0/res2_0_branch2b_w: (64, 64, 3, 3)
INFO net.py:  96: res2_0_branch2b_bn_s loaded from weights file into gpu_0/res2_0_branch2b_bn_s: (64,)
INFO net.py:  96: res2_0_branch2b_bn_b loaded from weights file into gpu_0/res2_0_branch2b_bn_b: (64,)
INFO net.py:  96: res2_0_branch2c_w loaded from weights file into gpu_0/res2_0_branch2c_w: (256, 64, 1, 1)
INFO net.py:  96: res2_0_branch2c_bn_s loaded from weights file into gpu_0/res2_0_branch2c_bn_s: (256,)
INFO net.py:  96: res2_0_branch2c_bn_b loaded from weights file into gpu_0/res2_0_branch2c_bn_b: (256,)
INFO net.py:  96: res2_0_branch1_w loaded from weights file into gpu_0/res2_0_branch1_w: (256, 64, 1, 1)

...

[I net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 4.9924e-05 secs
[I net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 5.3495e-05 secs
[I net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 1.0585e-05 secs
[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
Segmentation fault (core dumped)

Anyone else get Segmentation fault (core dumped) ?

satyajithj commented 5 years ago

Used it in the wrong manner.

Needs to contain the config file (--cfg), output dir (--out_dir) and end device (--device) My command:

python3 /path-to/convert_pkl_to_pb.py --cfg /path-to/config_mask_rcnn_R-50-FPN.yaml --out_dir ./pb --device gpu
satyajithj commented 5 years ago

Fails when a test image is provided. Crashes within the verify_model function.