{"id":{"repo_id":"unitec","oai_identifier":"oai:null:10652/6947"},"canonical_url":"https://search.ndltd.org/etd/unitec/oai:null:10652/6947","repository":{"repo_id":"unitec","name":"Unitec","base_url":"https://www.researchbank.ac.nz/server/oai/request"},"display":{"title":"Grape & apple disease detection using CNN-ViT hybrid model with RF classifier","abstract":"RESEARCH QUESTIONS 1 How much does the hybrid CNN–ViT model improve classification accuracy for grape and apple leaf diseases compared to standalone CNN and ViT models? 2 What is the impact of using a Random Forest classifier on generalization 4 and overfitting mitigation in disease classification tasks? 3 How do CNN, ViT and CNN-ViT-RF hybrid models compare in terms of accuracy and generalization on grape and apple disease classification? ABSTRACT As agriculture increasingly adopts intelligent and automated systems, the early detection of crop diseases has become critical to maintaining yield and quality. In New Zealand, where apple and grape cultivation is central to both local and international horticulture, crops are highly vulnerable to diseases such as Black Rot, ESCA, and Leaf Blight. Manual inspection methods are time-consuming and error-prone, especially over large farm areas. To address this challenge, this study proposes a hybrid deep learning framework that integrates Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and a Random Forest (RF) classifier for multi-class plant disease detection using RGB leaf images. CNNs are leveraged for extracting fine-grained local features, such as texture and lesions, while ViTs model global dependencies using attention-based mechanisms. The complementary feature sets are fused and passed through a Random Forest classifier, enhancing model generalization across disease classes. The proposed CNN–ViT–RF model was evaluated across ten curated datasets comprising grape and apple leaf images with multiple disease categories, class imbalance, and varying quality conditions. The training pipeline incorporated PCA-based clustering, CycleGAN-based augmentation, and 5-fold cross-validation to ensure robustness and generalizability. Experimental results show the hybrid model significantly outperforms individual CNN, ViT, and CNN+RF baselines, achieving up to 98% classification accuracy and macro-averaged F1-scores consistently above 0.95. The model also demonstrated superior AUC-ROC and class separation in confusion matrix analyses. Robustness tests under conditions of noise, brightness variation, and rotation confirmed the system’s resilience in real-world settings. Inference speed and memory profiling on the NVIDIA Jetson Nano further indicate the model’s suitability for edge deployment in smart farming applications. Overall, the fusion of local and global feature extractors with an ensemble classifier presents a scalable and effective solution for precision agriculture and automated plant health monitoring","abstract_html":"RESEARCH QUESTIONS 1 How much does the hybrid CNN–ViT model improve classification accuracy for grape and apple leaf diseases compared to standalone CNN and ViT models? 2 What is the impact of using a Random Forest classifier on generalization 4 and overfitting mitigation in disease classification tasks? 3 How do CNN, ViT and CNN-ViT-RF hybrid models compare in terms of accuracy and generalization on grape and apple disease classification? ABSTRACT As agriculture increasingly adopts intelligent and automated systems, the early detection of crop diseases has become critical to maintaining yield and quality. In New Zealand, where apple and grape cultivation is central to both local and international horticulture, crops are highly vulnerable to diseases such as Black Rot, ESCA, and Leaf Blight. Manual inspection methods are time-consuming and error-prone, especially over large farm areas. To address this challenge, this study proposes a hybrid deep learning framework that integrates Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and a Random Forest (RF) classifier for multi-class plant disease detection using RGB leaf images. CNNs are leveraged for extracting fine-grained local features, such as texture and lesions, while ViTs model global dependencies using attention-based mechanisms. The complementary feature sets are fused and passed through a Random Forest classifier, enhancing model generalization across disease classes. The proposed CNN–ViT–RF model was evaluated across ten curated datasets comprising grape and apple leaf images with multiple disease categories, class imbalance, and varying quality conditions. The training pipeline incorporated PCA-based clustering, CycleGAN-based augmentation, and 5-fold cross-validation to ensure robustness and generalizability. Experimental results show the hybrid model significantly outperforms individual CNN, ViT, and CNN+RF baselines, achieving up to 98% classification accuracy and macro-averaged F1-scores consistently above 0.95. The model also demonstrated superior AUC-ROC and class separation in confusion matrix analyses. Robustness tests under conditions of noise, brightness variation, and rotation confirmed the system’s resilience in real-world settings. Inference speed and memory profiling on the NVIDIA Jetson Nano further indicate the model’s suitability for edge deployment in smart farming applications. Overall, the fusion of local and global feature extractors with an ensemble classifier presents a scalable and effective solution for precision agriculture and automated plant health monitoring","abstract_has_math":false,"creators":["Bedi, Japneet Singh"],"institution":"Unitec, Te Pūkenga – New Zealand Institute of Skills and Technology","degree_name":"Master of Applied Technologies (Computing)","degree_level":"Masters","degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":["Shakiba, Masoud","Varestehpour, Soheil"],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025","date_published":"2025","updated_at":"2026-11-26T14:13:46Z","subjects":["grape vines","apple trees","leaf spots","plant disease","modelling","neural networks","image processing","pattern recognition systems in agriculture"],"languages":["en"],"rights":["All rights reserved","Author"],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Bedi, J.S. (2025). Grape & apple disease detection using CNN-ViT hybrid model with RF classifier (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec, Te Pūkenga - New Zealand Institute of Skills and Technology https://hdl.handle.net/10652/6947"],"render_values":[{"text":"Bedi, J.S. (2025). Grape & apple disease detection using CNN-ViT hybrid model with RF classifier (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec, Te Pūkenga - New Zealand Institute of Skills and Technology https://hdl.handle.net/10652/6947","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10652/6947","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10652/6947","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aunitec%3Aoai%3Anull%3A10652%2F6947","prefix":"oai_dc"},"source_record":{"url":"https://www.researchbank.ac.nz/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Anull%3A10652%2F6947","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Shakiba, Masoud","Varestehpour, Soheil"]},{"key":"dc:creator","label":"Author","values":["Bedi, Japneet Singh"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-08-20T01:28:47Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-08-20T01:28:47Z"]},{"key":"dc:date.issued","label":"Date","values":["2025"]},{"key":"dc:type","label":"Dc Type","values":["Masters Thesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Applied Technologies (Computing)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Unitec, Te Pūkenga – New Zealand Institute of Skills and Technology"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["grape vines","apple trees","leaf spots","plant disease","modelling","neural networks","image processing","pattern recognition systems in agriculture"]},{"key":"dc:subject.discipline","label":"Dc Subject Discipline","values":["Applied Technologies"]},{"key":"dc:subject.marsden","label":"Dc Subject Marsden","values":["ANZSRC Fields of Research 2020::31 Biological sciences::3108 Plant biology::310805 Plant pathology","ANZSRC Fields of Research 2020::46 Information and computing sciences::4603 Computer vision and multimedia computation::460306 Image processing","ANZSRC Fields of Research 2020::30 Agricultural, veterinary and food sciences::3002 Agriculture, land and farm management::300299 Agriculture, land and farm management not elsewhere classified"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["All rights reserved"]},{"key":"dc:rights.holder","label":"Dc Rights Holder","values":["Author"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Bedi, J.S. (2025). Grape & apple disease detection using CNN-ViT hybrid model with RF classifier (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec, Te Pūkenga - New Zealand Institute of Skills and Technology https://hdl.handle.net/10652/6947"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10652/6947"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["RESEARCH QUESTIONS 1 How much does the hybrid CNN–ViT model improve classification accuracy for grape and apple leaf diseases compared to standalone CNN and ViT models? 2 What is the impact of using a Random Forest classifier on generalization 4 and overfitting mitigation in disease classification tasks? 3 How do CNN, ViT and CNN-ViT-RF hybrid models compare in terms of accuracy and generalization on grape and apple disease classification? ABSTRACT As agriculture increasingly adopts intelligent and automated systems, the early detection of crop diseases has become critical to maintaining yield and quality. In New Zealand, where apple and grape cultivation is central to both local and international horticulture, crops are highly vulnerable to diseases such as Black Rot, ESCA, and Leaf Blight. Manual inspection methods are time-consuming and error-prone, especially over large farm areas. To address this challenge, this study proposes a hybrid deep learning framework that integrates Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and a Random Forest (RF) classifier for multi-class plant disease detection using RGB leaf images. CNNs are leveraged for extracting fine-grained local features, such as texture and lesions, while ViTs model global dependencies using attention-based mechanisms. The complementary feature sets are fused and passed through a Random Forest classifier, enhancing model generalization across disease classes. The proposed CNN–ViT–RF model was evaluated across ten curated datasets comprising grape and apple leaf images with multiple disease categories, class imbalance, and varying quality conditions. The training pipeline incorporated PCA-based clustering, CycleGAN-based augmentation, and 5-fold cross-validation to ensure robustness and generalizability. Experimental results show the hybrid model significantly outperforms individual CNN, ViT, and CNN+RF baselines, achieving up to 98% classification accuracy and macro-averaged F1-scores consistently above 0.95. The model also demonstrated superior AUC-ROC and class separation in confusion matrix analyses. Robustness tests under conditions of noise, brightness variation, and rotation confirmed the system’s resilience in real-world settings. Inference speed and memory profiling on the NVIDIA Jetson Nano further indicate the model’s suitability for edge deployment in smart farming applications. Overall, the fusion of local and global feature extractors with an ensemble classifier presents a scalable and effective solution for precision agriculture and automated plant health monitoring"]},{"key":"dc:format.extent","label":"Dc Format Extent","values":["85"]},{"key":"dc:title","label":"Title","values":["Grape & apple disease detection using CNN-ViT hybrid model with RF classifier"]},{"key":"local:contributor.affiliation","label":"Local Contributor Affiliation","values":["Unitec, Te Pūkenga"]}]}],"canonical_facts":{"dc:contributor.advisor":["Shakiba, Masoud","Varestehpour, Soheil"],"dc:creator":["Bedi, Japneet Singh"],"dc:date.accessioned":["2025-08-20T01:28:47Z"],"dc:date.available":["2025-08-20T01:28:47Z"],"dc:date.issued":["2025"],"dc:description.abstract":["RESEARCH QUESTIONS 1 How much does the hybrid CNN–ViT model improve classification accuracy for grape and apple leaf diseases compared to standalone CNN and ViT models? 2 What is the impact of using a Random Forest classifier on generalization 4 and overfitting mitigation in disease classification tasks? 3 How do CNN, ViT and CNN-ViT-RF hybrid models compare in terms of accuracy and generalization on grape and apple disease classification? ABSTRACT As agriculture increasingly adopts intelligent and automated systems, the early detection of crop diseases has become critical to maintaining yield and quality. In New Zealand, where apple and grape cultivation is central to both local and international horticulture, crops are highly vulnerable to diseases such as Black Rot, ESCA, and Leaf Blight. Manual inspection methods are time-consuming and error-prone, especially over large farm areas. To address this challenge, this study proposes a hybrid deep learning framework that integrates Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and a Random Forest (RF) classifier for multi-class plant disease detection using RGB leaf images. CNNs are leveraged for extracting fine-grained local features, such as texture and lesions, while ViTs model global dependencies using attention-based mechanisms. The complementary feature sets are fused and passed through a Random Forest classifier, enhancing model generalization across disease classes. The proposed CNN–ViT–RF model was evaluated across ten curated datasets comprising grape and apple leaf images with multiple disease categories, class imbalance, and varying quality conditions. The training pipeline incorporated PCA-based clustering, CycleGAN-based augmentation, and 5-fold cross-validation to ensure robustness and generalizability. Experimental results show the hybrid model significantly outperforms individual CNN, ViT, and CNN+RF baselines, achieving up to 98% classification accuracy and macro-averaged F1-scores consistently above 0.95. The model also demonstrated superior AUC-ROC and class separation in confusion matrix analyses. Robustness tests under conditions of noise, brightness variation, and rotation confirmed the system’s resilience in real-world settings. Inference speed and memory profiling on the NVIDIA Jetson Nano further indicate the model’s suitability for edge deployment in smart farming applications. Overall, the fusion of local and global feature extractors with an ensemble classifier presents a scalable and effective solution for precision agriculture and automated plant health monitoring"],"dc:format.extent":["85"],"dc:identifier.citation":["Bedi, J.S. (2025). Grape & apple disease detection using CNN-ViT hybrid model with RF classifier (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec, Te Pūkenga - New Zealand Institute of Skills and Technology https://hdl.handle.net/10652/6947"],"dc:identifier.uri":["https://hdl.handle.net/10652/6947"],"dc:language.iso":["en"],"dc:rights":["All rights reserved"],"dc:rights.holder":["Author"],"dc:subject":["grape vines","apple trees","leaf spots","plant disease","modelling","neural networks","image processing","pattern recognition systems in agriculture"],"dc:subject.discipline":["Applied Technologies"],"dc:subject.marsden":["ANZSRC Fields of Research 2020::31 Biological sciences::3108 Plant biology::310805 Plant pathology","ANZSRC Fields of Research 2020::46 Information and computing sciences::4603 Computer vision and multimedia computation::460306 Image processing","ANZSRC Fields of Research 2020::30 Agricultural, veterinary and food sciences::3002 Agriculture, land and farm management::300299 Agriculture, land and farm management not elsewhere classified"],"dc:title":["Grape & apple disease detection using CNN-ViT hybrid model with RF classifier"],"dc:type":["Masters Thesis"],"local:contributor.affiliation":["Unitec, Te Pūkenga"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Applied Technologies (Computing)"],"thesis:institution_name":["Unitec, Te Pūkenga – New Zealand Institute of Skills and Technology"]},"updated_at":"2026-11-26T14:13:46Z"}