Source-linked AI summary

Performance Evaluation of Deep Transfer Learning on Multiclass Identification of Common Weed Species in Cotton Production Systems

Dong Chen, Yuzhen Lu, Zhaojiang Li, Sierra Young

arXiv:2110.04960v1cs.CV

TL;DR

Accurate weed-species identification is needed for precise weed control, while blanket herbicide use can harm the environment and facilitate herbicide resistance. The paper benchmarks transfer learning on a new cotton-weed dataset, finding high classification accuracy across models, with ResNet101 achieving the highest reported F1 score.

  • Problem

    Accurate weed-species identification is needed for precise weed control, while blanket herbicide use has adverse environmental impacts and facilitates herbicide-resistant weeds.

    Source: §1 · pp. 1–2
  • Method

    The paper created a cotton-weed dataset and benchmarked 27 deep-learning models through transfer learning, also introducing a cosine-similarity metric and weighted loss for minority classes.

    Source: §1 · p. 3
  • Results

    Across the benchmark, DTL achieved F1 scores >95% in under 2.5 hours; ResNet101 achieved the highest accuracy, F1=99.1%.

    Source: §5 · p. 13
  • Takeaways & Limitations

    The dataset and benchmark are intended as a valuable reference for future research on machine vision systems for cotton weed control and beyond.

    Source: §1 · p. 3

    Minority-class performance remains an area for further work; the authors plan to evaluate weighted loss functions to improve it.

    Source: §4.2 · p. 12, §4.1 · p. 12

Abstract

from arXiv · show

Precision weed management offers a promising solution for sustainable cropping systems through the use of chemical-reduced/non-chemical robotic weeding techniques, which apply suitable control tactics to individual weeds. Therefore, accurate identification of weed species plays a crucial role in such systems to enable precise, individualized weed treatment. This paper makes a first comprehensive evaluation of deep transfer learning (DTL) for identifying common weeds specific to cotton production systems in southern United States. A new dataset for weed identification was created, consisting of 5187 color images of 15 weed classes collected under natural lighting conditions and at varied weed growth stages, in cotton fields during the 2020 and 2021 field seasons. We evaluated 27 state-of-the-art deep learning models through transfer learning and established an extensive benchmark for the considered weed identification task. DTL achieved high classification accuracy of F1 scores exceeding 95%, requiring reasonably short training time (less than 2.5 hours) across models. ResNet101 achieved the best F1-score of 99.1% whereas 14 out of the 27 models achieved F1 scores exceeding 98.0%. However, the performance on minority weed classes with few training samples was less satisfactory for models trained with a conventional, unweighted cross entropy loss function. To address this issue, a weighted cross entropy loss function was adopted, which achieved substantially improved accuracies for minority weed classes. Furthermore, a deep learning-based cosine similarity metrics was employed to analyze the similarity among weed classes, assisting in the interpretation of classifications. Both the codes for model benchmarking and the weed dataset are made publicly available, which expect to be be a valuable resource for future research in weed identification and beyond.

1. Introduction

Weed control in cotton faces environmental and economic costs from herbicide reliance, while precise weed treatment depends on accurate species identification. The paper addresses the lack of cotton-specific weed imagery and broad model comparisons with a new dataset and deep-learning benchmark.

1. Introduction

  • Poor weed management can cause up to 90% yield loss in cotton, and intensive broadcast herbicide use harms the environment and facilitates herbicide resistance.Weeds are estimated to cause 43% potential crop-yield loss globally.Source: §1 · p. 1
  • Precision weed management targets individual weeds, but accurate identification remains essential and robust recognition above 95% is a bottleneck for automated weeding in row crops such as cotton.Commercial-scale applicability in variable growing conditions has yet to be evaluated or demonstrated.Source: §1 · pp. 1–2
  • Prior image-feature methods rely on hand-crafted features that may not adapt to diverse images, while deep learning trained from scratch requires substantial time, computing, and annotated data.Transfer learning reuses pretrained models and fine-tunes them for a new domain; prior weed studies tested only a small number of architectures.Source: §1 · p. 2
  • The paper introduces a 5,187-image dataset of 15 cotton-weed classes and benchmarks 27 transfer-learned models, alongside a cosine-similarity metric and weighted loss for minority classes.The dataset was collected across multiple southern U.S. states and two seasons.Source: §1 · p. 3

2.1. Cotton Weed Dataset

The dataset comprises cotton-field weed images collected across locations, seasons, growth stages, and field conditions. Its 15 classes are imbalanced and include both within-class variation and visual similarities between classes.

