Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿飞的客栈
Mask_RCNN
提交
89629ed9
M
Mask_RCNN
项目概览
阿飞的客栈
/
Mask_RCNN
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Mask_RCNN
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
89629ed9
编写于
7月 02, 2018
作者:
C
Corey Hu
提交者:
Waleed
7月 11, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
spellcheck config.py
上级
8075ecc1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
12 deletion
+12
-12
mrcnn/model.py
mrcnn/model.py
+12
-12
未找到文件。
mrcnn/model.py
浏览文件 @
89629ed9
...
...
@@ -1661,7 +1661,7 @@ def data_generator(dataset, config, shuffle=True, augment=False, augmentation=No
defined in the Dataset class.
Returns a Python generator. Upon calling next() on it, the
generator returns two lists, inputs and outputs. The cont
ainte
s
generator returns two lists, inputs and outputs. The cont
ent
s
of the lists differs depending on the received arguments:
inputs list:
- images: [batch, H, W, C]
...
...
@@ -1693,7 +1693,7 @@ def data_generator(dataset, config, shuffle=True, augment=False, augmentation=No
config
.
BACKBONE_STRIDES
,
config
.
RPN_ANCHOR_STRIDE
)
# Keras requires a generator to run indefin
a
tely.
# Keras requires a generator to run indefin
i
tely.
while
True
:
try
:
# Increment index to pick next image. Shuffle if at the start of an epoch.
...
...
@@ -2101,10 +2101,10 @@ class MaskRCNN():
return
checkpoint
def
load_weights
(
self
,
filepath
,
by_name
=
False
,
exclude
=
None
):
"""Modified version of the correspoding Keras function with
"""Modified version of the correspo
n
ding Keras function with
the addition of multi-GPU support and the ability to exclude
some layers from loading.
ex
lude: list of layer names to excluc
e
ex
clude: list of layer names to exclud
e
"""
import
h5py
# Conditional import to support versions of Keras before 2.2
...
...
@@ -2238,7 +2238,7 @@ class MaskRCNN():
layer
.
layer
.
trainable
=
trainable
else
:
layer
.
trainable
=
trainable
# Print trainble layer names
# Print train
a
ble layer names
if
trainable
and
verbose
>
0
:
log
(
"{}{:20} ({})"
.
format
(
" "
*
indent
,
layer
.
name
,
layer
.
__class__
.
__name__
))
...
...
@@ -2306,7 +2306,7 @@ class MaskRCNN():
flips images right/left 50% of the time. You can pass complex
augmentations as well. This augmentation applies 50% of the
time, and when it does it flips images right/left half the time
and adds a Gauss
s
ian blur with a random sigma in range 0 to 5.
and adds a Gaussian blur with a random sigma in range 0 to 5.
augmentation = imgaug.augmenters.Sometimes(0.5, [
imgaug.augmenters.Fliplr(0.5),
...
...
@@ -2385,10 +2385,10 @@ class MaskRCNN():
def
mold_inputs
(
self
,
images
):
"""Takes a list of images and modifies them to the format expected
as an input to the neural network.
images: List of image matric
i
es [height,width,depth]. Images can have
images: List of image matrices [height,width,depth]. Images can have
different sizes.
Returns 3 Numpy matric
i
es:
Returns 3 Numpy matrices:
molded_images: [N, h, w, 3]. Images resized and normalized.
image_metas: [N, length of meta data]. Details about each image.
windows: [N, (y1, x1, y2, x2)]. The portion of the image that has the
...
...
@@ -2550,7 +2550,7 @@ class MaskRCNN():
the model.
molded_images: List of images loaded using load_image_gt()
image_metas: image meta data, also ret
ru
ned by load_image_gt()
image_metas: image meta data, also ret
ur
ned by load_image_gt()
Returns a list of dicts, one dict per image. The dict contains:
rois: [N, (y1, x1, y2, x2)] detection bounding boxes
...
...
@@ -2678,7 +2678,7 @@ class MaskRCNN():
outputs.
image_metas: If provided, the images are assumed to be already
molded (i.e. resized, padded, and nor
am
lized)
molded (i.e. resized, padded, and nor
ma
lized)
outputs: List of tuples (name, tensor) to compute. The tensors are
symbolic TensorFlow tensors and the names are for easy tracking.
...
...
@@ -2803,7 +2803,7 @@ def parse_image_meta_graph(meta):
def
mold_image
(
images
,
config
):
"""Expects an RGB image (or array of images) and subtrac
e
s
"""Expects an RGB image (or array of images) and subtrac
t
s
the mean pixel and converts it to float. Expects image
colors in RGB order.
"""
...
...
@@ -2820,7 +2820,7 @@ def unmold_image(normalized_images, config):
############################################################
def
trim_zeros_graph
(
boxes
,
name
=
None
):
"""Often boxes are represented with matric
i
es of shape [N, 4] and
"""Often boxes are represented with matrices of shape [N, 4] and
are padded with zeros. This removes zero boxes.
boxes: [N, 4] matrix of boxes.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录