Ask Your Question
0

Reading from ProtoFile - openpose COCO model example

asked 2018-11-01 07:54:04 -0600

infinityplusb gravatar image

I am trying to run the openpose example https://github.com/opencv/opencv/blob... using the COCO model.

However when I compile and run (my executable is "kpd" for "Key Point Detection", I get the following error about the file being open

kpd -i /home/brian/Pictures/MyPic/IMG20180801205312.jpg -m pose_iter_440000.caffemodel -p pose_deploy_linevec.prototxt

OpenCV(3.4.1) Error: Unspecified error (FAILED: fs.is_open(). Can't open "true") in ReadProtoFromTextFile, file /home/brian/Progams/opencv/modules/dnn/src/caffe/caffe_io.cpp, line 1119 terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.1) /home/brian/Progams/opencv/modules/dnn/src/caffe/caffe_io.cpp:1119: error: (-2) FAILED: fs.is_open(). Can't open "true" in function ReadProtoFromTextFile

Aborted (core dumped)

It doesn't appear to matter when the prototxt file is in the same folder or not, or whether I use absolute paths or not. I've also tried different models to no avail.

It's probably something simple, but I'm just getting started, so a bit green at OpenCV.

Thanks in Advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-11-01 08:10:25 -0600

berak gravatar image

if it is the same code from the dnn/samples folder (under another name ?), then it's indeed simple:

opencv's CommandLineParser expects arguments in --key=value fashion, you're missing the = ;)

in your case, it should be:

kpd -i=/home/brian/Pictures/MyPic/IMG20180801205312.jpg -m=pose_iter_440000.caffemodel -p=pose_deploy_linevec.prototxt
edit flag offensive delete link more

Comments

1

sigh ... as I said, something simple. Thanks, don't know how I missed that.

infinityplusb gravatar imageinfinityplusb ( 2018-11-01 08:54:48 -0600 )edit

don't worry, you're not the 1st person being bitten by that ;)

berak gravatar imageberak ( 2018-11-01 08:56:43 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-01 07:54:04 -0600

Seen: 608 times

Last updated: Nov 01 '18