A comparative machine-learning study found that deep neural networks identified early-stage weeds more accurately than conventional image-analysis methods, while a separate segmentation architecture localized weeds at the pixel level. The research evaluated Support Vector Machines, Random Forests, k-nearest neighbors, a custom convolutional neural network and U-Net across a public sugar beet dataset and a newly collected maize seedling dataset. The CNN reported 98.7% classification accuracy in the principal results summary, compared with 95.2% for Random Forest, 94.3% for SVM and 91.6% for k-nearest neighbors. U-Net, tested separately because it performs segmentation rather than image classification, produced a mean Intersection over Union of 87.6% and a Dice score of 0.91.
The work addresses a difficult stage of precision agriculture, when young crops and weeds may look alike and weeds can begin competing with seedlings for water, nutrients and light. The researchers describe manual weeding as labor-intensive and blanket herbicide application as potentially imprecise, while noting that conventional machine-learning systems can be disrupted by changes in illumination, plant overlap, soil backgrounds and morphology. Their proposed framework therefore compared two independent pipelines under a common protocol: classical models received handcrafted color, texture and shape features, whereas deep models learned visual representations directly from preprocessed images. The pipelines were not fused, a design intended to make their performance easier to assess without the added complexity of feature- or decision-level integration.
Two complementary datasets provided the experimental material. The public Sugar Beets 2016 dataset consists of RGB field photographs captured under agronomic conditions at the University of Bonn, with pixel-level annotations for crops, weeds and soil. It includes weeds such as Chenopodium album, Veronica persica and Viola arvensis, along with variation in illumination, occlusion and plant overlap. The second dataset was assembled from experimental fields in western Uttar Pradesh, India, during the early vegetative stage of maize cultivation. Images were taken in natural daylight with a 12-megapixel smartphone camera from different angles and under varying lighting. The custom collection contains 7,800 labeled images divided among 3,200 crop images, 2,800 Weed A images and 1,800 Weed B images.
Annotation and preprocessing were designed to reduce avoidable sources of bias and improve robustness. For the maize dataset, crop, Weed A and Weed B images were manually annotated, with bounding regions and pixel labels checked independently by two annotators and verified by agricultural experts. The study reports high inter-rater agreement, with an IoU of 0.92. All images were resized to 224 by 224 pixels with bilinear interpolation, and pixel values were divided by 255 to place them between zero and one. Training data were augmented with rotations from minus 45 to plus 45 degrees, horizontal and vertical flipping, zooming, scaling and illumination variation. Targeted augmentation and class weighting were used to address the imbalance, particularly the smaller Weed B category.
The classical pipeline extracted Gray-Level Co-occurrence Matrix texture statistics, including contrast, homogeneity and correlation, alongside area, perimeter and compactness as shape descriptors and 32-bin RGB histograms. These feature vectors were supplied to an SVM with a radial basis function kernel, a 100-tree Random Forest configured to a maximum depth of 20, and k-nearest neighbors with five neighbors selected by validation F1-score. The deep pipeline used a custom CNN for three-class classification and U-Net for binary weed localization. The CNN combined convolutional layers, ReLU activation, max pooling, fully connected layers and a SoftMax output. U-Net used an encoder-decoder structure with skip connections and a final one-by-one convolution and sigmoid layer to generate pixel-level masks.
Both approaches were trained with a stratified 70% training, 15% validation and 15% test division, while the study also reports five-fold cross-validation on the merged sugar beet and maize data. The CNN used Adam optimization at a learning rate of 0.001, categorical cross-entropy, batches of 32 and 20 epochs. U-Net used binary cross-entropy plus Dice loss, batches of 8 and 30 epochs. Early stopping, checkpointing and augmentation were used to limit overfitting. Classification was assessed with accuracy, precision, recall, F1-score and ROC-AUC, whereas segmentation was evaluated separately with mean IoU, Dice coefficient and pixel accuracy. A one-way analysis of variance indicated significant performance differences among models, and independent t-tests found the CNN’s classification advantage over the classical models significant at p less than 0.01.
The classification results favored the learned image representations, with Random Forest emerging as the strongest classical baseline. The paper’s abstract and conclusion report CNN accuracy of 98.7%, an F1-score of 0.96 and ROC-AUC of 0.98, while a more detailed results section gives 98.3% plus or minus 0.5% accuracy, F1-score of 0.96 plus or minus 0.01 and ROC-AUC of 0.97 plus or minus 0.01 across folds. One-vs-rest ROC curves ranged from 0.93 to 0.99 for the three target classes, with micro-average AUC of 0.96 and macro-average AUC of 0.95. The confusion analysis described perfect recognition of Weed A, with most remaining errors occurring between crop and Weed B when their early foliage appeared similar.
U-Net supplied a different kind of output: masks indicating where weeds occurred rather than a class label for the whole image. Its reported mean IoU of 87.6% plus or minus 0.8%, Dice score of 0.91 plus or minus 0.01 and pixel accuracy of 96.4% plus or minus 0.4% indicate substantial overlap with the reference masks. The authors also compared the proposed CNN with MobileNet, VGG16 and DenseNet121 under matched preprocessing, augmentation, optimization and partitioning. VGG16 and DenseNet121 were described as highly accurate but more demanding to train, while MobileNet offered competitive performance with lower computational complexity. The proposed CNN was presented as achieving similar or better accuracy with less architectural complexity, making the comparison relevant to systems that may eventually operate on field equipment.
These results support the potential for automated early weed recognition, but they do not establish that the tested systems are ready for autonomous field deployment. The custom maize dataset is relatively small compared with large agricultural datasets, and the two crops do not represent the full range of crops, weed species, seasons and geographies in which such systems would have to operate. The study also has not yet tested the framework with multispectral or UAV imagery at large scale. Class imbalance remains a concern despite augmentation and weighting, and pixel-level annotation required considerable human effort, making the segmentation pipeline more expensive to scale. Computational demands of CNN and U-Net could also limit operation on resource-constrained edge devices. The authors identify lightweight transformers, self-supervised learning, domain adaptation, multispectral data and edge-aware optimization as priorities for future work.
Overall, the experiment provides evidence that the deep-learning pipeline was more accurate than the classical feature-engineering pipeline on the evaluated weed-classification task, and that U-Net could accurately delineate weed regions at the pixel level. Its strongest claim is therefore comparative rather than operational: under the study’s preprocessing, data and validation protocols, the CNN achieved the best classification performance and Random Forest was the leading classical method, while U-Net performed a distinct segmentation task. The work frames these results as a step toward timely, site-specific weed management, but the reported performance came from a limited experimental setting and still requires validation in large, diverse and real-time field environments before operational benefits such as reduced herbicide use can be demonstrated.
Subject of Research: Comparative machine-learning methods for early-stage weed classification and pixel-level localization in precision agriculture
Article Title: Comparative evaluation of classical machine learning and deep learning models for early weed detection in precision agriculture
Article References: Kumar, R., Singh, P. K., & Tiwari, R. K. (2026). Comparative evaluation of classical machine learning and deep learning models for early weed detection in precision agriculture. Discover Artificial Intelligence, 6(1), Article 1111. https://doi.org/10.1007/s44163-026-02195-y
Image Credits: AI Generated
DOI: 10.1007/s44163-026-02195-y
Keywords: weed detection, precision agriculture, deep learning, convolutional neural network, U-Net segmentation, sugar beet, maize seedlings, image classification, computer vision, Comparative, evaluation, classical
News Source: Blake Davidson. (October 26, 2026). Deep learning outperforms classical methods for early weed detection. Scienmag.



