add yolov3_resnet18&yolov3_darknet53&yolov3_darknet53_quant&deepfm hub conf files

pull/6811/head
chengxianbin 4 years ago
parent 5bd1dd4e89
commit 535853c205

@ -112,6 +112,7 @@ sh run_eval.sh dataset/coco2014/ checkpoint/0-319_102400.ckpt
. .
└─yolov3_darknet53 └─yolov3_darknet53
├─README.md ├─README.md
├─mindspore_hub_conf.md # config for mindspore hub
├─scripts ├─scripts
├─run_standalone_train.sh # launch standalone training(1p) in ascend ├─run_standalone_train.sh # launch standalone training(1p) in ascend
├─run_distribute_train.sh # launch distributed training(8p) in ascend ├─run_distribute_train.sh # launch distributed training(8p) in ascend
@ -302,12 +303,12 @@ The above python command will run in the background. You can view the results th
### Evaluation Performance ### Evaluation Performance
| Parameters | YOLO |YOLO | | Parameters | YOLO |YOLO |
| -------------------------- | ----------------------------------------------------------- |----------------------------------------------------------- | | -------------------------- | ----------------------------------------------------------- |------------------------------------------------------------ |
| Model Version | YOLOv3 |YOLOv3 | | Model Version | YOLOv3 |YOLOv3 |
| Resource | Ascend 910; CPU 2.60GHz, 192cores; Memory, 755G | NV SMX2 V100-16G; CPU 2.10GHz, 96cores; Memory, 251G | | Resource | Ascend 910; CPU 2.60GHz, 192cores; Memory, 755G | NV SMX2 V100-16G; CPU 2.10GHz, 96cores; Memory, 251G |
| uploaded Date | 06/31/2020 (month/day/year) | 09/02/2020 (month/day/year) | | uploaded Date | 06/31/2020 (month/day/year) | 09/02/2020 (month/day/year) |
| MindSpore Version | 0.5.0-alpha | 0.7.0 | | MindSpore Version | 0.5.0-alpha | 0.7.0 |
| Dataset | COCO2014 | COCO2014 | | Dataset | COCO2014 | COCO2014 |
| Training Parameters | epoch=320, batch_size=32, lr=0.001, momentum=0.9 | epoch=320, batch_size=32, lr=0.001, momentum=0.9 | | Training Parameters | epoch=320, batch_size=32, lr=0.001, momentum=0.9 | epoch=320, batch_size=32, lr=0.001, momentum=0.9 |
| Optimizer | Momentum | Momentum | | Optimizer | Momentum | Momentum |
@ -315,7 +316,7 @@ The above python command will run in the background. You can view the results th
| outputs | boxes and label | boxes and label | | outputs | boxes and label | boxes and label |
| Loss | 34 | 34 | | Loss | 34 | 34 |
| Speed | 1pc: 350 ms/step; | 1pc: 600 ms/step; | | Speed | 1pc: 350 ms/step; | 1pc: 600 ms/step; |
| Total time | 8pc: 25 hours | 8pc: 18 hours(shape=416) | | Total time | 8pc: 18.5 hours | 8pc: 18 hours(shape=416) |
| Parameters (M) | 62.1 | 62.1 | | Parameters (M) | 62.1 | 62.1 |
| Checkpoint for Fine tuning | 474M (.ckpt file) | 474M (.ckpt file) | | Checkpoint for Fine tuning | 474M (.ckpt file) | 474M (.ckpt file) |
| Scripts | https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/yolov3_darknet53 | https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/yolov3_darknet53 | | Scripts | https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/yolov3_darknet53 | https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/yolov3_darknet53 |
@ -331,15 +332,15 @@ The above python command will run in the background. You can view the results th
| MindSpore Version | 0.5.0-alpha | 0.7.0 | | MindSpore Version | 0.5.0-alpha | 0.7.0 |
| Dataset | COCO2014, 40,504 images | COCO2014, 40,504 images | | Dataset | COCO2014, 40,504 images | COCO2014, 40,504 images |
| batch_size | 1 | 1 | | batch_size | 1 | 1 |
| outputs | mAP | mAP | | outputs | mAP | mAP |
| Accuracy | 8pcs: 31.1% | 8pcs: 29.7%~30.3% (shape=416)| | Accuracy | 8pcs: 31.1% | 8pcs: 29.7%~30.3% (shape=416)|
| Model for inference | 474M (.ckpt file) | 474M (.ckpt file) | | Model for inference | 474M (.ckpt file) | 474M (.ckpt file) |
# [Description of Random Situation](#contents) # [Description of Random Situation](#contents)
There are random seeds in distributed_sampler.py, transforms.py, yolo_dataset.py files. There are random seeds in distributed_sampler.py, transforms.py, yolo_dataset.py files.
# [ModelZoo Homepage](#contents) # [ModelZoo Homepage](#contents)
Please check the official [homepage](https://gitee.com/mindspore/mindspore/tree/master/model_zoo). Please check the official [homepage](https://gitee.com/mindspore/mindspore/tree/master/model_zoo).

@ -0,0 +1,22 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""hub config."""
from src.yolo import YOLOV3DarkNet53
def create_network(name, *args, **kwargs):
if name == "yolov3_darknet53":
yolov3_darknet53_net = YOLOV3DarkNet53(is_training=False)
return yolov3_darknet53_net
raise NotImplementedError(f"{name} is not implemented in the repo")

@ -111,6 +111,7 @@ sh run_eval.sh dataset/coco2014/ checkpoint/yolov3_quant.ckpt 0
. .
└─yolov3_darknet53_quant └─yolov3_darknet53_quant
├─README.md ├─README.md
├─mindspore_hub_conf.md # config for mindspore hub
├─scripts ├─scripts
├─run_standalone_train.sh # launch standalone training(1p) in ascend ├─run_standalone_train.sh # launch standalone training(1p) in ascend
├─run_distribute_train.sh # launch distributed training(8p) in ascend ├─run_distribute_train.sh # launch distributed training(8p) in ascend
@ -284,7 +285,7 @@ Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.558
| outputs | boxes and label | | outputs | boxes and label |
| Loss | 34 | | Loss | 34 |
| Speed | 1pc: 135 ms/step; | | Speed | 1pc: 135 ms/step; |
| Total time | 8pc: 24.5 hours | | Total time | 8pc: 23.5 hours |
| Parameters (M) | 62.1 | | Parameters (M) | 62.1 |
| Checkpoint for Fine tuning | 474M (.ckpt file) | | Checkpoint for Fine tuning | 474M (.ckpt file) |
| Scripts | https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/yolov3_darknet53_quant | | Scripts | https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/yolov3_darknet53_quant |

@ -0,0 +1,32 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""hub config."""
from mindspore.train.quant import quant
from src.yolo import YOLOV3DarkNet53
from src.config import ConfigYOLOV3DarkNet53
def create_network(name, *args, **kwargs):
if name == "yolov3_darknet53_quant":
yolov3_darknet53_quant = YOLOV3DarkNet53(is_training=False)
config = ConfigYOLOV3DarkNet53()
# convert fusion network to quantization aware network
if config.quantization_aware:
yolov3_darknet53_quant = quant.convert_quant_network(yolov3_darknet53_quant,
bn_fold=True,
per_channel=[True, False],
symmetric=[True, False])
return yolov3_darknet53_quant
raise NotImplementedError(f"{name} is not implemented in the repo")

@ -98,6 +98,7 @@ After installing MindSpore via the official website, you can start training and
``` ```
└── cv └── cv
├── README.md // descriptions about all the models ├── README.md // descriptions about all the models
├── mindspore_hub_conf.md // config for mindspore hub
└── yolov3_resnet18 └── yolov3_resnet18
├── README.md // descriptions about yolov3_resnet18 ├── README.md // descriptions about yolov3_resnet18
├── scripts ├── scripts

@ -0,0 +1,23 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""hub config."""
from src.yolov3 import yolov3_resnet18
from src.config import ConfigYOLOV3ResNet18
def create_network(name, *args, **kwargs):
if name == "yolov3_resnet18":
yolov3_resnet18_net = yolov3_resnet18(ConfigYOLOV3ResNet18())
return yolov3_resnet18_net
raise NotImplementedError(f"{name} is not implemented in the repo")

@ -117,6 +117,7 @@ After installing MindSpore via the official website, you can start training and
. .
└─deepfm └─deepfm
├─README.md ├─README.md
├─mindspore_hub_conf.md # config for mindspore hub
├─scripts ├─scripts
├─run_standalone_train.sh # launch standalone training(1p) in Ascend or GPU ├─run_standalone_train.sh # launch standalone training(1p) in Ascend or GPU
├─run_distribute_train.sh # launch distributed training(8p) in Ascend ├─run_distribute_train.sh # launch distributed training(8p) in Ascend

@ -0,0 +1,26 @@
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""hub config."""
from src.deepfm import ModelBuilder
from src.config import ModelConfig, TrainConfig
def create_network(name, *args, **kwargs):
if name == 'deepfm':
model_config = ModelConfig()
train_config = TrainConfig()
model_builder = ModelBuilder(model_config, train_config)
_, deepfm_eval_net = model_builder.get_train_eval_net()
return deepfm_eval_net
raise NotImplementedError(f"{name} is not implemented in the repo")
Loading…
Cancel
Save