DLCV Ch1 Introduction
DLCV Ch1 Introduction
Computer Vision
INTRODUCTION TO
DEEP LEARNING
Digital Surveillance
Deep Learning forSystems and Application
Computer Vision 8
Initial Parameters
• 𝐼𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛 = 2
• 𝐿𝑒𝑎𝑟𝑛𝑖𝑛𝑔 𝑟𝑎𝑡𝑒 = 0.3
• 𝑃 =(678, 105) Score: 0
• 𝐺 =(443, 346)
Score: 1
x y S
Initial position 678 105 0 S: 0
S: 0.15
Iteration 1 537 249 0.15
Iteration 2 481 307 0.85 S: 0.85
𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡 𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡
𝑑1𝑥 = 2 678 − 443 = 470 𝑑1𝑥 = 2 537 − 443 = 188
𝑑1𝑦 = 2 105 − 346 = -482 𝑑1𝑦 = 2 249.6 − 346 = -192.8
Update position Update position
537 = 678 − 0.3 ∗ 470 480.6 = 537 − 0.3 ∗ 188
249.6 = 105 − 0.3 ∗ (−482) 307.44
= 249.6 − 0.3 ∗ (−192.8)
Deep Learning for Computer Vision 12
Update Position
x y Loss of x Loss of y 𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡 of x 𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡 of y
Initial position 678 105 55225 58081 470 -482
Iteration 1 537 249.6 8836 92921 188 -192.8
Iteration 2 480 307 1414 1487 74 -78
Ground Truth 443 346 0 0 0 0
# Hyper-parameters
num_epochs = 50
learning_rate = 0.001
# Set initialize parameter y = ax + b
a = -0.5
b=1
x y
Initial position 678 105 S: 0.15 S: 0
Iteration 1 537 249
Iteration 2 481 307
Iteration 3
Iteration 4
Iteration 5
S: 1
Ground Truth 443 346
Deep Learning for Computer Vision 18
Example 1.2
• Iteration 1 • Iteration 2
𝐿𝑜𝑠𝑠 𝐿𝑜𝑠𝑠
𝐿1𝑥 = (678 − 443)2 𝐿1𝑥 = (537 − 443)2
𝐿1𝑦 = (105 − 346)2 𝐿1𝑦 = (249.6 − 346)2
𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡 𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡
𝑑1𝑥 = 2 678 − 443 = 470 𝑑1𝑥 = 2 537 − 443 = 188
𝑑1𝑦 = 2 105 − 346 = -482 𝑑1𝑦 = 2 249.6 − 346 = -192.8
Update position Update position
537 = 678 − 0.3 ∗ 470 480.6 = 537 − 0.3 ∗ 188
249.6 = 105 − 0.3 ∗ (−482) 307.44
= 249.6 − 0.3 ∗ (−192.8)
Deep Learning for Computer Vision 19
Example 1.3 Dog Detection
𝑇𝑃
Recall =
𝑇𝑃 + 𝐹𝑁
2
Precision = = 0.5
2+2
2
TP = 2 FP = 2 FN = 1 Recall = 2 +1
= 0.666
𝑇𝑃
Precision =
𝑇𝑃 + 𝐹𝑃
𝑇𝑃
Recall =
𝑇𝑃 + 𝐹𝑁
4
Precision = = 0.667
4+2
4
Recall = = 0.8
4 +1
TP = 4 FP = 2 FN = 1
Example 1.2
𝑇𝑃
Precision =
𝑇𝑃 + 𝐹𝑃
𝑇𝑃
Recall =
𝑇𝑃 + 𝐹𝑁