Abstract:UAV can efficiently perceive the fire environment and obtain the fire scene information. To improve the intelligence level of firefighting work, a fire cannon pre-aiming system based on UAV visual information is proposed. Pre-aiming is a control process consisting of three stages: Fire scene perception, pose calculation, and angle adjustment. In the stage of fire scene perception, considering the real-time requirements of firefighting work, a perception model combining lightweight object detection and dehazing processing is proposed to address the problems of small target size and smoke interference in UAV images of fire scenes. Regarding image dehazing, considering the characteristics of non-uniform distribution and diverse gray levels of haze in fire scenes, the atmospheric scattering model is improved. A neural network with an encoder-decoder structure is designed to solve transmission map and haze gray value, which significantly enhances the image quality. Regarding object detection, YOLOv8s is used as the baseline. In the backbone network, the convolution operations in shallow layers are replaced by PSConv module with a concentrated receptive field to extract more information of small targets; the convolution operations in deep layers are replaced by GhostConv, and the SimA-former module is employed to substitute the deepest C2f structure to achieve model lightweighting. During the feature fusion stage of the neck network, the coordinate attention mechanism (CA) and the small target detection head are combined to construct a high-resolution multi-scale feature fusion module. Based on the acquired fire scene information, the camera model is utilized to compute the relative position and orientation of the fire cannon and fire source. Subsequently, the required horizontal and pitch angles for the fire cannon adjustement are determined. Experiments were conducted in a custom-built fire scenario outside an industrial facility. The perception model achieved a mAP50 score of 92.3%, representing a 6.2% improvement over the YOLOv8s without dehazing preprocessing. The pre-alignment error in the horizontal angle was within ±4°, while the distance estimation error for the fire source remained below 6%. Those results demonstrate the effectiveness and practical applicability of the proposed method.