2.1. Cotton Weed Dataset

  • Images were collected in cotton fields across southern U.S. locations during the 2020 and 2021 growing seasons, using smartphones or handheld digital cameras.Collection included different view angles, natural field light, and varied growth stages.Source: §2.1 · p. 3
  • The benchmark dataset contains 5,187 images across 15 weed classes, with a random 65%-20%-15% train-validation-test split.Figure 1 shows total image counts per class and the partition proportions.Source: §2.1 · p. 3, Figure 1 · p. 4
  • Class counts are imbalanced, and Morningglory groups several species because of their similarity in weed management.Images with multiple weed classes were cropped so each resulting image contained a single weed class.Source: §2.1 · p. 3
  • Images vary in leaf morphology, color, soil background, and lighting; some classes also share visual traits that may contribute to identification errors.Examples include similar young Morningglory and Spurred Anoda leaves and similar-looking Palmer Amaranth and Waterhemp.Source: §2.1 · p. 4

2.2. Transfer learning

The study fine-tunes pretrained models for 15-class cotton-weed identification and compares a broad set of architectures. Training uses a randomized data split, image augmentation, and repeated model runs.

2.2. Transfer learning

  • Pretrained models were adapted by replacing their final fully connected layers with 15 output neurons for the cotton-weed classes.The benchmark selected 27 state-of-the-art CNN architectures based on visual-categorization performance and source-code availability.Source: §2.2 · p. 4
  • The conventional cross-entropy objective compares model class probabilities with the true class label during training.The output represents probabilities for the 15 weed classes.Source: §2.2 · p. 4
  • Models were trained for 50 epochs using SGD with momentum 0.9 and an initially 0.001 learning rate that decreased by a factor of 0.1 every seven epochs.Five replications with shared random seeds were used, and mean test accuracies were computed.Source: §2.2 · p. 6

2.3. Performance Metrics

The paper assesses model size, training and inference time, and classification performance. Class-level confusion and micro-averaged F1 complement overall comparisons.

2.3. Performance Metrics

  • Performance was evaluated using model parameter counts, training and inference times, confusion matrices, and F1-score.The confusion matrix reports class-specific accuracy and misclassifications; overall classification accuracy is represented by micro-averaged F1.Source: §2.3 · p. 6, §2.3.3 · p. 6

2.3.1. Number of Model Parameters

  • The parameter count includes all weights and biases updated during fine-tuning and serves as a measure of model complexity.Larger parameter counts may require more deployment memory and incur longer training and inference times.Source: §2.3.1 · p. 6

2.3.2. Training and Inference Times

  • Training time measures how long a model takes to train under the prescribed configurations and computing resources; inference time measures prediction latency.Inference latency was averaged over 30 randomly selected test images.Source: §2.3.2 · p. 6

2.3.3. Confusion Matrix and F1-score

  • The confusion matrix reveals individual-class accuracy and misclassifications, while micro-F1 aggregates class predictions to calculate precision and recall.Micro-F1 is the harmonic combination of aggregated precision and recall.Source: §2.3.3 · p. 6

2.4. Weighted Cross Entropy Loss

Conventional cross entropy does not account for class imbalance and may produce large errors on minority weed classes. The paper introduces weighted cross entropy with class-specific weights to address this imbalance.

2.4. Weighted Cross Entropy Loss

  • Conventional cross entropy ignores class imbalance and may cause large classification errors for minority weed classes.Spurred Anoda is given as an example.Source: §2.4 · p. 6
  • Weighted cross entropy assigns individualized class penalties, with larger weights for minority classes.The conventional loss corresponds to weights of one for every class.Source: §2.4 · p. 7
  • Weights are based on class image counts, but the final values were fine-tuned because direct inversion could be sub-optimal.Spurred Anoda’s example weight is 18.3 (1115/61); the adopted weights are listed in Table 1.Source: §2.4 · p. 7, Table 1 · p. 7
  • Table 1 presents the coefficients for conventional cross entropy, the inverse-proportion rule, and weighted cross entropy.Source: Table 1 · p. 7

2.5. Deep Learning-based Similarity Measure

The paper uses deep-learning image features to measure similarity between weed classes. This approach is intended to avoid the sensitivity to changing image conditions associated with Euclidean distance.

2.5. Deep Learning-based Similarity Measure

  • Euclidean distance is sensitive to field-image variations, while cosine similarity is insensitive to vector magnitude.The cited variations include ambient light and camera view angle and position.Source: §2.5 · p. 7
  • VGG11 features from the first fully connected layer are used to calculate cosine similarity between weed classes.The feature vector has length 4,096; VGG11 was selected for its trade-off between classification performance and training time.Source: §2.5 · p. 7
  • Similarity is averaged over 30 randomly sampled image pairs, with values from -1 to 1; 1 denotes perfect similarity and -1 perfect dissimilarity.Source: §2.5 · p. 7

3. Experimental Results

Across 27 transfer-learned models, classification was strong, while weighted cross entropy improved several minority-class accuracies and yielded a higher overall F1-score for DenseNet161 than the best cross-entropy model. The similarity analysis connected weed-class feature similarity with observed classification errors.

