# Visual Ranging Based on Object Detection Bounding Box Optimization
###### Abstract  
Faster and more accurate ranging can be achieved by combining the object detection technique based on deep learning with conventional visual ranging. However, changes in scene, uneven lighting, fuzzy object boundaries and other factors may result in a non-fit phenomenon between the detection bounding box and the object. The pixel spacing between the detection bounding box and the object can cause ranging errors. To reduce pixel spacing, increase the degree of fit between the object detection bounding box and the object, and improve ranging accuracy, an object detection bounding box optimization method is proposed. Two evaluation indicators, WOV and HOV, are also proposed to evaluate the results of bounding box optimization. The experimental results show that the pixel width of the bounding box is optimized by 1.19-19.24% and the pixel height is optimized by 0-12.14%. At the same time, the ranging experiments demonstrate that the optimization of the bounding box improves the ranging accuracy. In addition, few practical monocular range measurement techniques can also determine the distance to an object whose size is unknown. Therefore, a similar triangle ranging technique based on height difference is suggested to measure the distance to items of unknown size. A ranging experiment is carried out based on the optimization of the detecting bounding box, and the experimental results reveal that the ranging relative error within 6 m is between 0.7% and 2.47%, allowing for precise distance measurement. visual ranging; monocular ranging; object detection; data augmentation; GrabCut segmentation +
Footnote †: journal: Medical Engineering, Jiangsu University of Science and Technology, Zhenjiang 212100, China 1  
[PERSON]  
Footnote †: journal: Medical Engineering, Jiangsu University of Science and Technology, Zhenjiang 212100, China 1  
distance between the camera and an object of unknown size by establishing a geometric ranging model between the camera and the object [12], a method which has simple structure and strong portability. All in all, there are few practical methods that can measure the distance objects of unknown size in monocular visual ranging. In visual ranging, object detection is the first phase. In visual fields including face recognition [13], pedestrian detection [14], video detection [15], and vehicle detection [16], object detection is frequently used to identify and locate objects. Deep learning detection methods and conventional detection methods are two categories of object detection. Traditional detection methods include DPM [17], Selective Search [18], Oxford-MKL [19], NLPR-HOGLBP [20], etc. Deep learning has made significant progress in object detection over the past few years due to the constant advancement of artificial intelligence and machine vision [21]. In terms of detection accuracy, detection speed, and generalization, the object detection algorithms represented by you only look once (YOLO) [22], single shot multiBox detector (SSD) [23], regions with convolutional neural network features (R-CNN) [24], feature pyramid network (FPN) [25], etc., greatly outperform the conventional object identification approaches. As a result, numerous researchers have merged deep learning-based object detection algorithms with the visual ranging approach for object ranging, with promising results. [PERSON] [26] proposed a single-vehicle ranging method based on a fitting approach by combining the R-CNN algorithm with the data regression modeling method. The experiment's lateral inaccuracy was within 0.3 m, while its error within 60 m was within 10%. [PERSON] [27] proposed a vehicle distance measurement method for two-way lanes with an average inaccuracy of 3.15% within 60 m by combining the YOLOv5 algorithm and the geometric relation method. By combining the YOLOv3 algorithm with binocular vision, [PERSON] [28] developed an unmanned aerial vehicle (UAV) ranging method, and the experimental results demonstrate that the measured relative error may reach a minimum of 2.54%.