Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Loading a Caffe model in OpenCV.js

Hi there,

I am testing how to use the readNetFromCaffe() function to load the MobileNetSSD_deploy.prototxt and MobileNetSSD_deploy.caffemodel files. But the system keep complaining with this message:

Exception: OpenCV(4.1.1-pre) /build/master-contrib_docs-lin64/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "file.txt" in function 'ReadProtoFromTextFile'

Can anyone help ? Thanks.

Here are the lines I used to load the files:

let modelTxt='MobileNetSSD_deploy.prototxt';

let modelBin='MobileNetSSD_deploy.caffemodel';

utils.createFileFromUrl('file.txt', modelTxt, callback);

utils.createFileFromUrl('file.bin', modelBin, callback);

net=cv.readNetFromCaffe('file.txt', 'file.bin');

click to hide/show revision 2
None

updated 2019-07-17 03:55:01 -0600

berak gravatar image

Loading a Caffe model in OpenCV.js

Hi there,

I am testing how to use the readNetFromCaffe() function to load the MobileNetSSD_deploy.prototxt and MobileNetSSD_deploy.caffemodel files. But the system keep complaining with this message:

Exception: OpenCV(4.1.1-pre) /build/master-contrib_docs-lin64/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "file.txt" in function 'ReadProtoFromTextFile'

Can anyone help ? Thanks.

Here are the lines I used to load the files:

let modelTxt='MobileNetSSD_deploy.prototxt';

modelTxt='MobileNetSSD_deploy.prototxt'; let modelBin='MobileNetSSD_deploy.caffemodel';

let modelBin='MobileNetSSD_deploy.caffemodel';

utils.createFileFromUrl('file.txt', modelTxt, callback);

callback);

utils.createFileFromUrl('file.bin', modelBin, callback);

callback);

net=cv.readNetFromCaffe('file.txt', 'file.bin');

'file.bin');

Loading a Caffe model in OpenCV.js

Hi there,

I am testing how to use the readNetFromCaffe() function to load the MobileNetSSD_deploy.prototxt and MobileNetSSD_deploy.caffemodel files. But the system keep complaining with this message:

Exception: OpenCV(4.1.1-pre) /build/master-contrib_docs-lin64/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "file.txt" in function 'ReadProtoFromTextFile'

Can anyone help ? Thanks.

Here are the lines I used to load the files:

let modelTxt='MobileNetSSD_deploy.prototxt';

let modelBin='MobileNetSSD_deploy.caffemodel';

utils.createFileFromUrl('file.txt', modelTxt, callback);

utils.createFileFromUrl('file.bin', modelBin, callback);

net=cv.readNetFromCaffe('file.txt', 'file.bin');