From 63f508578414381a04f917baf0b910165683c941 Mon Sep 17 00:00:00 2001 From: qiucan4 Date: Tue, 9 Sep 2025 12:26:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Deformable=20DETR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Deformable-DETR/Deformable-DETR_npu.patch | 21 +++---------------- model_examples/Deformable-DETR/README.md | 4 +++- .../Deformable-DETR/test/train_8p_full.sh | 2 -- .../test/train_8p_performance.sh | 2 -- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/model_examples/Deformable-DETR/Deformable-DETR_npu.patch b/model_examples/Deformable-DETR/Deformable-DETR_npu.patch index b43c01d6..eff06b0a 100644 --- a/model_examples/Deformable-DETR/Deformable-DETR_npu.patch +++ b/model_examples/Deformable-DETR/Deformable-DETR_npu.patch @@ -136,18 +136,10 @@ new mode 100755 diff --git a/datasets/coco.py b/datasets/coco.py old mode 100644 new mode 100755 -index 1be8308..c23dfaf +index 1be8308..682e5fb --- a/datasets/coco.py +++ b/datasets/coco.py -@@ -18,6 +18,7 @@ import torch - import torch.utils.data - from pycocotools import mask as coco_mask - -+from mx_driving.dataset.utils.dynamic_transforms import BalancedRandomResize - from .torchvision_datasets import CocoDetection as TvCocoDetection - from util.misc import get_local_rank, get_local_size - import datasets.transforms as T -@@ -135,19 +136,19 @@ def make_coco_transforms(image_set): +@@ -135,13 +135,13 @@ def make_coco_transforms(image_set): return T.Compose([ T.RandomHorizontalFlip(), T.RandomSelect( @@ -159,14 +151,7 @@ index 1be8308..c23dfaf - T.RandomResize(scales, max_size=1333), ]) ), -+ BalancedRandomResize(scales, max_size=1333, seed=100), - normalize, - ]) - - if image_set == 'val': - return T.Compose([ -- T.RandomResize([800], max_size=1333), -+ T.RandomResize([640], max_size=1333), ++ T.RandomResize(scales, max_size=1333), normalize, ]) diff --git a/model_examples/Deformable-DETR/README.md b/model_examples/Deformable-DETR/README.md index 8ce0e9cc..f8686bdc 100644 --- a/model_examples/Deformable-DETR/README.md +++ b/model_examples/Deformable-DETR/README.md @@ -108,7 +108,7 @@ bash test/train_8p_performance.sh --data_path='.data/coco' # 替换成你的coc | 芯片 | 卡数 | epoch | global batch size| mAP(IoU=0.50:0.95) | 性能-单步迭代耗时(s) | FPS | | ------------- | ---- | ----- | ----- | ------------------ | ---- | ---- | | 竞品A | 8p | 50 | 64 | 0.437 | 1.01 | 65 | -| Atlas 800T A2 | 8p | 50 | 64 | 0.428 | 1.01 | 65 | +| Atlas 800T A2 | 8p | 50 | 64 | 0.436 | 1.01 | 63 | ## 变更说明 @@ -118,6 +118,8 @@ bash test/train_8p_performance.sh --data_path='.data/coco' # 替换成你的coc 2025.8.21:性能优化、更新性能和精度数据 +2025.9.9:更新性能和精度数据 + ## FAQ 暂无 \ No newline at end of file diff --git a/model_examples/Deformable-DETR/test/train_8p_full.sh b/model_examples/Deformable-DETR/test/train_8p_full.sh index 8815e1ad..78c85741 100644 --- a/model_examples/Deformable-DETR/test/train_8p_full.sh +++ b/model_examples/Deformable-DETR/test/train_8p_full.sh @@ -44,8 +44,6 @@ export ASCEND_GLOBAL_LOG_LEVEL=3 export ASCEND_GLOBAL_EVENT_ENABLE=0 #设置是否开启taskque,0-关闭/1-开启/2-流水优化 export TASK_QUEUE_ENABLE=2 -#设置aclnn cache,使能host侧算子下发缓存机制 -export DISABLE_L2_CACHE=0 #设置是否开启均匀绑核,0-关闭/1-开启粗粒度绑核/2-开启细粒度绑核 export CPU_AFFINITY_CONF=1 #HCCL白名单开关,配置在使用HCCL时是否关闭通信白名单。1-关闭/0-开启 diff --git a/model_examples/Deformable-DETR/test/train_8p_performance.sh b/model_examples/Deformable-DETR/test/train_8p_performance.sh index b6ecd82e..ce22e461 100644 --- a/model_examples/Deformable-DETR/test/train_8p_performance.sh +++ b/model_examples/Deformable-DETR/test/train_8p_performance.sh @@ -44,8 +44,6 @@ export ASCEND_GLOBAL_LOG_LEVEL=3 export ASCEND_GLOBAL_EVENT_ENABLE=0 #设置是否开启taskque,0-关闭/1-开启/2-流水优化 export TASK_QUEUE_ENABLE=2 -#设置aclnn cache,使能host侧算子下发缓存机制 -export DISABLE_L2_CACHE=0 #设置是否开启均匀绑核,0-关闭/1-开启粗粒度绑核/2-开启细粒度绑核 export CPU_AFFINITY_CONF=1 #HCCL白名单开关,配置在使用HCCL时是否关闭通信白名单。1-关闭/0-开启 -- Gitee