Skip to content

Commit 382e389

Browse files
committed
dnn: fix documentation links
1 parent 14de8ac commit 382e389

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

modules/dnn/test/pascal_semsegm_test_fcn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ def process(self, frameworks, data_fetcher):
205205
parser.add_argument("--val_names", help="path to file with validation set image names, download it here: "
206206
"https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/data/pascal/seg11valid.txt")
207207
parser.add_argument("--cls_file", help="path to file with colors for classes, download it here: "
208-
"https://github.com/opencv/opencv_contrib/blob/master/modules/dnn/samples/pascal-classes.txt")
208+
"https://github.com/opencv/opencv/blob/master/modules/samples/data/dnn/pascal-classes.txt")
209209
parser.add_argument("--prototxt", help="path to caffe prototxt, download it here: "
210-
"https://github.com/opencv/opencv_contrib/blob/master/modules/dnn/samples/fcn8s-heavy-pascal.prototxt")
210+
"https://github.com/opencv/opencv/blob/master/modules/samples/data/dnn/fcn8s-heavy-pascal.prototxt")
211211
parser.add_argument("--caffemodel", help="path to caffemodel file, download it here: "
212212
"http://dl.caffe.berkeleyvision.org/fcn8s-heavy-pascal.caffemodel")
213213
parser.add_argument("--log", help="path to logging file")

modules/dnn/tutorials/tutorial_dnn_googlenet.markdown

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,53 @@ We will demonstrate results of this example on the following picture.
1313
Source Code
1414
-----------
1515

