I use your
- h5 model: mask_rcnn_nucleus_0080.h5 - Google Drive
- mrcnn_to_trt_single_resnet50.py in #22
- config.py in #22
and change (It’s not necessary because of mrcnn_to_trt_single_resnet50.py → “class CocoConfig(Config):” )
diff --git a/mrcnn/config.py b/mrcnn/config.py
old mode 100644
new mode 100755
index 6f91170..3e6020b
--- a/mrcnn/config.py
+++ b/mrcnn/config.py
@@ -52,7 +52,7 @@ class Config(object):
# You can also provide a callable that should have the signature
# of model.resnet_graph. If you do so, you need to supply a callable
# to COMPUTE_BACKBONE_SHAPE as well
- BACKBONE = "resnet101"
+ BACKBONE = "resnet50"
I can generate uff model
$ ls -la /home/cding/tmp/mask_rcnn_nucleus_0080.uff
-rw-rw-r-- 1 cding cding 178893115 Dec 25 18:49 /home/cding/tmp/mask_rcnn_nucleus_0080.uff
Log:
$ python ./mrcnn_to_trt_single_resnet50.py -w /home/cding/segmentation/maskRCNN_model_conver/mask_rcnn_nucleus_0080.h5 -o /home/cding/tmp/mask_rcnn_nucleus_0080.uff -p ./config.py
Using TensorFlow backend.
Configurations:
BACKBONE resnet50
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 4000
DETECTION_MIN_CONFIDENCE 0
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 256
IMAGE_META_SIZE 14
IMAGE_MIN_DIM 256
IMAGE_MIN_SCALE 0
IMAGE_RESIZE_MODE pad64
IMAGE_SHAPE [256 256 3]
LEARNING_MOMENTUM 0.9
LEARNING_RATE 0.001
LOSS_WEIGHTS {'mrcnn_mask_loss': 1.0, 'rpn_bbox_loss': 1.0, 'mrcnn_bbox_loss': 1.0, 'mrcnn_class_loss': 1.0, 'rpn_class_loss': 1.0}
MASK_POOL_SIZE 14
MASK_SHAPE [28, 28]
MAX_GT_INSTANCES 200
MEAN_PIXEL [188.58 154.34 182.38]
MINI_MASK_SHAPE (56, 56)
NAME nucleus
NUM_CLASSES 2
POOL_SIZE 7
POST_NMS_ROIS_INFERENCE 20000
POST_NMS_ROIS_TRAINING 1000
PRE_NMS_LIMIT 6000
ROI_POSITIVE_RATIO 0.33
RPN_ANCHOR_RATIOS [0.5, 1, 2]
RPN_ANCHOR_SCALES (8, 16, 32, 64, 128)
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 64
STEPS_PER_EPOCH 1000
TOP_DOWN_PYRAMID_SIZE 256
TRAIN_BN False
TRAIN_ROIS_PER_IMAGE 128
USE_MINI_MASK True
USE_RPN_ROIS True
VALIDATION_STEPS 50
WEIGHT_DECAY 0.0001
WARNING:tensorflow:From /home/cding/.virtualenvs/virtual-py2/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-12-25 18:49:12.413967: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2019-12-25 18:49:12.583316: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55777154c850 executing computations on platform CUDA. Devices:
2019-12-25 18:49:12.583388: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): Tesla P4, Compute Capability 6.1
2019-12-25 18:49:12.606954: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1700000000 Hz
2019-12-25 18:49:12.607904: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x5577719c17f0 executing computations on platform Host. Devices:
2019-12-25 18:49:12.607964: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined>
2019-12-25 18:49:12.608319: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties:
name: Tesla P4 major: 6 minor: 1 memoryClockRate(GHz): 1.1135
pciBusID: 0000:ae:00.0
totalMemory: 7.93GiB freeMemory: 7.78GiB
2019-12-25 18:49:12.608364: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-12-25 18:49:12.611050: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-12-25 18:49:12.611087: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2019-12-25 18:49:12.611118: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2019-12-25 18:49:12.611341: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7569 MB memory) -> physical GPU (device: 0, name: Tesla P4, pci bus id: 0000:ae:00.0, compute capability: 6.1)
WARNING:tensorflow:From /home/cding/segmentation/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]
__________________________________________________________________________________________________
res5a_branch2a (Conv2D) (None, 512, 32, 32) 524800 res4f_out[0][0]
__________________________________________________________________________________________________
bn5a_branch2a (BatchNorm) (None, 512, 32, 32) 2048 res5a_branch2a[0][0]
__________________________________________________________________________________________________
activation_28 (Activation) (None, 512, 32, 32) 0 bn5a_branch2a[0][0]
__________________________________________________________________________________________________
res5a_branch2b (Conv2D) (None, 512, 32, 32) 2359808 activation_28[0][0]
__________________________________________________________________________________________________
bn5a_branch2b (BatchNorm) (None, 512, 32, 32) 2048 res5a_branch2b[0][0]
__________________________________________________________________________________________________
activation_29 (Activation) (None, 512, 32, 32) 0 bn5a_branch2b[0][0]
__________________________________________________________________________________________________
res5a_branch2c (Conv2D) (None, 2048, 32, 32) 1050624 activation_29[0][0]
__________________________________________________________________________________________________
res5a_branch1 (Conv2D) (None, 2048, 32, 32) 2099200 res4f_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_14 (Add) (None, 2048, 32, 32) 0 bn5a_branch2c[0][0]
bn5a_branch1[0][0]
__________________________________________________________________________________________________
res5a_out (Activation) (None, 2048, 32, 32) 0 add_14[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_30 (Activation) (None, 512, 32, 32) 0 bn5b_branch2a[0][0]
__________________________________________________________________________________________________
res5b_branch2b (Conv2D) (None, 512, 32, 32) 2359808 activation_30[0][0]
__________________________________________________________________________________________________
bn5b_branch2b (BatchNorm) (None, 512, 32, 32) 2048 res5b_branch2b[0][0]
__________________________________________________________________________________________________
activation_31 (Activation) (None, 512, 32, 32) 0 bn5b_branch2b[0][0]
__________________________________________________________________________________________________
res5b_branch2c (Conv2D) (None, 2048, 32, 32) 1050624 activation_31[0][0]
__________________________________________________________________________________________________
bn5b_branch2c (BatchNorm) (None, 2048, 32, 32) 8192 res5b_branch2c[0][0]
__________________________________________________________________________________________________
add_15 (Add) (None, 2048, 32, 32) 0 bn5b_branch2c[0][0]
res5a_out[0][0]
__________________________________________________________________________________________________
res5b_out (Activation) (None, 2048, 32, 32) 0 add_15[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_32 (Activation) (None, 512, 32, 32) 0 bn5c_branch2a[0][0]
__________________________________________________________________________________________________
res5c_branch2b (Conv2D) (None, 512, 32, 32) 2359808 activation_32[0][0]
__________________________________________________________________________________________________
bn5c_branch2b (BatchNorm) (None, 512, 32, 32) 2048 res5c_branch2b[0][0]
__________________________________________________________________________________________________
activation_33 (Activation) (None, 512, 32, 32) 0 bn5c_branch2b[0][0]
__________________________________________________________________________________________________
res5c_branch2c (Conv2D) (None, 2048, 32, 32) 1050624 activation_33[0][0]
__________________________________________________________________________________________________
bn5c_branch2c (BatchNorm) (None, 2048, 32, 32) 8192 res5c_branch2c[0][0]
__________________________________________________________________________________________________
add_16 (Add) (None, 2048, 32, 32) 0 bn5c_branch2c[0][0]
res5b_out[0][0]
__________________________________________________________________________________________________
res5c_out (Activation) (None, 2048, 32, 32) 0 add_16[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 res4f_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, 20000, 4) 0 rpn_class[0][0]
rpn_bbox[0][0]
input_anchors[0][0]
__________________________________________________________________________________________________
input_image_meta (InputLayer) (None, 14) 0
__________________________________________________________________________________________________
roi_align_classifier (PyramidRO (None, 20000, 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, 20000, 1024, 12846080 roi_align_classifier[0][0]
__________________________________________________________________________________________________
mrcnn_class_bn1 (TimeDistribute (None, 20000, 1024, 4096 mrcnn_class_conv1[0][0]
__________________________________________________________________________________________________
activation_34 (Activation) (None, 20000, 1024, 0 mrcnn_class_bn1[0][0]
__________________________________________________________________________________________________
mrcnn_class_conv2 (TimeDistribu (None, 20000, 1024, 1049600 activation_34[0][0]
__________________________________________________________________________________________________
mrcnn_class_bn2 (TimeDistribute (None, 20000, 1024, 4096 mrcnn_class_conv2[0][0]
__________________________________________________________________________________________________
activation_35 (Activation) (None, 20000, 1024, 0 mrcnn_class_bn2[0][0]
__________________________________________________________________________________________________
pool_squeeze (Lambda) (None, 20000, 1024) 0 activation_35[0][0]
__________________________________________________________________________________________________
mrcnn_class_logits (TimeDistrib (None, 20000, 2) 2050 pool_squeeze[0][0]
__________________________________________________________________________________________________
mrcnn_bbox_fc (TimeDistributed) (None, 20000, 8) 8200 pool_squeeze[0][0]
__________________________________________________________________________________________________
mrcnn_class (TimeDistributed) (None, 20000, 2) 0 mrcnn_class_logits[0][0]
__________________________________________________________________________________________________
mrcnn_bbox (Reshape) (None, 20000, 2, 4) 0 mrcnn_bbox_fc[0][0]
__________________________________________________________________________________________________
mrcnn_detection (DetectionLayer (None, 4000, 6) 0 ROI[0][0]
mrcnn_class[0][0]
mrcnn_bbox[0][0]
input_image_meta[0][0]
__________________________________________________________________________________________________
lambda_1 (Lambda) (None, 4000, 4) 0 mrcnn_detection[0][0]
__________________________________________________________________________________________________
roi_align_mask (PyramidROIAlign (None, 4000, 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, 4000, 256, 14 590080 roi_align_mask[0][0]
__________________________________________________________________________________________________
mrcnn_mask_bn1 (TimeDistributed (None, 4000, 256, 14 1024 mrcnn_mask_conv1[0][0]
__________________________________________________________________________________________________
activation_37 (Activation) (None, 4000, 256, 14 0 mrcnn_mask_bn1[0][0]
__________________________________________________________________________________________________
mrcnn_mask_conv2 (TimeDistribut (None, 4000, 256, 14 590080 activation_37[0][0]
__________________________________________________________________________________________________
mrcnn_mask_bn2 (TimeDistributed (None, 4000, 256, 14 1024 mrcnn_mask_conv2[0][0]
__________________________________________________________________________________________________
activation_38 (Activation) (None, 4000, 256, 14 0 mrcnn_mask_bn2[0][0]
__________________________________________________________________________________________________
mrcnn_mask_conv3 (TimeDistribut (None, 4000, 256, 14 590080 activation_38[0][0]
__________________________________________________________________________________________________
mrcnn_mask_bn3 (TimeDistributed (None, 4000, 256, 14 1024 mrcnn_mask_conv3[0][0]
__________________________________________________________________________________________________
activation_39 (Activation) (None, 4000, 256, 14 0 mrcnn_mask_bn3[0][0]
__________________________________________________________________________________________________
mrcnn_mask_conv4 (TimeDistribut (None, 4000, 256, 14 590080 activation_39[0][0]
__________________________________________________________________________________________________
mrcnn_mask_bn4 (TimeDistributed (None, 4000, 256, 14 1024 mrcnn_mask_conv4[0][0]
__________________________________________________________________________________________________
activation_40 (Activation) (None, 4000, 256, 14 0 mrcnn_mask_bn4[0][0]
__________________________________________________________________________________________________
mrcnn_mask_deconv (TimeDistribu (None, 4000, 256, 28 262400 activation_40[0][0]
__________________________________________________________________________________________________
mrcnn_mask (TimeDistributed) (None, 4000, 2, 28, 514 mrcnn_mask_deconv[0][0]
==================================================================================================
Total params: 44,662,942
Trainable params: 44,603,678
Non-trainable params: 59,264
__________________________________________________________________________________________________
The output names of tensorflow graph nodes: [u'mrcnn_mask/Reshape_1']
WARNING:tensorflow:From ./mrcnn_to_trt_single_resnet50.py:173: 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/cding/.virtualenvs/virtual-py2/local/lib/python2.7/site-packages/tensorflow/python/framework/graph_util_impl.py:245: 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 /home/cding/.virtualenvs/virtual-py2/local/lib/python2.7/site-packages/uff/converters/tensorflow/conversion_helpers.py:185: __init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.
UFF Version 0.5.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
No. nodes: 1751
UFF Output written to /home/cding/tmp/mask_rcnn_nucleus_0080.uff
UFF Text Output written to /home/cding/tmp/mask_rcnn_nucleus_0080.pbtxt