Ask Your Question

fabito's profile - activity

2019-12-23 18:34:00 -0600 received badge  Popular Question (source)
2017-12-19 04:36:18 -0600 commented question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

Hi @dkurt, the good news is that I removed the assertion and it worked!! The bad news is that the net.forward is VERY sl

2017-12-18 18:47:26 -0600 commented question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

Hi @dkurt, the good news is that I removed the assertion and it worked!! The bad news is that the net.forward is too slo

2017-12-18 18:43:10 -0600 commented question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

Hi @dkurt, the good news is that I removed the assertion and it worked!! The bad news is that the net.forward is too slo

2017-12-18 09:14:12 -0600 received badge  Organizer (source)
2017-12-18 09:13:37 -0600 received badge  Editor (source)
2017-12-18 09:13:37 -0600 edited question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

Error running inference on Single Shot Scale-invariant Face Detector pre trained model Hi, I'm trying to use the pre tr

2017-12-18 08:58:09 -0600 received badge  Student (source)
2017-12-18 08:55:56 -0600 asked a question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

Error running inference on Single Shot Scale-invariant Face Detector pre trained model Hi, I'm trying to use the pre tr

2017-12-01 10:43:23 -0600 received badge  Enthusiast
2017-11-21 06:02:46 -0600 commented answer How to use mean.binaryproto with blobFromImage(s) ?

@dkurt, do you know if this BlobProto protobuf class is available in OpenCV ? Just wondering if we could load and proce

2017-11-21 04:51:44 -0600 commented answer How to use mean.binaryproto with blobFromImage(s) ?

@dkurt, do you know if this BlobProto protobuf class is available in OpenCV ? Just wondering if we could load and proce

2017-11-21 04:46:42 -0600 received badge  Supporter (source)
2017-11-21 04:46:40 -0600 marked best answer How to use mean.binaryproto with blobFromImage(s) ?

I’m using dnn::readNetFromCaffe to load this model published in the caffe model zoo:

https://github.com/BVLC/caffe/wiki/Mo...

Apart from the standard .prototxt and .caffemodel files, a third file is provided: mean.binaryproto.

I know I should use it to perform the mean subtraction. But I couldn't figure out whether its a cv::subtract I should apply before invoking blobFromImage or is it something I'd use to somehow infer the mean and scalefactor parameters.

Mat mean = readMeanFromBinary(); // How to read a binaryproto into a Mat ?
Mat img = imread(imgFile);
// How to use mean ?
Mat inputBlob = blobFromImage(img, 1.0f, Size(227, 227), Scalar(), false);
net.setInput(inputBlob, "data");
Mat prob = age.forward("prob");

So I have basically two questions:

  • How to read the mean.binaryproto file into a Mat ?
  • Once I have the mean, can I use it with blobFromImage ?

thanks Fábio

2017-11-21 04:46:40 -0600 received badge  Scholar (source)
2017-11-18 21:04:07 -0600 asked a question How to use mean.binaryproto with blobFromImage(s) ?

How to use mean.binaryproto with blobFromImage(s) ? I’m using dnn::readNetFromCaffe to load this model published in the