The future of deep learning integration in agriculture holds great potential for advancing sustainable agricultural practices, precision agriculture and improved decision-making. With the rapid development of image processing and artificial intelligence technologies in recent years, deep learning has begun to play a major role in identifying agricultural pests and optimizing agricultural product marketing. However, there are challenges related to data quality, model scalability, and geographical limitations for widespread adoption of deep learning in agriculture. This study on Olive was conducted to improve the quality of the data set and to ensure more reliable training of object detection models. According to the result of the training process of YOLOv7 used in the study, it was concluded that it was characterized by decreasing loss values and showed an increase in the model's ability to detect objects correctly. It was observed that the other model, YOLOv8l, had a more effective learning capacity and a tendency to learn faster. The performance of both models was evaluated with various metrics, and it was determined that YOLOv8l had higher Precision, Recall, and mAP values. It was emphasized that YOLOv8l showed high performance even in low epoch numbers and can be preferred especially in cases where time and computational resources were limited. It was determined that YOLOv7 made detections in a wide confidence range, but had difficulty in detections with low confidence scores. It was observed that YOLOv8l made more stable and reliable detections with higher confidence scores. The metric data of the "YOLOv8l" model was found to be higher compared to other models. The F1 score of the YOLOv5l model was 92.337%, precision 96.568%, recall %88,462,mAP@0.5:0.65 value gave the highest score with 94.608%. This research on deep learning-based object detection models indicated that YOLOv8l showed superior performance compared to YOLOv7 and was a more reliable option for agricultural applications.