Algorithm 1 The second-stage model fine-training algorithm |
Initialization: |
1. Collect the image sets under various scenarios; 2. First-stage model training hlane_1; |
3. Set the confidence threshold T; 4. Set the threshold growth factor ζ; |
5. Divide images into multiple sets M, of which each contains the batch size number of images |
Training process: |
For batch in M: |
for Xi in batch:
|
1. Obtain the coordinates, width, and height (x, y, w, h), and confidence ξ using the model hlane_1 |
if T ≤ ξi: |
(1) Set a new area of the bounding box as (x, y, w + 2δ, h + 2δ) |
(2) Determine the lane edge using the adaptive threshold detection algorithm based on the Canny |
(3) Binarize the area and determine the connected domain of the lane |
(4) Determine a new bounding box (x’, y’, w’, h’) of the lane |
else if T/4 ≤ ξi < T: |
(1) Set a new area of the bounding box as (x, y, w + 2δ, h + 2δ) |
(2) Set the pixel value in the new area to 0 |
end |
end |
2. Obtain the processed image sets
|
3. Make T = T + ζ, retrain hlane_1 |
end |