diff --git a/configs/visdrone/README.md b/configs/visdrone/README.md index 04de6870b618040d631fa99701d7bd88b50796b6..79901e8c13f74e4df8f5fdb70b4ea57910561886 100644 --- a/configs/visdrone/README.md +++ b/configs/visdrone/README.md @@ -17,6 +17,7 @@ PaddleDetection团队提供了针对VisDrone-DET小目标数航拍场景的基 |PP-YOLOE-P2-Alpha-l| 30.1 | 48.9 | 24.3 | 40.8 | 28.47 | 48.16 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_l_p2_alpha_80e_visdrone.pdparams) | [配置文件](./ppyoloe_crn_l_p2_alpha_80e_visdrone.yml) | |PP-YOLOE-Alpha-largesize-l| 41.9 | 65.0 | 32.3 | 53.0 | 37.13 | 61.15 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_l_alpha_largesize_80e_visdrone.pdparams) | [配置文件](./ppyoloe_crn_l_alpha_largesize_80e_visdrone.yml) | |PP-YOLOE-P2-Alpha-largesize-l| 41.3 | 64.5 | 32.4 | 53.1 | 37.49 | 51.54 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_crn_l_p2_alpha_largesize_80e_visdrone.pdparams) | [配置文件](./ppyoloe_crn_l_p2_alpha_largesize_80e_visdrone.yml) | +|PP-YOLOE-plus-largesize-l | 43.3 | 66.7 | 33.5 | 54.7 | 38.24 | 62.76 | [下载链接](https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_l_largesize_80e_visdrone.pdparams) | [配置文件](./ppyoloe_plus_crn_l_largesize_80e_visdrone.yml) | ## 原图评估和拼图评估对比: diff --git a/configs/visdrone/ppyoloe_plus_crn_l_largesize_80e_visdrone.yml b/configs/visdrone/ppyoloe_plus_crn_l_largesize_80e_visdrone.yml new file mode 100644 index 0000000000000000000000000000000000000000..fddfe46a1afe02ff3955d0b22f41efd511cb7722 --- /dev/null +++ b/configs/visdrone/ppyoloe_plus_crn_l_largesize_80e_visdrone.yml @@ -0,0 +1,58 @@ +_BASE_: [ + 'ppyoloe_crn_l_80e_visdrone.yml', +] +log_iter: 100 +snapshot_epoch: 10 +weights: output/ppyoloe_plus_crn_l_largesize_80e_visdrone/model_final +pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_l_80e_coco.pdparams + + +CSPResNet: + use_alpha: True + + +LearningRate: + base_lr: 0.0025 + + +worker_num: 2 +eval_height: &eval_height 1920 +eval_width: &eval_width 1920 +eval_size: &eval_size [*eval_height, *eval_width] + +TrainReader: + sample_transforms: + - Decode: {} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} + batch_transforms: + - BatchRandomResize: {target_size: [1024, 1088, 1152, 1216, 1280, 1344, 1408, 1472, 1536, 1600, 1664, 1728, 1792, 1856, 1920], random_size: True, random_interp: True, keep_ratio: False} + - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none} + - Permute: {} + - PadGT: {} + batch_size: 2 + shuffle: true + drop_last: true + use_shared_memory: true + collate_batch: true + +EvalReader: + sample_transforms: + - Decode: {} + - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none} + - Permute: {} + batch_size: 1 + +TestReader: + inputs_def: + image_shape: [3, *eval_height, *eval_width] + sample_transforms: + - Decode: {} + - Resize: {target_size: *eval_size, keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], norm_type: none} + - Permute: {} + batch_size: 1 + fuse_normalize: True diff --git a/deploy/python/infer.py b/deploy/python/infer.py index aefb0eb50cc52192cc3fb82dc0b1ed5dd8a0f447..c276175897f9a700c3f337a06080ae441f3e7292 100644 --- a/deploy/python/infer.py +++ b/deploy/python/infer.py @@ -235,7 +235,7 @@ class Detector(object): import sahi from sahi.slicing import slice_image except Exception as e: - logger.error( + print( 'sahi not found, plaese install sahi. ' 'for example: `pip install sahi`, see https://github.com/obss/sahi.' ) @@ -251,6 +251,7 @@ class Detector(object): overlap_width_ratio=overlap_ratio[1]) sub_img_num = len(slice_image_result) merged_bboxs = [] + print('sub_img_num', sub_img_num) batch_image_list = [ slice_image_result.images[_ind] for _ind in range(sub_img_num) diff --git a/deploy/python/visualize.py b/deploy/python/visualize.py index 2ab2f0323fb4f99bd947dca771b52407d90be9a1..4bc2e17832bcfc7450e7c1704bb8064824734565 100644 --- a/deploy/python/visualize.py +++ b/deploy/python/visualize.py @@ -237,8 +237,8 @@ def visualize_pose(imgfile, import matplotlib plt.switch_backend('agg') except Exception as e: - logger.error('Matplotlib not found, please install matplotlib.' - 'for example: `pip install matplotlib`.') + print('Matplotlib not found, please install matplotlib.' + 'for example: `pip install matplotlib`.') raise e skeletons, scores = results['keypoint'] skeletons = np.array(skeletons) diff --git a/ppdet/data/source/dataset.py b/ppdet/data/source/dataset.py index 4f54494a3adfad7dd835b77603bb6a5133066570..2eeaf6e70682361b0fc07964e7bffc85cba394a2 100644 --- a/ppdet/data/source/dataset.py +++ b/ppdet/data/source/dataset.py @@ -13,8 +13,8 @@ # limitations under the License. import os +import copy import numpy as np - try: from collections.abc import Sequence except Exception: @@ -22,9 +22,11 @@ except Exception: from paddle.io import Dataset from ppdet.core.workspace import register, serializable from ppdet.utils.download import get_dataset_path -import copy from ppdet.data import source +from ppdet.utils.logger import setup_logger +logger = setup_logger(__name__) + @serializable class DetDataset(Dataset):