Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
要开心的学习
Mask_RCNN
提交
c1bb148f
M
Mask_RCNN
项目概览
要开心的学习
/
Mask_RCNN
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
提交
c1bb148f
编写于
11月 06, 2017
作者:
W
Waleed Abdulla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename config.print() to display() for Python 2.7
上级
a12c1b81
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
10 deletion
+11
-10
coco.py
coco.py
+5
-5
config.py
config.py
+3
-2
demo.ipynb
demo.ipynb
+1
-1
inspect_model.ipynb
inspect_model.ipynb
+1
-1
train_shapes.ipynb
train_shapes.ipynb
+1
-1
未找到文件。
coco.py
浏览文件 @
c1bb148f
...
...
@@ -243,7 +243,7 @@ def build_coco_results(dataset, image_ids, rois, class_ids, scores, masks):
result
=
{
"image_id"
:
image_id
,
"category_id"
:
dataset
.
get_source_class_id
(
class_id
,
"coco"
),
"bbox"
:
[
bbox
[
1
],
bbox
[
0
],
bbox
[
3
]
-
bbox
[
1
],
bbox
[
2
]
-
bbox
[
0
]],
"bbox"
:
[
bbox
[
1
],
bbox
[
0
],
bbox
[
3
]
-
bbox
[
1
],
bbox
[
2
]
-
bbox
[
0
]],
"score"
:
score
,
"segmentation"
:
maskUtils
.
encode
(
np
.
asfortranarray
(
mask
))
}
...
...
@@ -281,7 +281,7 @@ def evaluate_coco(dataset, coco, eval_type="bbox", limit=0):
t_prediction
+=
(
time
.
time
()
-
t
)
# Convert results to COCO format
image_results
=
build_coco_results
(
dataset
,
coco_image_ids
[
i
:
i
+
1
],
image_results
=
build_coco_results
(
dataset
,
coco_image_ids
[
i
:
i
+
1
],
r
[
"rois"
],
r
[
"class_ids"
],
r
[
"scores"
],
r
[
"masks"
])
results
.
extend
(
image_results
)
...
...
@@ -297,15 +297,15 @@ def evaluate_coco(dataset, coco, eval_type="bbox", limit=0):
cocoEval
.
summarize
()
print
(
"Prediction time: {}. Average {}/image"
.
format
(
t_prediction
,
t_prediction
/
len
(
image_ids
)))
t_prediction
,
t_prediction
/
len
(
image_ids
)))
print
(
"Total time: "
,
time
.
time
()
-
t_start
)
############################################################
# Training
############################################################
if
__name__
==
'__main__'
:
import
argparse
...
...
@@ -336,7 +336,7 @@ if __name__ == '__main__':
GPU_COUNT
=
1
IMAGES_PER_GPU
=
1
config
=
InferenceConfig
()
config
.
print
()
config
.
display
()
# Create model
if
args
.
command
==
"train"
:
...
...
config.py
浏览文件 @
c1bb148f
...
...
@@ -141,7 +141,8 @@ class Config(object):
self
.
BATCH_SIZE
=
self
.
IMAGES_PER_GPU
*
self
.
GPU_COUNT
# Input image size
self
.
IMAGE_SHAPE
=
np
.
array
([
self
.
IMAGE_MAX_DIM
,
self
.
IMAGE_MAX_DIM
,
3
])
self
.
IMAGE_SHAPE
=
np
.
array
(
[
self
.
IMAGE_MAX_DIM
,
self
.
IMAGE_MAX_DIM
,
3
])
# Compute backbone size from input image size
self
.
BACKBONE_SHAPES
=
np
.
array
(
...
...
@@ -149,7 +150,7 @@ class Config(object):
int
(
math
.
ceil
(
self
.
IMAGE_SHAPE
[
1
]
/
stride
))]
for
stride
in
self
.
BACKBONE_STRIDES
])
def
print
(
self
):
def
display
(
self
):
"""Display Configuration values."""
print
(
"
\n
Configurations:"
)
for
a
in
dir
(
self
):
...
...
demo.ipynb
浏览文件 @
c1bb148f
...
...
@@ -130,7 +130,7 @@
" IMAGES_PER_GPU = 1\n",
"\n",
"config = InferenceConfig()\n",
"config.
print
()"
"config.
display
()"
]
},
{
inspect_model.ipynb
浏览文件 @
c1bb148f
...
...
@@ -151,7 +151,7 @@
" IMAGES_PER_GPU = 1\n",
"\n",
"config = InferenceConfig()\n",
"config.
print
()"
"config.
display
()"
]
},
{
train_shapes.ipynb
浏览文件 @
c1bb148f
...
...
@@ -155,7 +155,7 @@
" VALIDATION_STPES = 5\n",
" \n",
"config = ShapesConfig()\n",
"config.
print
()"
"config.
display
()"
]
},
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录