Category : caffe

I’m using caffe with c++. I have this line to predict the output: const std::vector< caffe::Blob<float>* > output = network_->Forward(inputs,&loss); I have already an array of all outputs of this network. It’s possible to create a caffe::Blob<float> with my data? Example: const std::vector< caffe::Blob<float>* > output = new caffe::Blob<float>([0,0])//example output[0].setData(MYDATA) // just an example, this ..

Read more

I am experiencing an access violation exception when using OpenCv::dnn::Net forward function. std::string m_pathCaffeModel; std::string m_pathConfig; m_pathCaffeModel = "model.caffemodel"; m_pathConfig = "model.prototxt"; cv::dnn::Net m_net; m_net = cv::dnn::readNetFromCaffe(m_pathConfig, m_pathCaffeModel); cv::Mat blob; cv::dnn::blobFromImage(resized, blob, 1.0, cv::Size(), cv::Scalar(), false, false, CV_32F); m_net.setInput(blob); m_net.forward(); When I call net.forward() I get the following error: Unhandled exception at 0x00007FFD4B9E3B29 in my_exe.exe: ..

Read more

I would like to assign data to a boost::shared_ptr<caffe::Blob<float>> from a cv::Mat On this page, I find the blobFromImage function that converts a bgr opencv image into a 4d blob input that caffe needs, along with stuff like cropping and subtracting mean etc. However, how do I assign that returned cv::Mat to the caffe::Blob<float> Sample ..

Read more