diff --git a/configs/smalldet/README.md b/configs/smalldet/README.md index e8a16379cc003cbcdcc09a4c5cd114273e6fc9d7..f44e7d3fd4e92970439e732cd8cca6cf0c309ea4 100644 --- a/configs/smalldet/README.md +++ b/configs/smalldet/README.md @@ -41,11 +41,11 @@ PaddleDetection团队提供了针对VisDrone-DET、DOTA水平框、Xview等小 **注意:** - 使用[SAHI](https://github.com/obss/sahi)切图工具需要首先安装:`pip install sahi`,参考[installation](https://github.com/obss/sahi/blob/main/README.md#installation)。 - **SLICE_SIZE**表示使用SAHI工具切图后子图的边长大小,**OVERLAP_RATIO**表示切图的子图之间的重叠率,DOTA水平框和Xview数据集均是切图后训练,AP指标为切图后的子图val上的指标。 -- VisDrone-DET数据集请参照[visdrone](../visdrone),可使用原图训练,也可使用切图后训练。 +- VisDrone-DET数据集请参照[visdrone](../visdrone),可使用原图训练,也可使用切图后训练,这上面表格中的指标均是使用VisDrone-DET的val子集做验证而未使用test_dev子集。 - PP-YOLOE模型训练过程中使用8 GPUs进行混合精度训练,如果**GPU卡数**或者**batch size**发生了改变,你需要按照公式 **lrnew = lrdefault * (batch_sizenew * GPU_numbernew) / (batch_sizedefault * GPU_numberdefault)** 调整学习率。 - 常用训练验证部署等步骤请参考[ppyoloe](../ppyoloe#getting-start)。 -- 自动切图和拼图的推理预测需添加设置`--slice_infer`,具体见下文使用说明。 -- Assembled表示自动切图和拼图。 +- 自动切图和拼图的推理预测需添加设置`--slice_infer`,具体见下文[模型库使用说明](#模型库使用说明)中的[预测](#预测)和[部署](#部署)。 +- Assembled表示自动切图和拼图,参照[2.3 子图拼图评估](#评估)。 ## 数据集准备 @@ -280,7 +280,7 @@ CUDA_VISIBLE_DEVICES=0 python deploy/python/infer.py --model_dir=output_inferenc 首先统计所用数据集标注框的平均宽高占图片真实宽高的比例分布: ```bash -python slice_tools/box_distribution.py --json_path ../../dataset/DOTA/annotations/train.json --out_img box_distribution.jpg +python tools/box_distribution.py --json_path ../../dataset/DOTA/annotations/train.json --out_img box_distribution.jpg ``` - `--json_path` :待统计数据集COCO 格式 annotation 的json文件路径 - `--out_img` :输出的统计分布图路径 @@ -313,7 +313,7 @@ pip install sahi #### 基于SAHI切图 ```bash -python slice_tools/slice_image.py --image_dir ../../dataset/DOTA/train/ --json_path ../../dataset/DOTA/annotations/train.json --output_dir ../../dataset/dota_sliced --slice_size 500 --overlap_ratio 0.25 +python tools/slice_image.py --image_dir ../../dataset/DOTA/train/ --json_path ../../dataset/DOTA/annotations/train.json --output_dir ../../dataset/dota_sliced --slice_size 500 --overlap_ratio 0.25 ``` - `--image_dir`:原始数据集图片文件夹的路径 diff --git a/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025.yml b/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025.yml index efb573a99b66bec449b360e60beb2dc0ba5648d0..9df37919bf12c202769341c42134a6579a8a3a7b 100644 --- a/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025.yml +++ b/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025.yml @@ -20,6 +20,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + epoch: 80 LearningRate: diff --git a/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025_slice_infer.yml b/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025_slice_infer.yml index 6de6db4c0db8650e5055d067932d11f16d3df54b..5464c95504b5be2fc334605100f8ad9af4854b2d 100644 --- a/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025_slice_infer.yml +++ b/configs/smalldet/ppyoloe_crn_l_80e_sliced_visdrone_640_025_slice_infer.yml @@ -20,6 +20,10 @@ TrainReader: EvalReader: batch_size: 1 # only support bs=1 when slice infer +TestReader: + batch_size: 1 + fuse_normalize: True + epoch: 80 LearningRate: diff --git a/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_DOTA_500_025.yml b/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_DOTA_500_025.yml index f7bdb583769cc4277d033836010f705539f6dca0..4e47f2c88d3a1c230dcc6461cab70eeb68f53419 100644 --- a/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_DOTA_500_025.yml +++ b/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_DOTA_500_025.yml @@ -28,6 +28,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + epoch: 80 LearningRate: diff --git a/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_xview_400_025.yml b/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_xview_400_025.yml index cbf20b2c23d2cb4990a89ac68af50de8de3176ba..e94d799b2727e5097a7b5e90f7b7c1935bed0df8 100644 --- a/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_xview_400_025.yml +++ b/configs/smalldet/ppyoloe_p2_crn_l_80e_sliced_xview_400_025.yml @@ -28,6 +28,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + epoch: 80 LearningRate: diff --git a/configs/visdrone/ppyoloe_crn_l_80e_visdrone.yml b/configs/visdrone/ppyoloe_crn_l_80e_visdrone.yml index 93f8b40c8811f6a83596050547d4f631c27bbc8c..5da9f177f64b786663d791028019f2453dbfaff4 100644 --- a/configs/visdrone/ppyoloe_crn_l_80e_visdrone.yml +++ b/configs/visdrone/ppyoloe_crn_l_80e_visdrone.yml @@ -20,6 +20,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + epoch: 80 LearningRate: diff --git a/configs/visdrone/ppyoloe_crn_l_alpha_largesize_80e_visdrone.yml b/configs/visdrone/ppyoloe_crn_l_alpha_largesize_80e_visdrone.yml index dcea2687abdc99536e76d44b4d773c5424d30a1c..c16f2116a7015be193d052bc7c9811d2b4133de3 100644 --- a/configs/visdrone/ppyoloe_crn_l_alpha_largesize_80e_visdrone.yml +++ b/configs/visdrone/ppyoloe_crn_l_alpha_largesize_80e_visdrone.yml @@ -55,3 +55,4 @@ TestReader: - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - Permute: {} batch_size: 1 + fuse_normalize: True diff --git a/configs/visdrone/ppyoloe_crn_l_p2_alpha_80e_visdrone.yml b/configs/visdrone/ppyoloe_crn_l_p2_alpha_80e_visdrone.yml index cc0b5440c9db3ddd7f9fdb2e43e8c710a0d356aa..f0093beb0fdf66079483f3bec07a94cc5afec617 100644 --- a/configs/visdrone/ppyoloe_crn_l_p2_alpha_80e_visdrone.yml +++ b/configs/visdrone/ppyoloe_crn_l_p2_alpha_80e_visdrone.yml @@ -13,6 +13,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + LearningRate: base_lr: 0.005 diff --git a/configs/visdrone/ppyoloe_crn_l_p2_alpha_largesize_80e_visdrone.yml b/configs/visdrone/ppyoloe_crn_l_p2_alpha_largesize_80e_visdrone.yml index 5aca08856a8c6935fcf2fef216103f027aaf2509..53b4c9f0d66b74e20897e0ae509176d1ab4beceb 100644 --- a/configs/visdrone/ppyoloe_crn_l_p2_alpha_largesize_80e_visdrone.yml +++ b/configs/visdrone/ppyoloe_crn_l_p2_alpha_largesize_80e_visdrone.yml @@ -62,3 +62,4 @@ TestReader: - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - Permute: {} batch_size: 1 + fuse_normalize: True diff --git a/configs/visdrone/ppyoloe_crn_s_80e_visdrone.yml b/configs/visdrone/ppyoloe_crn_s_80e_visdrone.yml index 555dab200d4d6a4a712f0dbe0f27ce0152d7a959..d3c386fd066950360c0456bf0e02571ccfc14e85 100644 --- a/configs/visdrone/ppyoloe_crn_s_80e_visdrone.yml +++ b/configs/visdrone/ppyoloe_crn_s_80e_visdrone.yml @@ -20,6 +20,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + epoch: 80 LearningRate: diff --git a/configs/visdrone/ppyoloe_crn_s_p2_alpha_80e_visdrone.yml b/configs/visdrone/ppyoloe_crn_s_p2_alpha_80e_visdrone.yml index d82d25b98eceb04afd83caa36d4ae30767956665..70e34cd05a872e168f88e7d59858d69305559e29 100644 --- a/configs/visdrone/ppyoloe_crn_s_p2_alpha_80e_visdrone.yml +++ b/configs/visdrone/ppyoloe_crn_s_p2_alpha_80e_visdrone.yml @@ -13,6 +13,10 @@ TrainReader: EvalReader: batch_size: 1 +TestReader: + batch_size: 1 + fuse_normalize: True + LearningRate: base_lr: 0.005