Commit 662fc9c7 authored by Vitaliy Lyudvichenko's avatar Vitaliy Lyudvichenko

Fix docs warnings

parent dcf42525
...@@ -221,7 +221,7 @@ namespace dnn //! This namespace is used for dnn module functionlaity. ...@@ -221,7 +221,7 @@ namespace dnn //! This namespace is used for dnn module functionlaity.
CV_WRAP void allocate(); CV_WRAP void allocate();
/** @brief Runs forward pass to compute output of layer @p toLayer. /** @brief Runs forward pass to compute output of layer @p toLayer.
* @detail By default runs forward pass for the whole network. * @details By default runs forward pass for the whole network.
*/ */
CV_WRAP void forward(LayerId toLayer = String()); CV_WRAP void forward(LayerId toLayer = String());
/** @brief Runs forward pass to compute output of layer @p toLayer, but computations start from @p startLayer */ /** @brief Runs forward pass to compute output of layer @p toLayer, but computations start from @p startLayer */
...@@ -295,7 +295,7 @@ namespace dnn //! This namespace is used for dnn module functionlaity. ...@@ -295,7 +295,7 @@ namespace dnn //! This namespace is used for dnn module functionlaity.
CV_EXPORTS_W Ptr<Importer> createCaffeImporter(const String &prototxt, const String &caffeModel = String()); CV_EXPORTS_W Ptr<Importer> createCaffeImporter(const String &prototxt, const String &caffeModel = String());
/** @brief Reads a network model stored in Caffe model files. /** @brief Reads a network model stored in Caffe model files.
* @detail This is shortcut consisting from createCaffeImporter and Net::populateNet calls. * @details This is shortcut consisting from createCaffeImporter and Net::populateNet calls.
*/ */
CV_EXPORTS_W Net readNetFromCaffe(const String &prototxt, const String &caffeModel = String()); CV_EXPORTS_W Net readNetFromCaffe(const String &prototxt, const String &caffeModel = String());
......
...@@ -84,6 +84,8 @@ std::vector<String> readClassNames(const char *filename = "synset_words.txt") ...@@ -84,6 +84,8 @@ std::vector<String> readClassNames(const char *filename = "synset_words.txt")
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
cv::dnn::initModule(); //Required if OpenCV is built as static libs
String modelTxt = "bvlc_googlenet.prototxt"; String modelTxt = "bvlc_googlenet.prototxt";
String modelBin = "bvlc_googlenet.caffemodel"; String modelBin = "bvlc_googlenet.caffemodel";
String imageFile = (argc > 1) ? argv[1] : "space_shuttle.jpg"; String imageFile = (argc > 1) ? argv[1] : "space_shuttle.jpg";
...@@ -92,7 +94,7 @@ int main(int argc, char **argv) ...@@ -92,7 +94,7 @@ int main(int argc, char **argv)
Net net = dnn::readNetFromCaffe(modelTxt, modelBin); Net net = dnn::readNetFromCaffe(modelTxt, modelBin);
//! [Read and initialize network] //! [Read and initialize network]
//! [Check that net was read successfully] //! [Check that network was read successfully]
if (net.empty()) if (net.empty())
{ {
std::cerr << "Can't load network by using the following files: " << std::endl; std::cerr << "Can't load network by using the following files: " << std::endl;
...@@ -102,7 +104,7 @@ int main(int argc, char **argv) ...@@ -102,7 +104,7 @@ int main(int argc, char **argv)
std::cerr << "http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel" << std::endl; std::cerr << "http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel" << std::endl;
exit(-1); exit(-1);
} }
//! [Check that net was read successfully] //! [Check that network was read successfully]
//! [Prepare blob] //! [Prepare blob]
Mat img = imread(imageFile); Mat img = imread(imageFile);
......
...@@ -29,11 +29,11 @@ Explanation ...@@ -29,11 +29,11 @@ Explanation
Put these files into working dir of this program example. Put these files into working dir of this program example.
-# Create the importer of Caffe models -# Read and initialize network using path to .prototxt and .caffemodel files
@snippet dnn/samples/caffe_googlenet.cpp Create the importer of Caffe model @snippet dnn/samples/caffe_googlenet.cpp Read and initialize network
-# Create the network and initialize its by using the created importer -# Check that network was read successfully
@snippet dnn/samples/caffe_googlenet.cpp Initialize network @snippet dnn/samples/caffe_googlenet.cpp Check that network was read successfully
-# Read input image and convert to the blob, acceptable by GoogleNet -# Read input image and convert to the blob, acceptable by GoogleNet
@snippet dnn/samples/caffe_googlenet.cpp Prepare blob @snippet dnn/samples/caffe_googlenet.cpp Prepare blob
...@@ -41,7 +41,7 @@ Explanation ...@@ -41,7 +41,7 @@ Explanation
Now image is actually a 3-dimensional array with 224x224x3 shape. Now image is actually a 3-dimensional array with 224x224x3 shape.
Next, we convert the image to 4-dimensional blob (so-called batch) with 1x2x224x224 shape by using special @ref cv::dnn::Blob constructor. Next, we convert the image to 4-dimensional blob (so-called batch) with 1x3x224x224 shape by using special cv::dnn::Blob::fromImages constructor.
-# Pass the blob to the network -# Pass the blob to the network
@snippet dnn/samples/caffe_googlenet.cpp Set input blob @snippet dnn/samples/caffe_googlenet.cpp Set input blob
......
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