Closed JohnReid closed 2 years ago
Hi.
The box detection is not the contribution of the MLSD paper.
It is provided to emphasize that the detection of low level feature such as a line segment should be very fast.
Anyway, I heuristically designed all the parameters used in the box detection codes to find the appropriate rectangle object lying in the center of the image.
The default value of the parameter was found (simple grid search) using the evaluation data which I obtained with smartphone.
A brief explanation about all parameters is...
score
: https://github.com/navervision/mlsd/blob/master/utils.py#L84
The score value is for thresholding the reliability of the line segment.
The larger the score value, the more lines that highly contrast to the background are mainly used.outside ratio
and inside ratio
: https://github.com/navervision/mlsd/blob/master/utils.py#L257-L266
The line segments obtained through score thresholding are regarded as straight lines to find the intersection points between straight lines. (ref)
The intersection points are usually located inside and outside the line segments.
In order to find a valid intersection which could be one of the corners of the square among countless intersections, we should discard the intersection points located far from the line segment or too inward by controlling outside ratio
and inside ratio
.w_overlap
: https://github.com/navervision/mlsd/blob/master/utils.py#L410-L415
w_overlap
is a weight for that the detected square overlaps with the line segments obtained by MLSD model.w_degree
and w_length
: The larger these values, the more we find a square like a parallelogram shapew_area
: This is a weight for the area of the detected squares.w_center
: The larger this value, the more we find a square located in the center of the image.Thanks for that, much appreciated.
Thanks for your great line and box detection code. Are the parameters for the box detection method described anywhere? I looked in the paper and didn't see how to match the equations to the code.