This research is related to the use of deep learning models on thermal images for object detection using Unmanned Aerial Vehicles (UAVs). Thermal imaging proves to be efficient in environments with minimal light and during nighttime, as it operates based on emitted heat rather than visible light. The ability to detect objects in thermal images enhances surveillance and security measures, particularly in dark conditions. During search and rescue missions, especially in settings with restricted visibility, thermal imaging aids in the identification of individuals or animals by detecting their heat signatures. This facilitates the process of locating them in diverse conditions. Detecting objects at night is challenging due to the lack of illumination. Experiments were conducted using the publicly available HIT-UAV dataset, consisting of 2898 images. This dataset includes several classes such as Person, Car, Bicycle, Other Vehicle, and DontCare. This study proposes the use of both YOLOv5 and YOLOv8 for object detection on this dataset. The YOLOv8 model is the latest model currently available. Both YOLOv5 and YOLOv8 variants were developed by Ultralytics. The experiment used five Yolo models: nano (n), small (s), medium (m), large (l), and extra-large (x). By using YOLOv8m, we achieved a mean Average Precision at IoU threshold 0.5