Commit c8f2d2bb authored by Dmitry Kurtaev's avatar Dmitry Kurtaev Committed by Vadim Pisarevsky

Replace createCaffeImporter to readNetFromCaffe (#1310)

parent 9fd5e99f
......@@ -110,23 +110,7 @@ bool TrackerGOTURNImpl::initImpl(const Mat& image, const Rect2d& boundingBox)
//Load GOTURN architecture from *.prototxt and pretrained weights from *.caffemodel
String modelTxt = "goturn.prototxt";
String modelBin = "goturn.caffemodel";
Ptr<dnn::Importer> importer;
try //Import GOTURN model
{
importer = dnn::createCaffeImporter(modelTxt, modelBin);
}
catch (const cv::Exception &err) //Importer can throw errors, we will catch them
{
std::cerr << err.msg << std::endl;
}
if (!importer)
{
cvError(CV_StsError, "cv::gtr::InitImpl", "GOTURN network loading error...", "gtrTracker.cpp", 117);
}
importer->populateNet(net);
importer.release(); //We don't need importer anymore
net = dnn::readNetFromCaffe(modelTxt, modelBin);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment