To address the challenges such as item occlusion and missing detection of small objects in prohibited item detection tasks of Xray images, an improved YOLOv7 based object detection model is proposed. Firstly, within the Extended Efficient Layer Aggregation Network (E-ELAN) module, the Omni-Dimensional Dynamic Convolution (ODConv), which utilizes a combination of multiple attention mechanisms to enhance the network's sensitivity to feature extraction, is employed instead of conventional convolution. Secondly, the detection head in YOLOv7 model is replaced with an efficient decoupled detection head, which can decouple features channels for localization and classification tasks. Such operation effectively enhances the model's ability to classify and locate small-sized prohibited items. Finally, the Focal-EIoU loss function is applied to make model optimization. The proposed model is verified on the large-scale public dataset SIXray, and achieves the high mAP of 96.6%, which is the 1.8% improvement compared to the original YOLOv7 model.