sample_uff_maskRCNN problems

Hi. I meet a problem about sample_uff_maskRCNN followed the repo: https://github.com/NVIDIA/TensorRT/tree/release/6.0/samples/opensource/sampleUffMaskRCNN

I want to run the demo on Nano. And I follow the link: IndexError: list index out of range(Object Detection And Instance Segmentations With A TensorFlow Ma...
to set up the Nano which is Jetpack4.3 tensorrt6.0 cuda10.

You know that Nano can not create the from .h5 to .pb because there is not enough GPU to create it. So I use my PC to create the mrcnn_nchw.uff and mrcnn_nchw.pbtxt and put them in Nano.

Then I run the command: ./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/
and it shows this result:
&&&& RUNNING TensorRT.sample_maskrcnn # ./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/
[03/08/2020-10:24:49] [I] Building and running a GPU inference engine for Mask RCNN
[03/08/2020-10:24:56] [E] [TRT] UffParser: Validator error: roi_align_mask_trt: Unsupported operation _PyramidROIAlign_TRT
&&&& FAILED TensorRT.sample_maskrcnn

./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/

Why would it show that?
Many thanks!

Hi,

Based on the instruction, the .h5 is converted to the .uff rather than .pb.
Are you using this tool for the conversion?

 python3 mrcnn_to_trt_single.py -w /path/to/data/mask_rcnn_coco.h5 -o /path/to/data/mrcnn_nchw.uff -p ./config.py

More detail of MaskRCNN setting can be found in this topic:

Thanks.

Hi AastaLLL,
Sure, I have used this method to convert the from .h5 to .uff.

I also found that there is no file named sampleUffMaskRCNN in /usr/src/tensorrt/samples/ when I install Jetpack4.3 for Nano.

So I downloaded the tensorrt-release-6.0 from the link:

https://github.com/NVIDIA/TensorRT/tree/release/6.0

And used

python3 mrcnn_to_trt_single.py -w /path/to/data/mask_rcnn_coco.h5 -o /path/to/data/mrcnn_nchw.uff -p ./config.py

Then the terminal shows as follow:

Using TensorFlow backend.
WARNING:tensorflow:From /usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py:18: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.

WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:146: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.


Configurations:
BACKBONE                       resnet101
BACKBONE_STRIDES               [4, 8, 16, 32, 64]
BATCH_SIZE                     1
BBOX_STD_DEV                   [0.1 0.1 0.2 0.2]
COMPUTE_BACKBONE_SHAPE         None
DETECTION_MAX_INSTANCES        100
DETECTION_MIN_CONFIDENCE       0.7
DETECTION_NMS_THRESHOLD        0.3
FPN_CLASSIF_FC_LAYERS_SIZE     1024
GPU_COUNT                      1
GRADIENT_CLIP_NORM             5.0
IMAGES_PER_GPU                 1
IMAGE_CHANNEL_COUNT            3
IMAGE_MAX_DIM                  1024
IMAGE_META_SIZE                93
IMAGE_MIN_DIM                  800
IMAGE_MIN_SCALE                0
IMAGE_RESIZE_MODE              square
IMAGE_SHAPE                    [1024 1024    3]
LEARNING_MOMENTUM              0.9
LEARNING_RATE                  0.001
LOSS_WEIGHTS                   {'rpn_class_loss': 1.0, 'rpn_bbox_loss': 1.0, 'mrcnn_class_loss': 1.0, 'mrcnn_bbox_loss': 1.0, 'mrcnn_mask_loss': 1.0}
MASK_POOL_SIZE                 14
MASK_SHAPE                     [28, 28]
MAX_GT_INSTANCES               100
MEAN_PIXEL                     [123.7 116.8 103.9]
MINI_MASK_SHAPE                (56, 56)
NAME                           coco
NUM_CLASSES                    81
POOL_SIZE                      7
POST_NMS_ROIS_INFERENCE        1000
POST_NMS_ROIS_TRAINING         2000
PRE_NMS_LIMIT                  6000
ROI_POSITIVE_RATIO             0.33
RPN_ANCHOR_RATIOS              [0.5, 1, 2]
RPN_ANCHOR_SCALES              (32, 64, 128, 256, 512)
RPN_ANCHOR_STRIDE              1
RPN_BBOX_STD_DEV               [0.1 0.1 0.2 0.2]
RPN_NMS_THRESHOLD              0.7
RPN_TRAIN_ANCHORS_PER_IMAGE    256
STEPS_PER_EPOCH                1000
TOP_DOWN_PYRAMID_SIZE          256
TRAIN_BN                       False
TRAIN_ROIS_PER_IMAGE           200
USE_MINI_MASK                  True
USE_RPN_ROIS                   True
VALIDATION_STEPS               50
WEIGHT_DECAY                   0.0001


WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:504: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3828: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:166: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.

WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3652: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:1928: The name tf.image.resize_nearest_neighbor is deprecated. Please use tf.compat.v1.image.resize_nearest_neighbor instead.

WARNING:tensorflow:From /home/zhu/Mask_RCNN/mrcnn/model.py:412: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /home/zhu/Mask_RCNN/mrcnn/model.py:374: calling crop_and_resize_v1 (from tensorflow.python.ops.image_ops_impl) with box_ind is deprecated and will be removed in a future version.
Instructions for updating:
box_ind is deprecated, use box_indices instead
WARNING:tensorflow:From /home/zhu/Mask_RCNN/mrcnn/model.py:731: The name tf.sets.set_intersection is deprecated. Please use tf.sets.intersection instead.

WARNING:tensorflow:From /home/zhu/Mask_RCNN/mrcnn/model.py:783: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.cast` instead.
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
input_image (InputLayer)        (None, 3, 1024, 1024 0                                            
__________________________________________________________________________________________________
zero_padding2d_1 (ZeroPadding2D (None, 3, 1030, 1030 0           input_image[0][0]                
__________________________________________________________________________________________________
conv1 (Conv2D)                  (None, 64, 512, 512) 9472        zero_padding2d_1[0][0]           
__________________________________________________________________________________________________
bn_conv1 (BatchNorm)            (None, 64, 512, 512) 256         conv1[0][0]                      
__________________________________________________________________________________________________
activation_1 (Activation)       (None, 64, 512, 512) 0           bn_conv1[0][0]                   
__________________________________________________________________________________________________
max_pooling2d_1 (MaxPooling2D)  (None, 64, 256, 256) 0           activation_1[0][0]               
__________________________________________________________________________________________________
res2a_branch2a (Conv2D)         (None, 64, 256, 256) 4160        max_pooling2d_1[0][0]            
__________________________________________________________________________________________________
bn2a_branch2a (BatchNorm)       (None, 64, 256, 256) 256         res2a_branch2a[0][0]             
__________________________________________________________________________________________________
activation_2 (Activation)       (None, 64, 256, 256) 0           bn2a_branch2a[0][0]              
__________________________________________________________________________________________________
res2a_branch2b (Conv2D)         (None, 64, 256, 256) 36928       activation_2[0][0]               
__________________________________________________________________________________________________
bn2a_branch2b (BatchNorm)       (None, 64, 256, 256) 256         res2a_branch2b[0][0]             
__________________________________________________________________________________________________
activation_3 (Activation)       (None, 64, 256, 256) 0           bn2a_branch2b[0][0]              
__________________________________________________________________________________________________
res2a_branch2c (Conv2D)         (None, 256, 256, 256 16640       activation_3[0][0]               
__________________________________________________________________________________________________
res2a_branch1 (Conv2D)          (None, 256, 256, 256 16640       max_pooling2d_1[0][0]            
__________________________________________________________________________________________________
bn2a_branch2c (BatchNorm)       (None, 256, 256, 256 1024        res2a_branch2c[0][0]             
__________________________________________________________________________________________________
bn2a_branch1 (BatchNorm)        (None, 256, 256, 256 1024        res2a_branch1[0][0]              
__________________________________________________________________________________________________
add_1 (Add)                     (None, 256, 256, 256 0           bn2a_branch2c[0][0]              
                                                                 bn2a_branch1[0][0]               
__________________________________________________________________________________________________
res2a_out (Activation)          (None, 256, 256, 256 0           add_1[0][0]                      
__________________________________________________________________________________________________
res2b_branch2a (Conv2D)         (None, 64, 256, 256) 16448       res2a_out[0][0]                  
__________________________________________________________________________________________________
bn2b_branch2a (BatchNorm)       (None, 64, 256, 256) 256         res2b_branch2a[0][0]             
__________________________________________________________________________________________________
activation_4 (Activation)       (None, 64, 256, 256) 0           bn2b_branch2a[0][0]              
__________________________________________________________________________________________________
res2b_branch2b (Conv2D)         (None, 64, 256, 256) 36928       activation_4[0][0]               
__________________________________________________________________________________________________
bn2b_branch2b (BatchNorm)       (None, 64, 256, 256) 256         res2b_branch2b[0][0]             
__________________________________________________________________________________________________
activation_5 (Activation)       (None, 64, 256, 256) 0           bn2b_branch2b[0][0]              
__________________________________________________________________________________________________
res2b_branch2c (Conv2D)         (None, 256, 256, 256 16640       activation_5[0][0]               
__________________________________________________________________________________________________
bn2b_branch2c (BatchNorm)       (None, 256, 256, 256 1024        res2b_branch2c[0][0]             
__________________________________________________________________________________________________
add_2 (Add)                     (None, 256, 256, 256 0           bn2b_branch2c[0][0]              
                                                                 res2a_out[0][0]                  
__________________________________________________________________________________________________
res2b_out (Activation)          (None, 256, 256, 256 0           add_2[0][0]                      
__________________________________________________________________________________________________
res2c_branch2a (Conv2D)         (None, 64, 256, 256) 16448       res2b_out[0][0]                  
__________________________________________________________________________________________________
bn2c_branch2a (BatchNorm)       (None, 64, 256, 256) 256         res2c_branch2a[0][0]             
__________________________________________________________________________________________________
activation_6 (Activation)       (None, 64, 256, 256) 0           bn2c_branch2a[0][0]              
__________________________________________________________________________________________________
res2c_branch2b (Conv2D)         (None, 64, 256, 256) 36928       activation_6[0][0]               
__________________________________________________________________________________________________
bn2c_branch2b (BatchNorm)       (None, 64, 256, 256) 256         res2c_branch2b[0][0]             
__________________________________________________________________________________________________
activation_7 (Activation)       (None, 64, 256, 256) 0           bn2c_branch2b[0][0]              
__________________________________________________________________________________________________
res2c_branch2c (Conv2D)         (None, 256, 256, 256 16640       activation_7[0][0]               
__________________________________________________________________________________________________
bn2c_branch2c (BatchNorm)       (None, 256, 256, 256 1024        res2c_branch2c[0][0]             
__________________________________________________________________________________________________
add_3 (Add)                     (None, 256, 256, 256 0           bn2c_branch2c[0][0]              
                                                                 res2b_out[0][0]                  
__________________________________________________________________________________________________
res2c_out (Activation)          (None, 256, 256, 256 0           add_3[0][0]                      
__________________________________________________________________________________________________
res3a_branch2a (Conv2D)         (None, 128, 128, 128 32896       res2c_out[0][0]                  
__________________________________________________________________________________________________
bn3a_branch2a (BatchNorm)       (None, 128, 128, 128 512         res3a_branch2a[0][0]             
__________________________________________________________________________________________________
activation_8 (Activation)       (None, 128, 128, 128 0           bn3a_branch2a[0][0]              
__________________________________________________________________________________________________
res3a_branch2b (Conv2D)         (None, 128, 128, 128 147584      activation_8[0][0]               
__________________________________________________________________________________________________
bn3a_branch2b (BatchNorm)       (None, 128, 128, 128 512         res3a_branch2b[0][0]             
__________________________________________________________________________________________________
activation_9 (Activation)       (None, 128, 128, 128 0           bn3a_branch2b[0][0]              
__________________________________________________________________________________________________
res3a_branch2c (Conv2D)         (None, 512, 128, 128 66048       activation_9[0][0]               
__________________________________________________________________________________________________
res3a_branch1 (Conv2D)          (None, 512, 128, 128 131584      res2c_out[0][0]                  
__________________________________________________________________________________________________
bn3a_branch2c (BatchNorm)       (None, 512, 128, 128 2048        res3a_branch2c[0][0]             
__________________________________________________________________________________________________
bn3a_branch1 (BatchNorm)        (None, 512, 128, 128 2048        res3a_branch1[0][0]              
__________________________________________________________________________________________________
add_4 (Add)                     (None, 512, 128, 128 0           bn3a_branch2c[0][0]              
                                                                 bn3a_branch1[0][0]               
__________________________________________________________________________________________________
res3a_out (Activation)          (None, 512, 128, 128 0           add_4[0][0]                      
__________________________________________________________________________________________________
res3b_branch2a (Conv2D)         (None, 128, 128, 128 65664       res3a_out[0][0]                  
__________________________________________________________________________________________________
bn3b_branch2a (BatchNorm)       (None, 128, 128, 128 512         res3b_branch2a[0][0]             
__________________________________________________________________________________________________
activation_10 (Activation)      (None, 128, 128, 128 0           bn3b_branch2a[0][0]              
__________________________________________________________________________________________________
res3b_branch2b (Conv2D)         (None, 128, 128, 128 147584      activation_10[0][0]              
__________________________________________________________________________________________________
bn3b_branch2b (BatchNorm)       (None, 128, 128, 128 512         res3b_branch2b[0][0]             
__________________________________________________________________________________________________
activation_11 (Activation)      (None, 128, 128, 128 0           bn3b_branch2b[0][0]              
__________________________________________________________________________________________________
res3b_branch2c (Conv2D)         (None, 512, 128, 128 66048       activation_11[0][0]              
__________________________________________________________________________________________________
bn3b_branch2c (BatchNorm)       (None, 512, 128, 128 2048        res3b_branch2c[0][0]             
__________________________________________________________________________________________________
add_5 (Add)                     (None, 512, 128, 128 0           bn3b_branch2c[0][0]              
                                                                 res3a_out[0][0]                  
__________________________________________________________________________________________________
res3b_out (Activation)          (None, 512, 128, 128 0           add_5[0][0]                      
__________________________________________________________________________________________________
res3c_branch2a (Conv2D)         (None, 128, 128, 128 65664       res3b_out[0][0]                  
__________________________________________________________________________________________________
bn3c_branch2a (BatchNorm)       (None, 128, 128, 128 512         res3c_branch2a[0][0]             
__________________________________________________________________________________________________
activation_12 (Activation)      (None, 128, 128, 128 0           bn3c_branch2a[0][0]              
__________________________________________________________________________________________________
res3c_branch2b (Conv2D)         (None, 128, 128, 128 147584      activation_12[0][0]              
__________________________________________________________________________________________________
bn3c_branch2b (BatchNorm)       (None, 128, 128, 128 512         res3c_branch2b[0][0]             
__________________________________________________________________________________________________
activation_13 (Activation)      (None, 128, 128, 128 0           bn3c_branch2b[0][0]              
__________________________________________________________________________________________________
res3c_branch2c (Conv2D)         (None, 512, 128, 128 66048       activation_13[0][0]              
__________________________________________________________________________________________________
bn3c_branch2c (BatchNorm)       (None, 512, 128, 128 2048        res3c_branch2c[0][0]             
__________________________________________________________________________________________________
add_6 (Add)                     (None, 512, 128, 128 0           bn3c_branch2c[0][0]              
                                                                 res3b_out[0][0]                  
__________________________________________________________________________________________________
res3c_out (Activation)          (None, 512, 128, 128 0           add_6[0][0]                      
__________________________________________________________________________________________________
res3d_branch2a (Conv2D)         (None, 128, 128, 128 65664       res3c_out[0][0]                  
__________________________________________________________________________________________________
bn3d_branch2a (BatchNorm)       (None, 128, 128, 128 512         res3d_branch2a[0][0]             
__________________________________________________________________________________________________
activation_14 (Activation)      (None, 128, 128, 128 0           bn3d_branch2a[0][0]              
__________________________________________________________________________________________________
res3d_branch2b (Conv2D)         (None, 128, 128, 128 147584      activation_14[0][0]              
__________________________________________________________________________________________________
bn3d_branch2b (BatchNorm)       (None, 128, 128, 128 512         res3d_branch2b[0][0]             
__________________________________________________________________________________________________
activation_15 (Activation)      (None, 128, 128, 128 0           bn3d_branch2b[0][0]              
__________________________________________________________________________________________________
res3d_branch2c (Conv2D)         (None, 512, 128, 128 66048       activation_15[0][0]              
__________________________________________________________________________________________________
bn3d_branch2c (BatchNorm)       (None, 512, 128, 128 2048        res3d_branch2c[0][0]             
__________________________________________________________________________________________________
add_7 (Add)                     (None, 512, 128, 128 0           bn3d_branch2c[0][0]              
                                                                 res3c_out[0][0]                  
__________________________________________________________________________________________________
res3d_out (Activation)          (None, 512, 128, 128 0           add_7[0][0]                      
__________________________________________________________________________________________________
res4a_branch2a (Conv2D)         (None, 256, 64, 64)  131328      res3d_out[0][0]                  
__________________________________________________________________________________________________
bn4a_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4a_branch2a[0][0]             
__________________________________________________________________________________________________
activation_16 (Activation)      (None, 256, 64, 64)  0           bn4a_branch2a[0][0]              
__________________________________________________________________________________________________
res4a_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_16[0][0]              
__________________________________________________________________________________________________
bn4a_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4a_branch2b[0][0]             
__________________________________________________________________________________________________
activation_17 (Activation)      (None, 256, 64, 64)  0           bn4a_branch2b[0][0]              
__________________________________________________________________________________________________
res4a_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_17[0][0]              
__________________________________________________________________________________________________
res4a_branch1 (Conv2D)          (None, 1024, 64, 64) 525312      res3d_out[0][0]                  
__________________________________________________________________________________________________
bn4a_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4a_branch2c[0][0]             
__________________________________________________________________________________________________
bn4a_branch1 (BatchNorm)        (None, 1024, 64, 64) 4096        res4a_branch1[0][0]              
__________________________________________________________________________________________________
add_8 (Add)                     (None, 1024, 64, 64) 0           bn4a_branch2c[0][0]              
                                                                 bn4a_branch1[0][0]               
__________________________________________________________________________________________________
res4a_out (Activation)          (None, 1024, 64, 64) 0           add_8[0][0]                      
__________________________________________________________________________________________________
res4b_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4a_out[0][0]                  
__________________________________________________________________________________________________
bn4b_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4b_branch2a[0][0]             
__________________________________________________________________________________________________
activation_18 (Activation)      (None, 256, 64, 64)  0           bn4b_branch2a[0][0]              
__________________________________________________________________________________________________
res4b_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_18[0][0]              
__________________________________________________________________________________________________
bn4b_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4b_branch2b[0][0]             
__________________________________________________________________________________________________
activation_19 (Activation)      (None, 256, 64, 64)  0           bn4b_branch2b[0][0]              
__________________________________________________________________________________________________
res4b_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_19[0][0]              
__________________________________________________________________________________________________
bn4b_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4b_branch2c[0][0]             
__________________________________________________________________________________________________
add_9 (Add)                     (None, 1024, 64, 64) 0           bn4b_branch2c[0][0]              
                                                                 res4a_out[0][0]                  
__________________________________________________________________________________________________
res4b_out (Activation)          (None, 1024, 64, 64) 0           add_9[0][0]                      
__________________________________________________________________________________________________
res4c_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4b_out[0][0]                  
__________________________________________________________________________________________________
bn4c_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4c_branch2a[0][0]             
__________________________________________________________________________________________________
activation_20 (Activation)      (None, 256, 64, 64)  0           bn4c_branch2a[0][0]              
__________________________________________________________________________________________________
res4c_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_20[0][0]              
__________________________________________________________________________________________________
bn4c_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4c_branch2b[0][0]             
__________________________________________________________________________________________________
activation_21 (Activation)      (None, 256, 64, 64)  0           bn4c_branch2b[0][0]              
__________________________________________________________________________________________________
res4c_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_21[0][0]              
__________________________________________________________________________________________________
bn4c_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4c_branch2c[0][0]             
__________________________________________________________________________________________________
add_10 (Add)                    (None, 1024, 64, 64) 0           bn4c_branch2c[0][0]              
                                                                 res4b_out[0][0]                  
__________________________________________________________________________________________________
res4c_out (Activation)          (None, 1024, 64, 64) 0           add_10[0][0]                     
__________________________________________________________________________________________________
res4d_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4c_out[0][0]                  
__________________________________________________________________________________________________
bn4d_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4d_branch2a[0][0]             
__________________________________________________________________________________________________
activation_22 (Activation)      (None, 256, 64, 64)  0           bn4d_branch2a[0][0]              
__________________________________________________________________________________________________
res4d_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_22[0][0]              
__________________________________________________________________________________________________
bn4d_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4d_branch2b[0][0]             
__________________________________________________________________________________________________
activation_23 (Activation)      (None, 256, 64, 64)  0           bn4d_branch2b[0][0]              
__________________________________________________________________________________________________
res4d_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_23[0][0]              
__________________________________________________________________________________________________
bn4d_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4d_branch2c[0][0]             
__________________________________________________________________________________________________
add_11 (Add)                    (None, 1024, 64, 64) 0           bn4d_branch2c[0][0]              
                                                                 res4c_out[0][0]                  
__________________________________________________________________________________________________
res4d_out (Activation)          (None, 1024, 64, 64) 0           add_11[0][0]                     
__________________________________________________________________________________________________
res4e_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4d_out[0][0]                  
__________________________________________________________________________________________________
bn4e_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4e_branch2a[0][0]             
__________________________________________________________________________________________________
activation_24 (Activation)      (None, 256, 64, 64)  0           bn4e_branch2a[0][0]              
__________________________________________________________________________________________________
res4e_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_24[0][0]              
__________________________________________________________________________________________________
bn4e_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4e_branch2b[0][0]             
__________________________________________________________________________________________________
activation_25 (Activation)      (None, 256, 64, 64)  0           bn4e_branch2b[0][0]              
__________________________________________________________________________________________________
res4e_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_25[0][0]              
__________________________________________________________________________________________________
bn4e_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4e_branch2c[0][0]             
__________________________________________________________________________________________________
add_12 (Add)                    (None, 1024, 64, 64) 0           bn4e_branch2c[0][0]              
                                                                 res4d_out[0][0]                  
__________________________________________________________________________________________________
res4e_out (Activation)          (None, 1024, 64, 64) 0           add_12[0][0]                     
__________________________________________________________________________________________________
res4f_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4e_out[0][0]                  
__________________________________________________________________________________________________
bn4f_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4f_branch2a[0][0]             
__________________________________________________________________________________________________
activation_26 (Activation)      (None, 256, 64, 64)  0           bn4f_branch2a[0][0]              
__________________________________________________________________________________________________
res4f_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_26[0][0]              
__________________________________________________________________________________________________
bn4f_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4f_branch2b[0][0]             
__________________________________________________________________________________________________
activation_27 (Activation)      (None, 256, 64, 64)  0           bn4f_branch2b[0][0]              
__________________________________________________________________________________________________
res4f_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_27[0][0]              
__________________________________________________________________________________________________
bn4f_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4f_branch2c[0][0]             
__________________________________________________________________________________________________
add_13 (Add)                    (None, 1024, 64, 64) 0           bn4f_branch2c[0][0]              
                                                                 res4e_out[0][0]                  
__________________________________________________________________________________________________
res4f_out (Activation)          (None, 1024, 64, 64) 0           add_13[0][0]                     
__________________________________________________________________________________________________
res4g_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4f_out[0][0]                  
__________________________________________________________________________________________________
bn4g_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4g_branch2a[0][0]             
__________________________________________________________________________________________________
activation_28 (Activation)      (None, 256, 64, 64)  0           bn4g_branch2a[0][0]              
__________________________________________________________________________________________________
res4g_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_28[0][0]              
__________________________________________________________________________________________________
bn4g_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4g_branch2b[0][0]             
__________________________________________________________________________________________________
activation_29 (Activation)      (None, 256, 64, 64)  0           bn4g_branch2b[0][0]              
__________________________________________________________________________________________________
res4g_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_29[0][0]              
__________________________________________________________________________________________________
bn4g_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4g_branch2c[0][0]             
__________________________________________________________________________________________________
add_14 (Add)                    (None, 1024, 64, 64) 0           bn4g_branch2c[0][0]              
                                                                 res4f_out[0][0]                  
__________________________________________________________________________________________________
res4g_out (Activation)          (None, 1024, 64, 64) 0           add_14[0][0]                     
__________________________________________________________________________________________________
res4h_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4g_out[0][0]                  
__________________________________________________________________________________________________
bn4h_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4h_branch2a[0][0]             
__________________________________________________________________________________________________
activation_30 (Activation)      (None, 256, 64, 64)  0           bn4h_branch2a[0][0]              
__________________________________________________________________________________________________
res4h_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_30[0][0]              
__________________________________________________________________________________________________
bn4h_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4h_branch2b[0][0]             
__________________________________________________________________________________________________
activation_31 (Activation)      (None, 256, 64, 64)  0           bn4h_branch2b[0][0]              
__________________________________________________________________________________________________
res4h_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_31[0][0]              
__________________________________________________________________________________________________
bn4h_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4h_branch2c[0][0]             
__________________________________________________________________________________________________
add_15 (Add)                    (None, 1024, 64, 64) 0           bn4h_branch2c[0][0]              
                                                                 res4g_out[0][0]                  
__________________________________________________________________________________________________
res4h_out (Activation)          (None, 1024, 64, 64) 0           add_15[0][0]                     
__________________________________________________________________________________________________
res4i_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4h_out[0][0]                  
__________________________________________________________________________________________________
bn4i_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4i_branch2a[0][0]             
__________________________________________________________________________________________________
activation_32 (Activation)      (None, 256, 64, 64)  0           bn4i_branch2a[0][0]              
__________________________________________________________________________________________________
res4i_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_32[0][0]              
__________________________________________________________________________________________________
bn4i_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4i_branch2b[0][0]             
__________________________________________________________________________________________________
activation_33 (Activation)      (None, 256, 64, 64)  0           bn4i_branch2b[0][0]              
__________________________________________________________________________________________________
res4i_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_33[0][0]              
__________________________________________________________________________________________________
bn4i_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4i_branch2c[0][0]             
__________________________________________________________________________________________________
add_16 (Add)                    (None, 1024, 64, 64) 0           bn4i_branch2c[0][0]              
                                                                 res4h_out[0][0]                  
__________________________________________________________________________________________________
res4i_out (Activation)          (None, 1024, 64, 64) 0           add_16[0][0]                     
__________________________________________________________________________________________________
res4j_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4i_out[0][0]                  
__________________________________________________________________________________________________
bn4j_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4j_branch2a[0][0]             
__________________________________________________________________________________________________
activation_34 (Activation)      (None, 256, 64, 64)  0           bn4j_branch2a[0][0]              
__________________________________________________________________________________________________
res4j_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_34[0][0]              
__________________________________________________________________________________________________
bn4j_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4j_branch2b[0][0]             
__________________________________________________________________________________________________
activation_35 (Activation)      (None, 256, 64, 64)  0           bn4j_branch2b[0][0]              
__________________________________________________________________________________________________
res4j_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_35[0][0]              
__________________________________________________________________________________________________
bn4j_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4j_branch2c[0][0]             
__________________________________________________________________________________________________
add_17 (Add)                    (None, 1024, 64, 64) 0           bn4j_branch2c[0][0]              
                                                                 res4i_out[0][0]                  
__________________________________________________________________________________________________
res4j_out (Activation)          (None, 1024, 64, 64) 0           add_17[0][0]                     
__________________________________________________________________________________________________
res4k_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4j_out[0][0]                  
__________________________________________________________________________________________________
bn4k_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4k_branch2a[0][0]             
__________________________________________________________________________________________________
activation_36 (Activation)      (None, 256, 64, 64)  0           bn4k_branch2a[0][0]              
__________________________________________________________________________________________________
res4k_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_36[0][0]              
__________________________________________________________________________________________________
bn4k_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4k_branch2b[0][0]             
__________________________________________________________________________________________________
activation_37 (Activation)      (None, 256, 64, 64)  0           bn4k_branch2b[0][0]              
__________________________________________________________________________________________________
res4k_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_37[0][0]              
__________________________________________________________________________________________________
bn4k_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4k_branch2c[0][0]             
__________________________________________________________________________________________________
add_18 (Add)                    (None, 1024, 64, 64) 0           bn4k_branch2c[0][0]              
                                                                 res4j_out[0][0]                  
__________________________________________________________________________________________________
res4k_out (Activation)          (None, 1024, 64, 64) 0           add_18[0][0]                     
__________________________________________________________________________________________________
res4l_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4k_out[0][0]                  
__________________________________________________________________________________________________
bn4l_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4l_branch2a[0][0]             
__________________________________________________________________________________________________
activation_38 (Activation)      (None, 256, 64, 64)  0           bn4l_branch2a[0][0]              
__________________________________________________________________________________________________
res4l_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_38[0][0]              
__________________________________________________________________________________________________
bn4l_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4l_branch2b[0][0]             
__________________________________________________________________________________________________
activation_39 (Activation)      (None, 256, 64, 64)  0           bn4l_branch2b[0][0]              
__________________________________________________________________________________________________
res4l_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_39[0][0]              
__________________________________________________________________________________________________
bn4l_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4l_branch2c[0][0]             
__________________________________________________________________________________________________
add_19 (Add)                    (None, 1024, 64, 64) 0           bn4l_branch2c[0][0]              
                                                                 res4k_out[0][0]                  
__________________________________________________________________________________________________
res4l_out (Activation)          (None, 1024, 64, 64) 0           add_19[0][0]                     
__________________________________________________________________________________________________
res4m_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4l_out[0][0]                  
__________________________________________________________________________________________________
bn4m_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4m_branch2a[0][0]             
__________________________________________________________________________________________________
activation_40 (Activation)      (None, 256, 64, 64)  0           bn4m_branch2a[0][0]              
__________________________________________________________________________________________________
res4m_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_40[0][0]              
__________________________________________________________________________________________________
bn4m_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4m_branch2b[0][0]             
__________________________________________________________________________________________________
activation_41 (Activation)      (None, 256, 64, 64)  0           bn4m_branch2b[0][0]              
__________________________________________________________________________________________________
res4m_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_41[0][0]              
__________________________________________________________________________________________________
bn4m_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4m_branch2c[0][0]             
__________________________________________________________________________________________________
add_20 (Add)                    (None, 1024, 64, 64) 0           bn4m_branch2c[0][0]              
                                                                 res4l_out[0][0]                  
__________________________________________________________________________________________________
res4m_out (Activation)          (None, 1024, 64, 64) 0           add_20[0][0]                     
__________________________________________________________________________________________________
res4n_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4m_out[0][0]                  
__________________________________________________________________________________________________
bn4n_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4n_branch2a[0][0]             
__________________________________________________________________________________________________
activation_42 (Activation)      (None, 256, 64, 64)  0           bn4n_branch2a[0][0]              
__________________________________________________________________________________________________
res4n_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_42[0][0]              
__________________________________________________________________________________________________
bn4n_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4n_branch2b[0][0]             
__________________________________________________________________________________________________
activation_43 (Activation)      (None, 256, 64, 64)  0           bn4n_branch2b[0][0]              
__________________________________________________________________________________________________
res4n_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_43[0][0]              
__________________________________________________________________________________________________
bn4n_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4n_branch2c[0][0]             
__________________________________________________________________________________________________
add_21 (Add)                    (None, 1024, 64, 64) 0           bn4n_branch2c[0][0]              
                                                                 res4m_out[0][0]                  
__________________________________________________________________________________________________
res4n_out (Activation)          (None, 1024, 64, 64) 0           add_21[0][0]                     
__________________________________________________________________________________________________
res4o_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4n_out[0][0]                  
__________________________________________________________________________________________________
bn4o_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4o_branch2a[0][0]             
__________________________________________________________________________________________________
activation_44 (Activation)      (None, 256, 64, 64)  0           bn4o_branch2a[0][0]              
__________________________________________________________________________________________________
res4o_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_44[0][0]              
__________________________________________________________________________________________________
bn4o_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4o_branch2b[0][0]             
__________________________________________________________________________________________________
activation_45 (Activation)      (None, 256, 64, 64)  0           bn4o_branch2b[0][0]              
__________________________________________________________________________________________________
res4o_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_45[0][0]              
__________________________________________________________________________________________________
bn4o_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4o_branch2c[0][0]             
__________________________________________________________________________________________________
add_22 (Add)                    (None, 1024, 64, 64) 0           bn4o_branch2c[0][0]              
                                                                 res4n_out[0][0]                  
__________________________________________________________________________________________________
res4o_out (Activation)          (None, 1024, 64, 64) 0           add_22[0][0]                     
__________________________________________________________________________________________________
res4p_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4o_out[0][0]                  
__________________________________________________________________________________________________
bn4p_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4p_branch2a[0][0]             
__________________________________________________________________________________________________
activation_46 (Activation)      (None, 256, 64, 64)  0           bn4p_branch2a[0][0]              
__________________________________________________________________________________________________
res4p_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_46[0][0]              
__________________________________________________________________________________________________
bn4p_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4p_branch2b[0][0]             
__________________________________________________________________________________________________
activation_47 (Activation)      (None, 256, 64, 64)  0           bn4p_branch2b[0][0]              
__________________________________________________________________________________________________
res4p_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_47[0][0]              
__________________________________________________________________________________________________
bn4p_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4p_branch2c[0][0]             
__________________________________________________________________________________________________
add_23 (Add)                    (None, 1024, 64, 64) 0           bn4p_branch2c[0][0]              
                                                                 res4o_out[0][0]                  
__________________________________________________________________________________________________
res4p_out (Activation)          (None, 1024, 64, 64) 0           add_23[0][0]                     
__________________________________________________________________________________________________
res4q_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4p_out[0][0]                  
__________________________________________________________________________________________________
bn4q_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4q_branch2a[0][0]             
__________________________________________________________________________________________________
activation_48 (Activation)      (None, 256, 64, 64)  0           bn4q_branch2a[0][0]              
__________________________________________________________________________________________________
res4q_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_48[0][0]              
__________________________________________________________________________________________________
bn4q_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4q_branch2b[0][0]             
__________________________________________________________________________________________________
activation_49 (Activation)      (None, 256, 64, 64)  0           bn4q_branch2b[0][0]              
__________________________________________________________________________________________________
res4q_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_49[0][0]              
__________________________________________________________________________________________________
bn4q_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4q_branch2c[0][0]             
__________________________________________________________________________________________________
add_24 (Add)                    (None, 1024, 64, 64) 0           bn4q_branch2c[0][0]              
                                                                 res4p_out[0][0]                  
__________________________________________________________________________________________________
res4q_out (Activation)          (None, 1024, 64, 64) 0           add_24[0][0]                     
__________________________________________________________________________________________________
res4r_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4q_out[0][0]                  
__________________________________________________________________________________________________
bn4r_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4r_branch2a[0][0]             
__________________________________________________________________________________________________
activation_50 (Activation)      (None, 256, 64, 64)  0           bn4r_branch2a[0][0]              
__________________________________________________________________________________________________
res4r_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_50[0][0]              
__________________________________________________________________________________________________
bn4r_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4r_branch2b[0][0]             
__________________________________________________________________________________________________
activation_51 (Activation)      (None, 256, 64, 64)  0           bn4r_branch2b[0][0]              
__________________________________________________________________________________________________
res4r_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_51[0][0]              
__________________________________________________________________________________________________
bn4r_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4r_branch2c[0][0]             
__________________________________________________________________________________________________
add_25 (Add)                    (None, 1024, 64, 64) 0           bn4r_branch2c[0][0]              
                                                                 res4q_out[0][0]                  
__________________________________________________________________________________________________
res4r_out (Activation)          (None, 1024, 64, 64) 0           add_25[0][0]                     
__________________________________________________________________________________________________
res4s_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4r_out[0][0]                  
__________________________________________________________________________________________________
bn4s_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4s_branch2a[0][0]             
__________________________________________________________________________________________________
activation_52 (Activation)      (None, 256, 64, 64)  0           bn4s_branch2a[0][0]              
__________________________________________________________________________________________________
res4s_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_52[0][0]              
__________________________________________________________________________________________________
bn4s_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4s_branch2b[0][0]             
__________________________________________________________________________________________________
activation_53 (Activation)      (None, 256, 64, 64)  0           bn4s_branch2b[0][0]              
__________________________________________________________________________________________________
res4s_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_53[0][0]              
__________________________________________________________________________________________________
bn4s_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4s_branch2c[0][0]             
__________________________________________________________________________________________________
add_26 (Add)                    (None, 1024, 64, 64) 0           bn4s_branch2c[0][0]              
                                                                 res4r_out[0][0]                  
__________________________________________________________________________________________________
res4s_out (Activation)          (None, 1024, 64, 64) 0           add_26[0][0]                     
__________________________________________________________________________________________________
res4t_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4s_out[0][0]                  
__________________________________________________________________________________________________
bn4t_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4t_branch2a[0][0]             
__________________________________________________________________________________________________
activation_54 (Activation)      (None, 256, 64, 64)  0           bn4t_branch2a[0][0]              
__________________________________________________________________________________________________
res4t_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_54[0][0]              
__________________________________________________________________________________________________
bn4t_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4t_branch2b[0][0]             
__________________________________________________________________________________________________
activation_55 (Activation)      (None, 256, 64, 64)  0           bn4t_branch2b[0][0]              
__________________________________________________________________________________________________
res4t_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_55[0][0]              
__________________________________________________________________________________________________
bn4t_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4t_branch2c[0][0]             
__________________________________________________________________________________________________
add_27 (Add)                    (None, 1024, 64, 64) 0           bn4t_branch2c[0][0]              
                                                                 res4s_out[0][0]                  
__________________________________________________________________________________________________
res4t_out (Activation)          (None, 1024, 64, 64) 0           add_27[0][0]                     
__________________________________________________________________________________________________
res4u_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4t_out[0][0]                  
__________________________________________________________________________________________________
bn4u_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4u_branch2a[0][0]             
__________________________________________________________________________________________________
activation_56 (Activation)      (None, 256, 64, 64)  0           bn4u_branch2a[0][0]              
__________________________________________________________________________________________________
res4u_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_56[0][0]              
__________________________________________________________________________________________________
bn4u_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4u_branch2b[0][0]             
__________________________________________________________________________________________________
activation_57 (Activation)      (None, 256, 64, 64)  0           bn4u_branch2b[0][0]              
__________________________________________________________________________________________________
res4u_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_57[0][0]              
__________________________________________________________________________________________________
bn4u_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4u_branch2c[0][0]             
__________________________________________________________________________________________________
add_28 (Add)                    (None, 1024, 64, 64) 0           bn4u_branch2c[0][0]              
                                                                 res4t_out[0][0]                  
__________________________________________________________________________________________________
res4u_out (Activation)          (None, 1024, 64, 64) 0           add_28[0][0]                     
__________________________________________________________________________________________________
res4v_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4u_out[0][0]                  
__________________________________________________________________________________________________
bn4v_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4v_branch2a[0][0]             
__________________________________________________________________________________________________
activation_58 (Activation)      (None, 256, 64, 64)  0           bn4v_branch2a[0][0]              
__________________________________________________________________________________________________
res4v_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_58[0][0]              
__________________________________________________________________________________________________
bn4v_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4v_branch2b[0][0]             
__________________________________________________________________________________________________
activation_59 (Activation)      (None, 256, 64, 64)  0           bn4v_branch2b[0][0]              
__________________________________________________________________________________________________
res4v_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_59[0][0]              
__________________________________________________________________________________________________
bn4v_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4v_branch2c[0][0]             
__________________________________________________________________________________________________
add_29 (Add)                    (None, 1024, 64, 64) 0           bn4v_branch2c[0][0]              
                                                                 res4u_out[0][0]                  
__________________________________________________________________________________________________
res4v_out (Activation)          (None, 1024, 64, 64) 0           add_29[0][0]                     
__________________________________________________________________________________________________
res4w_branch2a (Conv2D)         (None, 256, 64, 64)  262400      res4v_out[0][0]                  
__________________________________________________________________________________________________
bn4w_branch2a (BatchNorm)       (None, 256, 64, 64)  1024        res4w_branch2a[0][0]             
__________________________________________________________________________________________________
activation_60 (Activation)      (None, 256, 64, 64)  0           bn4w_branch2a[0][0]              
__________________________________________________________________________________________________
res4w_branch2b (Conv2D)         (None, 256, 64, 64)  590080      activation_60[0][0]              
__________________________________________________________________________________________________
bn4w_branch2b (BatchNorm)       (None, 256, 64, 64)  1024        res4w_branch2b[0][0]             
__________________________________________________________________________________________________
activation_61 (Activation)      (None, 256, 64, 64)  0           bn4w_branch2b[0][0]              
__________________________________________________________________________________________________
res4w_branch2c (Conv2D)         (None, 1024, 64, 64) 263168      activation_61[0][0]              
__________________________________________________________________________________________________
bn4w_branch2c (BatchNorm)       (None, 1024, 64, 64) 4096        res4w_branch2c[0][0]             
__________________________________________________________________________________________________
add_30 (Add)                    (None, 1024, 64, 64) 0           bn4w_branch2c[0][0]              
                                                                 res4v_out[0][0]                  
__________________________________________________________________________________________________
res4w_out (Activation)          (None, 1024, 64, 64) 0           add_30[0][0]                     
__________________________________________________________________________________________________
res5a_branch2a (Conv2D)         (None, 512, 32, 32)  524800      res4w_out[0][0]                  
__________________________________________________________________________________________________
bn5a_branch2a (BatchNorm)       (None, 512, 32, 32)  2048        res5a_branch2a[0][0]             
__________________________________________________________________________________________________
activation_62 (Activation)      (None, 512, 32, 32)  0           bn5a_branch2a[0][0]              
__________________________________________________________________________________________________
res5a_branch2b (Conv2D)         (None, 512, 32, 32)  2359808     activation_62[0][0]              
__________________________________________________________________________________________________
bn5a_branch2b (BatchNorm)       (None, 512, 32, 32)  2048        res5a_branch2b[0][0]             
__________________________________________________________________________________________________
activation_63 (Activation)      (None, 512, 32, 32)  0           bn5a_branch2b[0][0]              
__________________________________________________________________________________________________
res5a_branch2c (Conv2D)         (None, 2048, 32, 32) 1050624     activation_63[0][0]              
__________________________________________________________________________________________________
res5a_branch1 (Conv2D)          (None, 2048, 32, 32) 2099200     res4w_out[0][0]                  
__________________________________________________________________________________________________
bn5a_branch2c (BatchNorm)       (None, 2048, 32, 32) 8192        res5a_branch2c[0][0]             
__________________________________________________________________________________________________
bn5a_branch1 (BatchNorm)        (None, 2048, 32, 32) 8192        res5a_branch1[0][0]              
__________________________________________________________________________________________________
add_31 (Add)                    (None, 2048, 32, 32) 0           bn5a_branch2c[0][0]              
                                                                 bn5a_branch1[0][0]               
__________________________________________________________________________________________________
res5a_out (Activation)          (None, 2048, 32, 32) 0           add_31[0][0]                     
__________________________________________________________________________________________________
res5b_branch2a (Conv2D)         (None, 512, 32, 32)  1049088     res5a_out[0][0]                  
__________________________________________________________________________________________________
bn5b_branch2a (BatchNorm)       (None, 512, 32, 32)  2048        res5b_branch2a[0][0]             
__________________________________________________________________________________________________
activation_64 (Activation)      (None, 512, 32, 32)  0           bn5b_branch2a[0][0]              
__________________________________________________________________________________________________
res5b_branch2b (Conv2D)         (None, 512, 32, 32)  2359808     activation_64[0][0]              
__________________________________________________________________________________________________
bn5b_branch2b (BatchNorm)       (None, 512, 32, 32)  2048        res5b_branch2b[0][0]             
__________________________________________________________________________________________________
activation_65 (Activation)      (None, 512, 32, 32)  0           bn5b_branch2b[0][0]              
__________________________________________________________________________________________________
res5b_branch2c (Conv2D)         (None, 2048, 32, 32) 1050624     activation_65[0][0]              
__________________________________________________________________________________________________
bn5b_branch2c (BatchNorm)       (None, 2048, 32, 32) 8192        res5b_branch2c[0][0]             
__________________________________________________________________________________________________
add_32 (Add)                    (None, 2048, 32, 32) 0           bn5b_branch2c[0][0]              
                                                                 res5a_out[0][0]                  
__________________________________________________________________________________________________
res5b_out (Activation)          (None, 2048, 32, 32) 0           add_32[0][0]                     
__________________________________________________________________________________________________
res5c_branch2a (Conv2D)         (None, 512, 32, 32)  1049088     res5b_out[0][0]                  
__________________________________________________________________________________________________
bn5c_branch2a (BatchNorm)       (None, 512, 32, 32)  2048        res5c_branch2a[0][0]             
__________________________________________________________________________________________________
activation_66 (Activation)      (None, 512, 32, 32)  0           bn5c_branch2a[0][0]              
__________________________________________________________________________________________________
res5c_branch2b (Conv2D)         (None, 512, 32, 32)  2359808     activation_66[0][0]              
__________________________________________________________________________________________________
bn5c_branch2b (BatchNorm)       (None, 512, 32, 32)  2048        res5c_branch2b[0][0]             
__________________________________________________________________________________________________
activation_67 (Activation)      (None, 512, 32, 32)  0           bn5c_branch2b[0][0]              
__________________________________________________________________________________________________
res5c_branch2c (Conv2D)         (None, 2048, 32, 32) 1050624     activation_67[0][0]              
__________________________________________________________________________________________________
bn5c_branch2c (BatchNorm)       (None, 2048, 32, 32) 8192        res5c_branch2c[0][0]             
__________________________________________________________________________________________________
add_33 (Add)                    (None, 2048, 32, 32) 0           bn5c_branch2c[0][0]              
                                                                 res5b_out[0][0]                  
__________________________________________________________________________________________________
res5c_out (Activation)          (None, 2048, 32, 32) 0           add_33[0][0]                     
__________________________________________________________________________________________________
fpn_c5p5 (Conv2D)               (None, 256, 32, 32)  524544      res5c_out[0][0]                  
__________________________________________________________________________________________________
fpn_p5upsampled (UpSampling2D)  (None, 256, 64, 64)  0           fpn_c5p5[0][0]                   
__________________________________________________________________________________________________
fpn_c4p4 (Conv2D)               (None, 256, 64, 64)  262400      res4w_out[0][0]                  
__________________________________________________________________________________________________
fpn_p4add (Add)                 (None, 256, 64, 64)  0           fpn_p5upsampled[0][0]            
                                                                 fpn_c4p4[0][0]                   
__________________________________________________________________________________________________
fpn_p4upsampled (UpSampling2D)  (None, 256, 128, 128 0           fpn_p4add[0][0]                  
__________________________________________________________________________________________________
fpn_c3p3 (Conv2D)               (None, 256, 128, 128 131328      res3d_out[0][0]                  
__________________________________________________________________________________________________
fpn_p3add (Add)                 (None, 256, 128, 128 0           fpn_p4upsampled[0][0]            
                                                                 fpn_c3p3[0][0]                   
__________________________________________________________________________________________________
fpn_p3upsampled (UpSampling2D)  (None, 256, 256, 256 0           fpn_p3add[0][0]                  
__________________________________________________________________________________________________
fpn_c2p2 (Conv2D)               (None, 256, 256, 256 65792       res2c_out[0][0]                  
__________________________________________________________________________________________________
fpn_p2add (Add)                 (None, 256, 256, 256 0           fpn_p3upsampled[0][0]            
                                                                 fpn_c2p2[0][0]                   
__________________________________________________________________________________________________
fpn_p5 (Conv2D)                 (None, 256, 32, 32)  590080      fpn_c5p5[0][0]                   
__________________________________________________________________________________________________
fpn_p2 (Conv2D)                 (None, 256, 256, 256 590080      fpn_p2add[0][0]                  
__________________________________________________________________________________________________
fpn_p3 (Conv2D)                 (None, 256, 128, 128 590080      fpn_p3add[0][0]                  
__________________________________________________________________________________________________
fpn_p4 (Conv2D)                 (None, 256, 64, 64)  590080      fpn_p4add[0][0]                  
__________________________________________________________________________________________________
fpn_p6 (MaxPooling2D)           (None, 256, 16, 16)  0           fpn_p5[0][0]                     
__________________________________________________________________________________________________
rpn_model (Model)               multiple             1189394     fpn_p2[0][0]                     
                                                                 fpn_p3[0][0]                     
                                                                 fpn_p4[0][0]                     
                                                                 fpn_p5[0][0]                     
                                                                 fpn_p6[0][0]                     
__________________________________________________________________________________________________
rpn_class (Concatenate)         (None, 261888, 2)    0           rpn_model[1][1]                  
                                                                 rpn_model[2][1]                  
                                                                 rpn_model[3][1]                  
                                                                 rpn_model[4][1]                  
                                                                 rpn_model[5][1]                  
__________________________________________________________________________________________________
rpn_bbox (Concatenate)          (None, 261888, 4)    0           rpn_model[1][2]                  
                                                                 rpn_model[2][2]                  
                                                                 rpn_model[3][2]                  
                                                                 rpn_model[4][2]                  
                                                                 rpn_model[5][2]                  
__________________________________________________________________________________________________
input_anchors (InputLayer)      (None, None, 4)      0                                            
__________________________________________________________________________________________________
ROI (ProposalLayer)             (None, 1000, 4)      0           rpn_class[0][0]                  
                                                                 rpn_bbox[0][0]                   
                                                                 input_anchors[0][0]              
__________________________________________________________________________________________________
input_image_meta (InputLayer)   (None, 93)           0                                            
__________________________________________________________________________________________________
roi_align_classifier (PyramidRO (None, 1000, 256, 7, 0           ROI[0][0]                        
                                                                 input_image_meta[0][0]           
                                                                 fpn_p2[0][0]                     
                                                                 fpn_p3[0][0]                     
                                                                 fpn_p4[0][0]                     
                                                                 fpn_p5[0][0]                     
__________________________________________________________________________________________________
mrcnn_class_conv1 (TimeDistribu (None, 1000, 1024, 1 12846080    roi_align_classifier[0][0]       
__________________________________________________________________________________________________
mrcnn_class_bn1 (TimeDistribute (None, 1000, 1024, 1 4096        mrcnn_class_conv1[0][0]          
__________________________________________________________________________________________________
activation_68 (Activation)      (None, 1000, 1024, 1 0           mrcnn_class_bn1[0][0]            
__________________________________________________________________________________________________
mrcnn_class_conv2 (TimeDistribu (None, 1000, 1024, 1 1049600     activation_68[0][0]              
__________________________________________________________________________________________________
mrcnn_class_bn2 (TimeDistribute (None, 1000, 1024, 1 4096        mrcnn_class_conv2[0][0]          
__________________________________________________________________________________________________
activation_69 (Activation)      (None, 1000, 1024, 1 0           mrcnn_class_bn2[0][0]            
__________________________________________________________________________________________________
pool_squeeze (Lambda)           (None, 1000, 1024)   0           activation_69[0][0]              
__________________________________________________________________________________________________
mrcnn_class_logits (TimeDistrib (None, 1000, 81)     83025       pool_squeeze[0][0]               
__________________________________________________________________________________________________
mrcnn_bbox_fc (TimeDistributed) (None, 1000, 324)    332100      pool_squeeze[0][0]               
__________________________________________________________________________________________________
mrcnn_class (TimeDistributed)   (None, 1000, 81)     0           mrcnn_class_logits[0][0]         
__________________________________________________________________________________________________
mrcnn_bbox (Reshape)            (None, 1000, 81, 4)  0           mrcnn_bbox_fc[0][0]              
__________________________________________________________________________________________________
mrcnn_detection (DetectionLayer (None, 100, 6)       0           ROI[0][0]                        
                                                                 mrcnn_class[0][0]                
                                                                 mrcnn_bbox[0][0]                 
                                                                 input_image_meta[0][0]           
__________________________________________________________________________________________________
lambda_1 (Lambda)               (None, 100, 4)       0           mrcnn_detection[0][0]            
__________________________________________________________________________________________________
roi_align_mask (PyramidROIAlign (None, 100, 256, 14, 0           lambda_1[0][0]                   
                                                                 input_image_meta[0][0]           
                                                                 fpn_p2[0][0]                     
                                                                 fpn_p3[0][0]                     
                                                                 fpn_p4[0][0]                     
                                                                 fpn_p5[0][0]                     
__________________________________________________________________________________________________
mrcnn_mask_conv1 (TimeDistribut (None, 100, 256, 14, 590080      roi_align_mask[0][0]             
__________________________________________________________________________________________________
mrcnn_mask_bn1 (TimeDistributed (None, 100, 256, 14, 1024        mrcnn_mask_conv1[0][0]           
__________________________________________________________________________________________________
activation_71 (Activation)      (None, 100, 256, 14, 0           mrcnn_mask_bn1[0][0]             
__________________________________________________________________________________________________
mrcnn_mask_conv2 (TimeDistribut (None, 100, 256, 14, 590080      activation_71[0][0]              
__________________________________________________________________________________________________
mrcnn_mask_bn2 (TimeDistributed (None, 100, 256, 14, 1024        mrcnn_mask_conv2[0][0]           
__________________________________________________________________________________________________
activation_72 (Activation)      (None, 100, 256, 14, 0           mrcnn_mask_bn2[0][0]             
__________________________________________________________________________________________________
mrcnn_mask_conv3 (TimeDistribut (None, 100, 256, 14, 590080      activation_72[0][0]              
__________________________________________________________________________________________________
mrcnn_mask_bn3 (TimeDistributed (None, 100, 256, 14, 1024        mrcnn_mask_conv3[0][0]           
__________________________________________________________________________________________________
activation_73 (Activation)      (None, 100, 256, 14, 0           mrcnn_mask_bn3[0][0]             
__________________________________________________________________________________________________
mrcnn_mask_conv4 (TimeDistribut (None, 100, 256, 14, 590080      activation_73[0][0]              
__________________________________________________________________________________________________
mrcnn_mask_bn4 (TimeDistributed (None, 100, 256, 14, 1024        mrcnn_mask_conv4[0][0]           
__________________________________________________________________________________________________
activation_74 (Activation)      (None, 100, 256, 14, 0           mrcnn_mask_bn4[0][0]             
__________________________________________________________________________________________________
mrcnn_mask_deconv (TimeDistribu (None, 100, 256, 28, 262400      activation_74[0][0]              
__________________________________________________________________________________________________
mrcnn_mask (TimeDistributed)    (None, 100, 81, 28,  20817       mrcnn_mask_deconv[0][0]          
==================================================================================================
Total params: 64,158,584
Trainable params: 64,047,096
Non-trainable params: 111,488
__________________________________________________________________________________________________
The output names of tensorflow graph nodes: ['mrcnn_mask/Reshape_1']
WARNING:tensorflow:From mrcnn_to_trt_single.py:145: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.convert_variables_to_constants`
WARNING:tensorflow:From /home/zhu/.local/lib/python3.6/site-packages/tensorflow/python/framework/graph_util_impl.py:270: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
WARNING:tensorflow:From /usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py:227: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.

UFF Version 0.6.5
=== Automatically deduced input nodes ===
[name: "input_image"
op: "Placeholder"
attr {
  key: "dtype"
  value {
    type: DT_FLOAT
  }
}
attr {
  key: "shape"
  value {
    shape {
      dim {
        size: -1
      }
      dim {
        size: 3
      }
      dim {
        size: 1024
      }
      dim {
        size: 1024
      }
    }
  }
}
]
=========================================

Using output node mrcnn_detection
Using output node mrcnn_mask/Sigmoid
Converting to UFF graph
Warning: No conversion function registered for layer: PyramidROIAlign_TRT yet.
Converting roi_align_mask_trt as custom op: PyramidROIAlign_TRT
Warning: No conversion function registered for layer: ResizeNearest_TRT yet.
Converting fpn_p5upsampled as custom op: ResizeNearest_TRT
Warning: No conversion function registered for layer: ResizeNearest_TRT yet.
Converting fpn_p4upsampled as custom op: ResizeNearest_TRT
Warning: No conversion function registered for layer: ResizeNearest_TRT yet.
Converting fpn_p3upsampled as custom op: ResizeNearest_TRT
Warning: No conversion function registered for layer: SpecialSlice_TRT yet.
Converting mrcnn_detection_bboxes as custom op: SpecialSlice_TRT
Warning: No conversion function registered for layer: DetectionLayer_TRT yet.
Converting mrcnn_detection as custom op: DetectionLayer_TRT
Warning: No conversion function registered for layer: ProposalLayer_TRT yet.
Converting ROI as custom op: ProposalLayer_TRT
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: No conversion function registered for layer: PyramidROIAlign_TRT yet.
Converting roi_align_classifier as custom op: PyramidROIAlign_TRT
DEBUG [/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py:96] Marking ['mrcnn_detection', 'mrcnn_mask/Sigmoid'] as outputs
No. nodes: 3044
UFF Output written to /home/zhu/Mask_RCNN/data/mrcnn.uff
UFF Text Output written to /home/zhu/Mask_RCNN/data/mrcnn.pbtxt

I can find a mrcnn_nchw.pbtxt(1.1m) and mrcnn_nchw.uff(257m) in /data

And I do this command:

./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/

But still errors:

 &&&& RUNNING TensorRT.sample_maskrcnn # ./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/
[03/08/2020-10:24:49] [I] Building and running a GPU inference engine for Mask RCNN
[03/08/2020-10:24:56] [E] [TRT] UffParser: Validator error: roi_align_mask_trt: Unsupported operation _PyramidROIAlign_TRT
&&&& FAILED TensorRT.sample_maskrcnn
# ./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/

How can solve it?

Hi,

It looks like the sample doesn’t link to TensorRT correctly.
Could you follow this comment and check if helps?

Thanks.

Hi AastaLLL,

I found that there were some problems in there:

/usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.6

When I try to do this command:

sudo rm -r /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.6

And try to do this command:

./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/

The command shows that I miss the libnvinfer_plugin.so.6.
That mean the original libnvinfer_plugin.so.6 can do lots of things.
So I try to do that in command:

sudo cp /path/to/tensorrt6/build/libnvinfer_plugin.so.6  /usr/lib/aarch64-linux-gnu/

And do this again:

./sample_uff_maskRCNN --datadir /home/nvidia/Mask_RCNN/data/

But get this error:

killed

Is that mean that the Jetson Nano can not run this MaskRCNN project because of not enough GPU calculating?

Hi,

It looks like you are not using the v6.0 OSS branch.
Could you go to the TensorRT GitHub directory and check the branch first?

$ git branch 

Thanks.

Hi AastaLLL ,

nvidia@nvidia:~/TensorRT$ git init
Reinitialized existing Git repository in /home/nvidia/TensorRT/.git/
nvidia@nvidia:~/TensorRT$ git branch
* release/6.0

I am using the release/6.0

Hi,

Sorry to keep you waiting.

We can run the sampleUffMaskRCNN with following steps.
Please help to check if this also works for you.

$ git clone -b release/6.0 https://github.com/nvidia/TensorRT TensorRT
$ cd TensorRT/
$ git submodule update --init --recursive
$ mkdir build
$ cd build/
$ cmake ../
$ make
$ ./sample_uff_maskRCNN -d path/to/data

If you meet a ‘Unsupported operation _AddV2’ error, please update config.py with following:

...
def preprocess(dynamic_graph):
    ...
    dynamic_graph.remove(['input_anchors', 'input_image_meta'])

    add_nodes = dynamic_graph.find_nodes_by_op("AddV2")
    for node in add_nodes:
        node.op = "Add"

    connect(dynamic_graph, timedistributed_connect_pairs)
    ...

Thanks.

Hi,

In your answer, you suggest running make inside the TensorRT cloned repo. But there is no MakeFile present in it… isn’t it wrong ?

Hi pradan,

Please help to open a new topic with more details. Thanks