Skip to content

Commit 608445b

Browse files
committed
update tutorial to latest function signature
1 parent 7a343a0 commit 608445b

File tree

5 files changed

+91
-92
lines changed

5 files changed

+91
-92
lines changed

tutorials/InteractiveParameters.ipynb

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.

tutorials/NoiseBenchmark.ipynb

Lines changed: 15 additions & 15 deletions
Large diffs are not rendered by default.

tutorials/Tutorial1-Introduction.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"## Tutorial 1 - Introduction\n",
99
"\n",
1010
"This tutorial gives an overview of the different ways to use multiple template matching for object recognition. \n",
11-
"More documentation is available in the [wiki](https://github.com/LauLauThom/MultiTemplateMatching/wiki) section of the repository.\n",
1211
"\n",
1312
"## Citations\n",
1413
"If you use this implementation for your research, please cite:\n",
@@ -77,9 +76,9 @@
7776
"cell_type": "markdown",
7877
"metadata": {},
7978
"source": [
80-
"As you can read from the doc, the function has 2 main image arguments :\n",
81-
"- a list of template images to search\n",
82-
"- an image in which to search for objects using the templates\n",
79+
"As you can read from the doc, the function has 2 main image arguments : \n",
80+
"- an image in which to search for objects using the templates \n",
81+
"- a list of template images to search \n",
8382
"\n",
8483
"Let's open an image of coins from scikit-image, we will showcase the multi-template matching for the detection of the coins' locations"
8584
]
@@ -92,7 +91,7 @@
9291
{
9392
"data": {
9493
"text/plain": [
95-
"<matplotlib.image.AxesImage at 0x187dbac96d0>"
94+
"<matplotlib.image.AxesImage at 0x1e93e2b6730>"
9695
]
9796
},
9897
"execution_count": 3,
@@ -135,7 +134,7 @@
135134
{
136135
"data": {
137136
"text/plain": [
138-
"<matplotlib.image.AxesImage at 0x187dcb512e0>"
137+
"<matplotlib.image.AxesImage at 0x1e93f341430>"
139138
]
140139
},
141140
"execution_count": 4,
@@ -180,7 +179,7 @@
180179
"# Then call the function matchTemplates (here a single template)\n",
181180
"listDetections = matchTemplates(image, \n",
182181
" listTemplate, \n",
183-
" score_threshold=0.5, \n",
182+
" scoreThreshold=0.5, \n",
184183
" maxOverlap=0)"
185184
]
186185
},
@@ -311,7 +310,7 @@
311310
}
312311
],
313312
"source": [
314-
"listDetections = matchTemplates(image, listTemplate, score_threshold=0.4, maxOverlap=0)\n",
313+
"listDetections = matchTemplates(image, listTemplate, scoreThreshold=0.4, maxOverlap=0)\n",
315314
"plotDetections(image, listDetections, showScore=True)"
316315
]
317316
},
@@ -335,7 +334,7 @@
335334
{
336335
"data": {
337336
"text/plain": [
338-
"<matplotlib.image.AxesImage at 0x187dcd3d520>"
337+
"<matplotlib.image.AxesImage at 0x1e93f52d670>"
339338
]
340339
},
341340
"execution_count": 9,
@@ -402,7 +401,7 @@
402401
],
403402
"source": [
404403
"listTemplates = [smallCoin, largeCoin]\n",
405-
"listDetections = matchTemplates(image, listTemplates, score_threshold=0.4, maxOverlap=0)\n",
404+
"listDetections = matchTemplates(image, listTemplates, scoreThreshold=0.4, maxOverlap=0)\n",
406405
"plotDetections(image, listDetections)"
407406
]
408407
},

