Aiming at the problems of low efficiency and low detection accuracy of parts defects in forging manufacturers, an improved EfficientNet model (EfficientNet-F) is proposed to detect the fluorescent magnetic particle flaw detection images of two kinds of forgings. A deep learning model with EfficientNet as the backbone feature extraction network is formulated, and the feature pyramid network is introduced as the feature fusion layer to improve the multi-scale feature fusion ability of the model. Complete intersection over union and attention mechanism are utilized to improve the robustness and detection efficiency of the model. Meanwhile, the fluorescent magnetic particle flaw detection image acquisition platform and the defective sample data set are both established. Experimental results show that the mean average precision precision of the optimal model of EfficientNet-F on the test set reaches 95. 03% . The F1 score is 0. 96 and the floating point operations is 1. 86 B. Compared with other deep learning models, the proposed method improvec the detection accuracy and efficiency. It can meet the needs of relevant production enterprises.