Human security screening constitutes a vital component in public safety assurance across varied environments like airports, governmental edifices, and additional public spaces. Among the paramount challenges inherent in human security screening lies the immediate and precise discernment of prospective threats within X-ray images. Despite the potential exhibited by convolutional neural networks (CNNs) in image recognition tasks, including the detection of targets in X-ray imagery, the substantial computational burden and memory prerequisites often render real-time deployment impracticable on devices with limited resources. In the present study, a novel lightweight CNN approach, melding Yolov5s and GhostNet models with the coordinate attention mechanism, is introduced to alleviate the constraints found in existing techniques. By employing this combination, efficiency in computation and model accuracy has been augmented, thereby addressing the challenges of swift and accurate threat identification. Performance evaluation, conducted on a publicly accessible dataset comprising X-ray images pertinent to human security screening, demonstrated the superior detection accuracy and reduced storage footprint of the proposed model in comparison to prevailing alternatives. Overall, the approach delineated herein presents an efficacious and streamlined solution for real-time human security screening image recognition on resource-constrained devices, contributing a promising advancement in the field.