DETR (DEtection TRansformer) is a novel approach that views object detection as a direct set prediction problem. This method streamlines the detection process, eliminating the need for many hand-designed components like non-maximum suppression procedures or anchor generation, which are typically used to explicitly encode prior knowledge about the task.
| GPU | IXUCA SDK | Release | Branch |
|---|---|---|---|
| MR-V100 | 4.4.0 | 26.03 | release/26.03 |
| MR-V100 | 4.3.0 | 25.12 | release/25.12 |
Note: 请切换到与您的 SDK 版本对应的 Release 分支进行测试。请勿直接在 master 分支上运行测试,因为 master 分支可能包含与您的本地 SDK 版本不兼容的最新更改。
切换分支命令示例:
git checkout release/26.03
Pretrained model: https://download.openmmlab.com/mmdetection/v3.0/detr/detr_r50_8xb2-150e_coco/detr_r50_8xb2-150e_coco_20221023_153551-436d03e8.pth
Dataset:
- https://github.com/ultralytics/assets/releases/download/v0.0.0/coco2017labels.zip to download the labels dataset.
- http://images.cocodataset.org/zips/val2017.zip to download the validation dataset.
- http://images.cocodataset.org/zips/train2017.zip to download the train dataset.
unzip -q -d ./ coco2017labels.zip
unzip -q -d ./coco/images/ train2017.zip
unzip -q -d ./coco/images/ val2017.zip
coco
├── annotations
│ └── instances_val2017.json
├── images
│ ├── train2017
│ └── val2017
├── labels
│ ├── train2017
│ └── val2017
├── LICENSE
├── README.txt
├── test-dev2017.txt
├── train2017.cache
├── train2017.txt
├── val2017.cache
└── val2017.txtContact the Iluvatar administrator to get the missing packages:
- mmcv-*.whl
# Install libGL
## CentOS
yum install -y mesa-libGL
## Ubuntu
apt install -y libgl1-mesa-glx
pip3 install -r requirements.txtmkdir checkpoints
python3 export_model.py --torch_file /path/to/detr_r50_8xb2-150e_coco_20221023_153551-436d03e8.pth --onnx_file checkpoints/detr_res50.onnx --bsz 1export PROJ_DIR=./
export DATASETS_DIR=/path/to/coco2017/
export CHECKPOINTS_DIR=./checkpoints
export COCO_GT=${DATASETS_DIR}/annotations/instances_val2017.json
export EVAL_DIR=${DATASETS_DIR}/images/val2017
export RUN_DIR=./
export CONFIG_DIR=config/DETR_CONFIG# Accuracy
bash scripts/infer_detr_fp16_accuracy.sh
# Performance
bash scripts/infer_detr_fp16_performance.sh| Model | BatchSize | Precision | FPS | MAP@0.5 | MAP@0.5:0.95 |
|---|---|---|---|---|---|
| DETR | 1 | FP16 | 65.84 | 0.370 | 0.198 |