Ask Your Question
0

Can't run sample dnn program [closed]

asked 2016-12-09 23:45:17 -0500

kevgeo gravatar image

I am using Opencv 3.1.0 on ubuntu 14.04. I have successfully built Opencv and wanted to try reading a caffe model and classifying.

I used the program and models from this tutorial

I am able to compile the program but running it gives me the error below-

OpenCV Error: Unspecified error (FAILED: fs.is_open(). Can't open "bvlc_googlenet.prototxt") iReadProtoFromTextFile, file /home/kevmepls/opt/opencv_contrib/modules/dnn/src/caffe/caffe_io.cpp, line 1077
Can't load network by using the following files: 
prototxt:   bvlc_googlenet.prototxt
caffemodel: bvlc_googlenet.caffemodel
bvlc_googlenet.caffemodel can be downloaded here:
http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel

I don't understand why it can't read the models?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2016-12-12 00:55:37.557004

Comments

hmm, a simple ifstream failed to open . not much magic here. it'sprobably about the path, can you try to put all files & your binary into te same folder ?

berak gravatar imageberak ( 2016-12-10 01:30:02 -0500 )edit

Hi break, I actually put all the models and image in the same folder with the program and still the error comes.

kevgeo gravatar imagekevgeo ( 2016-12-10 02:04:43 -0500 )edit

shame, again. that would have been too easy... (out of ideas, now)

berak gravatar imageberak ( 2016-12-10 02:07:34 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-12-11 23:40:05 -0500

kevgeo gravatar image

Sorry guys, it was a silly mistake. There was a space in the beginning of the caffemodel file name, so it couldn't read it. Later I got another error about failing to parse NetParameter file, so I had to download the caffemodel again and it got solved.

Now I have another error, so I will spend some time to see if there is a similar error online, or else I will put it as a separate issue.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-09 23:45:17 -0500

Seen: 1,026 times

Last updated: Dec 09 '16