Open lyuwenyu opened 1 year ago
请问有没有对比过INT8下的速度表现呢
请问有没有对比过INT8下的速度表现呢
已经在做了,( 如果用INT8 RT-DETR可能优势会更明显 ( 总的时间缩短 但是带后处理的模型 后处理时间是稳定的
不能eval,只能训练
(pytorch) C:\Users\lenovo\Desktop\study\PaddleDetection-develop\PaddleDetection-develop>python -u tools/eval.py -c configs/rtdetr/rtdetr_r50vd_6x_coco.yml -o weights=output/rtdetr_r50vd_6x_coco/8.pdparams
Warning: Unable to use JDE/FairMOT/ByteTrack, please install lap, for example: pip install lap
, see https://github.com/gatagat/lap
Warning: import ppdet from source directory without installing, run 'python setup.py install' to install ppdet firstly
W0421 15:32:24.823109 15072 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.5, Runtime API Version: 11.2
W0421 15:32:24.826112 15072 gpu_resources.cc:91] device: 0, cuDNN Version: 8.3.
loading annotations into memory...
Done (t=0.03s)
creating index...
index created!
[04/21 15:32:26] ppdet.data.source.coco INFO: Load [600 samples valid, 0 samples invalid] in file dataset/coco\annotations/instances_train2017.json.
[04/21 15:32:27] ppdet.utils.checkpoint INFO: Finish loading model weights: output/rtdetr_r50vd_6x_coco/8.pdparams
Traceback (most recent call last):
File "tools/eval.py", line 208, in
训练的自己的数据吧, 应该是val.json里的类别不全, category_id = label_to_cat_id_map[int(num_id)]
换成category_id = int(num_id)
试一下,,或者参考这个issue https://github.com/PaddlePaddle/PaddleDetection/issues/4777
请问如何对转出的onnx和trt进行推理呢 谢谢
看代码发现HybridEncoder里连MSDeformableAttention都去掉了?好厉害。
请问如何对转出的onnx和trt进行推理呢 谢谢
在readme里有 具体操作的步骤
请问 File "D:\Code\LJJ\rtdetr\PaddleDetection\ppdet\core\workspace.py", line 229, in create raise ValueError("The module {} is not registered".format(name)) ValueError: The module RTDETRTransformer is not registered 这是什么原因呢?
预训练模型的下载路径,文档的描述和配置文件里的默认值不一致。 hgnet_v2用2个预训练模型都提示不匹配;提示信息in model is not matched with pretrained weights, and its will be trained from scratch r50vd可以进入训练,在log出第1个iter信息后卡死。 机器是windows环境,rtx3090GPU
PP-YOLOE+_l 的 mAP 是 52点多,yolov5_l是67.3,论文的图中为什么mAP那么低?
请问 File "D:\Code\LJJ\rtdetr\PaddleDetection\ppdet\core\workspace.py", line 229, in create raise ValueError("The module {} is not registered".format(name)) ValueError: The module RTDETRTransformer is not registered 这是什么原因呢?
pull最新的代码试一下, 我们这边测试没有出现你说的这个情况
请问有添加到FastDeploy的计划么?
PP-YOLOE+_l 的 mAP 是 52点多,yolov5_l是67.3,论文的图中为什么mAP那么低?
看看论文,你看窜列了,你看的是红色这一列
好的
请问有添加到FastDeploy的计划么?
已经在做了 @hhxdestiny
能给一个怎么使用onnx模型的演示代码吗?
直接用官方教程,会报错
❯ python tools/infer.py -c configs/rtdetr/rtdetr_r101vd_6x_coco.yml \
-o weights=/root/art/paddle/model/rtdetr_r101vd_6x_coco.pdparams \
--infer_img=/root/art/paddle/test/1.jpg
[04/25 16:34:22] ppdet.utils.checkpoint INFO: Finish loading model weights: /root/art/paddle/model/rtdetr_r101vd_6x_coco.pdparams
[04/25 16:34:22] ppdet.data.source.category WARNING: anno_file 'dataset/coco/annotations/instances_val2017.json' is None or not set or not exist, please recheck TrainDataset/EvalDataset/Test
Dataset.anno_path, otherwise the default categories will be used by metric_type.
[04/25 16:34:22] ppdet.data.source.category WARNING: metric_type: COCO, load default categories of COCO.
0%| | 0/1 [00:00<?, ?it/s]
[04/25 16:34:22] reader WARNING: fail to map sample transform [Decode_13aee1] with error: 'bytes' object has no attribute 'shape' and stack:
Traceback (most recent call last):
File "/root/art/paddle/PaddleDetection/ppdet/data/reader.py", line 59, in __call__
data = f(data)
File "/root/art/paddle/PaddleDetection/ppdet/data/transform/operators.py", line 105, in __call__
sample = self.apply(sample, context)
File "/root/art/paddle/PaddleDetection/ppdet/data/transform/operators.py", line 138, in apply
sample['h'] = im.shape[0]
AttributeError: 'bytes' object has no attribute 'shape'
Exception in thread Thread-1 (_thread_loop):
Traceback (most recent call last):
File "/root/.local/share/rtx/installs/python/3.10.11/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/root/.local/share/rtx/installs/python/3.10.11/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/root/art/paddle/.direnv/python-3.10.11/lib/python3.10/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 247, in _thread_loop
batch = self._dataset_fetcher.fetch(
File "/root/art/paddle/.direnv/python-3.10.11/lib/python3.10/site-packages/paddle/fluid/dataloader/fetcher.py", line 127, in fetch
data.append(self.dataset[idx])
File "/root/art/paddle/PaddleDetection/ppdet/data/source/dataset.py", line 102, in __getitem__
return self.transform(roidb)
File "/root/art/paddle/PaddleDetection/ppdet/data/reader.py", line 65, in __call__
raise e
File "/root/art/paddle/PaddleDetection/ppdet/data/reader.py", line 59, in __call__
data = f(data)
File "/root/art/paddle/PaddleDetection/ppdet/data/transform/operators.py", line 105, in __call__
sample = self.apply(sample, context)
File "/root/art/paddle/PaddleDetection/ppdet/data/transform/operators.py", line 138, in apply
sample['h'] = im.shape[0]
AttributeError: 'bytes' object has no attribute 'shape'
用官方的 rtdetr_r101vd_6x_coco.onnx 和 这篇文章中的代码 https://zhuanlan.zhihu.com/p/622940435
运行还是报错
Traceback (most recent call last):
File "/Users/z/git/paddle/./test.py", line 48, in
output = session.run(None, {'image': img})
File "/Users/z/.local/share/rtx/installs/python/3.10.11/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 196, in run
raise ValueError("Model requires {} inputs. Input Feed contains {}".format(num_required_inputs, num_inputs))
ValueError: Model requires 3 inputs. Input Feed contains 1
改成 https://zhuanlan.zhihu.com/p/622940435 中的的模型才能运行
我可以正常eval,但在训练中遇到这样一个问题,rtx2080 8g
/home/sc/.local/lib/python3.7/site-packages/matplotlib-3.4.0rc1-py3.7-linux-x86_64.egg/matplotlib/init.py:152: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(module.version) < minver:
/home/sc/development/anaconda3/envs/rtdetr/lib/python3.7/site-packages/setuptools/_distutils/version.py:346: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
other = LooseVersion(other)
Warning: Unable to use JDE/FairMOT/ByteTrack, please install lap, for example: pip install lap
, see https://github.com/gatagat/lap
Warning: Unable to use numba in PP-Tracking, please install numba, for example(python3.7): pip install numba==0.56.4
Warning: Unable to use numba in PP-Tracking, please install numba, for example(python3.7): pip install numba==0.56.4
Warning: Unable to use MOT metric, please install motmetrics, for example: pip install motmetrics
, see https://github.com/longcw/py-motmetrics
Warning: Unable to use MCMOT metric, please install motmetrics, for example: pip install motmetrics
, see https://github.com/longcw/py-motmetrics
Warning: import ppdet from source directory without installing, run 'python setup.py install' to install ppdet firstly
loading annotations into memory...
Done (t=9.65s)
creating index...
index created!
[04/25 14:31:57] ppdet.data.source.coco WARNING: Found an invalid bbox in annotations: im_id: 200365, area: 0.0 x1: 296.65, y1: 388.33, x2: 297.67999999999995, y2: 388.33.
[04/25 14:32:08] ppdet.data.source.coco WARNING: Found an invalid bbox in annotations: im_id: 550395, area: 0.0 x1: 9.98, y1: 188.56, x2: 15.52, y2: 188.56.
[04/25 14:32:09] ppdet.data.source.coco INFO: Load [117266 samples valid, 1021 samples invalid] in file /media/sc/mSc/wkp/2017/annotations/instances_train2017.json.
W0425 14:32:10.895720 2548 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.4, Runtime API Version: 10.2
W0425 14:32:10.896754 2548 gpu_resources.cc:91] device: 0, cuDNN Version: 8.7.
[04/25 14:32:13] ppdet.utils.checkpoint INFO: ['fc.bias', 'fc.weight', 'last_conv.weight'] in pretrained weight is not used in the model, and its will not be loaded
[04/25 14:32:13] ppdet.utils.checkpoint INFO: Finish loading model weights: /home/sc/.cache/paddle/weights/PPHGNetV2_X_ssld_pretrained.pdparams
0 paddle::pybind::ThrowExceptionToPython(std::__exception_ptr::exception_ptr)
FatalError: Process abort signal
is detected by the operating system.
[TimeInfo: Aborted at 1682404354 (unix time) try "date -d @1682404354" if you are using GNU date ]
[SignalInfo: SIGABRT (@0x3e8000009f4) received by PID 2548 (TID 0x7f57b424f740) from PID 2548 ]
/home/sc/code/rt-dert/train.sh: 行 2: 2548 已放弃 python PaddleDetection-develop/tools/train.py -c PaddleDetection-develop/confrtdetr/rtdetr_hgnetv2_x_6x_coco.yml --eval
请问有没有对比过INT8下的速度表现呢
已经在做了,( 如果用INT8 RT-DETR可能优势会更明显 ( 总的时间缩短 但是带后处理的模型 后处理时间是稳定的
您好,反馈一个我们某家国产芯片编译器出现的情况。麻烦大佬也能综合一下,考虑下我们部署环境的局限性,十分感谢。 出现了部分算子不支持的情况:Shape、Cast、Where、range、Topk、Tile、GatherND、GridSample、Mod,还有Slice算子,目前编译器仅支持通道维度上的切分。
您好, 有计划发布pytorch版本吗
隔壁 ultralytics 已经在做 pytorch 版本了
用RTDETR进行SAHI切图拼图评估时报错
项目“RTDETR+SAHI切图”共享链接(有效期三天):https://aistudio.baidu.com/studio/project/partial/verify/6092017/b32e0f8533b2482aa1675a99aa50aeec
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/init.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/rcsetup.py:20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Iterable, Mapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/colors.py:53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Sized
W0505 10:40:56.459722 895 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 11.2
W0505 10:40:56.464571 895 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2.
loading annotations into memory...
Done (t=0.40s)
creating index...
index created!
[05/05 10:41:09] ppdet.data.source.coco INFO: 548 samples and slice to 2842 sub_samples in file /home/aistudio/MyDataset/val.json
[05/05 10:41:11] ppdet.utils.checkpoint INFO: Finish loading model weights: output/rtdetr_r101vd_6x_coco/best_model.pdparams
Traceback (most recent call last):
File "tools/eval.py", line 208, in
请问有没有对比过INT8下的速度表现呢
已经在做了,( 如果用INT8 RT-DETR可能优势会更明显 ( 总的时间缩短 但是带后处理的模型 后处理时间是稳定的
大佬,能否考虑尽可能的全量化,而不是根据敏感度分析,做部分量化。谢谢谢谢
什么时候可以支持fastdeploy呢?
我的输入数据是两张灰度图像,请问官方有相应的加载方法吗?或者有提供解决思路吗?
什么时候可以支持fastdeploy呢?
现在就已经支持的
我的输入数据是两张灰度图像,请问官方有相应的加载方法吗?或者有提供解决思路吗?
在backbone那个位置 把输入的channel 3改成 1
请问有没有对比过INT8下的速度表现呢
已经在做了,( 如果用INT8 RT-DETR可能优势会更明显 ( 总的时间缩短 但是带后处理的模型 后处理时间是稳定的
大佬,能否考虑尽可能的全量化,而不是根据敏感度分析,做部分量化。谢谢谢谢
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/deploy/auto_compression/configs
大佬,rt-detr结合swin或者convnext的话相比dino有优势吗?如果有的话可以我可以尝试结合一下
怎么调整模型的保存间隔。默认是每次训练完都会保存一次。
使用--slice_infer时出现KeyError: 'st_pix',报错信息如下:
Traceback (most recent call last): File "tools/eval.py", line 209, in <module> main() File "tools/eval.py", line 205, in main run(FLAGS, cfg) File "tools/eval.py", line 158, in run match_metric=FLAGS.match_metric) File "/personal/cuichaoqi/bisai/PaddleDetection/ppdet/engine/trainer.py", line 764, in evaluate_slice match_metric) File "/personal/cuichaoqi/bisai/PaddleDetection/ppdet/engine/trainer.py", line 707, in _eval_with_loader_slice shift_amount = data['st_pix'] KeyError: 'st_pix'
请问如何对转出的onnx和trt进行推理呢 谢谢
在readme里有 具体操作的步骤
@lyuwenyu 你好大佬,我在模型转onnx的时候强需求opset_version为11,修改之后paddle2onnx有如下信息
[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: ./output_inference/rtdetr_r101vd_6x_coco/model.pdmodel
[Paddle2ONNX] Paramters file path: ./output_inference/rtdetr_r101vd_6x_coco/model.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[Paddle2ONNX] [grid_sampler: grid_sample_0.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_1.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_2.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_3.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_4.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_5.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_6.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_7.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_8.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_9.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_10.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_11.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_12.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_13.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_14.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_15.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_16.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] [grid_sampler: grid_sample_17.tmp_0] Requires the minimal opset version of 16.
[Paddle2ONNX] Due to the operator: grid_sampler, requires opset_version >= 16.
[Paddle2ONNX] Opset version will change to 16 from 11
[Paddle2ONNX] Use opset_version = 16 for ONNX export.
[Paddle2ONNX] PaddlePaddle model is exported as ONNX format now.
我可以如何绕过这个算子从而生成opset_version为11的模型?
@lyuwenyu develop版的deploy/auto_compression/configs/rtdetr_reader.yml文件的TrainDataset的COCODataSet设置重复了
AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16,使用rtdetr_focalnet_L_384_3x_coco会报上述错误
AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16,使用rtdetr_focalnet_L_384_3x_coco会报上述错误 我也出现相同的错误。 AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16
1 datareader的TrainDataset未改; 2 量化训练还是无涨点,达不到官网的精度。上次测试也是这样 叨扰!
TypeError: build_2d_sincos_position_embedding() takes from 2 to 4 positional arguments but 5 were given 请问为什么会出现这个问题呢?
请问一下,论文中说可以灵活使用不同的解码层而不需要重新训练,这个是怎么去实现/操作呢
请问一下,论文中说可以灵活使用不同的解码层而不需要重新训练,这个是怎么去实现/操作呢
@whale1008 我的看法是,因为训练的时候解码器的每一层都是在干同样的事情:输入box和feat,输出delta box,也就是对box进行refine。而且每一层的loss权重还是一样的,也就是说每一层的‘重要性’都一样。所以在推理时,可以使用全部的6层,也可以使用其中几层,甚至能只用第一层重复推理6次。
好的,感谢,推理时需要修改哪些配置参数呢
训练rtdetr_focalnet_L_384_3x_coco报错: AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16
想问下论文里面的CSF和CCFM有什么区别呀
佬,现在有pytorch版本的RT-DETR代码发布了么,我找了圈没找到
我倒是从网上搜到了一个rtdetr pytorch版本 但是还没咋看 应该不是官方发布的版本
@.*** | |
---|---|
@.*** |
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年08月19日 15:36 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [PaddlePaddle/PaddleDetection] RT-DETR官方代码已发布 (Issue #8114) |
佬,现在有pytorch版本的RT-DETR代码发布了么,我找了圈没找到
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
感谢回复,虽然好像看不清佬你邮件给我得信息,不过我重新找了找,找到了RT-DETR/models/rtdetr_l.py at main · Jinhui-Luan/RT-DETR (github.com);Jinhui-Luan 大佬的pytorch复现版本,准备细看
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleDetection" @.>; 发送时间: 2023年8月19日(星期六) 下午3:38 @.>; @.**@.>; 主题: Re: [PaddlePaddle/PaddleDetection] RT-DETR官方代码已发布 (Issue #8114)
我倒是从网上搜到了一个rtdetr pytorch版本 但是还没咋看 应该不是官方发布的版本
@.*** | |
---|---|
@.*** |
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年08月19日 15:36 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [PaddlePaddle/PaddleDetection] RT-DETR官方代码已发布 (Issue #8114) |
佬,现在有pytorch版本的RT-DETR代码发布了么,我找了圈没找到
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16,使用rtdetr_focalnet_L_384_3x_coco会报上述错误 我也出现相同的错误。 AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16
一样的错误,坐等修复
AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16,使用rtdetr_focalnet_L_384_3x_coco会报上述错误 我也出现相同的错误。 AssertionError: Variable dtype not match, Variable [ conv2d_0.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.float16
一样的错误,坐等修复
等大佬修復,謝謝。
实测精度太差了,训练自己的数据收敛都是个问题
Halo,RT-DETR有更佳性能的主干权重么?RT-DETR有蒸馏之类的计划么?
RT-DETR-X我看性能是最好的,backbone是hgnetv2,但是我之前修改模型结构,发现resnet101和hgnetv2基本差不多,可能hgnetv2会好一点,蒸馏之类的计划不太了解。
---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2023年11月30日 20:59 | | 收件人 | @.> | | 抄送人 | @.> , @.> | | 主题 | Re: [PaddlePaddle/PaddleDetection] RT-DETR官方代码已发布 (Issue #8114) |
Halo,RT-DETR有更佳性能的主干权重么?RT-DETR有蒸馏之类的计划么?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
论文: DETRs Beat YOLOs on Real-time Object Detection 代码:
简介
RT-DETR是第一个实时端到端目标检测器。具体而言,我们设计了一个高效的混合编码器,通过解耦尺度内交互和跨尺度融合来高效处理多尺度特征,并提出了IoU感知的查询选择机制,以优化解码器查询的初始化。此外,RT-DETR支持通过使用不同的解码器层来灵活调整推理速度,而不需要重新训练,这有助于实时目标检测器的实际应用。RT-DETR-L在COCO val2017上实现了53.0%的AP,在T4 GPU上实现了114FPS,RT-DETR-X实现了54.8%的AP和74FPS,在速度和精度方面都优于相同规模的所有YOLO检测器。RT-DETR-R50实现了53.1%的AP和108FPS,RT-DETR-R101实现了54.3%的AP和74FPS,在精度上超过了全部使用相同骨干网络的DETR检测器。 若要了解更多细节,请参考我们的论文paper.