Algorithm 2 Patch-Based Approach. |
Inputs:
dataset ← collection of MIMs with the first frame of each MIM
ROI
← the numbers of rows and columns that are used to divide ROI into regions.
trajectory ← CSV file, each row represents
ground_truth ← CSV file, each row represents
Outputs:
pushing_folder, non-pushing_folder
|
1: |
▹ Automatic patches labeling |
2:
|
3:
|
4: for
do |
5: for do |
6: |
7: end for |
8: end for |
9:
|
10:
|
11: for
do |
12: for do |
13: |
14: end for |
15: end for |
16:
|
17: for each
do |
18: |
19: |
20: |
21: for each do |
22: //non-pushing |
23: for each do |
24: if then |
25: //pushing |
26: break |
27: end if |
28: end for |
29: |
30: |
31: |
32: end for |
33: end for |
|
▹ Visualization |
34: for each
do |
35: |
36: |
37: for each do |
38: |
39: if behavior ==2 then |
40: draw a circle around the position of pedestrian over |
41: end if |
42: end for |
43: for do |
44: if then |
45: draw a red rectangle around over |
46: else |
47: draw a green rectangle around over |
48: end if |
49: end for |
50: end for |
|
▹ Manual revision |
51: for each
do |
52: for each do |
53: manual revision of in |
54: if then |
55: manually updating the label of the patch_region in to 6, where 6 means unknown patch |
56: end if |
57: end for |
58: end for |
|
▹ Patch-based MIM dataset creation |
59: for each
do |
60: |
61: for do |
62: |
63: if then |
64: save to pushing_folder under name “" |
65: else if then |
66: save to non-pushing_folder under name “" |
67: end if |
68: end for |
69: end for |