laugh12321 / TensorRT-YOLO

🚀 TensorRT-YOLO: Supports YOLOv3, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOv9, YOLOv10, and PP-YOLOE using TensorRT acceleration with EfficientNMS, CUDA Kernels and CUDA Graphs!
https://github.com/laugh12321/TensorRT-YOLO
GNU General Public License v3.0
383 stars 50 forks source link

[Help]: 为什么我的.cu无法引入memory头文件,但是detect.hpp却可以 #18

Closed ChasePlan closed 2 months ago

laugh12321 commented 3 months ago

编译报错了?还是提示标红,编译能过就行。 是用的xmake编译的吗?

ChasePlan commented 3 months ago

啊?我用的cmake,camke不能用吗?请问我可不可以把.cu封装成dll?不太懂这些,打扰多包涵

laugh12321 commented 3 months ago

𝐂𝐦𝐚𝐤𝐞可以,但是我这边没尝试过。有条件的话可以建议用𝐱𝐦𝐚𝐤𝐞编译试试,最起码不会出错。 是可以打包成𝐝𝐥𝐥的这边测试过了。

ChasePlan commented 3 months ago

𝐂𝐦𝐚𝐤𝐞可以,但是我这边没尝试过。有条件的话可以建议用𝐱𝐦𝐚𝐤𝐞编译试试,最起码不会出错。 是可以打包成𝐝𝐥𝐥的这边测试过了。

我试着用cmake将工程打包成dll,虽然最后成功生成,但是似乎没有作用,可以简要说一下构建dll的流程吗?或者说我应该用搜索什么关键字去获取相关的教程?

laugh12321 commented 3 months ago

cmake 不是很熟,没法帮到你。最近会提交一个xmake构建动态库的配置文件。

fungtion commented 2 months ago

@laugh12321 使用xmake编译的时候出错

image

laugh12321 commented 2 months ago

xmake.lua没有改动吗?这个是 Lua 脚本的报错。

参考 https://github.com/xmake-io/xmake/issues/4892

fungtion commented 2 months ago

lua没有改动,我更新一下xmake看看

fungtion commented 2 months ago

@laugh12321 我是在linux上运行的,xmake.lua中的路径都改成了我安装的路径,xmake升级之后就可以正常编译了。在执行过程中,又报错

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.9.0) /home/xxx/.xmake/cache/packages/2404/o/opencv/4.9.0/source/modules/core/src/arithm.cpp:647: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arr
ays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'arithm_op'

我导出的模型batch size=300,这个错误是不是因为有一些batch的size不同导致的?

laugh12321 commented 2 months ago

@fungtion 你试试把batch_size先给小一点比如8,然后看看正常不。

fungtion commented 2 months ago

还是会出现这个错误,在执行多个batch之后,可能是我数据问题

laugh12321 commented 2 months ago

是最新的代码吗,不是的话你更新下。还是不行我这边测试一下。你给我些数据和模型,发我邮箱。

fungtion commented 2 months ago

之前用python测试的时候,opencv就会因为图像的格式问题抛出一些exception,我想可能是由于同样的问题导致的

fungtion commented 2 months ago

@laugh12321 问题已解决,是我的数据问题

laugh12321 commented 2 months ago

好的