Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
a14ed14d
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a14ed14d
编写于
6月 17, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
6月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
!2217 yolov3 network directory rectification
Merge pull request !2217 from chengxb7532/cxb_st
上级
4b5cbe5d
84b08346
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
22 addition
and
12 deletion
+22
-12
model_zoo/yolov3/README.md
model_zoo/yolov3/README.md
+0
-0
model_zoo/yolov3/eval.py
model_zoo/yolov3/eval.py
+4
-4
model_zoo/yolov3/scripts/run_distribute_train.sh
model_zoo/yolov3/scripts/run_distribute_train.sh
+6
-2
model_zoo/yolov3/scripts/run_eval.sh
model_zoo/yolov3/scripts/run_eval.sh
+3
-0
model_zoo/yolov3/scripts/run_standalone_train.sh
model_zoo/yolov3/scripts/run_standalone_train.sh
+3
-0
model_zoo/yolov3/src/config.py
model_zoo/yolov3/src/config.py
+1
-1
model_zoo/yolov3/src/dataset.py
model_zoo/yolov3/src/dataset.py
+1
-1
model_zoo/yolov3/src/utils.py
model_zoo/yolov3/src/utils.py
+1
-1
model_zoo/yolov3/src/yolov3.py
model_zoo/yolov3/src/yolov3.py
+0
-0
model_zoo/yolov3/train.py
model_zoo/yolov3/train.py
+3
-3
未找到文件。
example/yolov3_coco2017
/README.md
→
model_zoo/yolov3
/README.md
浏览文件 @
a14ed14d
文件已移动
example/yolov3_coco2017
/eval.py
→
model_zoo/yolov3
/eval.py
浏览文件 @
a14ed14d
...
...
@@ -19,10 +19,10 @@ import argparse
import
time
from
mindspore
import
context
,
Tensor
from
mindspore.train.serialization
import
load_checkpoint
,
load_param_into_net
from
mindspore.model_zoo
.yolov3
import
yolov3_resnet18
,
YoloWithEval
from
dataset
import
create_yolo_dataset
,
data_to_mindrecord_byte_image
from
config
import
ConfigYOLOV3ResNet18
from
util
import
metrics
from
src
.yolov3
import
yolov3_resnet18
,
YoloWithEval
from
src.
dataset
import
create_yolo_dataset
,
data_to_mindrecord_byte_image
from
src.
config
import
ConfigYOLOV3ResNet18
from
src.utils
import
metrics
def
yolo_eval
(
dataset_path
,
ckpt_path
):
"""Yolov3 evaluation."""
...
...
example/yolov3_coco2017
/run_distribute_train.sh
→
model_zoo/yolov3/scripts
/run_distribute_train.sh
浏览文件 @
a14ed14d
...
...
@@ -45,6 +45,9 @@ echo "After running the scipt, the network runs in the background. The log will
export
MINDSPORE_HCCL_CONFIG_PATH
=
$6
export
RANK_SIZE
=
$1
BASE_PATH
=
$(
cd
"
`
dirname
$0
`
"
||
exit
;
pwd
)
cd
$BASE_PATH
/../
||
exit
for
((
i
=
0
;
i<RANK_SIZE
;
i++
))
do
export
DEVICE_ID
=
$i
...
...
@@ -56,6 +59,7 @@ do
rm
-rf
LOG
$i
mkdir
./LOG
$i
cp
*
.py ./LOG
$i
cp
-r
./src ./LOG
$i
cd
./LOG
$i
||
exit
export
RANK_ID
=
$i
echo
"start training for rank
$i
, device
$DEVICE_ID
"
...
...
@@ -63,7 +67,7 @@ do
if
[
$#
==
6
]
then
taskset
-c
$cmdopt
python
../
train.py
\
taskset
-c
$cmdopt
python train.py
\
--distribute
=
1
\
--lr
=
0.005
\
--device_num
=
$RANK_SIZE
\
...
...
@@ -76,7 +80,7 @@ do
if
[
$#
==
8
]
then
taskset
-c
$cmdopt
python
../
train.py
\
taskset
-c
$cmdopt
python train.py
\
--distribute
=
1
\
--lr
=
0.005
\
--device_num
=
$RANK_SIZE
\
...
...
example/yolov3_coco2017
/run_eval.sh
→
model_zoo/yolov3/scripts
/run_eval.sh
浏览文件 @
a14ed14d
...
...
@@ -20,4 +20,7 @@ echo "sh run_eval.sh DEVICE_ID CKPT_PATH MINDRECORD_DIR IMAGE_DIR ANNO_PATH"
echo
"for example: sh run_eval.sh 0 yolo.ckpt ./Mindrecord_eval ./dataset ./dataset/eval.txt"
echo
"=============================================================================================================="
BASE_PATH
=
$(
cd
"
`
dirname
$0
`
"
||
exit
;
pwd
)
cd
$BASE_PATH
/../
||
exit
python eval.py
--device_id
=
$1
--ckpt_path
=
$2
--mindrecord_dir
=
$3
--image_dir
=
$4
--anno_path
=
$5
example/yolov3_coco2017
/run_standalone_train.sh
→
model_zoo/yolov3/scripts
/run_standalone_train.sh
浏览文件 @
a14ed14d
...
...
@@ -27,6 +27,9 @@ then
exit
1
fi
BASE_PATH
=
$(
cd
"
`
dirname
$0
`
"
||
exit
;
pwd
)
cd
$BASE_PATH
/../
||
exit
if
[
$#
==
5
]
then
python train.py
--device_id
=
$1
--epoch_size
=
$2
--mindrecord_dir
=
$3
--image_dir
=
$4
--anno_path
=
$5
...
...
example/yolov3_coco2017
/config.py
→
model_zoo/yolov3/src
/config.py
浏览文件 @
a14ed14d
...
...
@@ -25,7 +25,7 @@ class ConfigYOLOV3ResNet18:
"""
img_shape
=
[
352
,
640
]
feature_shape
=
[
32
,
3
,
352
,
640
]
num_classes
=
80
num_classes
=
2
nms_max_num
=
50
backbone_input_shape
=
[
64
,
64
,
128
,
256
]
...
...
example/yolov3_coco2017
/dataset.py
→
model_zoo/yolov3/src
/dataset.py
浏览文件 @
a14ed14d
...
...
@@ -23,7 +23,7 @@ from PIL import Image
import
mindspore.dataset
as
de
from
mindspore.mindrecord
import
FileWriter
import
mindspore.dataset.transforms.vision.c_transforms
as
C
from
config
import
ConfigYOLOV3ResNet18
from
src.
config
import
ConfigYOLOV3ResNet18
iter_cnt
=
0
_NUM_BOXES
=
50
...
...
example/yolov3_coco2017/util
.py
→
model_zoo/yolov3/src/utils
.py
浏览文件 @
a14ed14d
...
...
@@ -15,7 +15,7 @@
"""metrics utils"""
import
numpy
as
np
from
config
import
ConfigYOLOV3ResNet18
from
src.
config
import
ConfigYOLOV3ResNet18
def
calc_iou
(
bbox_pred
,
bbox_ground
):
...
...
m
indspore/model_zoo
/yolov3.py
→
m
odel_zoo/yolov3/src
/yolov3.py
浏览文件 @
a14ed14d
文件已移动
example/yolov3_coco2017
/train.py
→
model_zoo/yolov3
/train.py
浏览文件 @
a14ed14d
...
...
@@ -33,9 +33,9 @@ from mindspore.train import Model, ParallelMode
from
mindspore.train.serialization
import
load_checkpoint
,
load_param_into_net
from
mindspore.common.initializer
import
initializer
from
mindspore.model_zoo
.yolov3
import
yolov3_resnet18
,
YoloWithLossCell
,
TrainingWrapper
from
dataset
import
create_yolo_dataset
,
data_to_mindrecord_byte_image
from
config
import
ConfigYOLOV3ResNet18
from
src
.yolov3
import
yolov3_resnet18
,
YoloWithLossCell
,
TrainingWrapper
from
src.
dataset
import
create_yolo_dataset
,
data_to_mindrecord_byte_image
from
src.
config
import
ConfigYOLOV3ResNet18
def
get_lr
(
learning_rate
,
start_step
,
global_step
,
decay_step
,
decay_rate
,
steps
=
False
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录