During flight, aircraft cargo compartments are in a confined state. If a fire occurs, it will seriously affect flight safety. Therefore, fire detection systems must issue alarms within seconds of a fire breaking out, necessitating high real-time performance for aviation fire detection systems. In addressing the issue of fire target detection, the YOLO series models demonstrate superior performance in striking a balance between computational efficiency and recognition accuracy when compared with alternative models. Consequently, this paper opts to optimize the YOLO model. An enhanced version of the FDY-YOLO object detection algorithm is introduced in this paper for the purpose of instantaneous fire detection. Firstly, the FaB-C3 module, modified based on the FasterNet backbone network, replaces the C3 component in the YOLOv5 framework, significantly decreasing the computational burden of the algorithm. Secondly, the DySample module is used to replace the upsampling module and optimize the model’s ability to extract the features of small-scale flames or smoke in the early stages of a fire. We introduce RFID technology to manage the cameras that are capturing images. Finally, the model’s loss function is changed to the MPDIoU loss function, improving the model’s localization accuracy. Based on our self-constructed dataset, compared with the YOLOv5 model, FDY-YOLO achieves a 0.8% increase in mean average precision (mAP) while reducing the computational load by 40%.