数据集目录结构(在train_data目录下):
![](https://images2018.cnblogs.com/blog/842531/201808/842531-20180820160719479-1190714925.jpg)
pic目录下的部分图片:
![](https://images2018.cnblogs.com/blog/842531/201808/842531-20180820160816525-1092262576.jpg)
cv2_mask目录下部分图片:
![](https://images2018.cnblogs.com/blog/842531/201808/842531-20180820160903984-585823799.jpg)
json目录下部分文件:
![](https://images2018.cnblogs.com/blog/842531/201808/842531-20180820160942191-1806399771.jpg)
labelme_json目录下部分文件:
![](https://images2018.cnblogs.com/blog/842531/201808/842531-20180820161022587-1268023541.jpg)
#############代码块一##############
import os
import sys
import random
import math
import re
import time
import numpy as np
import cv2
import matplotlib
import matplotlib.pyplot as plt
from config import Config
import utils
import model as modellib
import visualize
import yaml
from model import log
from PIL import Image
# Root directory of the project
ROOT_DIR = os.getcwd()
# Directory to save logs and trained model
MODEL_DIR = os.path.join(ROOT_DIR, "logs")
iter_num=0
# Local path to trained weights file
COCO_MODEL_PATH = os.path.join(ROOT_DIR, "mask_rcnn_coco.h5")
# Download COCO trained weights from Releases if needed
if not os.path.exists(COCO_MODEL_PATH):
utils.download_trained_weights(COCO_MODEL_PATH)
##################代码块2#########
class ShapesConfig(Config):
"""Configuration for training on the toy shapes dataset.
Derives from the base Config class and overrides values specific
to the toy shapes dataset.
"""
# Give the configuration a recognizable name
NAME = "shapes"
# Train on 1 GPU and 8 images per GPU. We can put multiple images on each
# GPU because the images are small. Batch size is 8 (GPUs * images/GPU).
GPU_COUNT = 1
IMAGES_PER_GPU = 1
# Number of classes (including background)
NUM_CLASSES = 1 + 1 # background + 3 shapes
# Use small images for faster training. Set the limits of the small side
# the large side, and that determines the image shape.
IMAGE_MIN_DIM = 80
IMAGE_MAX_DIM = 512
# Use smaller anchors because our image and objects are small
RPN_ANCHOR_SCALES = (8 * 6, 16 * 6, 32 * 6, 64 * 6, 128 * 6) # anchor side in pixels
# Reduce training ROIs per image because the images are small and have
# few objects. Aim to allow ROI sampling to pick 33% positive ROIs.
TRAIN_ROIS_PER_IMAGE = 32
# Use a small epoch since the data is simple
STEPS_PER_EPOCH = 100
# use small validation steps since the epoch is small
VALIDATION_STEPS = 5
config = ShapesConfig()
config.display()
----------------------------------------
#输出:
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_MAX_DIM 512
IMAGE_META_SIZE 14
IMAGE_MIN_DIM 80
IMAGE_MIN_SCALE 0
IMAGE_RESIZE_MODE square
IMAGE_SHAPE [512 512 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 shapes
NUM_CLASSES 2
POOL_SIZE 7
POST_NMS_ROIS_INFERENCE 1000
POST_NMS_ROIS_TRAINING 2000
ROI_POSITIVE_RATIO 0.33
RPN_ANCHOR_RATIOS [0.5, 1, 2]
RPN_ANCHOR_SCALES (48, 96, 192, 384, 768)
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 100
TOP_DOWN_PYRAMID_SIZE 256
TRAIN_BN False
TRAIN_ROIS_PER_IMAGE 32
USE_MINI_MASK True
USE_RPN_ROIS True
VALIDATION_STEPS 5
WEIGHT_DECAY 0.0001
-------------------------------------------
############代码块三######################
class DrugDataset(utils.Dataset):
# 得到该图中有多少个实例(物体)
def get_obj_index(self, image):
n = np.max(image)
return n
# 解析labelme中得到的yaml文件,从而得到mask每一层对应的实例标签
def from_yaml_get_class(self, image_id):
info = self.image_info[image_id]
with open(info['yaml_path']) as f:
temp = yaml.load(f.read())
labels = temp['label_names']
del labels[0]
return labels
# 重新写draw_mask
def draw_mask(self, num_obj, mask, image,image_id):
info = self.image_info[image_id]
for index in range(num_obj):
for i in range(info['width']):
for j in range(info['height']):
at_pixel = image.getpixel((i, j))
if at_pixel == index + 1:
mask[j, i, index] = 1
return mask
# 重新写load_shapes,里面包含自己的自己的类别
def load_shapes(self, count, img_floder, mask_floder, imglist, dataset_root_path):
"""Generate the requested number of synthetic images.
count: number of images to generate.
height, width: the size of the generated images.
"""
# Add classes
self.add_class("shapes", 1, "box") # box
for i in range(count):
# 获取图片宽和高
filestr = imglist[i].split(".")[0]
# filestr = filestr.split("_")[1]
mask_path = mask_floder + "/" + filestr + ".png"
yaml_path = dataset_root_path + "labelme_json/" + filestr + "-box_json/info.yaml"
print(dataset_root_path + "labelme_json/" + filestr + "-box_json/img.png")
cv_img = cv2.imread(dataset_root_path + "labelme_json/" + filestr + "-box_json/img.png")
self.add_image("shapes", image_id=i, path=img_floder + "/" + imglist[i],width=cv_img.shape[1], height=cv_img.shape[0], mask_path=mask_path, yaml_path=yaml_path)
# 重写load_mask
def load_mask(self, image_id):
"""Generate instance masks for shapes of the given image ID."""
global iter_num
print("image_id",image_id)
info = self.image_info[image_id]
count = 1 # number of object
img = Image.open(info['mask_path'])
num_obj = self.get_obj_index(img)
mask = np.zeros([info['height'], info['width'], num_obj], dtype=np.uint8)
mask = self.draw_mask(num_obj, mask, img,image_id)
occlusion = np.logical_not(mask[:, :, -1]).astype(np.uint8)
for i in range(count - 2, -1, -1):
mask[:, :, i] = mask[:, :, i] * occlusion
occlusion = np.logical_and(occlusion, np.logical_not(mask[:, :, i]))
labels = []
labels = self.from_yaml_get_class(image_id)
labels_form = []
for i in range(len(labels)):
if labels[i].find("box") != -1:
# print "box"
labels_form.append("box")
class_ids = np.array([self.class_names.index(s) for s in labels_form])
return mask, class_ids.astype(np.int32)
###############代码块四#################
def get_ax(rows=1, cols=1, size=8):
"""Return a Matplotlib Axes array to be used in
all visualizations in the notebook. Provide a
central point to control graph sizes.
Change the default size attribute to control the size
of rendered images
"""
_, ax = plt.subplots(rows, cols, figsize=(size * cols, size * rows))
return ax
##############代码块五####################
#基础设置
dataset_root_path="train_data/"
img_floder = dataset_root_path + "pic"
mask_floder = dataset_root_path + "cv2_mask"
#yaml_floder = dataset_root_path
imglist = os.listdir(img_floder)
count = len(imglist)
#train与val数据集准备
dataset_train = DrugDataset()
dataset_train.load_shapes(count, img_floder, mask_floder, imglist,dataset_root_path)
dataset_train.prepare()
#print("dataset_train-->",dataset_train._image_ids)
dataset_val = DrugDataset()
dataset_val.load_shapes(10, img_floder, mask_floder, imglist,dataset_root_path)
dataset_val.prepare()
-----------------------------------------
输出:
train_data/labelme_json/0-box_json/img.png
train_data/labelme_json/1-box_json/img.png
train_data/labelme_json/10-box_json/img.png
train_data/labelme_json/100-box_json/img.png
train_data/labelme_json/101-box_json/img.png
train_data/labelme_json/102-box_json/img.png
train_data/labelme_json/103-box_json/img.png
train_data/labelme_json/104-box_json/img.png
train_data/labelme_json/105-box_json/img.png
train_data/labelme_json/106-box_json/img.png
train_data/labelme_json/107-box_json/img.png
train_data/labelme_json/108-box_json/img.png
train_data/labelme_json/109-box_json/img.png
train_data/labelme_json/11-box_json/img.png
train_data/labelme_json/110-box_json/img.png
train_data/labelme_json/111-box_json/img.png
train_data/labelme_json/112-box_json/img.png
train_data/labelme_json/113-box_json/img.png
train_data/labelme_json/114-box_json/img.png
train_data/labelme_json/115-box_json/img.png
train_data/labelme_json/116-box_json/img.png
train_data/labelme_json/117-box_json/img.png
train_data/labelme_json/118-box_json/img.png
train_data/labelme_json/119-box_json/img.png
train_data/labelme_json/12-box_json/img.png
train_data/labelme_json/120-box_json/img.png
train_data/labelme_json/121-box_json/img.png
train_data/labelme_json/122-box_json/img.png
train_data/labelme_json/123-box_json/img.png
train_data/labelme_json/124-box_json/img.png
train_data/labelme_json/125-box_json/img.png
train_data/labelme_json/126-box_json/img.png
train_data/labelme_json/127-box_json/img.png
train_data/labelme_json/128-box_json/img.png
train_data/labelme_json/129-box_json/img.png
train_data/labelme_json/13-box_json/img.png
train_data/labelme_json/130-box_json/img.png
train_data/labelme_json/131-box_json/img.png
....................train_data/labelme_json/101-box_json/img.pngtrain_data/labelme_json/102-box_json/img.png
train_data/labelme_json/103-box_json/img.png
train_data/labelme_json/104-box_json/img.png
train_data/labelme_json/105-box_json/img.png
train_data/labelme_json/106-box_json/img.png
#################代码块六###################
# Load and display random samples
image_ids = np.random.choice(dataset_train.image_ids, 10)
for image_id in image_ids:
image = dataset_train.load_image(image_id)
mask, class_ids = dataset_train.load_mask(image_id)
visualize.display_top_masks(image, mask, class_ids, dataset_train.class_names)
-------------------------------------
输出:
![](https://images2018.cnblogs.com/blog/842531/201808/842531-20180820160308296-2125691611.jpg)
###################代码块七#######################
# Create model in training mode
model = modellib.MaskRCNN(mode="training", config=config,model_dir=MODEL_DIR)
# Which weights to start with?
init_with = "coco" # imagenet, coco, or last
if init_with == "imagenet":
model.load_weights(model.get_imagenet_weights(), by_name=True)
elif init_with == "coco":
# Load weights trained on MS COCO, but skip layers that
# are different due to the different number of classes
# See README for instructions to download the COCO weights
model.load_weights(COCO_MODEL_PATH, by_name=True,exclude=["mrcnn_class_logits", "mrcnn_bbox_fc","mrcnn_bbox", "mrcnn_mask"])
elif init_with == "last":
# Load the last model you trained and continue training
model.load_weights(model.find_last()[1], by_name=True)
# Train the head branches
# Passing layers="heads" freezes all layers except the head
# layers. You can also pass a regular expression to select
# which layers to train by name pattern.
model.train(dataset_train, dataset_val,learning_rate=config.LEARNING_RATE,epochs=1,layers='heads')
----------------------------------------------------------
输出:
Starting at epoch 0. LR=0.001
Checkpoint Path: G:\TensorflowProject\Mask_RCNN-master\samples0820\shapes\logs\shapes20180820T1503\mask_rcnn_shapes_{epoch:04d}.h5
Selecting layers to train
fpn_c5p5 (Conv2D)
fpn_c4p4 (Conv2D)
fpn_c3p3 (Conv2D)
fpn_c2p2 (Conv2D)
fpn_p5 (Conv2D)
fpn_p2 (Conv2D)
fpn_p3 (Conv2D)
fpn_p4 (Conv2D)
In model: rpn_model
rpn_conv_shared (Conv2D)
rpn_class_raw (Conv2D)
rpn_bbox_pred (Conv2D)
mrcnn_mask_conv1 (TimeDistributed)
mrcnn_mask_bn1 (TimeDistributed)
mrcnn_mask_conv2 (TimeDistributed)
mrcnn_mask_bn2 (TimeDistributed)
mrcnn_class_conv1 (TimeDistributed)
mrcnn_class_bn1 (TimeDistributed)
mrcnn_mask_conv3 (TimeDistributed)
mrcnn_mask_bn3 (TimeDistributed)
mrcnn_class_conv2 (TimeDistributed)
mrcnn_class_bn2 (TimeDistributed)
mrcnn_mask_conv4 (TimeDistributed)
mrcnn_mask_bn4 (TimeDistributed)
mrcnn_bbox_fc (TimeDistributed)
mrcnn_mask_deconv (TimeDistributed)
mrcnn_class_logits (TimeDistributed)
mrcnn_mask (TimeDistributed)
F:\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py:98: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
Epoch 1/1
image_id 36
1/100 [..............................] - ETA: 11:08 - loss: 3.4756 - rpn_class_loss: 0.0133 - rpn_bbox_loss: 0.3852 - mrcnn_class_loss: 0.5015 - mrcnn_bbox_loss: 0.9523 - mrcnn_mask_loss: 1.6233image_id 810
2/100 [..............................] - ETA: 9:16 - loss: 3.6586 - rpn_class_loss: 0.0164 - rpn_bbox_loss: 0.4885 - mrcnn_class_loss: 0.7338 - mrcnn_bbox_loss: 0.9817 - mrcnn_mask_loss: 1.4381 image_id 678
3/100 [..............................] - ETA: 8:39 - loss: 3.5231 - rpn_class_loss: 0.0231 - rpn_bbox_loss: 0.4982 - mrcnn_class_loss: 0.6031 - mrcnn_bbox_loss: 1.0954 - mrcnn_mask_loss: 1.3033image_id 442
4/100 [>.............................] - ETA: 8:23 - loss: 3.3568 - rpn_class_loss: 0.0400 - rpn_bbox_loss: 0.4198 - mrcnn_class_loss: 0.6943 - mrcnn_bbox_loss: 0.9911 - mrcnn_mask_loss: 1.2116image_id 168
5/100 [>.............................] - ETA: 8:15 - loss: 3.2762 - rpn_class_loss: 0.0376 - rpn_bbox_loss: 0.4459 - mrcnn_class_loss: 0.6119 - mrcnn_bbox_loss: 1.0050 - mrcnn_mask_loss: 1.1758image_id 65
6/100 [>.............................] - ETA: 8:07 - loss: 3.9527 - rpn_class_loss: 0.0383 - rpn_bbox_loss: 1.2320 - mrcnn_class_loss: 0.5637 - mrcnn_bbox_loss: 0.9653 - mrcnn_mask_loss: 1.1534image_id 474
7/100 [=>............................] - ETA: 7:59 - loss: 3.7770 - rpn_class_loss: 0.0368 - rpn_bbox_loss: 1.1319 - mrcnn_class_loss: 0.5358 - mrcnn_bbox_loss: 0.9403 - mrcnn_mask_loss: 1.1323image_id 48
8/100 [=>............................] - ETA: 7:47 - loss: 3.7060 - rpn_class_loss: 0.0350 - rpn_bbox_loss: 1.0478 - mrcnn_class_loss: 0.5300 - mrcnn_bbox_loss: 0.9446 - mrcnn_mask_loss: 1.1486image_id 22
9/100 [=>............................] - ETA: 7:38 - loss: 3.6051 - rpn_class_loss: 0.0338 - rpn_bbox_loss: 0.9859 - mrcnn_class_loss: 0.5081 - mrcnn_bbox_loss: 0.9577 - mrcnn_mask_loss: 1.1196image_id 715
10/100 [==>...........................] - ETA: 7:30 - loss: 3.6313 - rpn_class_loss: 0.0309 - rpn_bbox_loss: 0.9577 - mrcnn_class_loss: 0.4624 - mrcnn_bbox_loss: 0.9966 - mrcnn_mask_loss: 1.1837image_id 149
11/100 [==>...........................] - ETA: 7:24 - loss: 3.6685 - rpn_class_loss: 0.0416 - rpn_bbox_loss: 0.8967 - mrcnn_class_loss: 0.4808 - mrcnn_bbox_loss: 1.0296 - mrcnn_mask_loss: 1.2197image_id 518
12/100 [==>...........................] - ETA: 7:17 - loss: 3.5888 - rpn_class_loss: 0.0396 - rpn_bbox_loss: 0.8463 - mrcnn_class_loss: 0.4641 - mrcnn_bbox_loss: 1.0344 - mrcnn_mask_loss: 1.2044image_id 137
13/100 [==>...........................] - ETA: 7:12 - loss: 3.5220 - rpn_class_loss: 0.0387 - rpn_bbox_loss: 0.8281 - mrcnn_class_loss: 0.4469 - mrcnn_bbox_loss: 1.0414 - mrcnn_mask_loss: 1.1669image_id 713
14/100 [===>..........................] - ETA: 7:06 - loss: 3.4769 - rpn_class_loss: 0.0376 - rpn_bbox_loss: 0.8080 - mrcnn_class_loss: 0.4552 - mrcnn_bbox_loss: 1.0203 - mrcnn_mask_loss: 1.1558image_id 501
15/100 [===>..........................] - ETA: 7:00 - loss: 3.4009 - rpn_class_loss: 0.0419 - rpn_bbox_loss: 0.7711 - mrcnn_class_loss: 0.4483 - mrcnn_bbox_loss: 1.0137 - mrcnn_mask_loss: 1.1259image_id 282
16/100 [===>..........................] - ETA: 6:54 - loss: 3.3244 - rpn_class_loss: 0.0397 - rpn_bbox_loss: 0.7250 - mrcnn_class_loss: 0.4330 - mrcnn_bbox_loss: 1.0061 - mrcnn_mask_loss: 1.1206image_id 638
17/100 [====>.........................] - ETA: 6:48 - loss: 3.2559 - rpn_class_loss: 0.0425 - rpn_bbox_loss: 0.6960 - mrcnn_class_loss: 0.4164 - mrcnn_bbox_loss: 1.0075 - mrcnn_mask_loss: 1.0936image_id 314
18/100 [====>.........................] - ETA: 6:42 - loss: 3.2037 - rpn_class_loss: 0.0460 - rpn_bbox_loss: 0.6883 - mrcnn_class_loss: 0.4014 - mrcnn_bbox_loss: 0.9962 - mrcnn_mask_loss: 1.0717image_id 62
19/100 [====>.........................] - ETA: 6:38 - loss: 3.1404 - rpn_class_loss: 0.0444 - rpn_bbox_loss: 0.6790 - mrcnn_class_loss: 0.3861 - mrcnn_bbox_loss: 0.9782 - mrcnn_mask_loss: 1.0526image_id 556
20/100 [=====>........................] - ETA: 6:33 - loss: 3.0993 - rpn_class_loss: 0.0427 - rpn_bbox_loss: 0.6804 - mrcnn_class_loss: 0.3816 - mrcnn_bbox_loss: 0.9577 - mrcnn_mask_loss: 1.0369image_id 256
21/100 [=====>........................] - ETA: 6:27 - loss: 3.0755 - rpn_class_loss: 0.0507 - rpn_bbox_loss: 0.6751 - mrcnn_class_loss: 0.3769 - mrcnn_bbox_loss: 0.9528 - mrcnn_mask_loss: 1.0200image_id 428
22/100 [=====>........................] - ETA: 6:22 - loss: 3.1179 - rpn_class_loss: 0.0536 - rpn_bbox_loss: 0.6918 - mrcnn_class_loss: 0.4033 - mrcnn_bbox_loss: 0.9641 - mrcnn_mask_loss: 1.0052image_id 310
23/100 [=====>........................] - ETA: 6:17 - loss: 3.1016 - rpn_class_loss: 0.0515 - rpn_bbox_loss: 0.6962 - mrcnn_class_loss: 0.3935 - mrcnn_bbox_loss: 0.9704 - mrcnn_mask_loss: 0.9900image_id 353
24/100 [======>.......................] - ETA: 6:12 - loss: 3.0987 - rpn_class_loss: 0.0496 - rpn_bbox_loss: 0.6854 - mrcnn_class_loss: 0.4006 - mrcnn_bbox_loss: 0.9886 - mrcnn_mask_loss: 0.9745image_id 213
25/100 [======>.......................] - ETA: 6:07 - loss: 3.0504 - rpn_class_loss: 0.0485 - rpn_bbox_loss: 0.6810 - mrcnn_class_loss: 0.3852 - mrcnn_bbox_loss: 0.9747 - mrcnn_mask_loss: 0.9610image_id 156
26/100 [======>.......................] - ETA: 6:01 - loss: 3.0056 - rpn_class_loss: 0.0487 - rpn_bbox_loss: 0.6670 - mrcnn_class_loss: 0.3794 - mrcnn_bbox_loss: 0.9613 - mrcnn_mask_loss: 0.9491image_id 517
27/100 [=======>......................] - ETA: 5:55 - loss: 2.9727 - rpn_class_loss: 0.0474 - rpn_bbox_loss: 0.6699 - mrcnn_class_loss: 0.3692 - mrcnn_bbox_loss: 0.9479 - mrcnn_mask_loss: 0.9384image_id 171
28/100 [=======>......................] - ETA: 5:50 - loss: 2.9539 - rpn_class_loss: 0.0475 - rpn_bbox_loss: 0.6725 - mrcnn_class_loss: 0.3700 - mrcnn_bbox_loss: 0.9346 - mrcnn_mask_loss: 0.9294image_id 505
29/100 [=======>......................] - ETA: 5:44 - loss: 2.9411 - rpn_class_loss: 0.0470 - rpn_bbox_loss: 0.6640 - mrcnn_class_loss: 0.3694 - mrcnn_bbox_loss: 0.9441 - mrcnn_mask_loss: 0.9165image_id 747
30/100 [========>.....................] - ETA: 5:39 - loss: 2.8848 - rpn_class_loss: 0.0457 - rpn_bbox_loss: 0.6434 - mrcnn_class_loss: 0.3626 - mrcnn_bbox_loss: 0.9300 - mrcnn_mask_loss: 0.9032image_id 733
31/100 [========>.....................] - ETA: 5:34 - loss: 2.8629 - rpn_class_loss: 0.0458 - rpn_bbox_loss: 0.6338 - mrcnn_class_loss: 0.3532 - mrcnn_bbox_loss: 0.9393 - mrcnn_mask_loss: 0.8907image_id 94
32/100 [========>.....................] - ETA: 5:29 - loss: 2.8659 - rpn_class_loss: 0.0461 - rpn_bbox_loss: 0.6322 - mrcnn_class_loss: 0.3451 - mrcnn_bbox_loss: 0.9575 - mrcnn_mask_loss: 0.8850image_id 363
33/100 [========>.....................] - ETA: 5:24 - loss: 2.8531 - rpn_class_loss: 0.0480 - rpn_bbox_loss: 0.6323 - mrcnn_class_loss: 0.3450 - mrcnn_bbox_loss: 0.9511 - mrcnn_mask_loss: 0.8767image_id 634
34/100 [=========>....................] - ETA: 5:19 - loss: 2.8641 - rpn_class_loss: 0.0482 - rpn_bbox_loss: 0.6347 - mrcnn_class_loss: 0.3485 - mrcnn_bbox_loss: 0.9645 - mrcnn_mask_loss: 0.8681image_id 460
35/100 [=========>....................] - ETA: 5:14 - loss: 2.8316 - rpn_class_loss: 0.0490 - rpn_bbox_loss: 0.6287 - mrcnn_class_loss: 0.3419 - mrcnn_bbox_loss: 0.9501 - mrcnn_mask_loss: 0.8619image_id 612
36/100 [=========>....................] - ETA: 5:08 - loss: 2.7951 - rpn_class_loss: 0.0479 - rpn_bbox_loss: 0.6133 - mrcnn_class_loss: 0.3391 - mrcnn_bbox_loss: 0.9394 - mrcnn_mask_loss: 0.8554image_id 549
37/100 [==========>...................] - ETA: 5:03 - loss: 2.8040 - rpn_class_loss: 0.0476 - rpn_bbox_loss: 0.6216 - mrcnn_class_loss: 0.3399 - mrcnn_bbox_loss: 0.9467 - mrcnn_mask_loss: 0.8483image_id 577
38/100 [==========>...................] - ETA: 4:58 - loss: 2.7978 - rpn_class_loss: 0.0469 - rpn_bbox_loss: 0.6310 - mrcnn_class_loss: 0.3332 - mrcnn_bbox_loss: 0.9413 - mrcnn_mask_loss: 0.8454image_id 123
39/100 [==========>...................] - ETA: 4:53 - loss: 2.7614 - rpn_class_loss: 0.0462 - rpn_bbox_loss: 0.6189 - mrcnn_class_loss: 0.3255 - mrcnn_bbox_loss: 0.9340 - mrcnn_mask_loss: 0.8369image_id 259
40/100 [===========>..................] - ETA: 4:48 - loss: 2.7412 - rpn_class_loss: 0.0460 - rpn_bbox_loss: 0.6356 - mrcnn_class_loss: 0.3186 - mrcnn_bbox_loss: 0.9147 - mrcnn_mask_loss: 0.8262image_id 656
41/100 [===========>..................] - ETA: 4:43 - loss: 2.7314 - rpn_class_loss: 0.0466 - rpn_bbox_loss: 0.6428 - mrcnn_class_loss: 0.3173 - mrcnn_bbox_loss: 0.9067 - mrcnn_mask_loss: 0.8180image_id 754
42/100 [===========>..................] - ETA: 4:38 - loss: 2.7247 - rpn_class_loss: 0.0465 - rpn_bbox_loss: 0.6488 - mrcnn_class_loss: 0.3141 - mrcnn_bbox_loss: 0.9042 - mrcnn_mask_loss: 0.8110image_id 632
43/100 [===========>..................] - ETA: 4:33 - loss: 2.7007 - rpn_class_loss: 0.0456 - rpn_bbox_loss: 0.6423 - mrcnn_class_loss: 0.3074 - mrcnn_bbox_loss: 0.9031 - mrcnn_mask_loss: 0.8023image_id 114
44/100 [============>.................] - ETA: 4:28 - loss: 2.6852 - rpn_class_loss: 0.0455 - rpn_bbox_loss: 0.6389 - mrcnn_class_loss: 0.3024 - mrcnn_bbox_loss: 0.9000 - mrcnn_mask_loss: 0.7984image_id 248
45/100 [============>.................] - ETA: 4:23 - loss: 2.6722 - rpn_class_loss: 0.0453 - rpn_bbox_loss: 0.6350 - mrcnn_class_loss: 0.3005 - mrcnn_bbox_loss: 0.8975 - mrcnn_mask_loss: 0.7939image_id 375
46/100 [============>.................] - ETA: 4:18 - loss: 2.6610 - rpn_class_loss: 0.0449 - rpn_bbox_loss: 0.6331 - mrcnn_class_loss: 0.2998 - mrcnn_bbox_loss: 0.8929 - mrcnn_mask_loss: 0.7903image_id 176
47/100 [=============>................] - ETA: 4:13 - loss: 2.6427 - rpn_class_loss: 0.0443 - rpn_bbox_loss: 0.6243 - mrcnn_class_loss: 0.3015 - mrcnn_bbox_loss: 0.8915 - mrcnn_mask_loss: 0.7811image_id 289
48/100 [=============>................] - ETA: 4:08 - loss: 2.6470 - rpn_class_loss: 0.0436 - rpn_bbox_loss: 0.6326 - mrcnn_class_loss: 0.3058 - mrcnn_bbox_loss: 0.8890 - mrcnn_mask_loss: 0.7760image_id 639
49/100 [=============>................] - ETA: 4:03 - loss: 2.6159 - rpn_class_loss: 0.0431 - rpn_bbox_loss: 0.6258 - mrcnn_class_loss: 0.2997 - mrcnn_bbox_loss: 0.8803 - mrcnn_mask_loss: 0.7671image_id 454
50/100 [==============>...............] - ETA: 3:58 - loss: 2.5960 - rpn_class_loss: 0.0427 - rpn_bbox_loss: 0.6192 - mrcnn_class_loss: 0.2959 - mrcnn_bbox_loss: 0.8782 - mrcnn_mask_loss: 0.7600image_id 95
51/100 [==============>...............] - ETA: 3:54 - loss: 2.5792 - rpn_class_loss: 0.0426 - rpn_bbox_loss: 0.6159 - mrcnn_class_loss: 0.2951 - mrcnn_bbox_loss: 0.8721 - mrcnn_mask_loss: 0.7535image_id 33
52/100 [==============>...............] - ETA: 3:49 - loss: 2.5728 - rpn_class_loss: 0.0424 - rpn_bbox_loss: 0.6153 - mrcnn_class_loss: 0.2916 - mrcnn_bbox_loss: 0.8736 - mrcnn_mask_loss: 0.7499image_id 417
53/100 [==============>...............] - ETA: 3:44 - loss: 2.5555 - rpn_class_loss: 0.0416 - rpn_bbox_loss: 0.6097 - mrcnn_class_loss: 0.2886 - mrcnn_bbox_loss: 0.8695 - mrcnn_mask_loss: 0.7460image_id 762
54/100 [===============>..............] - ETA: 3:39 - loss: 2.5466 - rpn_class_loss: 0.0413 - rpn_bbox_loss: 0.6246 - mrcnn_class_loss: 0.2859 - mrcnn_bbox_loss: 0.8568 - mrcnn_mask_loss: 0.7380image_id 808
55/100 [===============>..............] - ETA: 3:34 - loss: 2.5405 - rpn_class_loss: 0.0420 - rpn_bbox_loss: 0.6173 - mrcnn_class_loss: 0.2924 - mrcnn_bbox_loss: 0.8549 - mrcnn_mask_loss: 0.7339image_id 769
56/100 [===============>..............] - ETA: 3:29 - loss: 2.5340 - rpn_class_loss: 0.0415 - rpn_bbox_loss: 0.6236 - mrcnn_class_loss: 0.2891 - mrcnn_bbox_loss: 0.8528 - mrcnn_mask_loss: 0.7269image_id 368
57/100 [================>.............] - ETA: 3:25 - loss: 2.5249 - rpn_class_loss: 0.0411 - rpn_bbox_loss: 0.6311 - mrcnn_class_loss: 0.2887 - mrcnn_bbox_loss: 0.8433 - mrcnn_mask_loss: 0.7207image_id 484
58/100 [================>.............] - ETA: 3:20 - loss: 2.5134 - rpn_class_loss: 0.0407 - rpn_bbox_loss: 0.6281 - mrcnn_class_loss: 0.2879 - mrcnn_bbox_loss: 0.8404 - mrcnn_mask_loss: 0.7164image_id 433
59/100 [================>.............] - ETA: 3:15 - loss: 2.5018 - rpn_class_loss: 0.0401 - rpn_bbox_loss: 0.6262 - mrcnn_class_loss: 0.2856 - mrcnn_bbox_loss: 0.8357 - mrcnn_mask_loss: 0.7142image_id 146
60/100 [=================>............] - ETA: 3:10 - loss: 2.4818 - rpn_class_loss: 0.0396 - rpn_bbox_loss: 0.6171 - mrcnn_class_loss: 0.2832 - mrcnn_bbox_loss: 0.8337 - mrcnn_mask_loss: 0.7081image_id 525
61/100 [=================>............] - ETA: 3:05 - loss: 2.4822 - rpn_class_loss: 0.0396 - rpn_bbox_loss: 0.6178 - mrcnn_class_loss: 0.2814 - mrcnn_bbox_loss: 0.8355 - mrcnn_mask_loss: 0.7080image_id 70
62/100 [=================>............] - ETA: 3:01 - loss: 2.4654 - rpn_class_loss: 0.0391 - rpn_bbox_loss: 0.6110 - mrcnn_class_loss: 0.2783 - mrcnn_bbox_loss: 0.8282 - mrcnn_mask_loss: 0.7088image_id 426
63/100 [=================>............] - ETA: 2:56 - loss: 2.4604 - rpn_class_loss: 0.0387 - rpn_bbox_loss: 0.6111 - mrcnn_class_loss: 0.2774 - mrcnn_bbox_loss: 0.8296 - mrcnn_mask_loss: 0.7037image_id 226
64/100 [==================>...........] - ETA: 2:51 - loss: 2.4666 - rpn_class_loss: 0.0397 - rpn_bbox_loss: 0.6115 - mrcnn_class_loss: 0.2806 - mrcnn_bbox_loss: 0.8327 - mrcnn_mask_loss: 0.7022image_id 438
65/100 [==================>...........] - ETA: 2:46 - loss: 2.4781 - rpn_class_loss: 0.0392 - rpn_bbox_loss: 0.6313 - mrcnn_class_loss: 0.2776 - mrcnn_bbox_loss: 0.8321 - mrcnn_mask_loss: 0.6980image_id 128
66/100 [==================>...........] - ETA: 2:41 - loss: 2.4707 - rpn_class_loss: 0.0398 - rpn_bbox_loss: 0.6317 - mrcnn_class_loss: 0.2744 - mrcnn_bbox_loss: 0.8300 - mrcnn_mask_loss: 0.6948image_id 471
67/100 [===================>..........] - ETA: 2:36 - loss: 2.4479 - rpn_class_loss: 0.0395 - rpn_bbox_loss: 0.6238 - mrcnn_class_loss: 0.2720 - mrcnn_bbox_loss: 0.8239 - mrcnn_mask_loss: 0.6888image_id 58
68/100 [===================>..........] - ETA: 2:32 - loss: 2.4615 - rpn_class_loss: 0.0391 - rpn_bbox_loss: 0.6297 - mrcnn_class_loss: 0.2814 - mrcnn_bbox_loss: 0.8252 - mrcnn_mask_loss: 0.6861image_id 659
69/100 [===================>..........] - ETA: 2:27 - loss: 2.4440 - rpn_class_loss: 0.0386 - rpn_bbox_loss: 0.6269 - mrcnn_class_loss: 0.2810 - mrcnn_bbox_loss: 0.8182 - mrcnn_mask_loss: 0.6794image_id 332
70/100 [====================>.........] - ETA: 2:22 - loss: 2.4722 - rpn_class_loss: 0.0387 - rpn_bbox_loss: 0.6677 - mrcnn_class_loss: 0.2788 - mrcnn_bbox_loss: 0.8128 - mrcnn_mask_loss: 0.6741image_id 558
71/100 [====================>.........] - ETA: 2:17 - loss: 2.4636 - rpn_class_loss: 0.0390 - rpn_bbox_loss: 0.6631 - mrcnn_class_loss: 0.2767 - mrcnn_bbox_loss: 0.8141 - mrcnn_mask_loss: 0.6708image_id 18
72/100 [====================>.........] - ETA: 2:13 - loss: 2.4480 - rpn_class_loss: 0.0391 - rpn_bbox_loss: 0.6578 - mrcnn_class_loss: 0.2755 - mrcnn_bbox_loss: 0.8100 - mrcnn_mask_loss: 0.6656image_id 323
73/100 [====================>.........] - ETA: 2:08 - loss: 2.4514 - rpn_class_loss: 0.0397 - rpn_bbox_loss: 0.6561 - mrcnn_class_loss: 0.2770 - mrcnn_bbox_loss: 0.8165 - mrcnn_mask_loss: 0.6621image_id 361
74/100 [=====================>........] - ETA: 2:03 - loss: 2.4286 - rpn_class_loss: 0.0393 - rpn_bbox_loss: 0.6479 - mrcnn_class_loss: 0.2737 - mrcnn_bbox_loss: 0.8110 - mrcnn_mask_loss: 0.6568image_id 96
75/100 [=====================>........] - ETA: 1:58 - loss: 2.4283 - rpn_class_loss: 0.0391 - rpn_bbox_loss: 0.6442 - mrcnn_class_loss: 0.2744 - mrcnn_bbox_loss: 0.8169 - mrcnn_mask_loss: 0.6536image_id 676
76/100 [=====================>........] - ETA: 1:54 - loss: 2.4190 - rpn_class_loss: 0.0389 - rpn_bbox_loss: 0.6399 - mrcnn_class_loss: 0.2753 - mrcnn_bbox_loss: 0.8139 - mrcnn_mask_loss: 0.6510image_id 223
77/100 [======================>.......] - ETA: 1:49 - loss: 2.4286 - rpn_class_loss: 0.0388 - rpn_bbox_loss: 0.6388 - mrcnn_class_loss: 0.2779 - mrcnn_bbox_loss: 0.8184 - mrcnn_mask_loss: 0.6546image_id 373
78/100 [======================>.......] - ETA: 1:44 - loss: 2.4137 - rpn_class_loss: 0.0385 - rpn_bbox_loss: 0.6357 - mrcnn_class_loss: 0.2757 - mrcnn_bbox_loss: 0.8142 - mrcnn_mask_loss: 0.6496image_id 330
79/100 [======================>.......] - ETA: 1:39 - loss: 2.4111 - rpn_class_loss: 0.0383 - rpn_bbox_loss: 0.6309 - mrcnn_class_loss: 0.2809 - mrcnn_bbox_loss: 0.8127 - mrcnn_mask_loss: 0.6483image_id 162
80/100 [=======================>......] - ETA: 1:35 - loss: 2.4116 - rpn_class_loss: 0.0384 - rpn_bbox_loss: 0.6265 - mrcnn_class_loss: 0.2806 - mrcnn_bbox_loss: 0.8168 - mrcnn_mask_loss: 0.6493image_id 546
81/100 [=======================>......] - ETA: 1:30 - loss: 2.3967 - rpn_class_loss: 0.0381 - rpn_bbox_loss: 0.6210 - mrcnn_class_loss: 0.2780 - mrcnn_bbox_loss: 0.8153 - mrcnn_mask_loss: 0.6443image_id 311
82/100 [=======================>......] - ETA: 1:25 - loss: 2.3796 - rpn_class_loss: 0.0377 - rpn_bbox_loss: 0.6162 - mrcnn_class_loss: 0.2774 - mrcnn_bbox_loss: 0.8094 - mrcnn_mask_loss: 0.6389image_id 60
83/100 [=======================>......] - ETA: 1:20 - loss: 2.3775 - rpn_class_loss: 0.0377 - rpn_bbox_loss: 0.6349 - mrcnn_class_loss: 0.2741 - mrcnn_bbox_loss: 0.7996 - mrcnn_mask_loss: 0.6312image_id 145
84/100 [========================>.....] - ETA: 1:16 - loss: 2.3729 - rpn_class_loss: 0.0374 - rpn_bbox_loss: 0.6306 - mrcnn_class_loss: 0.2842 - mrcnn_bbox_loss: 0.7929 - mrcnn_mask_loss: 0.6279image_id 354
85/100 [========================>.....] - ETA: 1:11 - loss: 2.3779 - rpn_class_loss: 0.0374 - rpn_bbox_loss: 0.6328 - mrcnn_class_loss: 0.2837 - mrcnn_bbox_loss: 0.7915 - mrcnn_mask_loss: 0.6325image_id 574
86/100 [========================>.....] - ETA: 1:06 - loss: 2.3769 - rpn_class_loss: 0.0376 - rpn_bbox_loss: 0.6309 - mrcnn_class_loss: 0.2859 - mrcnn_bbox_loss: 0.7910 - mrcnn_mask_loss: 0.6315image_id 778
87/100 [=========================>....] - ETA: 1:01 - loss: 2.3688 - rpn_class_loss: 0.0374 - rpn_bbox_loss: 0.6253 - mrcnn_class_loss: 0.2849 - mrcnn_bbox_loss: 0.7908 - mrcnn_mask_loss: 0.6305image_id 799
88/100 [=========================>....] - ETA: 57s - loss: 2.3610 - rpn_class_loss: 0.0371 - rpn_bbox_loss: 0.6200 - mrcnn_class_loss: 0.2834 - mrcnn_bbox_loss: 0.7893 - mrcnn_mask_loss: 0.6312 image_id 527
89/100 [=========================>....] - ETA: 52s - loss: 2.3548 - rpn_class_loss: 0.0368 - rpn_bbox_loss: 0.6225 - mrcnn_class_loss: 0.2805 - mrcnn_bbox_loss: 0.7866 - mrcnn_mask_loss: 0.6284image_id 229
90/100 [==========================>...] - ETA: 47s - loss: 2.3514 - rpn_class_loss: 0.0365 - rpn_bbox_loss: 0.6203 - mrcnn_class_loss: 0.2823 - mrcnn_bbox_loss: 0.7852 - mrcnn_mask_loss: 0.6270image_id 250
91/100 [==========================>...] - ETA: 42s - loss: 2.3457 - rpn_class_loss: 0.0364 - rpn_bbox_loss: 0.6163 - mrcnn_class_loss: 0.2841 - mrcnn_bbox_loss: 0.7836 - mrcnn_mask_loss: 0.6253image_id 164
92/100 [==========================>...] - ETA: 38s - loss: 2.3411 - rpn_class_loss: 0.0360 - rpn_bbox_loss: 0.6139 - mrcnn_class_loss: 0.2853 - mrcnn_bbox_loss: 0.7808 - mrcnn_mask_loss: 0.6250image_id 805
93/100 [==========================>...] - ETA: 33s - loss: 2.3348 - rpn_class_loss: 0.0358 - rpn_bbox_loss: 0.6099 - mrcnn_class_loss: 0.2847 - mrcnn_bbox_loss: 0.7785 - mrcnn_mask_loss: 0.6260image_id 813
94/100 [===========================>..] - ETA: 28s - loss: 2.3224 - rpn_class_loss: 0.0354 - rpn_bbox_loss: 0.6075 - mrcnn_class_loss: 0.2847 - mrcnn_bbox_loss: 0.7733 - mrcnn_mask_loss: 0.6215image_id 761
95/100 [===========================>..] - ETA: 23s - loss: 2.3116 - rpn_class_loss: 0.0356 - rpn_bbox_loss: 0.6034 - mrcnn_class_loss: 0.2831 - mrcnn_bbox_loss: 0.7696 - mrcnn_mask_loss: 0.6199image_id 599
96/100 [===========================>..] - ETA: 18s - loss: 2.3066 - rpn_class_loss: 0.0354 - rpn_bbox_loss: 0.6015 - mrcnn_class_loss: 0.2813 - mrcnn_bbox_loss: 0.7685 - mrcnn_mask_loss: 0.6198image_id 242
97/100 [============================>.] - ETA: 14s - loss: 2.3021 - rpn_class_loss: 0.0353 - rpn_bbox_loss: 0.5989 - mrcnn_class_loss: 0.2822 - mrcnn_bbox_loss: 0.7684 - mrcnn_mask_loss: 0.6173image_id 50
98/100 [============================>.] - ETA: 9s - loss: 2.2898 - rpn_class_loss: 0.0352 - rpn_bbox_loss: 0.5949 - mrcnn_class_loss: 0.2807 - mrcnn_bbox_loss: 0.7656 - mrcnn_mask_loss: 0.6134 image_id 480
99/100 [============================>.] - ETA: 4s - loss: 2.2870 - rpn_class_loss: 0.0352 - rpn_bbox_loss: 0.5957 - mrcnn_class_loss: 0.2800 - mrcnn_bbox_loss: 0.7648 - mrcnn_mask_loss: 0.6113image_id 708
image_id 4
image_id 1
image_id 8
image_id 9
image_id 0
100/100 [==============================] - 488s 5s/step - loss: 2.2875 - rpn_class_loss: 0.0349 - rpn_bbox_loss: 0.5931 - mrcnn_class_loss: 0.2825 - mrcnn_bbox_loss: 0.7684 - mrcnn_mask_loss: 0.6085 - val_loss: 2.3259 - val_rpn_class_loss: 0.0170 - val_rpn_bbox_loss: 0.4478 - val_mrcnn_class_loss: 0.3944 - val_mrcnn_bbox_loss: 0.9476 - val_mrcnn_mask_loss: 0.5191
############代码块八###########
# Fine tune all layers
# Passing layers="all" trains all layers. You can also
# pass a regular expression to select which layers to
# train by name pattern.
model.train(dataset_train, dataset_val,
learning_rate=config.LEARNING_RATE / 10,
epochs=1,
layers="all")
----------------------------------------------------------
输出:
Starting at epoch 1. LR=0.0001
Checkpoint Path: G:\TensorflowProject\Mask_RCNN-master\samples0820\shapes\logs\shapes20180820T1503\mask_rcnn_shapes_{epoch:04d}.h5
Selecting layers to train
conv1 (Conv2D)
bn_conv1 (BatchNorm)
res2a_branch2a (Conv2D)
bn2a_branch2a (BatchNorm)
res2a_branch2b (Conv2D)
bn2a_branch2b (BatchNorm)
res2a_branch2c (Conv2D)
res2a_branch1 (Conv2D)
bn2a_branch2c (BatchNorm)
bn2a_branch1 (BatchNorm)
res2b_branch2a (Conv2D)
bn2b_branch2a (BatchNorm)
res2b_branch2b (Conv2D)
bn2b_branch2b (BatchNorm)
res2b_branch2c (Conv2D)
bn2b_branch2c (BatchNorm)
res2c_branch2a (Conv2D)
bn2c_branch2a (BatchNorm)
res2c_branch2b (Conv2D)
bn2c_branch2b (BatchNorm)
res2c_branch2c (Conv2D)
bn2c_branch2c (BatchNorm)
res3a_branch2a (Conv2D)
bn3a_branch2a (BatchNorm)
res3a_branch2b (Conv2D)
bn3a_branch2b (BatchNorm)
res3a_branch2c (Conv2D)
res3a_branch1 (Conv2D)
bn3a_branch2c (BatchNorm)
bn3a_branch1 (BatchNorm)
res3b_branch2a (Conv2D)
bn3b_branch2a (BatchNorm)
res3b_branch2b (Conv2D)
bn3b_branch2b (BatchNorm)
res3b_branch2c (Conv2D)
bn3b_branch2c (BatchNorm)
res3c_branch2a (Conv2D)
bn3c_branch2a (BatchNorm)
res3c_branch2b (Conv2D)
bn3c_branch2b (BatchNorm)
res3c_branch2c (Conv2D)
bn3c_branch2c (BatchNorm)
res3d_branch2a (Conv2D)
bn3d_branch2a (BatchNorm)
res3d_branch2b (Conv2D)
bn3d_branch2b (BatchNorm)
res3d_branch2c (Conv2D)
bn3d_branch2c (BatchNorm)
res4a_branch2a (Conv2D)
bn4a_branch2a (BatchNorm)
res4a_branch2b (Conv2D)
bn4a_branch2b (BatchNorm)
res4a_branch2c (Conv2D)
res4a_branch1 (Conv2D)
bn4a_branch2c (BatchNorm)
bn4a_branch1 (BatchNorm)
res4b_branch2a (Conv2D)
bn4b_branch2a (BatchNorm)
res4b_branch2b (Conv2D)
bn4b_branch2b (BatchNorm)
res4b_branch2c (Conv2D)
bn4b_branch2c (BatchNorm)
res4c_branch2a (Conv2D)
bn4c_branch2a (BatchNorm)
res4c_branch2b (Conv2D)
bn4c_branch2b (BatchNorm)
res4c_branch2c (Conv2D)
bn4c_branch2c (BatchNorm)
res4d_branch2a (Conv2D)
bn4d_branch2a (BatchNorm)
res4d_branch2b (Conv2D)
bn4d_branch2b (BatchNorm)
res4d_branch2c (Conv2D)
bn4d_branch2c (BatchNorm)
res4e_branch2a (Conv2D)
bn4e_branch2a (BatchNorm)
res4e_branch2b (Conv2D)
bn4e_branch2b (BatchNorm)
res4e_branch2c (Conv2D)
bn4e_branch2c (BatchNorm)
res4f_branch2a (Conv2D)
bn4f_branch2a (BatchNorm)
res4f_branch2b (Conv2D)
bn4f_branch2b (BatchNorm)
res4f_branch2c (Conv2D)
bn4f_branch2c (BatchNorm)
res4g_branch2a (Conv2D)
bn4g_branch2a (BatchNorm)
res4g_branch2b (Conv2D)
bn4g_branch2b (BatchNorm)
res4g_branch2c (Conv2D)
bn4g_branch2c (BatchNorm)
res4h_branch2a (Conv2D)
bn4h_branch2a (BatchNorm)
res4h_branch2b (Conv2D)
bn4h_branch2b (BatchNorm)
res4h_branch2c (Conv2D)
bn4h_branch2c (BatchNorm)
res4i_branch2a (Conv2D)
bn4i_branch2a (BatchNorm)
res4i_branch2b (Conv2D)
bn4i_branch2b (BatchNorm)
res4i_branch2c (Conv2D)
bn4i_branch2c (BatchNorm)
res4j_branch2a (Conv2D)
bn4j_branch2a (BatchNorm)
res4j_branch2b (Conv2D)
bn4j_branch2b (BatchNorm)
res4j_branch2c (Conv2D)
bn4j_branch2c (BatchNorm)
res4k_branch2a (Conv2D)
bn4k_branch2a (BatchNorm)
res4k_branch2b (Conv2D)
bn4k_branch2b (BatchNorm)
res4k_branch2c (Conv2D)
bn4k_branch2c (BatchNorm)
res4l_branch2a (Conv2D)
bn4l_branch2a (BatchNorm)
res4l_branch2b (Conv2D)
bn4l_branch2b (BatchNorm)
res4l_branch2c (Conv2D)
bn4l_branch2c (BatchNorm)
res4m_branch2a (Conv2D)
bn4m_branch2a (BatchNorm)
res4m_branch2b (Conv2D)
bn4m_branch2b (BatchNorm)
res4m_branch2c (Conv2D)
bn4m_branch2c (BatchNorm)
res4n_branch2a (Conv2D)
bn4n_branch2a (BatchNorm)
res4n_branch2b (Conv2D)
bn4n_branch2b (BatchNorm)
res4n_branch2c (Conv2D)
bn4n_branch2c (BatchNorm)
res4o_branch2a (Conv2D)
bn4o_branch2a (BatchNorm)
res4o_branch2b (Conv2D)
bn4o_branch2b (BatchNorm)
res4o_branch2c (Conv2D)
bn4o_branch2c (BatchNorm)
res4p_branch2a (Conv2D)
bn4p_branch2a (BatchNorm)
res4p_branch2b (Conv2D)
bn4p_branch2b (BatchNorm)
res4p_branch2c (Conv2D)
bn4p_branch2c (BatchNorm)
res4q_branch2a (Conv2D)
bn4q_branch2a (BatchNorm)
res4q_branch2b (Conv2D)
bn4q_branch2b (BatchNorm)
res4q_branch2c (Conv2D)
bn4q_branch2c (BatchNorm)
res4r_branch2a (Conv2D)
bn4r_branch2a (BatchNorm)
res4r_branch2b (Conv2D)
bn4r_branch2b (BatchNorm)
res4r_branch2c (Conv2D)
bn4r_branch2c (BatchNorm)
res4s_branch2a (Conv2D)
bn4s_branch2a (BatchNorm)
res4s_branch2b (Conv2D)
bn4s_branch2b (BatchNorm)
res4s_branch2c (Conv2D)
bn4s_branch2c (BatchNorm)
res4t_branch2a (Conv2D)
bn4t_branch2a (BatchNorm)
res4t_branch2b (Conv2D)
bn4t_branch2b (BatchNorm)
res4t_branch2c (Conv2D)
bn4t_branch2c (BatchNorm)
res4u_branch2a (Conv2D)
bn4u_branch2a (BatchNorm)
res4u_branch2b (Conv2D)
bn4u_branch2b (BatchNorm)
res4u_branch2c (Conv2D)
bn4u_branch2c (BatchNorm)
res4v_branch2a (Conv2D)
bn4v_branch2a (BatchNorm)
res4v_branch2b (Conv2D)
bn4v_branch2b (BatchNorm)
res4v_branch2c (Conv2D)
bn4v_branch2c (BatchNorm)
res4w_branch2a (Conv2D)
bn4w_branch2a (BatchNorm)
res4w_branch2b (Conv2D)
bn4w_branch2b (BatchNorm)
res4w_branch2c (Conv2D)
bn4w_branch2c (BatchNorm)
res5a_branch2a (Conv2D)
bn5a_branch2a (BatchNorm)
res5a_branch2b (Conv2D)
bn5a_branch2b (BatchNorm)
res5a_branch2c (Conv2D)
res5a_branch1 (Conv2D)
bn5a_branch2c (BatchNorm)
bn5a_branch1 (BatchNorm)
res5b_branch2a (Conv2D)
bn5b_branch2a (BatchNorm)
res5b_branch2b (Conv2D)
bn5b_branch2b (BatchNorm)
res5b_branch2c (Conv2D)
bn5b_branch2c (BatchNorm)
res5c_branch2a (Conv2D)
bn5c_branch2a (BatchNorm)
res5c_branch2b (Conv2D)
bn5c_branch2b (BatchNorm)
res5c_branch2c (Conv2D)
bn5c_branch2c (BatchNorm)
fpn_c5p5 (Conv2D)
fpn_c4p4 (Conv2D)
fpn_c3p3 (Conv2D)
fpn_c2p2 (Conv2D)
fpn_p5 (Conv2D)
fpn_p2 (Conv2D)
fpn_p3 (Conv2D)
fpn_p4 (Conv2D)
In model: rpn_model
rpn_conv_shared (Conv2D)
rpn_class_raw (Conv2D)
rpn_bbox_pred (Conv2D)
mrcnn_mask_conv1 (TimeDistributed)
mrcnn_mask_bn1 (TimeDistributed)
mrcnn_mask_conv2 (TimeDistributed)
mrcnn_mask_bn2 (TimeDistributed)
mrcnn_class_conv1 (TimeDistributed)
mrcnn_class_bn1 (TimeDistributed)
mrcnn_mask_conv3 (TimeDistributed)
mrcnn_mask_bn3 (TimeDistributed)
mrcnn_class_conv2 (TimeDistributed)
mrcnn_class_bn2 (TimeDistributed)
mrcnn_mask_conv4 (TimeDistributed)
mrcnn_mask_bn4 (TimeDistributed)
mrcnn_bbox_fc (TimeDistributed)
mrcnn_mask_deconv (TimeDistributed)
mrcnn_class_logits (TimeDistributed)
mrcnn_mask (TimeDistributed)