Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Oneflow-Inc
oneflow_yolov3
提交
3a019897
O
oneflow_yolov3
项目概览
Oneflow-Inc
/
oneflow_yolov3
9 个月 前同步成功
通知
4
Star
6
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oneflow_yolov3
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3a019897
编写于
7月 22, 2020
作者:
L
lichenyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Updata] fix bug
上级
52850236
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
5 deletion
+7
-5
oneflow_yolov3/model/yolo_net.py
oneflow_yolov3/model/yolo_net.py
+5
-4
oneflow_yolov3/model/yolo_test_python.py
oneflow_yolov3/model/yolo_test_python.py
+2
-1
未找到文件。
oneflow_yolov3/model/yolo_net.py
浏览文件 @
3a019897
...
...
@@ -33,11 +33,11 @@ yolo_box_diff_conf = [{'image_height': image_height, 'image_width': image_width,
'anchor_boxes_size'
:
anchor_boxes_size_list
,
'box_mask'
:
[
0
,
1
,
2
]}]
# to confirm wh pos, gr 12.19 check with 11 ~/yolov3/predict.job
yolo_conf
=
[{
'layer_height'
:
19
,
'layer_width'
:
19
,
'prob_thresh'
:
0.00
5
,
'num_classes'
:
80
,
yolo_conf
=
[{
'layer_height'
:
19
,
'layer_width'
:
19
,
'prob_thresh'
:
0.00
001
,
'num_classes'
:
80
,
'anchor_boxes_size'
:
[
116
,
90
,
156
,
198
,
373
,
326
]},
{
'layer_height'
:
38
,
'layer_width'
:
38
,
'prob_thresh'
:
0.00
5
,
'num_classes'
:
80
,
{
'layer_height'
:
38
,
'layer_width'
:
38
,
'prob_thresh'
:
0.00
001
,
'num_classes'
:
80
,
'anchor_boxes_size'
:
[
30
,
61
,
62
,
45
,
59
,
119
]},
{
'layer_height'
:
76
,
'layer_width'
:
76
,
'prob_thresh'
:
0.00
5
,
'num_classes'
:
80
,
{
'layer_height'
:
76
,
'layer_width'
:
76
,
'prob_thresh'
:
0.00
001
,
'num_classes'
:
80
,
'anchor_boxes_size'
:
[
10
,
13
,
16
,
30
,
33
,
23
]}]
...
...
@@ -223,7 +223,8 @@ def YoloPredictLayer(in_blob, origin_image_info, i, trainable):
[
out_bbox
,
out_probs
,
valid_num
]
=
yolo_detect
(
bbox
=
position
,
probs
=
confidence
,
origin_image_info
=
origin_image_info
,
image_height
=
608
,
image_width
=
608
,
layer_height
=
yolo_conf
[
i
][
'layer_height'
],
layer_width
=
yolo_conf
[
i
][
'layer_width'
],
prob_thresh
=
0.005
,
layer_width
=
yolo_conf
[
i
][
'layer_width'
],
prob_thresh
=
0.00001
,
num_classes
=
80
,
max_out_boxes
=
max_out_boxes
,
anchor_boxes
=
yolo_conf
[
i
][
'anchor_boxes_size'
],
name
=
str
(
layer_name
)
+
"yolo_detect"
)
...
...
oneflow_yolov3/model/yolo_test_python.py
浏览文件 @
3a019897
...
...
@@ -166,12 +166,13 @@ if __name__ == "__main__":
continue
# Best iou, index between pred and targets
m
=
(
pcls
==
tcls_tensor
)
m
=
np
.
nonzero
(
np
.
asarray
(
m
))[
0
]
iou
=
utils
.
bboxes_iou
(
pbox
,
tbox
[
m
])
bi
=
np
.
argmax
(
iou
)
maxiou
=
iou
[
bi
]
# If iou > threshold and class is correct mark as correct
if
maxiou
>
args
.
iou_thres
:
# and pcls == tcls[bi]:
if
maxiou
>
args
.
iou_thres
and
m
[
bi
]
not
in
detected
:
# and pcls == tcls[bi]:
correct
[
i
]
=
1
detected
.
append
(
m
[
bi
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录