Skip to content
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

关于运行报错 #10

Open
ygt7r21999 opened this issue Jun 10, 2024 · 5 comments
Open

关于运行报错 #10

ygt7r21999 opened this issue Jun 10, 2024 · 5 comments

Comments

@ygt7r21999
Copy link

大佬您好,根据您的指导,我结合自己的PC配置了OpenCV4.9.0和onnxruntime-win-gpu-x64-1.7.0。
因此我将CMakeList.txt的内容做了如下改动:

Find OpenCV

set(OpenCV_INCLUDE_DIRS "D:/OpenCV490/opencv/build/include")
set(OpenCV_LIBS "D:/OpenCV490/opencv/build/x64/vc16/lib/opencv_world490d.lib") # Debug 版本

Find ONNX Runtime

set(ONNXRUNTIME_INCLUDE_DIRS "D:/onnxruntime-win-gpu-x64-1.7.0/include")
set(ONNXRUNTIME_LIBRARIES "D:/onnxruntime-win-gpu-x64-1.7.0/lib/onnxruntime.lib")

后来我用CMake为该项目生成解决方案:
1、cd到github压缩包解压后程序文件夹下
2、按以下顺序操作:
mkdir build //创建build文件夹
cd build cmake .. //执行build
3、我在build文件夹下找到.sln文件并在VS Studio2019中打开
4、运行sam.cpp,结果报错:
报错2

请大佬有时间的话帮忙分析一下我这边存在什么问题,我之前在网上尝试了很多相关问题的解法都没有头绪。
我自己目前倾向于CMake过程出了问题,可能是我下载并运行开源C++项目的经验还不够,求大佬指点,谢谢!

@AIDajiangtang
Copy link
Owner

根据CMakeList.txt,cppDemo是exe,应该启动这个exe,项目配置成Debug x64

@ygt7r21999
Copy link
Author

ygt7r21999 commented Jun 11, 2024 via email

@ygt7r21999
Copy link
Author

大佬你好,我按照你的要求将cppDemo设置为启动项目,配置为Debug-x64。
但是仍然报错:
报错-11_25-0611
我看了一下源文件cppDemo.cpp,发现它调用了SimpleTokenizer,于是我找到SimpleTokenizer.cpp,发现里面有一个文件我没有:
报错-0611
根据源码第29行提示,我并没有以下文件D:\bpe_simple_vocab_16e6.txt,这个大佬可以提供一下吗?谢谢!

@AIDajiangtang
Copy link
Owner

https://github.com/AIDajiangtang/Segment-Anything-CPP/blob/main/bpe_simple_vocab_16e6.txt
但是我这个项目中CLIP 文本编码部分有问题,貌似是字符编码相关问题,还没有解决,暂时可以用点和框提示

@ygt7r21999
Copy link
Author

ygt7r21999 commented Jun 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants