Computer vision for presiced agriculture

Data science reinventens completely new methods for agriculture. It goes from fields analysis to each plant control. It allows to track every growing top dynamics to identify the aging and anomalies like diseases, drying, etc using computer vision.

It’s actual for expensive or specific types of plants. Let’s demonstrate it on the medical cannabis project example.

Certified company operates fully automated plantation in USA. The robot with HD camera used for the periodical circuiting of the plantation. Software detects grow tops and identifyis them, provides an information on growing process for every top as a result.


The first step of this project was to detect grow tops on images. In order to do it a neural network was trained on a labeled dataset.
In order to put the pictures into the neural network, they have to be of the same size, like these:

When grow tops on image were detected, we had to determine the size of bud for each of them. To do it, a standard OpenCV blobDetector was used, as it was suitable for our situation. The idea of it is to detect areas of similar characteristics using provided parameters, that are color(dark or light), shape(circularity, convexity, inertia), area and others.

Here are some examples of detected blobs in our case:

Next problem was racking of these detections. There are multiple options, that could have been used for it. One of them is the usage of some OpenCV algorithms with the filter. All of them were tested, but because of high similarities between targets of tracking and possible not affine transformation (some of the plants were moved, the scene shifted, the camera made zoom – all in difference of one frame!), were inefficient. Another option is using a DeepTracking, which is one of options using neural networks. But, in our case, we just went with heuristics.