AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
PDF (6 MB)
Collect
Submit Manuscript AI Chat Paper
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Publishing Language: Chinese

Tomato leaf-level disease detection via class-specific focal loss and vector scaling calibration

Lihe Zhang1,2, Shuping Zhang1, Miao Huang1( ), Lili Tao3, Longhua Ma4, Jie Tao3
School of Intelligent Medical and Health Engineering, Shanghai Polytechnic University, Shanghai 201209, China
School of Computer and Information Engineering, Shanghai Polytechnic University, Shanghai 201209, China
School of Intelligent Manufacturing and Control Engineering, Shanghai Polytechnic University, Shanghai 201209, China
School of Information Science and Engineering, Ningbo Tech University, Ningbo 315100, China
Show Author Information

Abstract

Accurate identification of diverse tomato leaf diseases is often hindered in practical agricultural applications by two coupled problems: substantial visual variation among disease categories leads to imbalanced recognition difficulty, and deep-learning-based detectors frequently produce confidence scores that deviate from the actual empirical accuracy, undermining the trustworthiness of automated decisions. To address these problems jointly, this study improves the Faster R-CNN framework by introducing a class-specific focal loss (CSFL) and a dual-parameter calibration (DPC) strategy, aiming to enhance detection accuracy for multiple tomato diseases while simultaneously improving the reliability of the model's confidence outputs. Considering the characteristics of leaf-level bounding-box detection tasks, differentiated scaling factor α and focusing parameter γ were preset for each disease category according to its visual feature complexity and sample scarcity, in order to construct the CSFL function. Instead of applying a single uniform loss across all categories, this category-specific parameter configuration reweights the training gradients according to category-specific recognition difficulty and thereby alleviates the imbalance in identification difficulty among categories with markedly different lesion morphologies. For confidence calibration, the idea of vector scaling was adopted to jointly optimize a class-specific temperature parameter and bias parameter within the logit transformation layer, realizing the proposed DPC mechanism as a post-hoc calibration step without altering the bounding-box coordinates or degrading detection precision.The expected calibration error (ECE) was introduced as the core evaluation metric to quantify the discrepancy between predicted confidence and empirical accuracy, and the maximum calibration error (MCE) was additionally reported to capture worst-case miscalibration. The proposed framework was trained and tested on a dataset covering six major tomato diseases, namely early blight, late blight, leaf mold, powdery mildew, septoria leaf spot, and tomato mosaic virus, and was further validated on an independent field dataset collected under real agricultural conditions with complex backgrounds, occluded leaves, and uncontrolled illumination, so as to examine the model's generalization capability beyond the controlled training environment. The improved model achieved a mean average precision (mAP0.5) of 96.07%, showing a clear advantage in detection accuracy over mainstream detectors such as RT-DETR (92.31%) and RetinaNet (75.01%). Meanwhile, the model maintained a real-time detection speed with a frame rate of 80.21 FPS(frames per second), outperforming the baseline Faster R-CNN (79.20 FPS). Compared with YOLOv8s, the proposed model's mAP0.5 was slightly lower than YOLOv8s's 98.69%, but its calibration reliability was markedly superior: the ECE decreased from 4.49% of the baseline Faster R-CNN to 2.96% after DPC was applied, notably lower than YOLOv8s's 5.41% and RT-DETR's 4.82%, while the MCE was 27.07%, far below YOLOv8s's 42.96% and RetinaNet's 46.99%. These results indicate that the proposed calibration mechanism effectively alleviates the overconfidence problem that is commonly observed in deep-learning-based agricultural disease detection models. Under the more challenging field test set, characterized by natural background interference and uncontrolled lighting, the model still maintained an mAP0.5 of 90.23% while keeping the ECE stable at a relatively low level of 8.02%, demonstrating consistent detection accuracy and calibration robustness beyond the controlled training environment. The proposed model achieves a favorable balance between detection precision and confidence reliability in tomato leaf-level disease detection, confirming its decision-making robustness and practical deployment potential under complex and open field environments. These findings provide a valuable reference for optimizing the reliability of deep-learning-based models applied to agricultural disease detection, and lay a foundation for extending this calibration-aware detection paradigm to a broader range of crop protection applications.

CLC number: S126 Document code: A Article ID: 1002-6819(2026)-15-0252-10

References

【1】
【1】
 
 
Transactions of the Chinese Society of Agricultural Engineering
Pages 252-261

{{item.num}}

Comments on this article

Go to comment

< Back to all reports

Review Status: {{reviewData.commendedNum}} Commended , {{reviewData.revisionRequiredNum}} Revision Required , {{reviewData.notCommendedNum}} Not Commended Under Peer Review

Review Comment

Close
Close
Cite this article:
Zhang L, Zhang S, Huang M, et al. Tomato leaf-level disease detection via class-specific focal loss and vector scaling calibration. Transactions of the Chinese Society of Agricultural Engineering, 2026, 42(15): 252-261. https://doi.org/10.11975/j.issn.1002-6819.202511174

5

Views

0

Downloads

0

Crossref

0

Web of Science

0

Scopus

Received: 22 November 2025
Revised: 08 May 2026
Published: 15 August 2026
© Chinese Society of Agricultural Engineering 2026