|
Algorithm 1 Pseudo-code of the proposed method. |
|
Step1: Collecting construction sign and road images
Step2: Labeling bounding box, segment, and four corners of the board
-
4:
Bounding box labels: ,
-
5:
Segment labels: ,
-
6:
Four corners of the board: ,
Step3: Content swapping
-
7:
Randomly select content image (source):
-
8:
Randomly select frame image (target):
-
9:
Set content region mask of target image using four corners label:
-
10:
Compute transformation matrix : ▹ Section 3.4
-
11:
Swap content:
Step4: Cut-and-paste with realistic transformations
-
12:
Randomly select road image (background):
-
13:
Compute pasteable region: ▹ Section 3.5.1
-
14:
Randomly select bottom point of the sign:
-
15:
Compute top point of the sign: ▹ Section 3.5.2
-
16:
Cut sign image and paste to road image :
-
17:
Transform segment label to and :
-
18:
Transform bounding box label to and :
-
19:
Reduce color difference: ▹ Section 3.5.3
Output: Synthesized training image: ;
Synthesized training label:
|