- [Description of Random Situation](#description-of-random-situation)
- [ModelZoo Homepage](#modelzoo-homepage)
## [YOLOv3-DarkNet53 Description](#contents)
You only look once (YOLO) is a state-of-the-art, real-time object detection system. YOLOv3 is extremely fast and accurate.
@ -32,11 +33,11 @@ YOLOv3 uses a few tricks to improve training and increase performance, including
[Paper](https://pjreddie.com/media/files/papers/YOLOv3.pdf): YOLOv3: An Incremental Improvement. Joseph Redmon, Ali Farhadi,
University of Washington
# [Model Architecture](#contents)
## [Model Architecture](#contents)
YOLOv3 use DarkNet53 for performing feature extraction, which is a hybrid approach between the network used in YOLOv2, Darknet-19, and that newfangled residual network stuff. DarkNet53 uses successive 3 × 3 and 1 × 1 convolutional layers and has some shortcut connections as well and is significantly larger. It has 53 convolutional layers.
# [Dataset](#contents)
## [Dataset](#contents)
Note that you can run the scripts based on the dataset mentioned in original paper or widely used in relevant domain/network architecture. In the following sections, we will introduce how to run the scripts using the related dataset below.
- Note:Data will be processed in yolo_dataset.py, and unzip files before uses it.
- Note:Data will be processed in yolo_dataset.py, and unzip files before uses it.
# [Environment Requirements](#contents)
## [Environment Requirements](#contents)
- Hardware(Ascend/GPU)
- Prepare hardware environment with Ascend or GPU processor. If you want to try Ascend , please send the [application form](https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/file/other/Ascend%20Model%20Zoo%E4%BD%93%E9%AA%8C%E8%B5%84%E6%BA%90%E7%94%B3%E8%AF%B7%E8%A1%A8.docx) to ascend@huawei.com. Once approved, you can get the resources.
After installing MindSpore via the official website, you can start training and evaluation in as follows. If running on GPU, please add `--device_target=GPU` in the python command or use the "_gpu" shell script ("xxx_gpu.sh").
@ -101,9 +102,9 @@ python eval.py \
sh run_eval.sh dataset/coco2014/ checkpoint/0-319_102400.ckpt
```
# [Script Description](#contents)
## [Script Description](#contents)
## [Script and Sample Code](#contents)
### [Script and Sample Code](#contents)
```contents
.
@ -134,7 +135,7 @@ sh run_eval.sh dataset/coco2014/ checkpoint/0-319_102400.ckpt
└─train.py # train net
```
## [Script Parameters](#contents)
### [Script Parameters](#contents)
```parameters
Major parameters in train.py as follow.
@ -197,9 +198,9 @@ optional arguments:
Resize rate for multi-scale training. Default: None
```
## [Training Process](#contents)
### [Training Process](#contents)
### Training
#### Training
```command
python train.py \
@ -230,7 +231,7 @@ After training, you'll get some checkpoint files under the outputs folder by def
The model checkpoint will be saved in outputs directory.
### Distributed Training
#### Distributed Training
For Ascend device, distributed training example(8p) by shell script
Before running the command below. If running on GPU, please add `--device_target=GPU` in the python command or use the "_gpu" shell script ("xxx_gpu.sh").
@ -278,6 +279,8 @@ sh run_eval.sh dataset/coco2014/ checkpoint/0-319_102400.ckpt
The above python command will run in the background. You can view the results through the file "log.txt". The mAP of the test dataset will be as follows:
This the standard format from `pycocotools`, you can refer to [cocodataset](https://cocodataset.org/#detection-eval) for more detail.
```eval log
# log.txt
=============coco eval reulst=========
@ -295,11 +298,11 @@ The above python command will run in the background. You can view the results th
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.551