AUTHOR=Tu Xiaoguang , Yuan Zihao , Liu Bokai , Liu Jianhua , Hu Yan , Hua Houqiang , Wei Lin TITLE=An improved YOLOv5 for object detection in visible and thermal infrared images based on contrastive learning JOURNAL=Frontiers in Physics VOLUME=Volume 11 - 2023 YEAR=2023 URL=https://www.frontiersin.org/journals/physics/articles/10.3389/fphy.2023.1193245 DOI=10.3389/fphy.2023.1193245 ISSN=2296-424X ABSTRACT=An improved algorithm has been proposed to address the challenges encountered in object detection using visible and thermal infrared images. These challenges include the diversity of detection object perspectives, deformation of the object, occlusion, illumination, and detection of small objects. The proposed algorithm introduces the concept of contrastive learning into the YOLO-v5 object detection network. To extract image features for contrastive loss calculation, object image regions and background image regions are randomly cropped from image samples. The contrastive loss is then integrated into the YOLO-v5 network, and the combined loss function of both objection detection and contrastive learning is used to optimize the network parameters. By utilizing the strategy of contrastive learning, the distinction between the background and the object in the feature space is improved, leading to enhanced object detection performance of the YOLO-v5 network. The proposed algorithm has shown pleasing detection results in both visible and thermal infrared images.