-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows vs2019编译报错: #6
Comments
我是在MacOS + CLion + CMake 环境下开发的,正在做Linux的兼容,可以尝试下 Windows + CLion + CMake. 目前确实是还没有兼容好windows,谢谢提醒,会尽快做好 ~ 这块的模板类 其实可以改成 非模板实现,后期发现其实这个模板类不是必须的。 |
在MacOS下,你可以尝试: git clone --depth=1 https://github.aaakk.us.kg.cnpmjs.org/DefTruth/lite.ai.git
cd lite.ai
sh ./build.sh build directory exist! clearing ...
clear built files done ! & rebuilding ...
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
......
-- Detecting CXX compile features - done
==================================== Lite.AI 0.0.1 =============================
Project: Lite.AI
Version: 0.0.1
SO Version: 0.0.1
Build Type: MinSizeRel
Root Path: xxx/third_party/library/lite.ai
================================================================================
########## Setting up 3rd-party dependencies for: xxx/third_party/library/lite.ai ###########
Setting Up Custom Dependencies ...
....
Installing Lite.AI Headers for ONNXRuntime Backend ...
-- Installing: xxx/library/lite.ai/build/lite.ai/include/ort/core/ort_config.h
....
-- Installing: xxx/third_party/library/lite.ai/build/lite.ai/include/lite/lite.h
>>>> Added Shared Library: lite.ai !
>>>> Added Lite Executable: lite_age_googlenet !
...
>>>> Added Lite Executable: lite_yolox !
-- Configuring done
-- Generating done
-- Build files have been written to: xxx/third_party/library/lite.ai/build
[ 3%] Building CXX object CMakeFiles/lite.ai.dir/ort/cv/center_loss_face.cpp.o
[ 3%] Building CXX object CMakeFiles/lite.ai.dir/ort/cv/age_googlenet.cpp.o
[ 3%] Building CXX object CMakeFiles/lite.ai.dir/ort/cv/cava_combined_face.cpp.o
[ 3%] Building CXX object CMakeFiles/lite.ai.dir/ort/cv/cava_ghost_arcface.cpp.o
[ 3%] Building CXX object CMakeFiles/lite.ai.dir/ort/cv/colorizer.cpp.o
....
[ 34%] Linking CXX shared library lite.ai/lib/liblite.ai.dylib 测试yolov5 cd build/lite.ai/bin && ls -lh | grep lite
-rwxr-xr-x 1 root staff 344K Jul 24 10:53 liblite.ai.0.0.1.dylib
-rwxr-xr-x 1 root staff 344K Jul 24 10:53 liblite.ai.dylib
-rwxr-xr-x 1 root staff 75K Jul 24 10:53 lite_age_googlenet
-rwxr-xr-x 1 root staff 74K Jul 24 10:53 lite_cava_combined_face
...
-rwxr-xr-x 1 root staff 75K Jul 24 10:53 lite_yolov5
-rwxr-xr-x 1 root staff 75K Jul 24 10:53 lite_yolox bin git:(main) ✗ ./lite_yolov5
LITEORT_DEBUG LogId: ../../../hub/onnx/cv/yolov5s.onnx
=============== Input-Dims ==============
input_node_dims: 1
input_node_dims: 3
input_node_dims: 640
input_node_dims: 640
=============== Output-Dims ==============
Output: 0 Name: pred Dim: 0 :1
detected num_anchors: 25200
generate_bboxes num: 16
ONNXRuntime Version Detected Boxes Num: 3 |
经过更改,我已经可以在windows10上跑起来了,非常感谢。模型您可以都放出来吗?yolox_s.onnx,Tencent_CurricularFace_Backbone.onnx等,我想都试着跑一下。 |
你可以在这下载所有模型文件 lite.ai.hub.onnx.md |
同样的问题,个人是把代码里的BoundingBoxType直接改成了auto类型。win10上用vs2019配置一下opencv的环境,然后用nuget安装onnxruntime,再修改一下上面这个报错就能运行了,效果不错。另外修改成gpu推理后也能正常运行。 |
安排上了🙃,我之后优化下 ~ 方便发下修改后的BoundingBoxType代码 ? |
把ort_types.h里所有的"BoundingBoxType"的字样改成"auto"就行,非常暴力。 |
哦哦,原来github上< int >打不出来 |
赞👍🏻 ~ |
怎么gpu推理,我使用gpu的库,然后效果没提示,估计还是使用的cpu。就简单的替换onnxruntime的gpu库不行吧? |
大佬们遇到过这个问题么 |
虽然不是这个项目的代码,我的代码也是Linux上CMake可以编译运行,windows编译成功,运行就07b。 |
我这边已经好了,其实就是缺dll或者所在的dll路径没有配到环境变量. |
@maliangzhibi 可是我之前是报找不到dll,然后使用vcpkg之后好像会自动把dll复制到exe目录。在执行就是07b. 麻烦能否回想一下具体是哪个dll或者你之后是如何配置的呢? 感谢! |
我的是onnxruntime.dll,这个要么放到.exe同路径,或者把onnxruntime.dll所在路径配置到环境变量就好了. |
@maliangzhibi 你的意思是 CMake 中配置的 onnxruntime 是没有效果的么? |
对的,可能是我对cmake不太熟
发自 网易邮箱大师
…---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 日期 | 2021年09月14日 09:59 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.******@***.***> |
| 主题 | Re: [DefTruth/lite.ai] windows vs2019编译报错: (#6) |
@maliangzhibi 你的意思是 CMake 中配置的 onnxruntime 是没有效果的么?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
@maliangzhibi 好的,感谢! |
可以具体说下嘛,我就是用的 Windows + CLion + CMake,但是还是报错,cmakelist.txt都不给我过,还有一堆include问题55555 |
大佬你那个BoundingBoxType报错是怎么解决的??? |
core\ort_types.h(272,1): error C2440: “初始化”: 无法从“ortcv::types::BoundingBoxType<int,double>”转换为“ortcv::types::BoundingBoxType<int,float>”
The text was updated successfully, but these errors were encountered: