PRECISION FARMING AI SOLUTION

About the Client

AgriTech company that develops an end-to-end service for managing, monitoring and optimizing the health and productivity of trees.

Business Challenge

The client’s goal was to give farmers a solution for automatically detecting ripe fruits. The solution would optimize inputs, protect the farm’s economic viability and increase the productivity of orchards by preventing tree diseases. It would also gather records about the health and productivity of any individual tree at any time, over time.

To reach this goal, the client started developing a solution that was supposed to increase productivity by more than 40%. This would be achieved with early detection of anomalies and diseases at two levels: an individual tree and the entire plantation.

Having built the basis for the solution, the client collaborated with Datamaister to implement more features, fix the ones that were working incorrectly and cover the data science part of the project.

Solution Overview

Our client has an AI team that creates a unique service that connects AI cloud technologies and multisensor data operations to reach the best analytical capabilities.

Datamaister extended the client’s existing team, increasing the accuracy of analysis and prediction by using sophisticated data science techniques.

The critical components of the system are:

  • Image preprocessing.
    Alignment of drone images using embedded drone sensors, drone and satellite images stitching and substitution. It gives farmers identical geo-aligned (with accuracy up to 6 cm) images and allows recognizing areas even when time passes.
  • Orchards decomposition.
    Some models recognize each lane of trees and each tree in it. The resulting dataset can be divided into different sets stratified by the number of oranges per image.
  • Growth analysis.
    Useful for monitoring each tree, comparing their status with the normal vegetation life cycle, recognizing and calculating fruits or creating other measurements easily.
  • Proprietary models.
    Our client can use proprietary models for decision-making support. They will save time, reduce costs and help to control the farm business.

Project Description

It took 4 months to release the project.

Firstly, we did thorough research and determined the subject area by analyzing available data and existing methods for solving segmentation problems. Secondly, we developed and tested various models. Only after that, we’ve developed the server and client’s part, did their integration and deployed the system.

When developing the project we had faced a couple of challenges, e.g. system integration with external services, which grants access to satellite images. We have tried to use different services, part of which were paid when others required significant modifications.

We have worked with multi-channel satellite data that required additional handling, such as image normalization, integration into one image, calculating additional channels (NDVI). Since these images were quite big (10000х10000 pxl) it was impossible to perform complex calculations due to RAM size limitation. We had to break the calculations into smaller parts with saving intermediate results. There were also imperfections in the markups that influenced the quality of the model, as a result, geo-specialists have received multiple requests to update the markups.

In order to track changes, a system of color identification was implemented:

  1. Deforestation areas that have not changed over a certain period are marked with YELLOW.
  2. The areas where there is an increase in deforestation are marked with RED.
  3. The areas that have no satellite data are marked with BLUE.

For each land lot, there is an opportunity to receive detailed information about the changes in deforestation.

Technological Details

Segmentation models were built using Keras, which is easy to use in the early stages of development, further we have moved to PyTorch that allows building more complex models.

The data science part for this platform was written in Python, therefore it was decided to use Python for the back-end part of the project for easier integration.

The front-end part of this platform was written using JavaScript library – React.

As the database, we have chosen PostgreSQL, as it has spatial database extender – PostGIS, which allowed us to store geospatial objects in the database.

For image processing and GIS we have used:

  • Imageio
  • openCV (powerful imaging tools)
  • gdal (used for calculating additional channels and images normalization)
  • geopandas (used for working with polygons and binding them to geographical coordinates)
  • rasterio (used for images in tiff format).

All systems services were deployed on AWS infrastructure.