16-
We will be using snippets from the example application, that can be downloaded [here](https://github.com/ludv1x/opencv_contrib/blob/master/modules/dnn/samples/caffe_googlenet.cpp).
16+
We will be using snippets from the example application, that can be downloaded [here](https://github.com/opencv/opencv/blob/master/modules/samples/dnn/caffe_googlenet.cpp).
1717

18-
@include dnn/samples/caffe_googlenet.cpp
18+
@include dnn/caffe_googlenet.cpp
1919

2020
Explanation
2121
-----------
2222

2323
-# Firstly, download GoogLeNet model files:
24-
[bvlc_googlenet.prototxt ](https://raw.githubusercontent.com/ludv1x/opencv_contrib/master/modules/dnn/samples/bvlc_googlenet.prototxt) and
24+
[bvlc_googlenet.prototxt ](https://raw.githubusercontent.com/opencv/opencv/master/modules/samples/data/dnn/bvlc_googlenet.prototxt) and
2525
[bvlc_googlenet.caffemodel](http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel)
2626

2727
Also you need file with names of [ILSVRC2012](http://image-net.org/challenges/LSVRC/2012/browse-synsets) classes:
28-
[synset_words.txt](https://raw.githubusercontent.com/ludv1x/opencv_contrib/master/modules/dnn/samples/synset_words.txt).
28+
[synset_words.txt](https://raw.githubusercontent.com/opencv/opencv/master/modules/samples/data/dnn/synset_words.txt).
2929

3030
Put these files into working dir of this program example.
3131

3232
-# Read and initialize network using path to .prototxt and .caffemodel files
33-
@snippet dnn/samples/caffe_googlenet.cpp Read and initialize network
33+
@snippet dnn/caffe_googlenet.cpp Read and initialize network
3434

3535
-# Check that network was read successfully
36-
@snippet dnn/samples/caffe_googlenet.cpp Check that network was read successfully
36+
@snippet dnn/caffe_googlenet.cpp Check that network was read successfully
3737

3838
-# Read input image and convert to the blob, acceptable by GoogleNet
39-
@snippet dnn/samples/caffe_googlenet.cpp Prepare blob
39+
@snippet dnn/caffe_googlenet.cpp Prepare blob
4040
Firstly, we resize the image and change its channel sequence order.
4141

4242
Now image is actually a 3-dimensional array with 224x224x3 shape.
4343

4444
Next, we convert the image to 4-dimensional blob (so-called batch) with 1x3x224x224 shape by using special cv::dnn::blobFromImages constructor.
4545

4646
-# Pass the blob to the network
47-
@snippet dnn/samples/caffe_googlenet.cpp Set input blob
47+
@snippet dnn/caffe_googlenet.cpp Set input blob
4848
In bvlc_googlenet.prototxt the network input blob named as "data", therefore this blob labeled as ".data" in opencv_dnn API.
4949

5050
Other blobs labeled as "name_of_layer.name_of_layer_output".
5151

5252
-# Make forward pass
53-
@snippet dnn/samples/caffe_googlenet.cpp Make forward pass
53+
@snippet dnn/caffe_googlenet.cpp Make forward pass
5454
During the forward pass output of each network layer is computed, but in this example we need output from "prob" layer only.
5555

5656
-# Determine the best class
57-
@snippet dnn/samples/caffe_googlenet.cpp Gather output
57+
@snippet dnn/caffe_googlenet.cpp Gather output
5858
We put the output of "prob" layer, which contain probabilities for each of 1000 ILSVRC2012 image classes, to the `prob` blob.
5959
And find the index of element with maximal value in this one. This index correspond to the class of the image.
6060

6161
-# Print results
62-
@snippet dnn/samples/caffe_googlenet.cpp Print results
62+
@snippet dnn/caffe_googlenet.cpp Print results
6363
For our image we get:
6464
> Best class: #812 'space shuttle'
6565
>

modules/dnn/tutorials/tutorial_dnn_halide.markdown

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,42 +89,42 @@ How to build OpenCV with DNN module you may find in @ref tutorial_dnn_build.
8989

9090
## Sample
9191

92-
@include dnn/samples/squeezenet_halide.cpp
92+
@include dnn/squeezenet_halide.cpp
9393

9494
## Explanation
9595
Download Caffe model from SqueezeNet repository: [train_val.prototxt](https://github.com/DeepScale/SqueezeNet/blob/master/SqueezeNet_v1.1/train_val.prototxt) and [squeezenet_v1.1.caffemodel](https://github.com/DeepScale/SqueezeNet/blob/master/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel).
9696

9797
Also you need file with names of [ILSVRC2012](http://image-net.org/challenges/LSVRC/2012/browse-synsets) classes:
98-
[synset_words.txt](https://raw.githubusercontent.com/ludv1x/opencv_contrib/master/modules/dnn/samples/synset_words.txt).
98+
[synset_words.txt](https://raw.githubusercontent.com/opencv/opencv/master/modules/samples/data/dnn/synset_words.txt).
9999

100100
Put these files into working dir of this program example.
101101

102102
-# Read and initialize network using path to .prototxt and .caffemodel files
103-
@snippet dnn/samples/squeezenet_halide.cpp Read and initialize network
103+
@snippet dnn/squeezenet_halide.cpp Read and initialize network
104104

105105
-# Check that network was read successfully
106-
@snippet dnn/samples/squeezenet_halide.cpp Check that network was read successfully
106+
@snippet dnn/squeezenet_halide.cpp Check that network was read successfully
107107

108108
-# Read input image and convert to the 4-dimensional blob, acceptable by SqueezeNet v1.1
109-
@snippet dnn/samples/squeezenet_halide.cpp Prepare blob
109+
@snippet dnn/squeezenet_halide.cpp Prepare blob
110110

111111
-# Pass the blob to the network
112-
@snippet dnn/samples/squeezenet_halide.cpp Set input blob
112+
@snippet dnn/squeezenet_halide.cpp Set input blob
113113

114114
-# Enable Halide backend for layers where it is implemented
115-
@snippet dnn/samples/squeezenet_halide.cpp Enable Halide backend
115+
@snippet dnn/squeezenet_halide.cpp Enable Halide backend
116116

117117
-# Make forward pass
118-
@snippet dnn/samples/squeezenet_halide.cpp Make forward pass
118+
@snippet dnn/squeezenet_halide.cpp Make forward pass
119119
Remember that the first forward pass after initialization require quite more
120120
time that the next ones. It's because of runtime compilation of Halide pipelines
121121
at the first invocation.
122122

123123
-# Determine the best class
124-
@snippet dnn/samples/squeezenet_halide.cpp Determine the best class
124+
@snippet dnn/squeezenet_halide.cpp Determine the best class
125125

126126
-# Print results
127-
@snippet dnn/samples/squeezenet_halide.cpp Print results
127+
@snippet dnn/squeezenet_halide.cpp Print results
128128
For our image we get:
129129

130130
> Best class: #812 'space shuttle'

samples/dnn/squeezenet_halide.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Third party copyrights are property of their respective owners.
77

88
// Sample of using Halide backend in OpenCV deep learning module.
9-
// Based on dnn/samples/caffe_googlenet.cpp.
9+
// Based on caffe_googlenet.cpp.
1010

1111
#include <opencv2/dnn.hpp>
1212
#include <opencv2/imgproc.hpp>

0 commit comments

Comments
 (0)