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

where is the model? #15

Open
dolphinqjyabcd opened this issue May 16, 2023 · 6 comments
Open

where is the model? #15

dolphinqjyabcd opened this issue May 16, 2023 · 6 comments

Comments

@dolphinqjyabcd
Copy link

No description provided.

@dolphinqjyabcd
Copy link
Author

std::string encoder_model_path = "E:\\OroChiLab\\segment-anything-main\\models\\raw\\sam_preprocess.onnx";
decoder_model_path = "E:/OroChiLab/segment-anything-main/model_weights/sam_vit_b_singlemask.onnx";
decoder_model_path = "E:/OroChiLab/segment-anything-main/model_weights/withEncoder/vit_b/decoder.onnx";

How to get three models?

@OroChippw
Copy link
Owner

OroChippw commented May 17, 2023

std::string encoder_model_path = "E:\\OroChiLab\\segment-anything-main\\models\\raw\\sam_preprocess.onnx";
decoder_model_path = "E:/OroChiLab/segment-anything-main/model_weights/sam_vit_b_singlemask.onnx";
decoder_model_path = "E:/OroChiLab/segment-anything-main/model_weights/withEncoder/vit_b/decoder.onnx";

How to get three models?

I will update the README.md tomorrow ,if you want to build sam_preprocess.onnx .you can look this file https://github.com/OroChippw/segment-anything/blob/master/export_pre_model.py
Thank you for your attention and questions😁

@dolphinqjyabcd
Copy link
Author

Thank you for your reply.
And I can't find SAM. h yet.
#include "../SAMWrapper/SAM.h" in sam.cpp

@OroChippw
Copy link
Owner

Thank you for your reply. And I can't find SAM. h yet. #include "../SAMWrapper/SAM.h" in sam.cpp

You can directly look at these three files ,copy it to rebuild,SAMOnnxRunner.cpp 、 SAMOnnxRunner.h 、main.cpp
the file sam.cpp is useless , i will delete it later . I am very glad that you can help me point out the problem
Thanks again😃

@knightwinWorldsfinal
Copy link

博主你好,你的代码对我帮助很大!我在Vs上跑通了你的代码,我有两个问题
1.演示时左键是选取兴趣区域,右键起到什么作用呢,源码中的区别好像是positive
2.SAM演示过程中能否选取框,该如何操作。

@OroChippw
Copy link
Owner

博主你好,你的代码对我帮助很大!我在Vs上跑通了你的代码,我有两个问题 1.演示时左键是选取兴趣区域,右键起到什么作用呢,源码中的区别好像是positive 2.SAM演示过程中能否选取框,该如何操作。

1、准确来说 左键是给予模型positive的正向点,告诉模型这是感兴趣区域,而右键则是继续一个negative的消极点,告诉模型所点击的区域不包含目标物体,目前代码里面只实现了单步的操作 所以只有positive
2、目前代码只是一个调用示范,对于选取框目前只支持代码里面更改,后续会添加进演示中
3、才学习了C++一个月不是很熟悉规范的代码结构,后续会持续进行改进,感谢您的关注希望你能提供更宝贵的建议,谢谢~😀

@OroChippw OroChippw reopened this Nov 15, 2023
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

3 participants