程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

2024-11(1)

yolov--11--YOLO v3的原版训练记录、mAP、AP、recall、precision、time等评价指标计算

发布于2019-08-07 12:16     阅读(5337)     评论(0)     点赞(5)     收藏(4)


版权声明:本博客所有内容以学习、研究和分享为主,如需转载,请联系本人,标明作者和出处,谢谢! https://blog.csdn.net/qq_33869371/article/details/91042239

Yolov-1-TX2上用YOLOv3训练自己数据集的流程(VOC2007-TX2-GPU)

Yolov--2--一文全面了解深度学习性能优化加速引擎---TensorRT

Yolov--3--TensorRT中yolov3性能优化加速(基于caffe)

yolov-5-目标检测:YOLOv2算法原理详解

yolov--8--Tensorflow实现YOLO v3

yolov--9--YOLO v3的剪枝优化

yolov--10--目标检测模型的参数评估指标详解、概念解析

yolov--11--YOLO v3的原版训练记录、mAP、AP、recall、precision、time等评价指标计算

yolov--12--YOLOv3的原理深度剖析和关键点讲解


8、yolov3-network-slimming

1.对原始weights文件进行稀疏化训练

 python sparsity_train-3.py -gpus 6,7 | tee visualization/sparsity-07-12trainval-yolov3-a-0.0001-resize416-batch128-32-2gpu-start2019-7-28-1450-1.log

 CUDA_VISIBLE_DEVICES='7' python sparsity_train-3.py | tee visualization/sparsity-07-12trainval-yolov3-a-0.0001-resize416-batch16-16-3cpu-start2019-7-28-1520-1.log
CUDA_VISIBLE_DEVICES='7' python sparsity_train-3.py -sr --s 0.001 | tee visualization/sparsity-07trainval-yolov3-a-2-0.001-resize416-batch16-1-2cpu-start2019-8-3-1520-1.log

2.剪枝

CUDA_VISIBLE_DEVICES=9 python new_prune-0.3.py --weights checkpoints-q-1/yolov3_sparsity_416_0.0001_final_1_182.weights --percent 0.5 | tee visualization/prune-0.5-07-12trainval-yolov3-a-resize416-batch16-1-2cpu-start2019-8-4-1500-1.log

3.对剪枝后的weights进行微调

CUDA_VISIBLE_DEVICES='7' python sparsity_train-weitiao.py --cfg prune_yolov3-voc-sparsity-1.cfg --weights checkpoints-q-1/prune_yolov3_sparsity_416_0.0001_final_1_182.weights | tee visualization/weitiao-07-12trainval-yolov3-a-resize416-batch16-1-2cpu-start2019-8-4-1500-1.log

4.微调后进行测试:

 

4.微调后进行测试:

 

7、facebookresearch/Detectron

https://github.com/facebookresearch/Detectron

https://caffe2.ai/docs/tutorials.html

 source activate pytorch1.1-cuda9-py3.6

https://github.com/facebookresearch/Detectron/blob/master/INSTALL.md

faster-rcnn-Detectron 

  • 开始训练
CUDA_VISIBLE_DEVICES='3,4' python tools/train_net.py --cfg experiment/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007.yaml OUTPUT_DIR out-1 | tee visualization/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007.log
CUDA_VISIBLE_DEVICES=2 python tools/train_net.py --cfg experiments/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007.yaml OUTPUT_DIR out-faster-rcnn-1/train-2 | tee visualization/1gpu_e2e_faster_rcnn_R-50-FPN-voc2007-iter70000-start-7-20-2150.log

2019-7-25: 

  • voc2007+12trainval训练
CUDA_VISIBLE_DEVICES='2,3' python tools/train_net.py --cfg experiments/tutorial_2gpu_e2e_faster_rcnn_R-50-FPN-trainval07+12.yaml OUTPUT_DIR tutorial_2gpu_e2e_faster_rcnn_R-50-FPN/ | tee visualization/tutorial_2gpu_e2e_faster_rcnn_R-50-FPN-trainval07+12-ite60000-1.log

CUDA_VISIBLE_DEVICES='6,7,8' python tools/train_net.py --cfg experiments/e2e_faster_rcnn_R-101-FPN_1x-trainval07+12.yaml OUTPUT_DIR e2e_faster_rcnn_R-101-FPN_1x-trainval07+12/train-3/ | tee visualization/e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-ite90000-start7-26-2040-1.log

CUDA_VISIBLE_DEVICES='6,7' python tools/train_net.py --cfg experiments/e2e_mask_rcnn_R-50-FPN_2x_gn-trainval07+12.yaml OUTPUT_DIR e2e_mask_rcnn_R-50-FPN_2x_gn-trainval07+12/ | tee visualization/e2e_mask_rcnn_R-50-FPN_2x_gn-trainval07+12-start7-27-1200-2gpu-1.log

CUDA_VISIBLE_DEVICES='8,9' python tools/train_net.py --cfg experiments/e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-2gpu.yaml OUTPUT_DIR e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-2gpu/ | tee visualization/e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-2gpu-start7-27-1215-1.log

 

CUDA_VISIBLE_DEVICES='6,7,8,9' python tools/train_net.py --cfg experiments/e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-4gpu.yaml OUTPUT_DIR e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-4gpu-iter20000/ | tee visualization/e2e_faster_rcnn_R-101-FPN_1x-trainval07+12-4gpu-start7-28-1100-iter20000-1.log

 

  • 测试训练结果(几张图片)
CUDA_VISIBLE_DEVICES=4 python tools/infer_simple.py --cfg experiment/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007.yaml   --output-dir out-1/detectron-visualizations/  --image-ext jpg --wts out-1/train/voc_2007_train/generalized_rcnn/model_final.pkl demo | tee visualization/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007-infer-simple.log
  •  评估训练结果(生成mAP)
CUDA_VISIBLE_DEVICES=4 python tools/test_net.py --cfg experiments/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007.yaml   TEST.WEIGHTS out-faster-rcnn-1/train/voc_2007_train/generalized_rcnn/model_final.pkl NUM_GPUS 1 | tee visualization/2gpu_e2e_faster_rcnn_R-50-FPN-voc2007-test_net.log
  • 可视化检测结果(测试多张图片)
CUDA_VISIBLE_DEVICES=4 python tools/visualize_results.py --dataset voc_2007_val --detections out-faster-rcnn-1/test/voc_2007_val/generalized_rcnn/detections.pkl --output-dir out-faster-rcnn-1/detectron-visualizations

问题:

FileNotFoundError: [Errno 2] No such file or directory: '/home/xxx/detectron/datasets/data/VOC2007/VOCdevkit2007/results/VOC2007/Main/comp4_80ce9d5d-3ac9-4469-8914-2b6eabc81797_det_val_aeroplane.txt'

新建results/VOC2007/Main文件夹即可


mask-rcnn-Detectron

训练:

CUDA_VISIBLE_DEVICES='2,3' python tools/train_net.py --cfg experiments/e2e_mask_rcnn_R-50-FPN_2x_gn.yaml OUTPUT_DIR out-e2e_mask_rcnn_R-50-FPN_2x_gn/ | tee visualization/e2e_mask_rcnn_R-50-FPN_2x_gn-voc2007-iter180000-start-7-21-1135.log

 CUDA_VISIBLE_DEVICES='4,5' python tools/train_net.py --cfg experiments/e2e_mask_rcnn_R-101-FPN_1x.yaml OUTPUT_DIR out-e2e_mask_rcnn_R-101-FPN_1x/ | tee visualization/e2e_mask_rcnn_R-101-FPN_1x-voc2007-iter90000-start-7-21-1935.log

1、yolov3-a-Pytorch-voc2007

CUDA_VISIBLE_DEVICES=8 ./darknet detector train cfg/voc-y.data cfg/yolov3-voc-y.cfg darknet53.conv.74 -map

原版训练:

CUDA_VISIBLE_DEVICES=3 ./darknet detector train cfg/voc-y.data cfg/yolov3-voc-y.cfg backup-y/yolov3-voc-y_2500.weights | tee visualization/train-yolov3-1.log
CUDA_VISIBLE_DEVICES=4 ./darknet detector train cfg/voc-y.data cfg/yolov3-voc-y.cfg | tee visualization/train-yolov3-1.log
 CUDA_VISIBLE_DEVICES=4 ./darknet detector train cfg/voc-y.data cfg/yolov3-voc-y.cfg backup/yolov3-voc-y_last.weights 2>1 | tee visualization/darknet-y-batch64-16-voc07-train5011-iteration16767-02.log

voc2007+12trainval训练:

./darknet detector train cfg/voc-y.data cfg/yolov3-voc-y.cfg darknet53.conv.74 -gpus 4,5 | tee visualization/darknet-y-batch128-32-voc0712trainval-iteration-start7-24-1300-01.log
./darknet detector train cfg/voc-y.data cfg/yolov3-voc-y.cfg backup/yolov3-voc-y_last.weights -gpus 4,5 | tee visualization/darknet-y-batch128-32-voc0712trainval-iteration-start7-24-1300-02.log

 

计算map:

./darknet detector map cfg/voc-y.data cfg/yolov3-voc-y.cfg backup/yolov3-voc-y_41000.weights | tee visualization/darknet-voc2007-bach64-16-20lei-iteration41000-prcurves-points-41000weights.log
CUDA_VISIBLE_DEVICES='7' ./darknet detector map cfg/voc-y.data cfg/yolov3-voc-y.cfg backup/yolov3-voc-y_final.weights | tee visualization/darknet-a-y-batch128-32-voc0712trainval-iteration60200-test-1.log

原版检测单张图片: 

CUDA_VISIBLE_DEVICES=8 ./darknet detector test ./cfg/voc-y.data ./cfg/yolov3-voc-y.cfg ./yolov3.weights data/dog.jpg

 

 


 

2、yolov3-a-voc2001

训练: 

CUDA_VISIBLE_DEVICES=4 ./darknet detector train cfg/voc2001.data cfg/yolov3-voc2001.cfg darknet53.conv.74 | tee visualization/darknet-voc2001-bach64-32-2lei-train5011-iteration.log

计算map:

./darknet detector map cfg/voc2001.data cfg/yolov3-voc2001.cfg backup/yolov3-voc2001_5000.weights | tee visualization/darknet-voc2001-bach64-32-2lei-trainval904-iteration-5000weights.log
./darknet detector map cfg/voc2001.data cfg/yolov3-voc2001.cfg backup/yolov3-voc2001_4000.weights | tee visualization/darknet-voc2001-bach64-32-2lei-trainval904-iteration5000-4000weights.log
./darknet detector map cfg/voc2001.data cfg/yolov3-voc2001.cfg backup/yolov3-voc2001_3000.weights | tee visualization/darknet-voc2001-bach64-32-2lei-trainval904-iteration5000-3000weights.log
./darknet detector map cfg/voc2001.data cfg/yolov3-voc2001.cfg backup/yolov3-voc2001_5000.weights -points 11 | tee visualization/darknet-voc2001-bach64-32-2lei-trainval904-iteration-prcurves-11points-5000weights.log

 

检测单张图片:

./darknet detector test cfg/voc2001.data cfg/yolov3-voc2001.cfg backup/yolov3-voc2001_last.weights data/000001.jpg | tee visualization/darknet-voc2001-bach64-32-2lei-trainval904-iteration5000-000001-jpg.log

 

 

3、yolov2-a-voc2001

训练:

CUDA_VISIBLE_DEVICES=5 ./darknet detector train cfg/voc2001.data cfg/yolov2-voc2001.cfg darknet19_448.conv.23 | tee visualization/darknet-v2-voc2001-batch64-16-trainval904-iteration-start6-30-22:58-01.log

 

计算map:

./darknet detector map cfg/voc2001.data cfg/yolov2-voc2001.cfg backup/yolov2-voc2001_4000.weights | tee visualization/darknet-v2-voc2001-bach64-32-2lei-trainval904-iteration5000-4000weights.log
./darknet detector map cfg/voc2001.data cfg/yolov2-voc2001.cfg backup/yolov2-voc2001_final.weights | tee visualization/darknet-v2-voc2001-bach64-32-2lei-trainval904-iteration5000-finalweights.log

 

检测单张图片:

./darknet detector test cfg/voc2001.data cfg/yolov2-voc2001.cfg backup/yolov2-voc2001_last.weights data/000002.jpg | tee visualization/darknet-voc2001-bach64-32-2lei-trainval904-iteration5000-000002-jpg.log

 

 

 

 

4、SSD.Pytorch

CUDA_VISIBLE_DEVICES=8 python train.py | tee visualization/train-ssd300-voc07-batch32-classes21-iter-04.log

 

 

5、yolov3原版剪枝

稀疏化:

CUDA_VISIBLE_DEVICES=9 python sparsity_train-3.py | tee visualization/sparsity-train-yolov3-voc07trainval--02.log

剪枝:

CUDA_VISIBLE_DEVICES=9 python new_prune-0.3.py --weights checkpoints-3/yolov3_sparsity_416_0.0001_final_1_410.weights

 

 5、Faster-RCNN

  1. voc2007

训练: 

CUDA_VISIBLE_DEVICES=4 python trainval_net.py --bs 10 --cuda --checkepoch 13 --checkpoint 1001 --use_tfb | tee visualization/faster-rcnn-voc07-trainval-iteration-01.log

测试:

CUDA_VISIBLE_DEVICES=4 python test_net.py --checkepoch 20 --checkpoint 1001 --cuda | tee visualization/faster-rcnn-voc07-trainval-checkepoch-20-checkpoint-1001-01.log

2、自己数据集

训练: 

python setup.py build develop
CUDA_VISIBLE_DEVICES=4 python trainval_net.py --bs 5 --cuda --use_tfb | tee visualization/faster-rcnn-voc2001-trainval-bs5-iteration-01.log

 

测试:

CUDA_VISIBLE_DEVICES=4 python test_net.py --checkepoch 20 --checkpoint 179 --cuda | tee visualization/faster-rcnn-voc2001-test275-checkepoch-20-checkpoint-179-01.log

 

6、CornerNet-Lite

 1、Getting Started

anaconda创建pytorch1.1虚拟环境:

source activate pytorch

 退出pytorch1.1虚拟环境:

conda deactivate

 

conda create --name cornerNet_Lite-y --file conda_packagelist.txt --channel pytorch
https://conda.anaconda.org/pytorch/linux-64/pytorch-1.0.0-py3.7_cuda10.0.130_cudnn7.4.1_1.tar.bz2

 

 

 

 


原文:https://blog.csdn.net/u014236392/article/details/81127537 



所属网站分类: 技术文章 > 博客

作者:西红柿煎鸡蛋

链接:https://www.pythonheidong.com/blog/article/10708/37b9aab6cb4680810f18/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

5 0
收藏该文
已收藏

评论内容:(最多支持255个字符)