Crop disease damage is a major source of concern for farmers and India's agriculture-based economy accounts for a considerable amount of the country's GDP. This project work utilizes machine learning to determine the type of illness present in a crop based on leaf photos. First, using the Single Shot Detector, the leaves are individually detected in real-time from the video feed captured from the field. Images of the leaves taken from the field can also be fed as an input to this system. A convolutional neural network is presented to categorize the type of illness present in the crop, which is trained using the PlantVillage dataset, and the proposed hybrid network is implemented on Kria KV-260 for real-time detection and identification. So this platform is developed for advanced vision application development without requiring complex hardware design knowledge. KV260 also provides the benefit of differentiating our design at software level with Vitis AI. The accuracy of disease classification reached is around 95.88 percent.
Motivation - Why we decided to make this project?Agriculture is extremely important to the world economy. Agriculture is well-known in India, and it employs over 60% of the population. Nowadays, the bulk of crop vegetation fails because crop disease detection is not successfully integrated into farmer harvesting processes. Every year, farmers battle disease damage to their crops. Farmers may benefit greatly from early detection and treatment of these diseases. It is difficult to find skilled experts in the field that can detect any type of plant disease. It would be a boon to farmers if an automated system could identify crop illnesses and other problems (such as malnutrition, weeds, or insect damage) through handheld devices or hardware on agricultural equipment in real time.
As a result, an system that can predict illness in crops before the entire harvest is ruined is required. Machine learning can be used to detect disease in crops and assist farmers in identifying the disease. Using the notion of deep learning, this research project intends to construct a real-time plant disease detection system. The model can be deployed on an embedded platform like Kria KV260 to provide real-time detection of the disease present in the crop. The main aim is to predict plant disease efficiently and so farmers can take effective measures before the disease spread in the crops. So, the objectives of the project are as follows:
- Collecting crop disease dataset for Indian crops(Gujarat)
- Developing a machine learning (ML) models for crop disease detection and classification.
- Porting the ML model on Kria KV 260
The project's major goal is to detect leaves on plants effectively and then accurately identify the type of illness present on the leaf. The SSD model was used to recognize plant leaves and the a new architecture based on Convolutional Neural Network (CNN) is used to identify leaf diseases. The SSD model and proposed CNN model are integrated to create a hybrid model that can detect leaves and diagnose diseases at the same time. Furthermore, this suggested hybrid model is deployed on Kria KV-260 for real-time testing to answer the problem of real-time detection of plant leaf disease. Figure below depicts a block diagram of the proposed system for leaf identification and disease categorization.
The proposed system was tested on the leaf images of PlantVillage dataset as well as the data captured from a real Tomato farm located nearby. By taking the system to a disease infected tomato leaf, the model's effectiveness for leaf detection and illness recognition was tested. The results are presented in figure below:
As evident from the figure, the model is able to accurately identify the type of disease from the leaves - Spider Mites, Early Blight, Tomato Mosaic Virus and Leaf Mold. The suggested model performs well in all situations, including atmosphere, background, soil, and illumination, as evidenced by these real-time field tests.
Installation of Vitis and Vivado on Ubuntu is quite tiring. They are a lot of dependencies that are prerequisites and are must for installing Vitis. No such proper documentation or links are available for the proper installation. Moreover it takes a long time to get installed in the device. It took us more than 12 hours for the complete installation after referring to some dead links.
2. TensorFlow Frozen graph problem and its installationFor getting the final froze graph, the inputs are.pb and.ckpt file which gives us the output frozen_graph.pb. This was a major problem of TensorFlow library, without this graph further processing was not being done.
This instruction was not being executed:
freeze_graph --input_graph yolov2-tiny.pb --input_checkpoint yolov2-tiny.ckpt --output_graph frozen/frozen_graph.pb --output_node_names yolov2-tinyconvolutional9/BiasAdd --input_binary true
Installation issue of TensorFlow
For real time interfacing of camera module and the processing, open CV is the most extensively used Python Library. Without this there will be no camera interfacing taking place and installing it in Linux environment was very time consuming.
For installing Vitis AI, we were trying to git clone the KV-260 ml accelerated library, but due to some issues the cloning was getting stucked at some point. For the installation purpose we need to create a Docker in which the Vitis-AI is to be installed. There were errors related to index-pack, GnuTLS and early EOF.
Before beginning with our own model, we thought of implementing and checking the hardware with YOLO. However, the main problem for real time camera interfacing with KV-260 while implementing YOLO pre-trained models is that the kit was not supporting real time webcam interfacing.
Comments