URGENT WORK Only OPENCV EXPERT Needed
ELEC 4727/5727- Computer Vision
Integral Image
Integral Image
[Part A] Integral Image- Finish filling in 4 missing values of the integral image.
Image:
|
10 |
3 |
10 |
10 |
4 |
5 |
9 |
1 |
7 |
5 |
4 |
7 |
10 |
0 |
1 |
8 |
|
6 |
6 |
1 |
1 |
6 |
10 |
1 |
7 |
9 |
8 |
5 |
1 |
4 |
0 |
9 |
3 |
|
8 |
3 |
3 |
5 |
4 |
10 |
0 |
6 |
10 |
6 |
9 |
7 |
9 |
1 |
9 |
0 |
|
1 |
4 |
8 |
4 |
9 |
3 |
5 |
4 |
10 |
10 |
3 |
1 |
1 |
5 |
7 |
7 |
|
4 |
0 |
8 |
3 |
7 |
8 |
6 |
8 |
4 |
9 |
6 |
6 |
2 |
3 |
2 |
7 |
|
10 |
6 |
4 |
8 |
6 |
3 |
3 |
7 |
4 |
1 |
9 |
5 |
2 |
9 |
9 |
9 |
|
7 |
6 |
8 |
2 |
5 |
8 |
8 |
2 |
3 |
5 |
9 |
2 |
5 |
1 |
6 |
9 |
|
8 |
0 |
8 |
8 |
10 |
8 |
3 |
8 |
8 |
5 |
8 |
0 |
8 |
6 |
6 |
9 |
|
0 |
10 |
1 |
5 |
7 |
7 |
6 |
8 |
3 |
5 |
5 |
9 |
6 |
10 |
3 |
0 |
|
8 |
8 |
4 |
5 |
2 |
2 |
4 |
8 |
1 |
3 |
2 |
8 |
3 |
3 |
7 |
6 |
|
0 |
6 |
3 |
4 |
8 |
7 |
9 |
2 |
8 |
5 |
2 |
0 |
7 |
0 |
8 |
7 |
|
0 |
1 |
8 |
3 |
2 |
10 |
5 |
7 |
3 |
4 |
4 |
6 |
3 |
2 |
9 |
9 |
|
4 |
5 |
0 |
7 |
4 |
1 |
1 |
1 |
0 |
4 |
6 |
7 |
2 |
7 |
0 |
9 |
|
1 |
0 |
10 |
10 |
3 |
5 |
10 |
6 |
1 |
6 |
1 |
3 |
7 |
7 |
6 |
3 |
|
2 |
4 |
2 |
6 |
7 |
7 |
5 |
3 |
4 |
10 |
2 |
3 |
5 |
6 |
6 |
8 |
|
8 |
3 |
9 |
8 |
5 |
9 |
10 |
8 |
0 |
3 |
8 |
5 |
9 |
8 |
4 |
3 |
Image Integral:
|
10 |
13 |
23 |
33 |
37 |
42 |
51 |
52 |
59 |
64 |
68 |
75 |
85 |
85 |
86 |
94 |
|
16 |
25 |
36 |
47 |
57 |
72 |
82 |
90 |
106 |
119 |
128 |
136 |
150 |
150 |
160 |
171 |
|
24 |
36 |
50 |
66 |
80 |
105 |
115 |
129 |
155 |
174 |
192 |
207 |
230 |
231 |
250 |
261 |
|
25 |
41 |
63 |
83 |
106 |
134 |
149 |
167 |
203 |
232 |
253 |
269 |
293 |
299 |
325 |
343 |
|
29 |
45 |
75 |
98 |
128 |
164 |
185 |
211 |
251 |
289 |
316 |
338 |
|
373 |
401 |
426 |
|
39 |
61 |
95 |
126 |
162 |
|
225 |
258 |
302 |
341 |
377 |
404 |
432 |
450 |
487 |
521 |
|
46 |
74 |
116 |
149 |
190 |
237 |
269 |
304 |
351 |
395 |
440 |
469 |
502 |
521 |
564 |
607 |
|
54 |
82 |
132 |
173 |
|
279 |
314 |
357 |
412 |
461 |
514 |
543 |
584 |
609 |
658 |
710 |
|
54 |
92 |
143 |
189 |
247 |
309 |
350 |
401 |
459 |
513 |
571 |
609 |
656 |
691 |
743 |
795 |
|
62 |
108 |
163 |
214 |
274 |
338 |
383 |
442 |
501 |
558 |
618 |
664 |
714 |
752 |
811 |
869 |
|
62 |
114 |
172 |
227 |
295 |
366 |
420 |
481 |
548 |
610 |
672 |
718 |
775 |
813 |
880 |
945 |
|
62 |
115 |
181 |
239 |
309 |
390 |
449 |
517 |
587 |
653 |
719 |
771 |
831 |
871 |
947 |
1021 |
|
66 |
124 |
190 |
255 |
329 |
411 |
471 |
540 |
610 |
680 |
752 |
811 |
873 |
920 |
996 |
1079 |
|
67 |
125 |
201 |
276 |
353 |
440 |
510 |
585 |
656 |
732 |
805 |
867 |
936 |
990 |
1072 |
1158 |
|
69 |
|
209 |
290 |
374 |
468 |
543 |
621 |
696 |
782 |
857 |
922 |
996 |
1056 |
1144 |
1238 |
|
77 |
142 |
229 |
318 |
407 |
510 |
595 |
681 |
756 |
845 |
928 |
998 |
1081 |
1149 |
1241 |
1338 |
Image Areas to Compute
|
Area |
Area sum- Show your calculation |
|
Red |
|
|
Blue |
|
[Part B] Accuracy- For each of the following figure outcomes of face detection, list the achieved detection rate and false positive rate. Show each result as a fraction.
Image A Image B
|
Image |
Detection rate
|
False positive rate
|
|
A |
|
|
|
B |
|
|
[Part C] Integral Image-
Generate the integral image for the following image data: Use Python/Jupyter Notebook.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Part 3] Calculate IOU (Intersection over Union)
In Python, given any two lists that defined the rectangles of the minimum and maximum corners:
Ground_truth = [(3,6),(10,10)]
Prediction = [(7,-1),(15,7)]
To calculate the areas and intersection over union
Feature Maps
[Part A] Object Features- Using the Feature Type (3x2), show which of the following scaled views of the type are allowed using uniform scaling for a 6x6 window. Show your answer by coloring in the respective boxes of each candidate. Do not make any changes if the candidate map is not valid.
|
|
|
|
|
|
|
|
[Part B] For each of the feature maps that you selected in Part A, list how many checks of that map are searched in a 6x6 window. If the map is not valid simply mark an “X” in the count column.
In the 6x6 area (shown for reference only)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map |
Count |
Map |
Count |
|
a |
|
k |
|
|
b |
|
l |
|
|
c |
|
m |
|
|
d |
|
n |
|
|
e |
|
o |
|
|
f |
|
p |
|
|
g |
|
q |
|
|
h |
|
r |
|
|
i |
|
s |
|
|
j |
|
t |
|
[Part C: Graduate Student] Assume the image is 640x480, how many 6x6 windows are there to check in the image? Show work by writing a Python script that takes into account any ImageWidth, ImageHeight, as well as any window size (WindowWidthxWindowHeight). The script function should return the number of evaluations and the locations using a list of coordinates of tuples (example: [(0,0), (0,1), (0,2)…]
[Part D: Graduate Student] Combine your answer in Part C (total of all checks) and Part B to calculate the total number of feature maps calculated.
AdaBoost
Use the following 2-d diagram to solve the AdaBoost problem.
9
8
7
6
5
4
3
2
FOR ANY TIES, choose the letter nearest the start of the alphabet, such as A before B or B before D.
[Part 1] Phase1: Assume that each point classified in error has an error score of 1.
|
Classifier |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Total |
|
A (below line is blue) |
|
|
|
|
|
|
|
|
|
|
|
B (below line is blue) |
|
|
|
|
|
|
|
|
|
|
|
C (to right of line is blue) |
|
|
|
|
|
|
|
|
|
|
|
D (below line is blue) |
|
|
|
|
|
|
|
|
|
|
[Part 2] Circle the best classifier (Phase1): ( A B C D )
[Part 3] Circle the points that the best classifier (Phase 1) had in error list: ( 1 2 3 4 5 6 7 8 9 )
[Part 4] Phase2: Assume that each point classified in error from the best classifier in Phase1 has an error score doubled for the next round. Re-calculate the total errors, but you do not need to re-score the best classifier line. Thus only 3 lines are given to you in the table:
|
Classifier |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Total |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Part 5] Circle the best classifier (Phase 1): ( A B C D )
[Part 6] Circle the points that the best classifier (Phase 2) had in error list: ( 1 2 3 4 5 6 7 8 9 )
[Part 7] Phase3: Assume that each point classified in error from the best classifier in Phase3 has an error score double if the classifier incorrect labeled the point. Only errors are boosted. Re-calculate the total errors, but you do not need to re-score the best classifier line. Thus only 2 lines are given to you in the table:
|
Classifier |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Total |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|