Infrared target detection,which is widely used in military,life and industrial control industries,has been a hot research topic.In this paper,we use YOLOv5 s as the base model and thermal infrared images and near infrared images as the dataset during model training to develop the detection of pedestrians,cars,motorcycles and bicycles under infrared images.The three work elements performed are as follows(1)For thermal infrared images,there is the problem of low resolution and difficult detection.In this paper,a YOLOv5s_CD model is proposed to improve the detection accuracy of the model by introducing attention mechanism(CBAM),Bottleneck-D structure and bilinear interpolation method.The Backbone and Neck structures are also optimized to further improve the model performance while reducing the complexity of the model,and the m AP reaches 81.3% compared to the original YOLOv5 s network model,which is 3.0% better.(2)To address the problem of target detection due to the lack of NIR image dataset and the lack of color information in the images.In this paper,we produce a NIR dataset and also propose a YOLOv5s_BN network model to improve the detection accuracy of the target to be detected by introducing a small target detection layer,bi-directional feature network(Bi FPN).m AP is improved by 3.1% compared with the original YOLOv5 s network model,reaching 80.1%.(3)In order to facilitate the deployment of the improved model on embedded devices,a Ghost Bottleneck_Add structure is proposed in this paper to simplify the network model.Then,combining with the above improved model,the model is trained on thermal infrared data set and near infrared data respectively to obtain the lightened network model weights.Finally,the network model is ported to Raspberry Pi.The experimental results show that the memory occupied by the lightened network model is 8.9M and 8.1M respectively,and the m AP is 74.4%and 75.7% respectively,which reduces the number of model parameters and the memory required by the model while maintaining a certain accuracy. |