tutorials/Tutorial2-Template_Augmentation.ipynb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
"cell_type": "code",
32-
"execution_count": 3,
32+
"execution_count": 5,
3333
"metadata": {},
3434
"outputs": [
3535
{
@@ -62,16 +62,16 @@
6262
},
6363
{
6464
"cell_type": "code",
65-
"execution_count": 4,
65+
"execution_count": 6,
6666
"metadata": {},
6767
"outputs": [
6868
{
6969
"data": {
7070
"text/plain": [
71-
"<matplotlib.image.AxesImage at 0x21d633d90a0>"
71+
"<matplotlib.image.AxesImage at 0x2c1bda167f0>"
7272
]
7373
},
74-
"execution_count": 4,
74+
"execution_count": 6,
7575
"metadata": {},
7676
"output_type": "execute_result"
7777
},
@@ -104,16 +104,16 @@
104104
},
105105
{
106106
"cell_type": "code",
107-
"execution_count": 5,
107+
"execution_count": 7,
108108
"metadata": {},
109109
"outputs": [
110110
{
111111
"data": {
112112
"text/plain": [
113-
"<matplotlib.image.AxesImage at 0x21d64acab20>"
113+
"<matplotlib.image.AxesImage at 0x2c1bdb2cf70>"
114114
]
115115
},
116-
"execution_count": 5,
116+
"execution_count": 7,
117117
"metadata": {},
118118
"output_type": "execute_result"
119119
},
@@ -146,7 +146,7 @@
146146
},
147147
{
148148
"cell_type": "code",
149-
"execution_count": 6,
149+
"execution_count": 8,
150150
"metadata": {},
151151
"outputs": [],
152152
"source": [
@@ -159,7 +159,7 @@
159159
" listTemplates,\n",
160160
" listLabels,\n",
161161
" nObjects=4,\n",
162-
" score_threshold=0.4, \n",
162+
" scoreThreshold=0.4, \n",
163163
" maxOverlap=0.25)"
164164
]
165165
},
@@ -176,7 +176,7 @@
176176
},
177177
{
178178
"cell_type": "code",
179-
"execution_count": 7,
179+
"execution_count": 9,
180180
"metadata": {},
181181
"outputs": [
182182
{
@@ -195,7 +195,7 @@
195195
" (BoundingBox, score:0.46, xywh:(1064, 1238, 414, 400), index:0, temp0)]"
196196
]
197197
},
198-
"execution_count": 7,
198+
"execution_count": 9,
199199
"metadata": {},
200200
"output_type": "execute_result"
201201
}
@@ -207,7 +207,7 @@
207207
},
208208
{
209209
"cell_type": "code",
210-
"execution_count": 8,
210+
"execution_count": 10,
211211
"metadata": {},
212212
"outputs": [
213213
{
@@ -241,7 +241,7 @@
241241
},
242242
{
243243
"cell_type": "code",
244-
"execution_count": 9,
244+
"execution_count": 11,
245245
"metadata": {},
246246
"outputs": [
247247
{
@@ -286,7 +286,7 @@
286286
},
287287
{
288288
"cell_type": "code",
289-
"execution_count": 10,
289+
"execution_count": 12,
290290
"metadata": {},
291291
"outputs": [
292292
{
@@ -298,7 +298,7 @@
298298
" (BoundingBox, score:0.54, xywh:(1459, 474, 400, 414), index:1, 90)]"
299299
]
300300
},
301-
"execution_count": 10,
301+
"execution_count": 12,
302302
"metadata": {},
303303
"output_type": "execute_result"
304304
}
@@ -308,15 +308,15 @@
308308
" listTemplates,\n",
309309
" listLabels,\n",
310310
" nObjects=4, \n",
311-
" score_threshold=0.4, \n",
311+
" scoreThreshold=0.4, \n",
312312
" maxOverlap=0.3)\n",
313313
"\n",
314314
"listDetections"
315315
]
316316
},
317317
{
318318
"cell_type": "code",
319-
"execution_count": 11,
319+
"execution_count": 13,
320320
"metadata": {},
321321
"outputs": [
322322
{

0 commit comments

Comments
 (0)