Applications in Engineering: In industry, surface defect detection is crucial for improving product quality. However, there are many challenges in industrial inspection scenarios, such as interference from background noise, complex small-target problems, significant variations in target objects, and the problem of finding a balance between inspection speed and accuracy. To address the above problems, this paper proposes an industrial defect-aware network based on cross-layer semantic information guidance and contextual attention enhancement (IDP-Net). Specifically, IDP-Net has four different new features. The contribution of artificial intelligence: Firstly, to solve the industrial surface context and defect similarity problem, this paper proposes a Lightweight Local Global Feature Extraction Network (LLG-Net), unlike other methods, the effective combination of self-attention blocks and convolution blocks ensures gradual integration of global and local features across multiple layers, to improve the detection ability of targets with significant changes in scale, this paper designs a Multiscale Perceptual Feature Aggregation Network (MPA-Net), adequately fuses the shallow fine-grained information and the deep semantic information. Then, to enhance the connection between multi-scale semantic information, an adaptive cross-layer feature fusion module (ACFF) is proposed, which is novel in integrating the characteristics of multiple adjacent levels to help the model better capture the different scale characterisation of the target. Finally, a Region Attention Module (RAM) is proposed and introduced in the detector to enhance the attention to the critical regions around the target object. In particular, this paper proposes a new localisation loss function (MEIoU) that enhances the network’s attention to objects at different scales. The experimental results show that 94.3%, 98.7% and 99.5% of mAP@.5 are obtained on steel, PCB and aluminium surface defect datasets, respectively, and 50 FPS is achieved, which is better than the current mainstream detectors and meets the demand of practical industrial production.