We present a scheme of how YOLO can be improved in order to predict the absolute distance of objects using only information from a monocular camera. It is fully integrated into the original architecture by extending the prediction vectors, sharing the backbone’s weights with the bounding box regressor, and updating the original loss function by a part responsible for distance estimation. We designed two ways of handling the distance, class-agnostic and class-aware, proving class-agnostic creates smaller prediction vectors than class-aware and achieves better results. We demonstrate that the subtasks of object detection and distance measurement are in synergy, resulting in the increase of the precision of the original bounding box functionality. We show that using the KITTI dataset, the proposed scheme yields a mean relative error of 11% considering all eight classes and the distance range within [0, 150] m, which makes the solution highly competitive with existing approaches. Finally, we show that the inference speed is identical to the unmodified YOLO, 45 frames per second.
Although data preprocessing is a universal technique that can be widely used in neural networks, most research in this area is focused on designing new neural network architectures. In our work, we propose a preprocessing technique that enriches the original image data using local intensity information; this technique is motivated by human perception. To encode this information into an image, we introduce a new image structure named Image Represented by a Fuzzy Function. When using this structure, a crisp intensity value of each pixel is replaced by a fuzzy set given by a membership function constructed with the usage of extremal values from the particular neighborhood of that pixel. We describe this structure and its properties and propose a way in which it can be used as an input into existing neural networks without any modifications. Based on our benchmark consisting of three well-known datasets and five neural network architectures, we show that the proposed preprocessing can, in most cases, decrease classification error compared with a baseline and two other preprocessing methods. To support our claim, we have also selected several publicly available projects and tested the impact of the preprocessing with a positive result.