3.1. Deep Learning Model Performance

  • Training took 37–144 minutes across models, and larger parameter counts tended to accompany longer training and inference times.AlexNet, SqueezeNet, GoogleNet, ResNet18, ResNet50, VGGs, and MobileNets inferred in under 200 ms, or over 5 frames per second.Source: §3.1 · pp. 7–8, Figure 3 · p. 8
  • ResNet-101 classified 12 of 15 classes perfectly, but reached 80% accuracy on Spurred Anoda, with 20% misclassified as Prickly Sida.MnasNet reached 20% accuracy on Spurred Anoda; the paper attributes low minority-class accuracy presumably to limited images, including 61 for that class.Source: §3.1 · pp. 8–9, Figure 5 · p. 10, Figure 6 · p. 10
  • Among the 27 models, ResNet101 achieved the highest F1-score at 99.1%, and 12 other models exceeded 98%; the top 10 averaged 98.71%.The benchmark table reports model parameters, training and inference times, and F1 scores.Source: §3.1 · p. 8, Table 2 · p. 9

3.2. Performance Improvement with the WCE Loss

  • With WCE, MnasNet accuracy rose from 20% to 80% for Spurred Anoda, from 88% to 94% for Crabgrass, and from 80% to 95% for Ragweed.Figure 7 shows the MnasNet test confusion matrix under WCE.Source: §3.2 · p. 9, Figure 7 · p. 11
  • EfficientNet-b2 and Xception also improved Spurred Anoda identification by 40% and 20%, respectively, compared with their cross-entropy models.The comparison also included Morningglory, Waterhemp, and Crabgrass.Source: §3.2 · p. 10
  • With weighted cross entropy, DenseNet161 reached 99.24% overall F1, above the best cross-entropy model, ResNet101 at 99.1%, while some models slightly decreased on Morningglory.VGG11 classified Spurred Anoda at 100% despite only 61 images.Source: §3.2 · p. 11

3.3. Weed Similarity Analysis

  • Goosegrass and Crabgrass had cosine similarity 0.69, while the highest reported similarity, 0.73, was between Spurred Anoda and Prickly Sida.The paper reports that these similarities align with observed classification errors; Prickly Sida also had more than twice as many images as Spurred Anoda.Source: §3.3 · p. 11

4. Discussion and Future Research

The discussion considers approaches to improve minority-class classification and identifies broader data augmentation as future work. It also describes a similarity measure for interpreting class relationships.

4.1. Weighted Loss Functions

  • Further evaluation of weighted loss functions for improving minority-class classification is planned for future research.Source: §4 · p. 11, §4.1 · p. 12
  • Weighted cross entropy improves on conventional cross entropy by assigning adaptive weights to individual weed classes to address class imbalance.The table compares CE and WCE by weed class and overall F1-score, but the supplied passage does not state its cell values.Source: §4.1 · p. 11, Table 3 · p. 12
  • Class-balanced loss uses each class’s effective sample count, while focal loss down-weights easy examples and focuses training on challenging classes with few images.For class-balanced loss, β = 0 matches CE and β →1 corresponds to inverse-frequency reweighting; focal loss reduces to CE at γ = 0.Source: §4.1 · pp. 11–12
  • The deep learning-based similarity measure produces a class-similarity matrix whose diagonal entries indicate perfect similarity between each class and itself.Source: Figure 8 · p. 12

4.2. Data Augmentation

  • Some models, including EfficientNet, performed less well than expected, especially on minority weed classes; the authors suggest these models rely heavily on large-scale data for optimization without overfitting.Source: §4.2 · pp. 12–13
  • The study used random rotations and pixel normalization but did not fully explore augmentation; collecting more images may be difficult because of weather and limited field access.The authors identify broader data-augmentation techniques as a subject for future research.Source: §4.2 · p. 13

5. Conclusion

The paper benchmarks deep transfer learning for cotton-weed identification and reports high F1 scores with short training times. It also presents resources and analyses intended to support future weed-classification research.

5. Conclusion

  • F1 scores exceeded 95% in under 2.5 hours, with ResNet101 highest at F1=99.1%.Source: §5 · p. 13
  • The benchmark transferred 27 deep learning models to identify 15 cotton-weed classes using 5,187 images collected across two southern U.S. seasons.Source: §5 · p. 13
  • Weighted cross entropy substantially improved minority-class classification, cosine similarity helped interpret misclassifications, and source code and the dataset were publicly accessible.Source: §5 · p. 13
  • The benchmark provides a foundation for choosing weed-classification models and may benefit precision-agriculture research more broadly.Source: §5 · p. 13

Authorship Contribution

Chen led formal analysis and software and drafted the manuscript; Lu led conceptualization, investigation, curation, and supervision; Li contributed resources; Young contributed data curation.

Authorship Contribution

  • Chen handled formal analysis, software, and the original draft; Lu led conceptualization, investigation, curation, and supervision; Li contributed resources; Young contributed data curation.Lu, Li, and Young also contributed to review and editing.Source: Authorship Contribution · p. 13
Loading 2110.04960v1…