Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
lvxiaoqian 308ba41a14 | 2 years ago | |
---|---|---|
scripts | 2 years ago | |
src | 2 years ago | |
README.md | 2 years ago | |
eval.py | 2 years ago | |
export.py | 2 years ago | |
train.py | 2 years ago |
Cascade R-CNN算法是CVPR2018的文章,通过级联几个检测网络达到不断优化预测结果的目的,与普通级联不同的是,cascade R-CNN的几个检测网络是基于不同IOU阈值确定的正负样本上训练得到的,这是该算法的一大亮点。cascade R-CNN的实验大部分是在COCO数据集做的,而且效果非常出彩。
论文: Cai Z, Vasconcelos N. Cascade r-cnn: Delving into high quality object detection[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2018: 6154-6162.
使用的数据集:COCO 2017
硬件(Ascend/GPU)
下载数据集COCO 2017。
若使用COCO数据集,执行脚本时选择数据集COCO。
安装Cython和pycocotool,也可以安装mmcv进行数据处理。
pip install Cython
pip install pycocotools
pip install mmcv==0.2.14
.
└─cocodataset
├─annotations
├─instance_train2017.json
└─instance_val2017.json
├─val2017
└─train2017
通过官方网站安装MindSpore后,您可以按照如下步骤进行训练和评估:
注意:
# 单机训练
bash run_standalone_train_ascend.sh [PRETRAINED_MODEL]
# 分布式训练
bash run_distribute_train_ascend.sh [RANK_TABLE_FILE] [PRETRAINED_MODEL]
# 评估
bash run_eval_ascend.sh [VALIDATION_JSON_FILE] [CHECKPOINT_PATH]
.
└─Cascade R-CNN
├─README.md // Cascade R-CNN相关说明
├─scripts
├─run_standalone_train_ascend.sh // Ascend单机shell脚本
├─run_distribute_train_ascend.sh // Ascend分布式shell脚本
└─run_eval_ascend.sh // Ascend评估shell脚本
├─src
├─CascadeRCNN
├─__init__.py // init文件
├─anchor_generator.py // 锚点生成器
├─bbox_assign_sample.py // 第一阶段采样器
├─bbox_assign_sample_stage2.py // 第二阶段级联一阶段采样器
├─bbox_assign_sample_stage2_1_1.py // 第二阶段级联二阶段采样器
├─bbox_assign_sample_stage2_2_1.py // 第二阶段级联三阶段采样器
├─cascade_rcnn_r101.py // 以Resnet101作为backbone的Cascade R-CNN网络
├─fpn_neck.py // 特征金字塔网络
├─proposal_generator.py // 候选生成器
├─rcnn.py // R-CNN网络
├─resnet.py // 骨干网络
├─roi_align.py // ROI对齐网络
└─rpn.py // 区域候选网络
├─dataset.py // 创建并处理数据集
├─lr_schedule.py // 学习率生成器
├─network_define.py // Cascade R-CNN网络定义
├─util.py // 例行操作
├─config.py // 模型参数
├─export.py // 导出 AIR,MINDIR模型的脚本
├─eval.py // 评估脚本
└─train.py // 训练脚本
# Ascend单机训练
bash run_standalone_train_ascend.sh [PRETRAINED_MODEL]
# Ascend分布式训练
bash run_distribute_train_ascend.sh [RANK_TABLE_FILE] [PRETRAINED_MODEL]
# Ascend评估
bash run_eval_ascend.sh [VALIDATION_JSON_FILE] [CHECKPOINT_PATH]
评估结果将保存在示例路径中,文件夹名为“eval”。在此文件夹下,您可以在日志中找到类似以下的结果。
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.373
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.555
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.412
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.221
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.407
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.501
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.311
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.486
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.506
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.316
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.549
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.647
参数 | Ascend |
---|---|
模型版本 | V1 |
资源 | Ascend 910;CPU 2.60GHz,192核;内存:755G |
上传日期 | 2021/11/02 |
MindSpore版本 | 1.3.0 |
数据集 | COCO 2017 |
训练参数 | epoch=40, batch_size=2 |
优化器 | SGD |
损失函数 | Softmax交叉熵,Sigmoid交叉熵,SmoothL1Loss |
速度 | 1卡:190毫秒/步;8卡:200毫秒/步 |
总时间 | 1卡:182.72小时;8卡:24.89小时 |
参数(M) | 1013 |
参数 | Ascend |
---|---|
模型版本 | V1 |
资源 | Ascend 910 |
上传日期 | 2021/11/02 |
MindSpore版本 | 1.3.0 |
数据集 | COCO2017 |
batch_size | 2 |
输出 | mAP |
准确率 | IoU=0.50:55.5% |
请浏览官网主页。
Cascade R-CNN算法是CVPR2018的文章,通过级联几个检测网络达到不断优化预测结果的目的,与普通级联不同的是,cascade R-CNN的几个检测网络是基于不同IOU阈值确定的正负样本上训练得到的,这是该算法的一大亮点。cascade R-CNN的实验大部分是在COCO数据集做的,而且效果非常出彩。
Python Shell HAProxy
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》