From 84b083465965a5c84f375ad96e8f006c7fb62337 Mon Sep 17 00:00:00 2001 From: chengxianbin Date: Wed, 17 Jun 2020 11:46:23 +0800 Subject: [PATCH] yolov3 network directory rectification --- {example/yolov3_coco2017 => model_zoo/yolov3}/README.md | 0 {example/yolov3_coco2017 => model_zoo/yolov3}/eval.py | 8 ++++---- .../yolov3/scripts}/run_distribute_train.sh | 8 ++++++-- .../yolov3/scripts}/run_eval.sh | 3 +++ .../yolov3/scripts}/run_standalone_train.sh | 3 +++ .../yolov3_coco2017 => model_zoo/yolov3/src}/config.py | 2 +- .../yolov3_coco2017 => model_zoo/yolov3/src}/dataset.py | 2 +- .../util.py => model_zoo/yolov3/src/utils.py | 2 +- {mindspore/model_zoo => model_zoo/yolov3/src}/yolov3.py | 0 {example/yolov3_coco2017 => model_zoo/yolov3}/train.py | 6 +++--- 10 files changed, 22 insertions(+), 12 deletions(-) rename {example/yolov3_coco2017 => model_zoo/yolov3}/README.md (100%) rename {example/yolov3_coco2017 => model_zoo/yolov3}/eval.py (95%) rename {example/yolov3_coco2017 => model_zoo/yolov3/scripts}/run_distribute_train.sh (94%) rename {example/yolov3_coco2017 => model_zoo/yolov3/scripts}/run_eval.sh (94%) rename {example/yolov3_coco2017 => model_zoo/yolov3/scripts}/run_standalone_train.sh (96%) rename {example/yolov3_coco2017 => model_zoo/yolov3/src}/config.py (98%) rename {example/yolov3_coco2017 => model_zoo/yolov3/src}/dataset.py (99%) rename example/yolov3_coco2017/util.py => model_zoo/yolov3/src/utils.py (99%) rename {mindspore/model_zoo => model_zoo/yolov3/src}/yolov3.py (100%) rename {example/yolov3_coco2017 => model_zoo/yolov3}/train.py (97%) diff --git a/example/yolov3_coco2017/README.md b/model_zoo/yolov3/README.md similarity index 100% rename from example/yolov3_coco2017/README.md rename to model_zoo/yolov3/README.md diff --git a/example/yolov3_coco2017/eval.py b/model_zoo/yolov3/eval.py similarity index 95% rename from example/yolov3_coco2017/eval.py rename to model_zoo/yolov3/eval.py index 6e6d3582482..433ae834ba3 100644 --- a/example/yolov3_coco2017/eval.py +++ b/model_zoo/yolov3/eval.py @@ -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.""" diff --git a/example/yolov3_coco2017/run_distribute_train.sh b/model_zoo/yolov3/scripts/run_distribute_train.sh similarity index 94% rename from example/yolov3_coco2017/run_distribute_train.sh rename to model_zoo/yolov3/scripts/run_distribute_train.sh index 0b764419d2c..eeda5077e94 100644 --- a/example/yolov3_coco2017/run_distribute_train.sh +++ b/model_zoo/yolov3/scripts/run_distribute_train.sh @@ -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