Commit 35d29663 authored by Rayyyyy's avatar Rayyyyy
Browse files

Updata dtk to 24.04

parent fb8fe5f4
# Contributors
None
......@@ -23,9 +23,9 @@ DETR将目标检测看作一种set prediction问题, 并提出了一个十分简
### Docker(方法一)
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk-23.04.1-py38-latest
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-centos7.6-dtk24.04-py310
docker run -it -v /path/your_code_data/:/path/ your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal:/opt/hyhal:ro --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
cd /your_code_path/detr_pytorch
pip install -r requirements.txt
......@@ -35,31 +35,29 @@ pip install -r requirements.txt
```
cd ./docker
cp ../requirements.txt requirements.txt
docker build --no-cache -t detr:latest .
docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal:/opt/hyhal:ro --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
cd /your_code_path/detr_pytorch
pip install -r requirements.txt
```
### Anaconda(方法三)
1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装: https://developer.hpccube.com/tool/
```
DTK软件栈: dtk23.04.1
python: python3.8
torch: 1.13.1
torchvision: 0.14.1
DTK软件栈: dtk24.04
python: python3.10
torch: 2.1.0+git00661e0.abi0.dtk2404
torchvision: 0.16.0+gitc9e7141.abi0.dtk2404.torch2.1
```
Tips: 以上dtk软件栈、python、torch等DCU相关工具版本需要严格一一对应
2、其他非特殊库直接按照requirements.txt安装
```
```bash
pip install -r requirements.txt
```
......@@ -77,60 +75,62 @@ COCO2017
数据集的目录结构如下:
```
```bash
├── COCO2017
│ ├── images
│ ├── train2017
│ ├── val2017
── test2017
── annotations
── test2017
── annotations
│ ├── instances_train2017.json
│ └── instances_val2017.json
```
训练/验证集数据准备:
训练/验证集数据准备:训练/验证集都是采用的**COCO**的数据格式, 如果使用自己的标注数据, 请先将标注数据转换成**COCO**的格式, 并按照上面的目录结构进行存放。
训练/验证集都是采用的COCO的数据格式, 如果使用自己的标注数据, 请先将标注数据转换成COCO的格式, 并按照上面的目录结构进行存放。
本项目提供了`coco128`数据集可以进行功能验证使用,目录结构如下:
```bash
├── coco128
│ ├── train2017
│ └── annotations
│ └── train.json
```
## 训练
### 单机多卡
```
```bash
# --nproc_per_node 数据与显卡数量一致
# coco_path是训练数据集地址,数据是coco format
bash train.sh
```
## 推理
验证前需提前准备好预训练模型, 可从最下面的**参考资料**项目中提供的模型下载, 并将coco_path设置为当前环境中推理数据的对应地址, 数据应为COCO数据格式。
验证前需提前准备好预训练模型, 可从[参考资料](#参考资料)项目中提供的模型下载, 并将coco_path设置为当前环境中推理数据的对应地址, 数据应为COCO数据格式。
如果想要查看预测效果(预测结果输出到图片上), 请执行(其余参数如backbone等需与训练模型参数需一致, 详情请根据训练参数配置):
```
```bash
python test.py --pre_trained_model <checkpoint path> --coco_path <coco path>
```
#### 单卡推理
```
```bash
bash val.sh
```
## result
<div align=center>
<img src="./doc/000000001503.jpg"/>
<img src="./doc/results.jpg"/>
</div>
### 精度
在COCO2017的val数据集上进行R50 backbone的单卡测试, 结果如下表所示:
在COCO2017的val数据集上进行单卡测试, 结果如下表所示:
| device | backbone | schedule | epoch | box AP |
| :------: | :------: | :------: | :------: | :------: |
| Z100L | R50 | 500 | 5 | 39.8 |
| V100S | R50 | 500 | 5 | 39.9 |
| Z100L | R50 | 500 | 300 | 41.4 |
| V100 | R50 | 500 | 300 | 42 |
## 应用场景
### 算法类别
......
This diff is collapsed.
# Introduction
This directory contains software developed by Ultralytics LLC, and **is freely available for redistribution under the GPL-3.0 license**. For more information please visit https://www.ultralytics.com.
# Description
The https://github.com/ultralytics/COCO2YOLO repo contains code to convert JSON datasets into YOLO (darknet) format. The code works on Linux, MacOS and Windows.
# Requirements
Python 3.7 or later with the following `pip3 install -U -r requirements.txt` packages:
- `numpy`
- `tqdm`
# Citation
[![DOI](https://zenodo.org/badge/186122711.svg)](https://zenodo.org/badge/latestdoi/186122711)
# Contact
Issues should be raised directly in the repository. For additional questions or comments please email Glenn Jocher at glenn.jocher@ultralytics.com or visit us at https://contact.ultralytics.com.
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
45 0.479492 0.688771 0.955609 0.5955
45 0.736516 0.247188 0.498875 0.476417
50 0.637063 0.732938 0.494125 0.510583
45 0.339438 0.418896 0.678875 0.7815
49 0.646836 0.132552 0.118047 0.0969375
49 0.773148 0.129802 0.0907344 0.0972292
49 0.668297 0.226906 0.131281 0.146896
49 0.642859 0.0792187 0.148063 0.148062
23 0.770336 0.489695 0.335891 0.697559
23 0.185977 0.901608 0.206297 0.129554
58 0.519219 0.451121 0.39825 0.75729
75 0.501188 0.592138 0.26 0.456192
22 0.346211 0.493259 0.689422 0.892118
25 0.475759 0.414523 0.951518 0.672422
0 0.671279 0.617945 0.645759 0.726859
16 0.606687 0.341381 0.544156 0.51
17 0.597835 0.63755 0.342283 0.36886
17 0.324291 0.64808 0.219711 0.3164
0 0.620039 0.5939 0.172415 0.14608
0 0.385525 0.58557 0.14937 0.12586
0 0.328898 0.70199 0.0313386 0.06714
58 0.622546 0.89961 0.185932 0.09446
0 0.760577 0.69423 0.0285564 0.05486
0 0.510709 0.69215 0.0187927 0.04682
0 0.929554 0.67602 0.0388451 0.01844
0 0.445688 0.480615 0.075125 0.117295
0 0.640086 0.471742 0.0508281 0.0814344
20 0.643211 0.558852 0.129828 0.097623
20 0.459703 0.592121 0.22175 0.159242
0 0.435383 0.45832 0.0534531 0.111025
2 0.292792 0.729031 0.367417 0.246281
7 0.239438 0.599242 0.259542 0.0929219
11 0.279896 0.412773 0.077125 0.117453
74 0.394146 0.184914 0.321458 0.237984
2 0.752648 0.525833 0.0433594 0.033216
2 0.835727 0.538498 0.0380469 0.028169
2 0.700875 0.521455 0.0364375 0.0202347
2 0.937398 0.559777 0.0424219 0.0335915
6 0.452477 0.576408 0.755359 0.280892
2 0.794984 0.538779 0.0368125 0.0261502
2 0.953469 0.514906 0.026125 0.012723
7 0.539727 0.464061 0.0373281 0.0238967
7 0.58518 0.471397 0.0379844 0.0165962
2 0.982555 0.572371 0.0348906 0.0300469
2 0.767367 0.531279 0.0373906 0.0296948
2 0.617961 0.476373 0.0250156 0.0100704
2 0.588344 0.471491 0.0307812 0.0183333
2 0.560102 0.471303 0.0302344 0.0119953
2 0.796047 0.521796 0.0299687 0.0145775
2 0.734094 0.523427 0.029375 0.02723
23 0.658478 0.592133 0.677002 0.779766
23 0.391581 0.556305 0.546862 0.887391
3 0.497327 0.511852 0.948637 0.952609
3 0.240637 0.217617 0.475398 0.424859
16 0.32825 0.769577 0.463156 0.242207
1 0.128828 0.375258 0.249063 0.733333
0 0.476187 0.289613 0.0287813 0.138099
0 0.52143 0.258251 0.0211719 0.0608685
0 0.569492 0.285235 0.0245469 0.122254
0 0.746734 0.295869 0.0494687 0.0983568
0 0.444961 0.298779 0.0239531 0.110047
0 0.450773 0.271209 0.0182656 0.0569249
0 0.53553 0.308733 0.2069 0.317147
0 0.73609 0.272987 0.18926 0.259413
36 0.13364 0.88656 0.10108 0.06464
36 0.50059 0.413213 0.05466 0.07608
0 0.14666 0.667293 0.194 0.441093
0 0.59734 0.325733 0.0494 0.111253
36 0.73492 0.39656 0.04812 0.0401067
0 0.55563 0.265173 0.04586 0.220053
74 0.762851 0.196119 0.349886 0.385474
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment