Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
27号BigBang
Mask_RCNN
提交
61834b4d
M
Mask_RCNN
项目概览
27号BigBang
/
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 搜索 >>
提交
61834b4d
编写于
9月 21, 2018
作者:
W
Waleed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Apply previous commit to the other notebooks
上级
85bf5356
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
17 deletion
+21
-17
samples/balloon/inspect_balloon_model.ipynb
samples/balloon/inspect_balloon_model.ipynb
+1
-1
samples/coco/inspect_model.ipynb
samples/coco/inspect_model.ipynb
+10
-5
samples/nucleus/inspect_nucleus_model.ipynb
samples/nucleus/inspect_nucleus_model.ipynb
+10
-11
未找到文件。
samples/balloon/inspect_balloon_model.ipynb
浏览文件 @
61834b4d
...
...
@@ -493,7 +493,7 @@
"# Run RPN sub-graph\n",
"pillar = model.keras_model.get_layer(\"ROI\").output # node to start searching from\n",
"\n",
"# TF 1.4 and 1.9 introduce
s
new versions of NMS. Search for all names to support TF 1.3~1.10\n",
"# TF 1.4 and 1.9 introduce new versions of NMS. Search for all names to support TF 1.3~1.10\n",
"nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression:0\")\n",
"if nms_node is None:\n",
" nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression/NonMaxSuppressionV2:0\")\n",
samples/coco/inspect_model.ipynb
浏览文件 @
61834b4d
...
...
@@ -566,10 +566,12 @@
"# Run RPN sub-graph\n",
"pillar = model.keras_model.get_layer(\"ROI\").output # node to start searching from\n",
"\n",
"# TF 1.4
introduces a new version of NMS. Search for both names to support TF 1.3 and 1.4
\n",
"# TF 1.4
and 1.9 introduce new versions of NMS. Search for all names to support TF 1.3~1.10
\n",
"nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression:0\")\n",
"if nms_node is None:\n",
" nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression/NonMaxSuppressionV2:0\")\n",
"if nms_node is None: #TF 1.9-1.10\n",
" nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression/NonMaxSuppressionV3:0\")\n",
"\n",
"rpn = model.run_graph([image], [\n",
" (\"rpn_class\", model.keras_model.get_layer(\"rpn_class\").output),\n",
...
...
@@ -626,9 +628,12 @@
"# Show top anchors with refinement. Then with clipping to image boundaries\n",
"limit = 50\n",
"ax = get_ax(1, 2)\n",
"visualize.draw_boxes(image, boxes=rpn[\"pre_nms_anchors\"][0, :limit], \n",
" refined_boxes=rpn[\"refined_anchors\"][0, :limit], ax=ax[0])\n",
"visualize.draw_boxes(image, refined_boxes=rpn[\"refined_anchors_clipped\"][0, :limit], ax=ax[1])"
"pre_nms_anchors = utils.denorm_boxes(rpn[\"pre_nms_anchors\"][0], image.shape[:2])\n",
"refined_anchors = utils.denorm_boxes(rpn[\"refined_anchors\"][0], image.shape[:2])\n",
"refined_anchors_clipped = utils.denorm_boxes(rpn[\"refined_anchors_clipped\"][0], image.shape[:2])\n",
"visualize.draw_boxes(image, boxes=pre_nms_anchors[:limit],\n",
" refined_boxes=refined_anchors[:limit], ax=ax[0])\n",
"visualize.draw_boxes(image, refined_boxes=refined_anchors_clipped[:limit], ax=ax[1])"
]
},
{
...
...
@@ -653,7 +658,7 @@
"# Show refined anchors after non-max suppression\n",
"limit = 50\n",
"ixs = rpn[\"post_nms_anchor_ix\"][:limit]\n",
"visualize.draw_boxes(image, refined_boxes=r
pn[\"refined_anchors_clipped\"][0,
ixs], ax=get_ax())"
"visualize.draw_boxes(image, refined_boxes=r
efined_anchors_clipped[
ixs], ax=get_ax())"
]
},
{
samples/nucleus/inspect_nucleus_model.ipynb
浏览文件 @
61834b4d
...
...
@@ -569,10 +569,12 @@
"# Run RPN sub-graph\n",
"pillar = model.keras_model.get_layer(\"ROI\").output # node to start searching from\n",
"\n",
"# TF 1.4
introduces a new version of NMS. Search for both names to support TF 1.3 and 1.4
\n",
"# TF 1.4
and 1.9 introduce new versions of NMS. Search for all names to support TF 1.3~1.10
\n",
"nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression:0\")\n",
"if nms_node is None:\n",
" nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression/NonMaxSuppressionV2:0\")\n",
"if nms_node is None: #TF 1.9-1.10\n",
" nms_node = model.ancestor(pillar, \"ROI/rpn_non_max_suppression/NonMaxSuppressionV3:0\")\n",
"\n",
"rpn = model.run_graph(image[np.newaxis], [\n",
" (\"rpn_class\", model.keras_model.get_layer(\"rpn_class\").output),\n",
...
...
@@ -629,13 +631,12 @@
"# Show top anchors with refinement. Then with clipping to image boundaries\n",
"limit = 50\n",
"ax = get_ax(1, 2)\n",
"visualize.draw_boxes(\n",
" image, ax=ax[0],\n",
" boxes=utils.denorm_boxes(rpn[\"pre_nms_anchors\"][0, :limit], image.shape[:2]), \n",
" refined_boxes=utils.denorm_boxes(rpn[\"refined_anchors\"][0, :limit], image.shape[:2]))\n",
"visualize.draw_boxes(\n",
" image, ax=ax[1],\n",
" refined_boxes=utils.denorm_boxes(rpn[\"refined_anchors_clipped\"][0, :limit], image.shape[:2]))"
"pre_nms_anchors = utils.denorm_boxes(rpn[\"pre_nms_anchors\"][0], image.shape[:2])\n",
"refined_anchors = utils.denorm_boxes(rpn[\"refined_anchors\"][0], image.shape[:2])\n",
"refined_anchors_clipped = utils.denorm_boxes(rpn[\"refined_anchors_clipped\"][0], image.shape[:2])\n",
"visualize.draw_boxes(image, boxes=pre_nms_anchors[:limit],\n",
" refined_boxes=refined_anchors[:limit], ax=ax[0])\n",
"visualize.draw_boxes(image, refined_boxes=refined_anchors_clipped[:limit], ax=ax[1])"
]
},
{
...
...
@@ -660,9 +661,7 @@
"# Show refined anchors after non-max suppression\n",
"limit = 50\n",
"ixs = rpn[\"post_nms_anchor_ix\"][:limit]\n",
"visualize.draw_boxes(\n",
" image, ax=get_ax(),\n",
" refined_boxes=utils.denorm_boxes(rpn[\"refined_anchors_clipped\"][0, ixs], image.shape[:2]))"
"visualize.draw_boxes(image, refined_boxes=refined_anchors_clipped[ixs], ax=get_ax())"
]
},
{
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录