diff --git a/model_examples/FCOS3D/README.md b/model_examples/FCOS3D/README.md index f3da31bf72e791a638382ddc8d1cc471e17ba3be..a16661963a92d6b71b24024845a269bedaac3b7c 100644 --- a/model_examples/FCOS3D/README.md +++ b/model_examples/FCOS3D/README.md @@ -219,20 +219,27 @@ mv /path/to/resnet101_msra-6cc46731.pth /root/.cache/torch/hub/checkpoints/resne | 芯片 | 卡数 | global batch size | epoch | mAP | NDS | FPS | | :-----------: | :--: | :---------------: | :---: | :--------------------: | :--------------------: |--------------| -| 竞品A | 8p | 16 | 12 | 0.3049 | 0.3824 | 44.30 | -| Atlas 800T A2 | 8p | 16 | 12 | 0.3012 | 0.3797 | 44.31 | +| 竞品A | 8p | 16 | 12 | 0.2973 | 0.3785 | 44.30 | +| Atlas 800T A2 | 8p | 16 | 12 | 0.3000 | 0.3800 | 44.31 | # 版本说明 ## 变更 2025.01.20: 首次提交。 + 2025.02.05: 性能优化。 + 2025.02.18: 新增性能FPS计算,并添加到日志中。 + 2025.03.04: 新增性能测试脚本,大幅提升性能测试效率。 + 2025.03.25: 性能进一步优化。 + 2025.08.05: 优化算子,进一步提升性能。 +2025.08.22: 固定随机种子,更新精度指标。 + ## FAQ 无。 diff --git a/model_examples/FCOS3D/mmdet3d.patch b/model_examples/FCOS3D/mmdet3d.patch index 648118b0d994ab845ea67fcac009ab74d344b221..5a4185fcdf8b348521aaa2f576c940002877df7d 100644 --- a/model_examples/FCOS3D/mmdet3d.patch +++ b/model_examples/FCOS3D/mmdet3d.patch @@ -197,7 +197,7 @@ index 4afc2559..a3500eb7 100644 # TODO: support fuse_conv_bn and format_only def parse_args(): diff --git a/tools/train.py b/tools/train.py -index 6b9c3b08..22e9475e 100644 +index 6b9c3b08..00964fcc 100644 --- a/tools/train.py +++ b/tools/train.py @@ -11,6 +11,15 @@ from mmengine.runner import Runner @@ -216,11 +216,33 @@ index 6b9c3b08..22e9475e 100644 def parse_args(): parser = argparse.ArgumentParser(description='Train a 3D detector') -@@ -142,4 +151,6 @@ def main(): +@@ -141,5 +150,28 @@ def main(): + runner.train() ++def seed_all(seed=1234, is_gpu=True): ++ import random ++ import numpy as np ++ ++ random.seed(seed) ++ os.environ['PYTHONHASHSEED'] = str(seed) ++ np.random.seed(seed) ++ torch.manual_seed(seed) ++ ++ if is_gpu: ++ torch.cuda.manual_seed_all(seed) ++ torch.cuda.manual_seed(seed) ++ torch.backends.cudnn.deterministic = True ++ torch.backends.cudnn.enable = False ++ torch.backends.cudnn.benchmark = False ++ else: ++ torch_npu.npu.manual_seed_all(seed) ++ torch_npu.npu.manual_seed(seed) ++ ++ if __name__ == '__main__': - main() ++ seed_all(1024, is_gpu=False) # npu + pb = PatcherBuilder().add_module_patch("mmcv.ops", Patch(dc), Patch(mdc)) + with pb.build(): + main()