Systems and methods for plant species identification
Patent Information
- Application Number
- JP2022513875
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-09-05
- Filing Date
- 2020-09-03
- Publication Date
- 2024-09-12
- Estimated Expiration
- 2040-09-03
AI Technical Summary
Existing image processing methods for identifying weeds in crop fields suffer from low accuracy in semantic segmentation, particularly due to the similarity in shape and color among different weed species, leading to inefficient herbicide use and environmental impact.
A dual-task convolutional neural network (CNN) is employed, combining a classification task with semantic segmentation, using weighted loss functions to enhance pixel accuracy in identifying and quantifying weed species, including their parts, by training both tasks simultaneously.
The dual-task CNN achieves improved pixel accuracy and volumetric quantification of weeds, enabling precise herbicide application and reducing environmental impact by optimizing herbicide use.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates generally to electronic data processing, and more particularly to an image processing method, a computer program product, and a system for identifying weeds in a field.
Background Art
[0002] The presence of a weed community in agricultural land has an adverse effect (H. van Heemst, "The influence of weed competition on crop yield", Agricultural Systems, Vol. 18, No. 2, pp. 81-93, 1985, see). In the context of this document, weeds relate to any plant growing in the field that is different from the crops cultivated in the field. Two main reasons, competition and plant health problems, have been identified by research. Certain plant species (e.g., weeds) compete with crops for soil, nutrients, and sunlight, slowing down and reducing crop growth. Also, some weeds are hosts for pests and diseases. In this regard, farmers use herbicides to control or limit the weed population.
[0003] The following table includes some examples of weeds and their respective EPPO codes. Table 1: Examples of Weeds
Table 1
[0004] Thus, in recent years, agriculture has faced a complex challenge: the need to optimize food yields by ensuring the optimization of available resources while minimizing environmental impact. Taking weed control as an example, farmers typically apply the same amount of herbicide per surface area, ignoring the fact that different weeds have different densities, growth rates, and growth stages. However, biological studies have shown that using different types and ratios of herbicides optimizes product effectiveness, leads to better crop growth, and reduces the deposition of chemicals in the environment. Early weed identification enables optimization and improved performance in the use of plant hygiene products, leading to less concentrated herbicide use and the use of more specific herbicides.
[0005] New technologies have led to site-specific weed management (SSWM) (L. Tian, JF Reid, and JW Hummel, "Development of a precision sprayer for site-specific weed management," ASAE Transactions, Vol. 42, No. 4, p. 893, 1999), which involves spraying precise amounts of herbicide only in areas where weeds are present. SSWM significantly reduces herbicide use through optimal spraying. Two critical tasks in applying SSWM are achieving accurate differentiation between weeds and crops, and proper weed quantification and segmentation. The conventional method for addressing this problem is to manually segment plants on images, which is extremely time-consuming.
[0006] Furthermore, in recent years, machine learning techniques based on convolutional neural networks (CNNs) have been introduced. While CNNs have many applications in agriculture, the quantification of weeds has not yet been satisfactorily solved. Semantic segmentation for weed identification in the field based on trained standardized CNNs does not work well for plant image datasets due to domain differences. Semantic segmentation means understanding an image at the pixel level, that is, assigning an object class to each pixel in the image. In addition, the inherent complexity of segmenting plants that have little to no visual difference prevents farmers from successfully applying standardized CNN topologies to solve the weed identification problem with sufficient accuracy.
[0007] Mortensen et al. presented a study on semantic segmentation of crops and weeds using deep learning (AK Mortensen, M. Dyrmann, H. Karstoft, RN. Jorgensen, R. Gislum, et al., "Semantic segmentation of mixed crops using deep convolutional neural network," CIGR-AgEng Conference, June 26-29, 2016, Aarhus, Denmark. See abstract and original paper, pp. 1-6, Organizing Committee, CIGR2016, 2016), in which they achieved 79% pixel accuracy in semantic segmentation of different crop species. Later, they were able to distinguish corn crops from 23 different weed species by correctly labeling pixels as "corn" or "weed" in real-world cases with an impressive 94% pixel accuracy (M. Dyrmann, AK Mortensen, H. S Midtiby, RN Jorgensen, et al., "Pixel-wise classification of weeds and crops in images by using a fully convolutional neural network," Transactions of the International Conference on Agricultural Engineering, Aarhus, Denmark, pp. 26-29, 2016). Other authors have studied semantic segmentation of crops and weeds using deep CNNs to find new architectures and methods that may lead to better segmentation.In 2018, I. Sa et al. (I. Sa, Z. Chen, M. Popovic, R. Khanna, F. Liebisch, J. Nieto, and R. Siegwart), published "weednet: Dense semantic weed classification using multispectral images and mav for smart farming," in IEEE Robotics and Automation Letters. IEEE Letters, Vol. 3, No. 1, pp. 588-595, 2018 (reference), achieved an F1 score of 80% in segmenting crops and weeds with their improved VGG-16 called WeedNet, and A. Milioto et al. (A. Milioto, P. Lottes, and C. Stachniss), "Real-time semantic segmentation of crop and weed for precision agriculture robots leveraging background knowledge in CNN," 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 2229-2235, IEEE, 2018 (reference), achieved an mIoU of 80.8% in pixel-level classification of crops, weeds, and soil. Such prior art studies focus on crops and treat all weed species as a single class (from a taxonomic standpoint). The pixel accuracy obtained using these prior art methods is not yet satisfactory to adequately support agricultural workers seeking to optimize field protection activities. [Overview of the project] [Problems that the invention aims to solve]
[0008] Therefore, there is a need to provide systems and methods with improved image analysis capabilities for plant species identification. As a result, the plant species identification used herein relates to the problem of volume quantification of plants belonging to specific plant species, for example, weed species that compete with crops in a field. That is, the result of the plant species identification step is information about which plant species are present in the field and exactly where plants of a particular species can be found. Furthermore, there is interest in obtaining additional information regarding the presence and volume of different parts of each plant, such as stems, leaves, and fruits. For example, such information with a higher granularity regarding plant elements of a particular plant species (e.g., fruits) can provide useful information regarding the potential yield provided by the field or even the risk that a particular weed may spread rapidly, thanks to a specific expected number of seeds.
[0009] The problem of quantifying weed volume is solved by applying semantic segmentation techniques using CNN topology, resulting in higher pixel accuracy in weed segmentation than that achievable by known segmentation approaches such as standard PSPNet.
[0010] Embodiments of the present invention include a computer-implemented method for identifying plant species in a crop field, and a computer program product having computer-readable instructions stored in the memory of a computer system and, when executed by one or more processors of the computer system, causing one or more processors to execute the method. Further embodiments relate to a computer system configured to execute a computer-implemented method (for example, when the aforementioned computer program product is executed).
[0011] A computer-implemented method for identifying plant species in a crop field uses a specific convolutional neural network, referred to herein as a dual-task CNN. A dual-task CNN has a topology configured to perform two distinct tasks. Each task is associated with its corresponding loss function, and the entire dual-task CNN is trained considering two (different) loss functions. In this approach, the first task (a classification task performed by an intermediate module) guides the second task (a segmentation task performed by the semantic segmentation module of the dual-task CNN), leading to an overall improvement in the accuracy of the plant species segmentation results. The semantic segmentation module is also referred to herein as the “segmentation module.”
[0012] The intermediate module of a dual-task CNN performs the first task by determining the plant species present in the test input image. The result of the first task is associated with the first loss function. Plant species determination corresponds to a classification task. Therefore, the intermediate module can be implemented by a classification neural network or a recurrent neural network (e.g., one based on a residual network using a RESNET* backbone, such as a RESNET50 convolutional neural network). When using a classification neural network (i.e., a neural network configured to perform a classification task), the output is information about which plant species are present in a particular image representing crops and weeds, for example. In addition, when using a recurrent neural network, information about the proportion of present plant species is provided. Both CNN types provide information about the plant species present in a test input image containing crops and weeds.
[0013] When a classification neural network is used as an intermediate module, the first loss function is, favorably, a "weighted binary cross-entropy" where each sample (pixel) is weighted according to the class to which it belongs. The intermediate module uses a "sigmoid" as the final activation layer to support the presence of multiple classes simultaneously. For example, an analyzed section (i.e., a tile in the image) of a test input image may simultaneously contain pixels belonging to corn plants, weeds of different weed species, and soil. The sigmoid activation layer can handle such multiple classes simultaneously when making predictions about the presence of various classes on a text input image.
[0014] Binary cross-entropy and categorical cross-entropy are known to experts in this field. The following weighted categorical cross-entropy is similar to categorical cross-entropy, but with weights w c This has been added.
number
number
[0015] If the intermediate module is implemented by a recurrent neural network, the first loss function is favorably the mean squared error or mean error. The intermediate module may use a linear or sigmoid as the final activation layer to simultaneously support the presence of multiple classes.
[0016] The segmentation module of a dual-task CNN performs a second task in segmenting a test input image and determining a class for each pixel of the test input image. The class includes the determined plant species. The second task is associated with a second loss function different from the first loss function. Advantageously, the second loss function is "weighted category cross-entropy". For example, the segmentation module may be implemented by a pyramid pooling module (e.g., PSPNet, DeepLab, or based on piecewise topology).
[0017] In other words, each task performed by the dual-task CNN is optimized based on its own loss function. However, the intermediate module and the segmentation module are trained together, taking into account the first and second loss functions. This joint training of two modules with two different loss functions has an effect where the training of the intermediate module is influenced by the training of the segmentation module, and vice versa, leading to an improvement in the pixel accuracy of the final segmentation result. Traditional PSPNet training for semantic segmentation (H. Zhao, J. Shi, X. Qi, X. Wang, and J. Jia, "Pyramid Scene Parsing Network," Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2881-2890, 2017, reference) relies on a two-step training process in which an initial result is generated by monitoring with an intermediate segmentation loss, and a second step learns the subsequent residuals along with the final loss. Thus, the optimization of a deep learning neural network is broken down into two optimization tasks, each having a simpler solution. However, while this approach can yield good results, the learning from the first (intermediate) loss is lost while training the network with the second (final) loss. Despite the advantages that can be achieved by using traditional PSPNet for sematic segmentation, it lacks the ability to extract classes that exist in only a few percent of the pixels of the analyzed image. This problem is solved by the disclosed extension of the traditional segmentation module (e.g., PSPNet) by adding a second classification or regression task (performed by the intermediate module) that is trained concurrently with the segmentation task (performed by the segmentation module).This provides guidance for a simultaneous learning process using two loss functions.
[0018] In contrast to the traditional PSPNet approach, where the neural network is divided into two distinct problems that are sequentially trained with a single loss function that is active at any given time as a training strategy, the approach disclosed herein trains both tasks (classification and segmentation tasks) at the same time (i.e., simultaneously) by a simple weighted sum of the respective loss functions for both tasks.
[0019] The dual-task CNN topology disclosed herein extends traditional semantic segmentation networks to actual dual-task networks where the network weights are optimized simultaneously for two loss functions, so that the classification loss guides the segmentation loss. The loss function may be a weighted cross-entropy function, where each sample (pixel) is associated with a weight. Below, the training dataset for the dual-task CNN is described, which combines different data subsets: one containing manually annotated images and another containing automatically annotated images. The weights of samples can be associated with the data subset to which they belong. Samples from the data subset containing automatically annotated images may have higher weights than samples from the manually annotated dataset. Typically, the manually annotated data subset contains pixels that humans have classified as "other" or "unknown". To reduce the impact such pixels have on training a dual-task CNN, while still retaining a small amount of weight to enable domain adaptation to actual images, the weight of such pixels may be reduced (for example, by a number in the range of 10 to 1000). As a result, the weight reduction cannot be negative in any way.
[0020] Advantageously, the dual-task CNN module is jointly trained based on an image training dataset that includes a combination of two training data subsets: one subset that includes manually annotated training images and another subset that includes automatically annotated training images.
[0021] For example, the first data subset may include images representing the actual situation in a field with crop plants of a particular crop species and weed plants of one or more weed species, where the weed plants are spread among the crop plants. The first data subset has manual pixel annotations indicating the plant species to which the pixels of the training images belong. Typically, a human user looks at each image in the first dataset and marks a particular subsection of the image as belonging to a particular class (e.g., crop species, weed, seed, soil). In one implementation, the manual pixel annotation may be at a higher level of granularity in that not only are the pixels of a plant of a particular plant species annotated as that plant species, but the particular plant species may also have subclasses for annotation of various plant elements such as stems, leaves, fruits, etc. That is, the annotation can be done using tags such as corn1, corn1:leaf, corn1:fruit, weed1, weed1:leaf, weed1:fruit, etc. Often, since the user simply specifies a rectangle (or other shape including freeform shapes) on the image and enters the annotation for the specified area, such annotation is rather inaccurate at the pixel level. Considering the natural distribution of classes in the training images, it is clear that such manual annotation is only a rough approximation.
[0022] For this purpose, the first data subset is complemented (enhanced) by a second subset that includes training images with automatically generated annotations that are correct at the pixel level. Obtaining automatically annotated training images may be achieved in different ways.
[0023] For example, the second data subset may include images representing multiple plants of different plant species originally obtained from a single plant image. As a result, each single plant image represents a single plant of a specific species. Then, by extracting the image portions belonging to each single plant from the single plant image and pasting the extracted image portions onto a background image of soil, test images can be synthesized. As a result, a number of single plant images may be associated with various plant species. However, for each single plant image (since it is known that each pixel of the extracted section represents a part of the plant of its respective species), each species is known, and the extracted image portions to be later pasted onto the background image of soil are associated with each annotation at the pixel level. Thus, the pixels of the second data subset are automatically annotated with the class (species) to which they belong, as known from the original single plant image.
[0024] For example, another data subset having automatically generated annotations can be a third data subset that includes actual situation images representing multiple (weed) plants of a single (weed) species (typically, also representing different growth stages of the same plant species in one image). Since the third data subset includes only plants of a single species, the pixels can be easily automatically annotated with the corresponding class annotations corresponding to each plant species. For example, using a well-known leaf segmentation algorithm, all pixels can be extracted from the image of the original single-species actual image and annotated with the corresponding class information.
[0025] Thereafter, the trained dual-task CNN is applied to the test input image in the following manner. The test input is received by a computer system executing the dual-task CNN. The test input includes images representing plants belonging to different species. For example, the image may represent crop plants of a specific crop species in a field and one or more weed plants of weed species present among the aforementioned crop plants (i.e., spreading among the crop plants).
[0026] The computer system includes an image tile extractor that extracts tiles from a test input image having the dimensions of the intermediate module's input shape. Typically, the test input image is expected to be high resolution. Dual-task CNNs are also assumed to be trained on images of similar resolution. For example, images with a resolution of 1024x1024 to 10,000x10,000 pixels or higher are considered high-resolution images. However, the dimensions of the intermediate module's input shape (first layer) are lower (for example, the input shape of a typical RESNET50-based classification neural network can be (473,473,3)). Therefore, the image tile extractor divides the test input image into image tiles that match the intermediate module's input shape.
[0027] In the following, each extracted tile is processed separately, and at the end of the segmentation task, the segmented tiles are reconstructed into a whole segmented image. For each extracted tile, the intermediate module predicts the presence of one or more plant species present in each tile. The output of this first (classification) task to the segmentation module is an intermediate characteristic map containing all the characteristics classified by the intermediate module.
[0028] The segmentation module uses an intermediate feature map to generate a mask image, where each pixel on the mask is associated with a value between 0 and 1 (i.e., a value within the [0, 1] interval) that represents the probability of the aforementioned pixel belonging to the relevant class. This is achieved by extracting multiscale features and contextual information from the intermediate feature map and concatenating the extracted information to perform semantic segmentation.
[0029] Finally, the generated masks (masks for each tile) are combined into the final image. The final reconstructed image corresponds to the original test input image, with each pixel having additional information indicating whether it belongs to a specific plant species, and if so, which species. For example, color coding may be used, in which case a unique color is assigned to each plant species, and the pixel color of the pixels in the final image is adjusted to the assigned color.
[0030] When the segmentation module is implemented by a pyramid pooling module for performing semantic segmentation, it typically includes four separate filters with different receptive fields that scan intermediate feature maps provided by the intermediate module and create four arrays for multiscale feature detection that integrate information of different scales and sizes.
[0031] Furthermore, the pyramid pooling module typically includes multiple upsampling layers configured to use bilinear interpolation to restore the image size of each sequence to the size of the intermediate characteristic map. Additionally, the convolutional layers of the pyramid pooling module extract contextual information from four separate filters and concatenate this contextual information with information of different scales and sizes to generate a final characteristic map of the same size as the intermediate characteristic map. Finally, the pyramid pooling module typically includes a fully connected layer and computes the final pixel-by-pixel prediction as a generated mask with a final activation layer, "softmax". The "softmax" activation function is advantageous because it transforms a number known as a logit into a probability that sums to 1. A logit is a raw point output by the last layer of the neural network before activation occurs. Generally, the "softmax" function outputs a vector representing the probability distribution of a list of potential outcomes. When applied to the problem of plant species segmentation, pixels are mutually exclusive in that each pixel can belong to exactly one class (e.g., a pixel can be either soil or a specific species of plant, but not both at the same time). Therefore, "softmax" predicts the probability that each pixel belongs to a specific class (e.g., plant species or soil).
[0032] Further aspects of the present invention will be realized and achieved by the elements and combinations specifically provided in the appended claims. It should be understood that the above general description and the embodiments for carrying out the invention described below are illustrative and descriptive only, and do not limit the invention as described. [Brief explanation of the drawing]
[0033] [Figure 1] This includes a diagram of a computer system for identifying plant species in farmland using a dual-task convolutional neural network according to one embodiment. [Figure 2]This is a schematic flowchart of a computer-implemented method for identifying plant species in agricultural land, according to one embodiment. [Figure 3] An example topology of a dual-task convolutional neural network according to one embodiment is shown. [Figure 4A] This demonstrates the generation of a first training data subset using manual annotation. [Figure 4B] This demonstrates the generation of a second training data subset using automated annotation. [Figure 4C] This demonstrates the generation of a third training data subset using automated annotation. [Figure 4D] A single plant image 44 illustrates a scenario representing further elements of the plant. [Figure 5] This figure shows examples of common computer devices and common mobile computer devices that may be used in conjunction with the technologies described herein. [Figure 6] This demonstrates smart agricultural machinery as part of a distributed computing environment. [Figure 7] An example of a smart spraying system is shown. [Figure 8] This document presents a control protocol for a smart spraying system that controls weeds, diseases, or insects via a chemical control mechanism. [Modes for carrying out the invention]
[0034] Figure 1 includes a diagram of a computer system 100 for identifying plant species (e.g., crop or weed species) in a field using a dual-task convolutional neural network 120 according to one embodiment. Figure 2 is a schematic flowchart of a computer-implemented method 1000 for identifying plant species in a field according to one embodiment. Method 1000 may be performed by the computer system 100. In the following detailed description, Method 1000 of Figure 2 is disclosed in relation to the system 100 of Figure 1. Accordingly, the description will refer to the reference numbers used in both figures. Furthermore, Figure 3 shows an example topology of a dual-task convolutional neural network 122 according to one embodiment. Thus, where an example embodiment is considered with respect to a component or module of the computer system 100, the description will also refer to the reference numbers in Figure 3 in relation to the description of Figure 1.
[0035] The purpose of the computer system 100 is to support farmers in identifying the species and location of plants growing among crop plants in section 1 of a field (cultivated land or greenhouse). Such a section is sometimes referred to as a plot in the literature. In the drawing, different object shapes are used to distinguish different plant species. In the example, triangles are used to represent a specific species of crop plant being cultivated in the field. All other shapes represent different species of weed plants. The background drawn with dots represents the soil portion of section 1 (i.e., the part of the ground not obscured by plants). An image recording device 90 (e.g., a digital camera capable of recording high-resolution images with a resolution ranging from 1024 to 10000 pixels) takes an image of section 1 and provides this image to the computer system 100 as a test input image 91, which is then received by the corresponding interface 110. The test input image 91 schematically represents the crop plant of crop species 10 (triangle) in the field to which section 1 belongs. Furthermore, test input 91 represents one or more weed species 11, 12, and 13 located among the aforementioned crop plants. The weeds are spread among the crop plants (crop species 10). In a natural field, weeds of different species can spread very regularly or appear in specific populations. In the example, there are two populations of weeds: one of species 11 (e.g., crabgrass), one of species 13 (e.g., foxtail grass), and one of species 12 (e.g., goosefoot). As shown in the schematic example, there may be overlapping areas among the plants in image 91. For example, some crop plants overlap with other crop plants (as schematically shown in Figure 1) and overlap with some weed plants. Weeds may also overlap with crop plants.
[0036] In addition to the interface 110 for receiving test input images (and training images as well), the computer system has an image tile extraction module 130 that extracts tiles from the test input for further processing. Furthermore, an image reconstruction module 140 is used to finally reconstruct the processed tiles into a fully segmented image 92 output to the user (e.g., a farmer). Image processing to achieve semantic segmentation of the text input image is performed by a dual-task convolutional neural network 120 (DTCNN). The DTCNN 120 has the following two submodules: - An intermediate module 121 for performing a first task to determine weed species 11, 12, and 13 present on the test input image 91. The first task is associated with a first loss function LF1 for the purpose of optimizing the DTCNN. The first task (classification) of the DTCNN model analyzes the input image tile by tile and predicts the presence of different classes in each small part (i.e., tile) of the input image. - A segmentation module 122 performs a second task: segmenting the test input image 91 to determine the class of each pixel. Naturally, the classes for each pixel are mutually exclusive, in that a particular pixel can belong to only one class. Once the image tiles have passed the classification task, they are reduced to a characteristic map that is passed to the segmentation module. The classes include the determined weed species (and crop species and soil species as well). The second task is associated with a second different loss function LF2. The output generated by the segmentation module 1700 for each tile is a class-based correspondence mask. This mask is represented by an image the same size as the tile, where each pixel is associated with a value in the interval [0,1] that represents the probability that the pixel belongs to the associated class. The closer the value is to 1, the more likely the pixel is to belong to that class. Values above a given threshold are considered to belong to the class. This binary mask is considered to be the output of the segmentation task generated by the segmentation module 1700.
[0037] The final post-processing involves interpreting and combining these masks to reconstruct all the tiles into the final segmented image.
[0038] The DTCNN model exhibits a degree of invariance to different lighting conditions (e.g., in section 1), leaf overlap, background, and multiscale detection, surpassing models used in prior art approaches.
[0039] Before applying DTCNN120 to the test input, the network is trained on images from the training dataset, thereby training the intermediate module 121 and the segmentation module 122 together, taking into account the first and second loss functions LF1 and LF2. This is done directly by minimizing the two loss functions as follows: Combinatorial loss = Segmentation loss + Alpha * Classification loss Here, alpha can be a number in the range [0, 100]. As a result, the "segmentation loss" is associated with LF2 and the "classification loss" is associated with LF1. For example, one might choose alpha = 0.2 and consider the weighted category cross-entropy loss function LF2 for the segmentation task and the weighted category cross-entropy loss function LF1 for the classification task. That is, training of both modules occurs in parallel with the optimization of the two related loss functions. As mentioned earlier, prior art segmentation networks such as the PSPNet topology have two subsequent training stages, but when the second stage of training is performed, the training of the first stage is almost lost. In contrast, a co-training approach with separate loss functions for each task allows the performance of each task to be measured separately through each loss function, while simultaneously setting the weights for the entire topology of the DTCNN120, including the intermediate module 121 (for the classification task) and the segmentation module 122 (for the segmentation task).
[0040] The disclosed network architecture 120 was selected by analyzing intrinsic features that describe the types of images being segmented. Since color does not provide additional information (weeds and crop plants are typically all green), the decision is based rather on analyzing the shape and boundaries of the plants. The DTCNN has the following three main characteristics: - Extraction of spatial information. The model can segment leaf groups, but in reality, it is classifying every single pixel in the image. As a result, the network focuses on individual pixels, but at the same time, it can extract spatial information for segmenting objects. In this way, the model learns an abstract concept of what a leaf is, in that it learns which pixels in a particular region belong to a leaf. This property is called "pixel grouping". - High-resolution characteristics. Leaves of different weed species can be very similar. There may be images where the difference between two types of leaves is only visible across a high-resolution test input image of about 20 pixels. This means that the DTCNN needs to learn filters that focus on small groups of pixels to detect such subtle differences. This also applies to the learned filters for detecting sub-elements of different plants (e.g., fruit, stem, etc.). - Multiscale detection. Typically, leaf scales vary from image to image. Often, different plants at different stages of growth are represented in the same image. Therefore, DTCNN must recognize leaves of the same type (i.e., leaves of the same plant species) of different sizes and ages that coexist in the same image. For example, in later stages of growth, the plant may already be bearing fruit. Therefore, learning fruit features specific to a particular species can also help in recognizing the aforementioned species.
[0041] The Pyramid Scene Analysis Network (PSPNet), published in 2017 by Zao et al. (see above), is a deep learning model specifically designed for semantic segmentation to understand scenes. It involves classifying each pixel in an image as part of an object, considering the color, shape, and position of each element within the image. PSPNet is a standard semantic segmentation network that aggregates two main characteristics: multiscale information (pyramid-shaped modules) and contextual information. (Based on the 2012 PASCAL VOC dataset (M. Everingham, L. VanGool, CK Williams, J. Winn, and A. Zisserman), "The Pascal Visual Object Classes (VOC) Challenge," and the International Journal of Computer Vision) In *Vision*, Vol. 88, No. 2, pp. 303-338, 2010 (reference), PSPNet is described as follows: DeepLab (L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille, "Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs"), IEEE transactions on pattern analysis and machine intelligence. (Intelligence), Vol. 40, No. 4, pp. 834-848, 2018, see reference) or classification (G. Lin, C. Shen, A. van den Hengell)PSPNet performed better than other models, such as VanDenHengel and I. Reid, "Efficient piecewise training of deep structured models for semantic segmentation," Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3194-3203, 2016 (reference). Furthermore, PSPNet appears well-suited to the parameters required to solve the weed identification problem because it has a pyramidal pooling layer (for multiscale detection) and is specialized for semantic segmentation (high resolution) and scene analysis (contextual information). That said, those skilled in the art may use any other semantic segmentation module well known in the art as the basis for segmentation module 122.
[0042] However, applying traditional PSPNet topology to real-world field imagery yields unsatisfactory results. The problem is that training semantic segmentation datasets often present very different classes. Differences are found in color, shape, and texture, requiring different models to specialize in collecting all this information and predict each pixel. On the other hand, classes shown in images with crops and different weed species are very similar in shape and color. Differences are mainly found in the fine boundaries and edges of plant leaves (or other characteristic plant elements such as plant fruits). Furthermore, real-world field images typically represent leaf overlap, variations in lighting, and different multi-scale and growth-stage morphologies. For these reasons, pre-trained networks do not work well with plant image datasets.
[0043] PSPNet's ability to extract contextual information can even be counterproductive. In other detection scenarios, for example, detecting the sky as a background can be helpful in classifying airplanes or aircraft. However, in plant image datasets, the background and adjacent objects often look almost identical to the object being identified. Using that information can practically lead to misclassification. Furthermore, all leaves are almost the same color. Often, a single object exhibits a common pixel intensity (color) that distinguishes it from other objects. In this case, all leaves look similar in that part, and color does not provide additional information. Therefore, training DTCNN120 focuses on edges and boundaries.
[0044] To benefit from the advantages of the semantic segmentation module in its application to plant image datasets, a classification task is added to the topology of DTCNN120. The model is trained to classify small portions of the image simultaneously, learning pixel-level classification. Modifications of this traditional semantic segmentation network, such as PSPNet, improve pixel grouping (for the classification task) without sacrificing focus on detecting minor differences (for the segmentation task). Consequently, it is important that the classification task is associated with its own loss function, and the segmentation task is also associated with its own loss function, and that both tasks are trained together simultaneously, taking both loss functions into consideration.
[0045] When the computer system 100 receives the test input image 91, the extraction module 130 extracts 1200 tiles from the test input image having the dimensions of the input shape of the intermediate module 121. The input to the CNN is always a 4D array. That is, the input data has the shape (batch size, height, width, depth), where the first dimension represents the number of images processed each time, and the other three dimensions represent the dimensions of the image, which are height, width, and depth. The depth of the image is the number of color channels. For example, an RGB image has a depth of 3, and a grayscale image has a depth of 1. For example, the intermediate module may be implemented as a classification CNN 121-1 or a recurrent CNN 121-2 based on the RESNET architecture, such as the RESNET50 topology or other appropriate members of the RESNET family topology. The dimensions of the first layer of the intermediate module determine the dimensions of the tiles formed when the image is divided by the extraction unit 130 for further processing of tiles. For example, when using the RESNET50 CNN topology, the tile dimensions are configured to conform to the input shape of (473,473,3).
[0046] The intermediate module 121 predicts the presence of one or more plant species in each tile 1300. The output of the intermediate module includes classification results 121o2 that provide the plant species present in the test input image (as classes) (naturally, in addition to the weed species class, the classification results also include crop species and soil classes), and further includes a corresponding intermediate characteristic map having the extracted characteristics associated with the identified classes. For further processing, only the intermediate characteristic map 121o1 is output to the segmentation module 122 1400. The size of the intermediate characteristic map is only a small fraction (e.g., 1 / 8) of the size of the input image (corresponding to the tile size).
[0047] Figure 3 shows an example embodiment of a segmentation module 122 implemented with a pyramidal pooling module based on a PSPNet topology. Note that in test runs of the system, PSPNet outperformed other semantic segmentation topologies. However, those skilled in the art may implement segmentation module 122 using other segmentation topologies. In the PSPNet implementation, a pooling layer 122-1 that performs an initial filtering function in selecting the characteristic with the highest activation (i.e., the characteristic with the highest local neighborhood of activation) from the intermediate characteristic map typically processes the intermediate characteristic map 121o1.
[0048] The selected characteristics are then transferred to a filtering layer 122-2, which scans the selected characteristics of the intermediate characteristic map 121o1 and implements four isolated filters with different receptive fields to create four sequences for multiscale characteristic detection, integrating information of different scales and sizes.
[0049] The right-hand filter in filtering layer 122-2 is the coarsest level, performing an overall average pooling on each feature map to produce a single binary output. The filter following on the left is the second level, dividing the feature map into 2x2 sub-regions and then performing average pooling on each sub-region. The next filter on the left is the third level, dividing the feature map into 3x3 sub-regions and then performing average pooling on each sub-region. The filter on the left is the finest level, dividing the feature map into 6x6 sub-regions and then performing pooling on each sub-region. In the example with N=4 filter levels and M=2048 input feature maps, the output feature maps are (1 / 4)×2048=512, i.e., 512 output feature maps.
[0050] The next stage of the pyramid pooling module includes multiple upsampling layers 122-3 configured to use bilinear interpolation to restore the image size of each sequence to the size of the intermediate characteristic map 121o1. Generally, bilinear interpolation is performed to upsample each low-dimensional characteristic map to the same size as the original characteristic map.
[0051] The following convolutional layer 122-4 is configured to extract contextual information from four separate filters and combine this contextual information with information of different scales and sizes to produce a final characteristic map 122-4o of the same size as the intermediate characteristic map 121-o1. In other words, all different levels of the upsampled characteristic map are combined with the original characteristic map. These characteristic maps are fused together as an overall prior distribution. Sometimes in the literature, the convolutional layer 122-4 that provides the final characteristic map 122-4o is considered the last layer of the pyramid pooling module. However, in the context of this document, the pixel-level prediction layer 122-5 is also considered a layer of the pyramid pooling module.
[0052] The pixel-level prediction layer 122-5 is a convolutional layer that generates a final prediction map using the final characteristic map. For example, it may be implemented by a fully connected layer 122-5 to compute the final pixel-level prediction as a generated mask with a final activation layer "softmax" (i.e., normalized exponential function). The advantages of softmax activation have been explained earlier. The final prediction result is the pixel-level segmentation 122o of the image tile currently being processed.
[0053] Once all extracted tiles have been processed by the DTCNN120, the image reconstruction module 140 reconstructs a fully segmented image 92 corresponding to the size of the original image, with each pixel containing the class to which it belongs. For example, the reconstructed image 92 may use color coding to indicate the class of each pixel. In the schematic diagram of Figure 1, the segmented image 92 uses different textures to identify different pixel classes. For example, a surface with pixels classified as belonging to class 10 (crop) is represented by a brick texture. Naturally, textures cannot be used to mark a single pixel. However, distinct colors with specific color values for each class can be used. Thus, textures are used only as simplified markings in the schematic diagram to illustrate the marking concept behind them. For example, pixels belonging to class 11 (first weed species) are marked with a gray shaded texture, pixels belonging to class 12 (second weed species) are marked with a chessboard-like texture, and pixels belonging to class 13 (third weed species) are marked with a striped texture. Finally, in image 92, pixels belonging to the soil background class are marked with a dotted texture 19.
[0054] Figures 4A to 4C illustrate different methods for creating training data subsets that can be used to train a dual-task CNN. The image training dataset used to train the intermediate module along with the segmentation module of the DTCNN includes at least a first data subset generated using manual image annotation as disclosed in Figure 4A, and a further subset generated by automated annotation as disclosed in either Figure 4B or 4C.
[0055] Figure 4A illustrates the creation of manually annotated training images from the first data subset of the training data. Original image 41, representing a real-world situation in a field with crop plants of a certain crop species and one or more weed species present between the crop plants, is provided to a human user for manual annotation. The user attempts to assign different elements in the image to corresponding classes (e.g., crop species, weed species, soil). Image 41 and its elements in the example in Figure 4Aa correspond to image 91 and its elements in Figure 1. The results of the manual annotation task are manual pixel annotations 41-1, 41-2, and 41-3 for each training image belonging to the first data subset, indicating the species to which each pixel in the training image belongs. The texture used in the annotated image 41-a corresponds to the texture described with respect to image 92 in Figure 1. In the example in Figure 4A, the results of manual annotation are schematically shown only in the upper right corner of the original image 41. While the schematic diagram suggests that annotation is correct at the pixel level, this is not the case in reality for manually annotated images. Typically, manually annotated images contain numerous pixels that are either incorrectly assigned to a class or not assigned a class at all because the user failed to recognize a particular plant. In other words, manual annotation is noisy in the sense that a large number of pixels are not correctly annotated.
[0056] Typically, the user simply selects a rectangle in the image and assigns such rectangles to a class. Rectangle R1 may be used to classify the pixels within it as crop species 41-2. However, R1 also contains pixels associated with weed species 41-1 and 41-2. The user may further indicate rectangles R2 and R3, which are within or overlapping R1, and assign them to their respective weed species classes. It is clear that such an annotation method cannot lead to correct annotation at the pixel level. To support the user in manual annotation tasks, the computer system may provide the user with several classification support functions.
[0057] For example, the system may provide automated soil segmentation, using a stable and simple color-based segmentation algorithm to automatically remove the presence of ground (soil) and exclude it from manual segmentation. An example algorithm is based on simple thresholding of the Lab color channel (in the L*a*b* color space), where pixels with positive values in channel a are removed from the segmentation to obtain precise segmentation.
[0058] Furthermore, the system may provide support for overlapping plant parts, and especially in later biophenological stages, overlapping plants make annotation more complex to accurately segment all classes. To mitigate this, the system's manual annotation function allows marking annotations within other annotations (e.g., R2 within R1). In this case, the inner annotation (assigned to R2) is removed from the segmentation belonging to the outer annotation (assigned to R1). This simplifies the annotation process because it is not necessary to accurately annotate all species. It is sufficient to annotate only overlapping species with a "border" annotation or other annotation indicating the overlap.
[0059] To generate the first image data subset, the following conditions were valid during the system's test run: In 2017, a large-scale image acquisition campaign was conducted in two different locations in Germany and Spain. A set of 24 plots, each measuring 2.0 x 2.5 m, were planted. In these plots, two rows of corn (Zee maize) were planted together with six different weed species: three "grass-leaf" weeds (settlement grass, crabgrass, barnyard grass) and three "broadleaf" weeds (Japanese yew, goosefoot, amaranth). Each plot was imaged using two different devices: a Canon EOS 700D SLR camera and a Samsung A8 mobile phone, in both top-down and oblique views. To facilitate image acquisition, a metal structure was created to hold two mobile phones and two SLR cameras, and top-down images (height 2.0 m, focal length 18 mm) and perspective images (height 1.6 m, angle 30 degrees, focal length 18 mm) were taken. These four images can be taken simultaneously to save time, but this will not affect the quality of the training data.
[0060] To capture different bioseasonal stages of maize and weeds, images were taken twice daily, three times a week, over a nine-week period. The study began in May 2017 and ended in June 2017. After removing overexposed and / or blurry images, a total of 1679 images were manually segmented into seven target classes named according to their corresponding EPPO codes (ZEAMX, SETVE, DIGSA, ECHCG, ABUTH, CHEAL, AMARE).
[0061] The target weeds were planted in specific locations, but the presence of unknown weeds growing wild in the experimental plots complicated the task. To address this issue, two new classes (common broadleaf weeds and common grass-leaf weeds) were added to allow annotation of unknown or non-target weeds. The DTCNN topology was configured to ignore these noisy annotations.
[0062] For training purposes and to avoid any bias, the experimental section was divided into training, test, and validation sections. Eight sections were used for training, two for validation, and the other two for testing.
[0063] The first data subset was then combined with a training image dataset having at least one further subset, which may be either the second or third data subset described below.
[0064] The generation of the second data subset is shown in Figure 4B. The second set consists of synthetically generated images that can be correctly and automatically annotated at the pixel level. The final synthetically generated image 42-a of the second subset represents multiple weed plants of different weed species derived from the original single plant image 42, where each single plant image represents a single plant 12 of a single species. Single plant elements are extracted from the single plant image (e.g., using a leaf segmentation algorithm) and pasted onto the soil background image 42-b. Thus, since the extracted single plant elements (indicated by different textures in image 42-s) belong to known plant species, the second data subset can be fully automatically annotated at the pixel level with annotations 42-1, 42-3, 42-4 of pixels belonging to each weed species. Such automatic annotation is far less noisy than manual annotation because it substantially contains only pixels that truly belong to a single plant and can then be automatically annotated by the known species of plant in each single plant image.
[0065] The combination of the first and second data subsets overcomes some of the shortcomings of the first data subset, which is difficult and error-prone to annotation due to the substantial complexity of the dataset. As a result, the amount of annotated images for training and testing is limited and noisy. This can be overcome by using synthetic images from the second subset, which includes image communities generated by single plant images, in combination with the first subset. For this purpose, an additional acquisition campaign of single plants was conducted.
[0066] The composite dataset featured three novel weed species: goosefoot, datura, and buckwheat vine. It consisted of images, each representing a single plant on an 80x80cm plot in a greenhouse. There were two greenhouses from Spain. Different species were sown in each of them: AMARE, DIGSA, ECHCG, and SETVE in greenhouse 1, and ABUTH, CHESS, DATST, POLCO, and ZEAMX in greenhouse 2. There were a total of eight weeds and one crop. From each species, 30 to 36 single plants were sown. From day 0 to day 80, one image was taken each weekday (Monday to Friday), according to each individual plant. Since not all of them survived until the final day, the final (second) data subset contained 6906 images of single plants at different growth stages of nine different species.
[0067] Since each image contains only one plant, all images within a subset are labeled. Using a deep learning model for leaf segmentation, the entire dataset could be automatically annotated. A synthetic plant community generation algorithm can take segmented images of actual leaves and paste them onto actual background images. Using a single plant dataset allows for the automatic segmentation of leaves and / or plants, and their storage in a candidate repository. After identifying which candidates were viable, the final folder contained 11,096 images unevenly divided into nine species. The community generation algorithm retrieves candidates from the repository and pastes them onto soil images in a specific manner.
[0068] To generate these images, several random regions are created, each associated with three parameters that describe the region. These model parameters are plant species, growth stage, and density. The plant species are grown according to a Monte Carlo approach, depending on the region parameters. The pipeline for this algorithm is as follows: (i) The cultivation area is created as an ellipse of random size. (ii) Each ellipse is randomly assigned a class (species), age (days since sowing), and density (a real number between 0 and 1). (iii) Location points in the image are randomly sampled for each candidate plant. (iv) Depending on the location point, whether the candidate is located within the cultivation area (if not, the potential candidate is deemed unsuitable). (v) If the candidate is within the ellipse, the algorithm randomly samples a number between 0 and 1 and compares it to the "density" parameter of the cultivation area. If the sampled number is greater than the "density" threshold, the candidate is deemed unsuitable. (vi) The algorithm selects candidate images from the candidate repository that are suitable for the requirements of the cultivation area and places them on the plot image.
[0069] This method generates images containing several plant species at various stages of growth in a non-uniform density. The second data subset was created from 5000 composite images. Of the 5000 generated partition images, 80% were reserved for training, 10% for validation, and another 10% for testing.
[0070] Figure 4C shows a third data subset that can be used alternatively in combination with the first data subset to form a training image dataset. Of course, all three data subsets can also be combined to form a training dataset. The third dataset contains image 43-a representing multiple weed plants of a single weed species. Images in the third data subset are also automatically annotated with pixel annotations 42-3, 43-1, and 43-4, indicating that the pixels belong to a single weed species.
[0071] While the first data subset exhibits unbalanced classes and noisy annotations, the synthesized second data subset may have some issues in adequately mimicking real plant communities growing with overlapping plant elements. An example of unbalanced classes is having one class associated with 30% of pixels and another class associated with only 0.0001% of pixels. In addition, there may be unknown pixels that could belong to either class. The third data subset contains images of plants growing in a controlled environment with a single species in each plot. The plots were checked daily, and any plants of a different species that grew were manually removed. Having a single species per plot implicitly indicates that all images are already labeled and therefore automated segmentation is feasible. There were three plot densities (number of crop plants per area): high, medium, and low. Images were taken in two campaigns: one in Spain with 4245 images and the other in Germany with 818 images. Although the concept was the same, there were considerable differences between the images from Spain and Germany, particularly in terms of soil / background.
[0072] By using a leaf segmentation algorithm (for example, the leaf segmentation algorithm described earlier), an automatically generated labeled mask is obtained for each image, which acts as a ground-truth label for semantic segmentation. Although this segmentation method still makes some errors at the pixel level, it can be considered that the third data subset is accurately annotated.
[0073] The second and third data subsets are similar but complementary in their differences. The second data subset is more realistic in terms of plant community cultivation because it shows several species in the same image. On the other hand, the third data subset contains only one species, but it shows better texture, overlap, shading, and shape (i.e., more information) in images of actual fields.
[0074] Different training experiments were conducted by including combinations of three data subsets. All experiments were evaluated against validation and testing of the first data subset. In some experiments, more than one image training dataset was used for training. Because the data subsets had different numbers of images, a generator was used to fetch images from the different data subsets in an equivalent manner. The generator retrieves one image from each data subset each time. When a data subset runs out of images (i.e., when the generator has retrieved the last image from each subset), it starts over for each subset, incrementing the images from the other subsets.
[0075] To avoid bias, as already mentioned, each data subset was split into three parts: 80% for training images, another 10% for validation, and the last 10% for testing.
[0076] Data augmentation was applied each time a new image was fetched by the generator. Transformations applied to data augmentation included rotation, height and / or width shift, zoom, vertical and / or horizontal flip, pixel intensity shift (color change), and Gaussian blur. Since the semantic segmentation methods disclosed herein extract tiles from the image and maintaining consistency is important, shearing is not recommended.
[0077] The program code uses TensorFlow as the background and is implemented with the Keras deep learning library. Attenuation per epoch = 10 -6 Stochastic gradient descent was used as the optimizer for both tasks, with a learning rate lr=0.001, momentum=0.9, and Nesterov-accelerated gradient descent. Balanced Accuracy (BAC) was selected as the most appropriate algorithmic performance metric to address class imbalances present in the data subset (the use of "normal" accuracy is not recommended in such cases).
[0078] For training the DTCNN, an NVIDIA Tesla V100 GPU with 16GB of memory was used. Considering the size of the input images, the batch size was set to 6. Following the same methodology described in "Automatic plant disease diagnosis using mobile capture devices, applied on a wheat use case," Computers and Electronics in Agriculture, Vol. 138, pp. 200-209, 2017 by A. Johannes et al., and "Deep convolutional neural networks for mobile capture device-based crop disease classification in the wild," Computers and Electronics in Agriculture, 2018 by A. Picon et al., a validation subset of the first data subset and calculated values of balanced accuracy (BAC) and Dice-Sorensen coefficients were used to calculate thresholds that maximize validation sets for different weed species.
[0079] Test images from the first data subset represent real-world field conditions, and various experiments were tested using them. To measure the impact of using different trained datasets, several models were trained using combinations of different data subsets. Two sets of experiments were used. One set focused on validating the performance of a proposed dual-task CNN based on a PSPNet topology for the segmentation module, while the other set was for measuring the impact of different data subset combinations.
[0080] The following are two experiments focused on verifying that a dual-task PSPNet implementation performs better than a standard single-task PSPNet (the experiments are named according to the topology used and the number of data subsets used). - PSPNet 1 + 3. This experiment uses a baseline PSPNet trained with images from both the 1st and 3rd data subsets. This combination was selected as the best combination of data subsets for training. - Dual-task PSPNet 1 + 3. This experiment is similar to the previous one, but replaces the traditional PSPNet network architecture with the disclosed dual-task PSPNet.
[0081] The results show that using a dual-task (classification and segmentation) CNN yielded a mean Dice-Sorensen coefficient (DSC) of ~48% compared to ~45% with traditional architectures. Furthermore, balanced accuracy was slightly improved. Both models represent peak performance with image recordings during the second week after seeding (mid-term stage). In addition, the dual-task PSPNet1+3 performs better than PSPNet, especially in the early stages. However, its performance declines faster than PSPNet over time. In the worst-case DTCNN prediction (for images recorded during the fourth week after seeding), it obtains a value similar to that of traditional PSPNet predictions.
[0082] The impact of various data subsets on the performance of dual-task CNNs was investigated through the following experiments.
[0083] DTCNN 1. In this experiment, training was performed only on the first data subset. This dataset had several issues: a small number of images, high complexity, inaccurate annotations, and high class imbalance.
[0084] DTCNN 2. In this experiment, a synthetic second data subset was used for training. Since the synthetic images exhibit differences in spatial distribution, lighting, background, and scale, performance degradation due to domain shift was expected. To ensure that automatic pixel annotation correctly annotates each pixel with the correct class, proper leaf shape and edge information is suitable for training with near-perfect ground truth annotation.
[0085] DTCNN 3. In this experiment, a single-species (3rd) dataset subset is used for training. Plant images are acquired under real-world conditions, but plant community interactions cannot be obtained from this dataset.
[0086] DTCNN 1 + 2. In this experiment, images from the first and second data subsets are combined for training. The second data subset allows for the inclusion of synthetic images, which reduces the impact of class imbalances and poor-quality annotations from the first data subset.
[0087] DTCNN 1 + 3. In this experiment, image data subsets 1 and 3 are combined for training. The third data subset allows for the inclusion of single-type images from the third data subset, thereby mitigating the impact of class imbalances and poor-quality annotations from the first data subset.
[0088] DTCNN models 1, 2, and 3. The final model complements all data subsets.
[0089] In conclusion, when the target first data subset is combined with any of the supporting datasets (second or third), domain shift is reduced, and more accurate results are obtained. Combining the first and third data subsets for training a DTCNN yielded the best results.
[0090] Figure 4D illustrates a scenario in which a single plant image 44 (used for automatic annotation in Figure 4B) represents further elements of the plant. In this image 44, in addition to the leaves 12l, we can see the plant's stem 12s and fruit 12f. For many plants, the fruit has a different color than the leaves of the stem. In such cases, existing segmentation methods can be used to segment the pixels belonging to the fruit 12f from the pixels belonging to the plant's leaves 12l (or other elements of the plant that have the same color as the leaves). Then, in a similar manner to that described with respect to Figure 4B, not only the plant's leaves but also its fruit can be pasted onto the synthetically generated image 44-s. Combined with the background image 44-b, a more realistic annotated image 44-a is generated, which now also includes an annotated object 44-2 representing the fruit of plant 12* (in addition to the known objects 44-1, 44-3, and 44-4 from Figure 4B).
[0091] Those skilled in the art should also note that, by using the color difference between the fruits and leaves of plants, it is also possible to improve upon the method described in Figure 4C and generate automatically annotated images containing objects representing the leaves and fruits of each plant. For annotation of other plant elements that are similar in color to leaves (e.g., stems), manual annotation of such elements may be used.
[0092] When using automatically annotated images that also include representations of plant fruits, the DTCNN can be trained not only to distinguish between different plant species but also to segment the images into pixels belonging to each plant fruit (e.g., crop). Typically, only one crop species is cultivated in a field. In such cases, as described earlier, it is sufficient to train the DTCNN using automatically annotated images containing the leaves and fruits of this crop species, along with images of other plant species (weeds). Figure 5 shows examples of a typical computer device 900 and a typical mobile computer device 950, which may be used with the techniques described herein. The computing device 900 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Ideally, the device 900 has a GPU configured to process machine learning algorithms. The typical computer device 900 may correspond to the computer system 100 in Figure 1. The computing device 950 is intended to represent various forms of mobile devices, such as personal digital assistants, mobile phones, smartphones, and other similar computing devices. For example, computing device 950 may be used as a GUI front end, where the user captures test input images and provides them to computer device 900, and then receives segmented images from the computer device showing the locations of various weed plants and the respective species of weed plants on the image. As a result, computing device 950 may also include output device 50 in Figure 1. The components shown herein, their connections and relationships and their functions are for illustrative purposes only and are not intended to limit the implementations of the inventions described and / or claimed herein.
[0093] The computing device 900 comprises a processor 902, memory 904, a storage device 906, a high-speed interface 908 connected to memory 904 and a high-speed expansion port 910, and a low-speed bus 914 connected to storage device 906 and a low-speed interface 912. Each of the components 902, 904, 906, 908, 910, and 912 is interconnected using various buses and may be mounted on a common motherboard or in other ways as needed. The processor 902 can process instructions to be executed within the computing device 900, including instructions stored in memory 904 or storage device 906 to display GUI graphic information on an external input / output device such as a display 916 connected to the high-speed interface 908. In other implementation examples, a large number of processing units and / or buses may be used as needed, along with a large number of memories and memory types. Also, the large number of computing devices 900 may be connected to each device that provides some of the required operations (e.g., as a server bank, a group of blade servers, or a processing device).
[0094] Memory 904 stores information within the computing device 900. In one implementation, memory 904 is a volatile memory unit or a series of volatile memory units. In other implementations, memory 904 is a non-volatile memory unit or a series of non-volatile memory units. Memory 904 may also be other forms of computer-readable media, such as magnetic or optical disks.
[0095] The storage device 906 can provide large-capacity storage to the computing device 900. In one implementation example, the storage device 906 may be an array of devices including computer-readable media such as floppy disk devices, hard disk devices, optical disk devices, or tape devices, flash memory or other similar solid-state memory devices, or a storage area network or other configuration devices. A computer program product can be clearly embodied in the information carrier. The computer program product may also include instructions that, when executed, perform one or more of the methods described above. The information carrier is a computer or machine-readable media such as memory 904, storage device 906, or the memory of processor 902.
[0096] The high-speed control unit 908 manages the bandwidth consumption operations of the computing device 900, while the low-speed control unit 912 manages lower bandwidth consumption operations. Such function assignments are illustrative only. In one implementation example, the high-speed control unit 908 is connected to memory 904, a display 916 (e.g., via a graphics processor or accelerator), and a high-speed expansion port 910 that can accept various expansion cards (not shown). In the implementation example, the low-speed control unit 912 is connected to a storage device 906 and a low-speed expansion port 914. The low-speed expansion port, which may include various communication ports (e.g., USB, Bluetooth®, Ethernet, Wireless Ethernet), may be connected to one or more input / output devices such as a keyboard, pointing device, scanner, or network device such as a switch or router via a network adapter.
[0097] The computing device 900 may be implemented in several different forms, as shown in the figure. For example, it may be implemented as a standard server 920, or multiple times within a group of such servers. It may also be implemented as part of a rack server system 924. Furthermore, it may be implemented in a personal computer such as a laptop computer 922. Alternatively, components from the computing device 900 may be combined with other components in a mobile device (not shown), such as device 950. Each of such devices may contain one or more computing devices 900, 950, and the entire system may consist of a number of computing devices 900, 950 communicating with each other.
[0098] The computing device 950 includes, among other components, a processor 952, memory 964, input / output devices such as a display 954, a communication interface 966, and a transceiver 968. The device 950 may also be provided with storage devices such as a microdrive or other devices to provide additional storage. Components 950, 952, 964, 954, 966, and 968 are interconnected using various buses, and some components may be mounted on a common motherboard, or in other ways as needed.
[0099] The processor 952 can execute instructions within the computing device 950, including instructions stored in memory 964. The processor may be implemented as a chipset of a chip containing a number of separate analog and digital processing units. The processor may be provided for, for example, controlling the user interface, coordinating applications run by the device 950, and other components of the device 950, such as wireless communication by the device 950.
[0100] The processor 952 may communicate with the user through a control interface 958 and a display interface 956 connected to the display 954. The display 954 may be, for example, a TFT LC (thin-film transistor liquid crystal display) or an OLED (organic light-emitting diode) display or other suitable display technology. The display interface 956 may include appropriate circuitry for driving the display 954 to present graphics and other information to the user. The control interface 958 may receive commands from the user and translate them for submission to the processor 952. Furthermore, an external interface 962 may communicate with the processor 952 to enable short-range communication of device 950 with other devices. The external interface 962 may provide, for example, wired communication in some implementations or wireless communication in other implementations, and a number of interfaces may be used.
[0101] Memory 964 stores information within the computing device 950. Memory 964 can be implemented as one or more computer-readable media, volatile memory units, or non-volatile memory units. Extended memory 984 may also be provided through an extended interface 982, which may include, for example, a SIMM (Single In-Line Memory Module) card interface, and connected to device 950. Such extended memory 984 may provide surplus storage space for device 950, or it may store applications or other information for device 950. Specifically, extended memory 984 may include instructions for executing or supplementing the above processes, and may also include security information. Thus, for example, extended memory 984 may function as a security module for device 950, and may be programmed with instructions that allow the secure use of device 950. Furthermore, security applications may be provided via a SIMM card, along with additional information such as placing identification information on the SIMM card in a hack-proof manner.
[0102] The memory may include, for example, flash memory and / or NVRAM memory, as described below. In one implementation example, the computer program product is explicitly embodied in the information carrier. The computer program product, when executed, includes instructions that perform one or more of the methods described above. The information carrier is a computer or machine-readable medium, such as memory 964, extended memory 984, or memory on processor 952, which may be received, for example, via transceiver 968 or external interface 962.
[0103] Device 950 may communicate wirelessly through a communication interface 966, which may optionally include digital signal processing circuitry. The communication interface 966 may provide communication under various modes or protocols, including, in particular, GSM voice calls, SMS, EMS or MMS messaging, CDMA, TDMA, PDC, WCDMA®, CDMA2000 or GPRS. Such communication may occur, for example, through a radio frequency transceiver 968. Furthermore, short-range communication may occur, for example, using BLUETOOTH®, WiFi or other such transceivers (not shown). Additionally, a GPS (Global Positioning System) receiver module 980 may provide device 950 with additional navigation and location-related radio data, which may be used as needed by applications running on device 950.
[0104] Device 950 may also communicate audibly using an audio codec 960 that can receive spoken information from the user and convert it into usable digital information. The audio codec 960 may also generate audible sound for the user, for example, through the speaker of the handset of device 950. Such sound may include sound from a voice phone, recorded sound (e.g., voice messages, music files, etc.), or sound generated by an application running on device 950.
[0105] The computing device 950 may be implemented in several different forms, as shown in the figure. For example, it may be implemented as a mobile phone 980. It may also be implemented as part of a smartphone 982, a personal digital assistant, or other similar mobile device.
[0106] The various implementations of the systems and technologies described herein can be realized in digital electronic circuits, integrated circuits, specially designed ASICs (application-specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor, the at least one programmable processor may be special or general-purpose, and is connected to a storage system, at least one input device and at least one output device to receive data and instructions, and to transmit data and instructions to the storage system, at least one input device and at least one output device.
[0107] These computer programs (also known as programs, software, software applications, or code) contain machine language instructions for a programmable processor and can be implemented in high-level procedural languages and / or object-oriented programming languages, as well as in assembly language / machine language. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, apparatus and / or device (e.g., magnetic disks, optical disks, memory, programmable logic elements (PLDs)) used to provide machine language instructions and / or data to a programmable processor, including machine-readable medium that receives machine language instructions as machine-readable signals. The term “machine-readable signal” refers to any signal used to provide machine language instructions and / or data to a programmable processor.
[0108] To provide user interaction, the systems and technologies described herein can be implemented on a computer having a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LDC (liquid crystal display) monitor) and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide user interaction. For example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback). Input from the user can also be received in any form, including acoustic, voice, or tactile input.
[0109] The systems and technologies described herein can be implemented in computing devices that include backend components (e.g., as data servers), middleware components (e.g., application servers), or frontend components (e.g., client computers having a graphical user interface or web browser through which a user can interact with the implementation of the systems and technologies described herein), or any combination of such backend, middleware, and frontend components. The components of the systems can be interconnected by any form or medium of digital data communication (e.g., communication networks). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), and the Internet.
[0110] Computing devices can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The client-server relationship arises from computer programs running on each computer that have a client-server relationship with each other.
[0111] Several embodiments have been described. However, it will be understood that various improvements may be made without departing from the spirit and scope of the present invention.
[0112] Furthermore, the logical flow shown in the diagram does not need to be in a specific order or sequence shown in order to achieve the desired result. Additionally, other steps may be provided, steps may be removed from the described flow, and other components may be added to or removed from the described system. Therefore, other embodiments fall within the scope of the following claims.
[0113] Furthermore, embodiments of the present invention, in particular the method of the present invention, may be used to interact with and operate agricultural machinery, control and / or monitor agricultural machinery. In a preferred embodiment of the present invention, the method of the present invention further includes a step of outputting a signal, such as a control signal or an on / off signal, for operating, controlling and / or monitoring agricultural machinery. In an advantageous embodiment of the present invention, the method of the present invention further includes a step of outputting a signal, such as a control signal or an on / off signal, for operating, controlling and / or monitoring agricultural machinery, depending on the result of the weed identification or plant identification step in the method of the present invention. More preferably, if a specific weed is identified, a control or on / off signal is output for operating the agricultural machinery in a manner targeting this specific weed, for example, a control signal is output for operating the agricultural machinery to spray or apply a herbicide or other crop protectant targeting this specific weed, or to prepare the agricultural machinery for spraying or applying. Advantageously, if a particular weed is identified and exceeds a specific predefined threshold associated with this particular weed (e.g., in terms of the amount of weed, the volume of weed, the area (e.g., hectares), or the number of geographical locations where this weed is identified), a control or on / off signal is output to operate the agricultural machinery in a manner targeting this particular weed. For example, a control signal is output to operate the agricultural machinery to spray or apply a herbicide or other crop protection agent targeting this particular weed, or to prepare the agricultural machinery for spraying or applying. The agricultural machinery may include one or more processing mechanisms for treating plants in the field. Processing mechanisms may include chemical, mechanical, or electrical processing mechanisms or combinations of such processing mechanisms for treating weeds, diseases, or insects. The agricultural machinery may further include a detection and control system. The detection system may be configured to detect field conditions as the smart machine moves across the field. The control system may be configured to control the processing mechanisms based on the detected field conditions.
[0114] In one embodiment, the processing mechanism is a chemical processing mechanism. The agricultural machine of such an embodiment includes a sprayer having one or more nozzles for spraying chemicals or crop protectants onto the field.
[0115] In one embodiment, the detection system comprises one or more detection components for detecting field conditions as agricultural machinery traverses the field. The detection components may be optical detection components such as cameras that capture images of the field. The optical detection components may be, for example, an image recording device 90 (see Figure 1).
[0116] In further embodiments, the agricultural machine includes one or more processing elements associated with one or more sensing components. In such embodiments, the sensing components may be positioned in front of the processing elements when viewed in the direction of drive. In this way, the sensing components can sense the field conditions, the system can analyze the sensed field conditions, and control the processing elements based on such analysis. This enables targeted processing based on real-time field conditions present at the time of processing while the agricultural machine is traversing the field.
[0117] In further embodiments, the sprayer includes a plurality of nozzles associated with a plurality of optical detection components. In such embodiments, the optical detection components are positioned in front of the nozzles when viewed from the direction of drive. Furthermore, each of the optical detection components is associated with a nozzle such that, as the sprayer moves through the field, the field of view of the optical component and the spray shape of the associated nozzle overlap at least partially.
[0118] In a further embodiment, the control system is configured to analyze the conditions of a sensed field, such as those provided by a detection system. Based on such analysis, when the position of the treatment mechanism reaches the position of the analyzed field, the control system is further configured to generate a control signal to activate the treatment mechanism.
[0119] Figure 6 shows the smart agricultural machine 210 as part of a distributed computing environment.
[0120] The smart agricultural machine 210 may be a smart sprayer and may include a connection system 212. The connection system 212 is configured to communicately connect the smart agricultural machine 210 to a distributed computing environment. It may be configured to provide data collected by the smart agricultural machine 210 to one or more remote computing resources 212, 214, 216 in the distributed computing environment. One of the computing resources 212, 214, 216 may be a data management system 214 configured to send data to or receive data from the smart agricultural machine 210. For example, data may be sent from the smart agricultural machine 10 to the data management system 214 as a detection map or as a spray map containing data recorded during spraying. Further computing resources 212, 214, 216 may be a field management system 216 configured to provide control protocols, activation codes, or decision logic to the smart agricultural machine 210 or receive data from the smart agricultural machine 210. Such data may also be received through the data management system 214. Furthermore, additional computing resources 212, 214, and 216 may be client computers 216 configured to receive client data from the field management system 214 and / or the smart agricultural machinery 210. Such client data may include, for example, a spraying schedule planned to be carried out in a particular field using the smart agricultural machinery 210, or field analysis data to provide insights into the health of a particular field.
[0121] Figure 7 shows an example of a smart sprayer system.
[0122] The system comprises a tractor having a sprayer 220 for spraying pesticides such as herbicides, fungicides, or insecticides. The sprayer 220 may be detachably mounted to the tractor or directly mounted. The sprayer 220 has a boom having a number of nozzles 222 arranged along the boom of the sprayer 220. The nozzles 222 may be fixed or movable along the boom at regular or irregular intervals. Each nozzle 222 includes a controllable valve for adjusting the fluid discharge from the nozzle 222 to the field.
[0123] One or more tanks 24 are fluidly connected to the nozzle 222 through a pipe 226. Each tank 224 holds one or more components of the fluid mixture to be dispersed over the field. These may include chemically active or inactive components such as herbicide mixtures, components of herbicide mixtures, selective herbicides for specific weeds, fungicides, fungicide mixtures, fungicide and plant growth regulator mixtures, plant growth regulators, water, oil, etc. Each tank 224 may further include a controllable valve for regulating the fluid discharge from the tank 224 to the pipe 226. Such a device allows for control of the mixture discharged over the field.
[0124] Furthermore, the smart sprayer system includes a detection system 228 having a number of detection components 230 arranged along the boom. The detection components 230 may be fixed or movable along the boom at regular or irregular intervals. The detection components 230 are configured to sense one or more field conditions. The detection components 230 may be optical detection components 230 that provide an image of the field. Suitable optical detection components 230 are multispectral cameras, stereo cameras, IR cameras, CCD cameras, hyperspectral cameras, ultrasonic or LIDAR (light detection and ranging system) cameras. Alternatively or additionally, the detection components 230 may include sensors for measuring humidity, light, temperature, wind or other suitable field conditions.
[0125] The detection component 230 is positioned in front of the nozzle 222 (when viewed from the driving direction). In the embodiment shown in Figure 1, the detection component 230 is an optical detection component, and each detection component 230 is associated with a single nozzle 222 such that when the nozzle reaches each position, the field of view includes or at least overlaps with the spray shape of each nozzle 222 in the field. In other devices, each detection component 30 may be associated with more than one nozzle 222, or more than one detection component 30 may be associated with each nozzle 222.
[0126] The detection component 230, the tank valve, and the nozzle valve are communicatively connected to the control system 232. In the embodiment shown in Figure 1, the control system 232 is located within the main sprayer housing and wired to each component. In another embodiment, the detection component 230, the tank valve, or the nozzle valve may be wirelessly connected to the control system 232. In yet another embodiment, more than one control system 232 may be distributed across the sprayer housing or tractor and may be communicatively connected to the detection component 230, the tank valve, or the nozzle valve.
[0127] The control system 232 is configured to control and / or monitor the detection component, tank valve, or nozzle valve according to a control protocol. In this regard, the control system 232 may comprise a number of modules. One module, for example, controls the detection component to collect data such as field images. A further module analyzes the collected data, such as images, to derive parameters for tank or nozzle valve control. A further module controls the tank and / or nozzle valve based on these derived parameters.
[0128] Figure 8 shows a control protocol for a smart sprayer system for controlling weeds, diseases, or insects via a chemical control mechanism.
[0129] When the smart sprayer initiates a spraying operation in the field, the control protocol of the smart sprayer system may be triggered. In the first step 240, an optical detection component is triggered to provide data such as images of the field. In the second step 242, the data provided by each optical detection component, such as images, is analyzed with respect to weeds, diseases, or insects, depending on the target of the chemical control mechanism. In the context of the present invention, such images are analyzed using the method of the present invention. In the third step 244, parameters are derived from such analysis, and control signals for the tank and nozzle valves are derived and / or output. For example, if a specific weed is identified using the method of the present invention, control signals for the tank and nozzle valves are derived and / or output to spray or apply a specific herbicide or crop protectant targeting the identified weed, or to prepare for spraying or application. In the fourth step 246, such control signals are provided to each tank and / or nozzle valve.
[0130] Thanks to the system configuration, each tank and nozzle valve can be controlled individually. Therefore, if only one image indicates the presence of weeds, only the nozzles associated with the optical detection component having a spray shape that covers the field of view of that optical detection component will be triggered. Similarly, if multiple images indicate the presence of weeds, after image analysis using the method of the present invention is performed, each nozzle associated with those optical detection components having a spray shape that covers the field of view of those optical detection components will be triggered.
[0131] In addition to such targeted treatments, the control of the tank valves allows for adjustment of the treatment composition in response to conditions sensed by field optical detection components. For example, the first tank may contain a first herbicide containing a first active ingredient composition, and the second tank may contain a second herbicide containing a second active ingredient composition. Depending on the results of image analysis using the method of the present invention, the valves of the first, second, or both tanks may be triggered to provide each herbicide for spraying into the field.
[0132] In other advantageous embodiments, a variable-rate application (VRA) map for spraying a crop protection agent may be generated based on image analysis using the method of the present invention, where the images to be analyzed are obtained through an image recording device 90 which may be mounted, for example, on agricultural machinery, unmanned aerial vehicles (e.g., drones) or any mobile device. This variable-rate application (VRA) map may subsequently be used by other agricultural machinery, unmanned aerial vehicles, or mobile devices for applying herbicides or crop protection agents.
[0133] In other advantageous embodiments, image analysis using the method of the present invention can also be used to monitor the application of herbicides or crop protectants in terms of the effectiveness, timeliness, and completeness of the application, for example, 1, 2, 3, 4, 5, 6, 7, 10 days, 2 weeks, 3 weeks, or 4 weeks after the application has been carried out. Depending on the results of the image analysis, particularly the results of the weed identification or plant identification step in the method of the present invention, signals such as control signals or on / off signals for operating, controlling, and / or monitoring agricultural machinery may be output.
Claims
1. A computer-implemented method (1000) for identifying weeds in an agricultural field using a dual-task convolutional neural network (120) having a topology, comprising: A dual-task convolutional neural network (120) having said topology comprises: an intermediate module (121) configured to perform a first task associated with a first loss function (LF1) in determining weed species (11, 12, 13) present on a test input image (91); a semantic segmentation module (122) configured to perform a second task associated with a second different loss function (LF2) in segmenting the test input image (91) to determine, for each pixel of the test input image (91), a class that includes the determined weed species; Equipped with the intermediate module and the segmentation module are trained together taking into account the first loss function and the second loss function (LF1, LF2); The method comprises: Receiving (1100) a test input (91) comprising an image representing crop plants of a crop species and weed plants of one or more weed species located between said crop plants in a field; Extracting tiles from the test input image (1200) having dimensions of the shape of the input of the intermediate module; For each extracted tile, The intermediate module (121) predicts (1300) the presence of one or more weed species present in each of the tiles; The intermediate module (121) outputs (1400) an intermediate feature map (121-o1) corresponding to the segmentation module (122) as an output of the first task; The segmentation module extracts (1500) multi-scale features and context information from the intermediate feature maps, concatenates (1600) the extracted information, and performs semantic segmentation to generate (1700) a mask for each weed species class as a segmentation output of the second task, the mask being an image having the same size as a tile, and each pixel on the mask being associated with a value representing the probability of the pixel belonging to the associated class; and combining (1800) the generated mask into a final image indicating, for each pixel, whether it belongs to a particular weed species, and if so, which weed species it belongs to.
2. The method of claim 1 , wherein the intermediate module is implemented by a classification neural network.
3. 3. The method according to claim 1 or 2, wherein the first loss function (FL1) is a "weighted binary cross entropy" in which each sample pixel is weighted according to the class to which it belongs, and the intermediate module (121) uses a "sigmoid" as the last activation layer to simultaneously support the presence of multiple classes.
4. The method of claim 1 , wherein the intermediate module is implemented by a recurrent neural network.
5. 5. The method of claim 4, wherein the first loss function (FL1) is the "mean squared error" or "average error" and the intermediate module (121) uses "linear" or "sigmoid" as the last activation layer to support detection of the presence of multiple classes simultaneously.
6. The method according to claim 1 , wherein the second loss function (FL2) associated with the segmentation module is “weighted categorical cross entropy”.
7. The image training dataset used to train the intermediate module together with the segmentation module is a first data subset comprising an image (41-a) representative of a real situation in a field with crop plants of a crop species (10) and weed plants of one or more weed species (11, 12, 13) between said crop plants, said first data subset comprising manual pixel annotations (41-1, 41-2, 41-3) indicating the species to which said pixels of the training images belong, and a second data subset comprising images (42-a) representing a plurality of weed plants of different weed species, each single plant image being derived from single plant images representing a single species of plant, overlaid on a soil background image, and comprising automated annotations (42-1, 42-3, 42-4) of said pixels belonging to a single weed species; and a third data subset comprising an image (43-a) representing a plurality of weed plants of a single weed species and comprising an automatic annotation (42-3, 43-1, 43-4) of said pixels belonging to said single weed species; At least one of The method of any one of claims 1 to 6, comprising:
8. The method according to any one of claims 1 to 7, wherein the segmentation module (122) is implemented by a pyramid pooling module.
9. The method of claim 8 , wherein the pyramid pooling module is based on a PSPNet topology.
10. The method according to claim 8 or 9, wherein the pyramid pooling module comprises four separate filters (122-2) with different receptive fields that scan the intermediate feature map (121o1) and create four arrays for multi-scale feature detection to integrate information of different scales and sizes.
11. 11. The method of claim 10, wherein the pyramid pooling module further comprises a plurality of upsampling layers configured to restore an image size of each array to the size of the intermediate feature map (121o1) using bilinear interpolation.
12. 12. The method of claim 11, wherein the pyramid pooling module further comprises a convolutional layer (122-4) configured to extract context information from the four separate filters and combine the context information with information of different scales and sizes to generate a final feature map (122-4o) of the same size as the intermediate feature map (121-o1).
13. The method of claim 12, wherein the pyramid pooling module further comprises a fully connected layer (122-5) that computes a final pixel-wise prediction as the generated mask with a final activation layer "softmax".
14. and outputting a signal for operating, controlling and / or monitoring an agricultural machine if a particular weed is identified.
14. The method of any one of claims 1 to 13, wherein the signal is configured to trigger the spraying or application of a herbicide or other crop protection agent targeted to the particular weed.
15. 15. A computer program product for identifying weeds in agricultural fields which, when loaded into a memory of a computing device and executed by at least one processor of the computing device, causes the at least one processor to perform the steps of the computer-implemented method of any one of claims 1 to 14.
16. A computer system for identifying weeds in agricultural fields comprising a memory and at least one processor, further comprising a software module that, when executed by the at least one processor, causes the computer system to perform the steps of the computer-implemented method of any one of claims 1 to 14.
17. A computer-implemented method (1000) for identifying plant species in a field using a dual-task convolutional neural network (120) having a topology, comprising: A dual-task convolutional neural network (120) having said topology comprises: an intermediate module (121) configured to perform a first task associated with a first loss function (LF1) in determining the plant species (11, 12, 13) present on a test input image (91); a semantic segmentation module (122) configured to perform a second task associated with a second different loss function (LF2) in segmenting the test input image (91) to determine, for each pixel of the test input image (91), a class that includes the determined plant species; Equipped with the intermediate module and the segmentation module are trained together taking into account the first loss function and the second loss function (LF1, LF2); The method comprises: Receiving (1100) a test input (91) including images representing plants of a plurality of plant species in a field; Extracting tiles from the test input image (1200) having dimensions of the shape of the input of the intermediate module; For each extracted tile, The intermediate module (121) predicts (1300) the presence of one or more plant species present in each of the tiles; The intermediate module (121) outputs (1400) an intermediate feature map (121-o1) corresponding to the segmentation module (122) as an output of the first task; The segmentation module extracts (1500) multi-scale features and context information from the intermediate feature maps, concatenates (1600) the extracted information, and performs semantic segmentation to generate (1700) a mask for each plant species class as a segmentation output of the second task, the mask being an image having the same size as a tile, where each pixel on the mask is associated with a value representing the probability of the pixel belonging to an associated class; and combining (1800) the generated masks into a final image indicating, for each pixel, whether and if so, which plant species it belongs to.
18. and outputting a signal for operating, controlling and / or monitoring an agricultural machine if a particular weed is identified.
20. The method of claim 17, wherein the signal is configured to trigger a spray or application of a herbicide or other crop protection agent targeted to the particular weed.
19. 1. A computer-implemented method for identifying plant species and plant fruits in a field using a dual-task convolutional neural network (120) having a topology, the method comprising: A dual-task convolutional neural network (120) having said topology comprises: an intermediate module (121) configured to perform a first task associated with a first loss function (LF1) in determining plant species (11, 12, 13) and plant fruits (12f) of each plant species (12) present on a test input image (91); a semantic segmentation module (122) configured to perform a second task associated with a second different loss function (LF2) in segmenting the test input image (91) to determine, for each pixel of the test input image (91), a class comprising the determined plant species and a plant fruit; Equipped with the intermediate module and the segmentation module are trained together taking into account the first loss function and the second loss function (LF1, LF2); The method comprises: receiving a test input (91) including images representing plants of a plurality of plant species in a field having at least one plant bearing a plant fruit; Extracting tiles from the test input image having dimensions of the shape of the input of the intermediate module; For each extracted tile, the intermediate module (121) predicts the presence of one or more plant species and plant fruits of each plant species present in each of the tiles; The intermediate module (121) outputs (1400) an intermediate feature map (121-o1) corresponding to the segmentation module (122) as an output of the first task; the segmentation module extracts multi-scale features and contextual information from the intermediate feature maps and concatenates the extracted information to perform semantic segmentation to generate masks for each plant species class and plant fruit class as segmentation output of the second task, the masks being images having the same size as a tile, where each pixel on the mask is associated with a value representing the probability of the pixel belonging to an associated class; and combining the generated masks into a final image indicating, for each pixel, whether and if so, which plant species or particular plant fruit class it belongs to.
20. determining a number of pixels belonging to a particular plant fruit class associated with a crop grown in the field; estimating the ratio of the number of pixels belonging to said particular plant fruit class to the number of pixels belonging to a corresponding crop plant species; 20. The method of claim 19, further comprising:
21. and outputting a signal for operating, controlling and / or monitoring an agricultural machine if a particular weed is identified.
21. The method of claim 19 or 20, wherein the signal is configured to trigger the spraying or application of a herbicide or other crop protection agent targeted to the particular weed.
