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

How to use other model? #18

Open
liu6381810 opened this issue Jun 30, 2017 · 3 comments
Open

How to use other model? #18

liu6381810 opened this issue Jun 30, 2017 · 3 comments

Comments

@liu6381810
Copy link

liu6381810 commented Jun 30, 2017

I have MobileNetInit.pb and MobileNetPredict.pb in the models directory, but when I build this project, I got the error
'try!' expression unexpectedly raised an error: Error Domain=Caffe2 Code=1 "File named "mobileNetPredict.pb" not found in main bundle"
So how to use my model other than YOLO and Squeezenet

@KleinYuan
Copy link
Owner

@liu6381810 Hey, when you drag those model in, make sure you check the target Membership include this app. Also, if it's build-in, you may wanna add this in here with same naming convention.

@liu6381810
Copy link
Author

liu6381810 commented Jul 3, 2017

@KleinYuan Thanks for your reply, I have drag my model in the target and build successfully. But when I add statement to the function classifier in staticDetectorVC.swift like this var caffe = try! Caffe2(initNetNamed: "squeezeNetInit", predictNetNamed: "squeezeNetPredict") it runs well, and if let result = caffe.prediction(regarding: resizedImage!) get desired result of dim 1000, but when I changed the squeezeNet to tinyYolo ,the result dim is very large, and all the value is non, and when I use my own model, it just get an error Thread 1: signal SIGABRT at _predictor = new caffe2::Predictor(_initNet, _predictNet); so how can I fix it? I would appreciate it if you can help me.

@KleinYuan
Copy link
Owner

KleinYuan commented Jul 3, 2017

@liu6381810 ok, I guess you mentioned multiple issues.

But to the point of Thread 1: signal SIGABRT, I believe it's because of the google protocol memory size limit.

I guess your own model is larger than 64MB right?

Check this

For the issue of Yolo Output Nan, it's related to this issue

So, so far in this repo, I only output whatever the results give. To actually build a Yolo on Caffe2 project, we need some wrapper like this to actually visualize the bounding box.

I will try to add this soon.

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