Frontiers in Physics (May 2023)

An improved YOLOv5 for object detection in visible and thermal infrared images based on contrastive learning

  • Xiaoguang Tu,
  • Xiaoguang Tu,
  • Zihao Yuan,
  • Bokai Liu,
  • Jianhua Liu,
  • Yan Hu,
  • Houqiang Hua,
  • Lin Wei

DOI
https://doi.org/10.3389/fphy.2023.1193245
Journal volume & issue
Vol. 11

Abstract

Read online

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 object detection perspectives, deformation of the object, occlusion, illumination, and detection of small objects. The proposed algorithm introduces the concept of contrastive learning into the YOLOv5 object detection network. To extract image features for contrastive loss calculation, object and background image regions are randomly cropped from image samples. The contrastive loss is then integrated into the YOLOv5 network, and the combined loss function of both object 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 YOLOv5 network. The proposed algorithm has shown pleasing detection results in both visible and thermal infrared images.

Keywords