Foliar Leaf diseases in Apple Trees

Ujas
4 min readOct 10, 2020

This Blog is made by Ujas and Nir Patel And its Part of our Semester Group Project.

INTRODUCTION

Early detection of disease symptoms can be used to schedule pesticide application and pruning of infected tissues or eradication of infected apple trees to reduce the chance of severe outbreaks . Current disease identification practices in apple orchards involve scouting by experienced pathologists, shipping of potentially infected samples with visible symptoms to remote laboratories for chemical and PCR tests , and sharing digital images with experts for identification and recommendation. During a busy growing season, these practices can take so long, from observation, sample collection, shipping, analysis, and identification, that often recommendations are back to growers too late to take necessary control measures. There are also a limited number of extension experts who can provide in-person and on-site identification. Disease diagnosis can be a particular challenge for growers who are new and do not yet have expertise with the crop or for home growers, which can then also be a source of pathogen spread to commercial orchards.

Problem Statement

Misdiagnosis of the many diseases impacting agricultural crops can lead to misuse of chemicals leading to the emergence of resistant pathogen strains, increased input costs, and more outbreaks with significant economic loss and environmental impacts. Current disease diagnosis based on human scouting is time-consuming and expensive, and although computer-vision based models have the promise to increase efficiency, the great variance in symptoms due to age of infected tissues, genetic variations, and light conditions within trees decreases the accuracy of detection.

Objective

Objectives of ‘Foliar Leaf diseases in Apple Trees’ are to train a model using images of training dataset to 1) Accurately classify a given image from testing dataset into different diseased category or a healthy leaf; 2) Accurately distinguish between many diseases, sometimes more than one on a single leaf; 3) Deal with rare classes and novel symptoms; 4) Address depth perception — angle, light, shade, physiological age of the leaf; and 5) Incorporate expert knowledge in identification, annotation, quantification, and guiding computer vision to search for relevant features during learning.

DATASET

In our dataset there is 1800 images of different diseases like Rust,Scab,Lealthy,and multiple_diseases.

DATASET
Rust
Healthy
Scab
Multiple disease

Implementation Details

FLOW OF WORK

Step 1- Preprocessing

we have image of 2048*1366 pixel and there is very difficult to train model using such a high pixel image so we convert this image to 1024*633(half of actual image) and after converting we convert image to array using numpy.

Preprocessing.

Step-2 Model Building

For Creation of model We use resnet50 deep neural network Architecture.

Resnet,short for Residual Networks is a classic neural network used as a backbone for many computer vision tasks. This model was the winner of ImageNet challenge in 2015. The fundamental breakthrough with ResNet was it allowed us to train extremely deep neural networks with 150+layers successfully. Prior to ResNet training very deep neural networks was difficult due to the problem of vanishing gradients.

Resnet50 Architecture.

Step 3- Model Deployment

There is two task in deployment 1)creating API 2)Building Mobile App.

1)API-For API creation we Use Flask.

FLASK-Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions

API take leaf image As a input And Give Classified Output In JSON Format.

After Completing API We use AWS EC2 Service For Deployment of API.

EC2-Amazon Elastic Compute Cloud is a part of Amazon.com’s cloud-computing platform, Amazon Web Services, that allows users to rent virtual computers on which to run their own computer applications.

2) BUILDING MOBILE APPLICATION

For Building mobile app we use FLUTTER Framwork

FLUTTER-Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. The first version of Flutter was known as codename “Sky” and ran on the Android operating system.

SCREENSHOTS-

home screen
Image Picker
Selected Image

Conclusion

By Creating this project we learn about different technologies and learn about how to deploy our application in real time environment.

--

--