# Weed Detection and Classification with Computer Vision Using a Limited Image Dataset
## 1 Introduction
Unlike traditional feature-based approaches, where the rationale behind classifications can often be traced back to specific features or rules, deep learning models operate as complex \"black boxes\". To address the challenges associated with deep learning, it is beneficial to revert to the first method, which focuses on comprehending the content of images and extracting meaningful features from them. This approach involves employing techniques such as image processing and feature extraction to identify relevant characteristics within the images. By discerning key features like shapes, textures, and color patterns, the aim is to capture the essence of the objects or scenes depicted in the images. Once these meaningful features are extracted, some vector classifiers are trained and tested. For instance, a support vector machine (SVM) is utilized for classification purposes. SVM is a powerful supervised learning algorithm that excels at separating data points into distinct classes based on the features extracted from the input data. By leveraging the discriminative capabilities of SVM, images can be effectively classified into different categories to identify, for instance, specific weed species within agricultural landscapes. However, SVM was not the winner in our case. The random forest algorithm outperformed SVM. In [6], the authors presented a real-time, computer vision-based plant and weed recognition system for variable-rate agricultural spraying. The recognition and classification of plants and weeds were performed using the RF classifier. The results obtained from multiple field tests demonstrated the effectiveness of the proposed vision-based variable-rate agricultural spraying framework in real time. Ensuring that the training dataset includes a wide range of variations, such as different growth stages, lighting conditions, and perspectives, can significantly enhance the robustness and generalization ability of the classification model. The other aspect is the algorithms. For instance, [PERSON] [7] conducted research on recognizing plant silhouettes based on shape characteristics. Two methods were employed: one method approximated the distribution of distance-transformed image values using Legendre polynomials and classified these data, while the other method extracted 21 shape features and classified them using four different vector classifiers. The distance transformation approach achieved better recognition than the method using 21 features in classifying two types of plants. Another study [8] focused on recognizing three plants (canola, maize, and radish) using texture analysis. For this, local binary pattern (LBP) parameters were utilized, and classification was performed using an SVM classifier. The images were captured in a weed-free, well-lit environment on a table. This research achieved a recognition rate of 91.85%. [PERSON] [9] investigated malting barley using image processing techniques that involved shape recognition. Initially, they considered the application of Hu moments but ultimately utilized other central moments. Color features and local binary patterns (LBPs) were also employed. A linear SVM was used for classification. The images were captured against a clean background; however, a recurring issue was that the barley grains sometimes touched each other. Achieving good results required as many as 25,000 training images, which is feasible for seeds but challenging for breeds. In [10], weed recognition was performed using local binary patterns (LBPs) to extract local texture features. The extracted features were classified using template matching and SVM. For LBPs, template matching achieved a classification rate of 83.3%, while SVM achieved a rate of 93.8%. The study included two types of weeds, thus conducting binary classification and using a limited set of 200 images for each class. [PERSON] [11] conducted a study focusing on image classification, employing color and texture-based feature extraction. For the color space, [PERSON] opted for HSV (hue, saturation, and value).