Problem description
Introduction to Hardware
Bluetooth connection
GPS fixing :
Bluetooth Data transfer:
Read more- India is the largest contributor of cotton cultivation in the world but in recent times the cotton production has been decreased nearly 30% than cotton consumption so farmers face huge economic losses and the cotton prices has huge hike at recent times.
- The main reason for the cotton production loss is the cotton diseases. The cotton crops get affected by bacterial or fungal diseases or by pests. As the disease spread faster, it leads to huge production loss also it affects the cotton quality. So early detection and location of infected plants will help farmers in preventing the spread of disease to whole farmland, so that he need not treat his whole farmland instead the particular infected area can be treated..
- This project aims at the implementation of recent technologies such as drone monitoring and deep learning in agriculture. Sony Spresense board and Sony Spresense camera are physically interfaced with the drone to detect the infected cotton plants.
- The machine learning model is developed using Edge impulse platform and the developed model is deployed in the Spresense microcontroller.
- The built-in GNSS , which is one of the main feature of the Spresense Board , is used to detect the location of the infected plant in the farmland.
- The drone is integrated with Sony Spresense Board and camera board. Sony Spresense camera is used to get the live cotton leaf images in the field. Using Deep learning techniques, images from camera are processed and compared with the pictures which are collected from the real time plant saplings to detect if any plant is infected and also the type of the disease. The location of infected plant is identified using inbuilt GPS in Sony Spresense Board. Finally the output is displayed to the user via bluetooth application.
- HC-05 Bluetooth Module is the best and ideal to be used with Spresense Board.
- Refer the schematics diagram for the connections.
Edge impulse software is used for model training and deployment.
Step 1 :
- Login to Edge Impulse using your mailId. After logging in successfully you can create your own model.Refer below link,
- https://docs.edgeimpulse.com/docs/tutorials/image-classification
- You can create your own dataset for the type of diseases you need your ML model to detect,the dataset can be obtained from any opensource platforms or you can create your own dataset by obtaining real time images.
- You have to complete all the steps in impulse design(Impulse creation - use transfer learning for high accuracy,image feeding and impulse training).
- For better accuracy feed more images in the diseased class labels compared to the fresh cotton label.
Step 2 :
After developing your model sucessfully. Use the link below to connect your Sony Spresense Board to the edge impulse platform
Step 3 :
- After successfully connecting the Spresense board to the platform you can test the accuracy of the model using the Live classification option.
- Make sure the Sony Spresense Camera is connected to the Spresense board. The test image can be compared with the trained image.
- If you find no issues regarding the accuracy you can proceed to the deployment part.
Step 4:
- Choose the Sony Spresense board option in the latency calculations in the project info area.
- In the deployment option choose the Spresense board and click build option,now your model will be ready to deploy in your Spresense board.
- A binary file will be downloaded you need to flash the firmware.
- After the deployment of the model you will get the live classification result in your local desktop terminal without the use of internet.
- Hereby we have attached our live video demonstration
- https://drive.google.com/file/d/1-JevSJO2-sE1RQT9M1JKXtpIp1FA6lYx/view?usp=sharing
- For live inference preview on your device, from your terminal or command prompt run: edge-impulse-run-impulse --debug
- After the successful deployment of the model we need to connect the sony spresense to the arduino IDE for the gnss access.
- Use this link for GPS access,
- https://developer.sony.com/develop/spresense/tutorials-sample-projects/spresense-tutorials/how-to-read-gps-information
- Try different locations for proper location fixing. This process takes some time.
- You need to use your hc05 Bluetooth module in AT Mode to transfer the data from the board to the Bluetooth terminal application.
- Send AT commands through the serial port: https://docs.edgeimpulse.com/reference/remote-mgmt-serial-protocol 3
- You can run:
AT+RUNIMPULSE
, retrieve predictions and send them to your bluetooth module. - Finally your setup is ready,now you can monitor your field using our smart early cotton disease detector and save your field from economic loss!!!
- You can use an external power supply of 500 mAH lithium battery to power your board.
Comments