lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
2.31k stars 258 forks source link

使用3090训练自己数据集时GPU利用率经常为0 #300

Open BigworldNebula opened 4 months ago

BigworldNebula commented 4 months ago

Star RTDETR 请先在RTDETR主页点击star以支持本项目 Star RTDETR to help more people discover this project.


Describe the bug 使用3090训练自己数据集时,GPU显存占用正常,但GPU利用率经常为0,隔很久才会有利用率, 而使用coco训练时,GPU显存占用正常,利用率一直有,正常;

使用COCO训练时配置文件: num_classes: 80 remap_mscoco_category: True

train_dataloader: dataset: img_folder: /data/datasets/coco/train2017/ ann_file: /data/datasets/coco/annotations/instances_train2017.json shuffle: True batch_size: 24 num_workers: 8 drop_last: False

val_dataloader: dataset: img_folder: /data/datasets/coco/val2017/ ann_file: /data/datasets/coco/annotations/instances_val2017.json shuffle: False batch_size: 24 num_workers: 8 drop_last: False

使用个人数据集训练的配置: num_classes: 3 remap_mscoco_category: False

train_dataloader: dataset: img_folder: /data/datasets/my_dataset/train2017/ ann_file: /data/datasets/my_dataset/annotations/instances_train2017.json shuffle: True batch_size: 24 num_workers: 8 drop_last: False

val_dataloader: dataset: img_folder: /data/datasets/my_dataset/val2017/ ann_file: /data/datasets/my_dataset/annotations/instances_val2017.json shuffle: False batch_size: 24 num_workers: 8 drop_last: False

To Reproduce 软件版本: torch 2.0.1+cu118 torchvision 0.15.2+cu118

训练都是使用3090单卡

lyuwenyu commented 4 months ago

自己啥数据 没遇到过你这种情况。建议用torch.profile分析下 是不是cpu数据处理太慢