Systems and methods for plant species identification - Patents.com

A dual-task CNN with classification and segmentation tasks using separate loss functions enhances weed identification accuracy, addressing the challenge of low precision in existing methods, leading to optimized herbicide application and resource use in crop fields.

JP7581334B2Active Publication Date: 2024-11-12BASF SE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022513875
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-05
Filing Date
2020-09-03
Publication Date
2024-11-12
Estimated Expiration
2040-09-03

AI Technical Summary

Technical Problem

Existing image processing methods for identifying weeds in crop fields suffer from low accuracy in semantic segmentation, particularly due to domain differences and the complexity of distinguishing similar plant species, which hinders precise herbicide application and resource optimization.

Method used

A dual-task convolutional neural network (CNN) is employed, combining classification and segmentation tasks with separate loss functions to enhance pixel accuracy in plant species identification, using a combination of manually and automatically annotated training data subsets.

Benefits of technology

The dual-task CNN achieves improved pixel accuracy in weed segmentation, enabling more precise weed identification and volume quantification, thereby optimizing herbicide use and resource management in agricultural fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007581334000004
    Figure 0007581334000004
  • Figure 0007581334000005
    Figure 0007581334000005
  • Figure 0007581334000006
    Figure 0007581334000006
Patent Text Reader

Abstract

A computer-implemented method, computer program product, and computer system (100) for identifying weeds in agricultural fields using a dual-task convolutional neural network (120) having a topology, the dual-task convolutional neural network (120) having a topology comprising an intermediate module (121) performing a classification task associated with a first loss function (LF1) and a semantic segmentation module (122) performing a segmentation task associated with a second, different loss function (LF2), the intermediate module and the segmentation module being trained together taking into account the first and second loss functions (LF1, LF2). The system performs a method comprising receiving a test input (91) comprising an image representing crop plants of a crop species in a field and weed plants of one or more weed species located among the crop plants, predicting the presence of one or more weed species (11, 12, 13) present in each tile, outputting an intermediate feature map corresponding to a segmentation module as an output of the classification task, extracting multi-scale features and contextual information from the intermediate feature map, concatenating the extracted information and performing semantic segmentation to generate masks for each weed species class as a segmentation output of the second task, and generating a final image (92) indicating for each pixel whether it belongs to a specific weed species and, if so, to which weed species it belongs.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to electronic data processing, and more particularly to image processing methods, computer program products and systems for identifying weeds in fields. [Background technology]

[0002] The presence of weed populations on agricultural land has negative effects (see H. van Heemst, "The influence of weed competition on crop yield", Agricultural Systems, Vol. 18, No. 2, pp. 81-93, 1985). Weeds in the context of this document concern any plant growing in the field that is distinct from the crop cultivated in the field. Research has identified two main reasons: competition and plant health problems. Certain plant species (e.g. weeds) compete with the crop for soil, nutrients and sunlight, making the crop grow slower and less. Some weeds are also hosts for pests and diseases. In this regard, farmers use herbicides to eliminate or limit the weed population.

[0003] The table below contains some examples of weeds and their respective EPPO codes. Table 1: Examples of weeds [Table 1]

[0004] Thus, in recent years, agriculture faces a complex challenge: the need to ensure the optimization of available resources to optimize food yields and minimize environmental impact. Take weed control as an example: farmers usually apply the same amount of herbicide per surface, ignoring the fact that different weeds have different densities, growth rates and growth stages. However, biological studies have shown that using different types and rates of herbicides optimizes the effectiveness of the product, resulting in better crop growth and reducing chemical deposition in the environment. Early weed identification allows optimization and performance improvement in the use of plant health products, leading to less intensive and more specific herbicides.

[0005] New technology has led to Site Specific Weed Management (SSWM) (see L. Tian, ​​JF Reid and JW Hummel, "Development of a precision sprayer for site-specific weed management," Transactions of ASAE, Vol. 42, No. 4, p. 893, 1999), which describes the application of precise amounts of herbicide only in areas where weeds are present. SSWM significantly reduces herbicide use by optimizing spraying. Two critical tasks in applying SSWM are to achieve accurate discrimination between weeds and crops and proper weed quantification and staging. The traditional way to address the problem is to manually segment plants on the image, which is very time-consuming.

[0006] More recently, machine learning techniques based on convolutional neural networks (CNNs) have been introduced. Although CNNs have many applications in agriculture, weed quantification has not yet been solved at a satisfactory level. Semantic segmentation for weed identification in fields based on trained standardized CNNs does not perform well for plant image datasets due to domain differences. Semantic segmentation means understanding an image at pixel level, i.e., assigning an object class to each pixel in an image. In addition, the inherent complexity of segmenting plants with almost no visual differences 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, 26-29 June 2016, Aarhus, Denmark. Abstract and Original Paper, pp. 1-6, Organizing Committee, CIGR2016, 2016), where they obtained a pixel accuracy of 79% in the semantic segmentation of different crop species. Later, they were able to distinguish maize crops from 23 different weed species, correctly labelling pixels as “maize” or “weed” in a real case with an impressive pixel accuracy of 94% (M. Dyrmann, AK Mortensen, HS 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 in order to find new architectures and methods that could lead to better segmentation.In 2018, Sa et al. (I. Sa, Z. Chen, M. Popovic, R. Khanna, F. Liebisch, J. Nieto, and R. Siegwart), "Weednet: Dense semantic weed classification using multispectral images and mav for smart farming," IEEE Robotics and Automation Letters. Letters, vol. 3, no. 1, pp. 588-595, 2018) obtained an F1 score of 80% in segmenting crops and weeds with their modified VGG-16, called WeedNet, and 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, pp. 2229-2235, IEEE, 2018) achieved an mIoU of 80.8% for pixel-wise classification of crops, weeds, and soil. Such prior art works focus on crop plants and consider all weed species as a single class (from a taxonomic point of view). The pixel accuracy achieved with such prior art methods is still not sufficient to fully support farmers in optimizing their field protection activities. Summary of the Invention [Problem to be solved by the invention]

[0008] Therefore, there is a need to provide a system and method with improved image analysis capabilities for plant species identification. As a result, plant species identification as used herein relates to the problem of volumetric quantification of plants belonging to a particular plant species, e.g., a weed species competing with a crop 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 where exactly plants of a particular species are found. Furthermore, it is of interest to obtain additional information about the presence and volume of different parts of each plant, e.g., plant stems, leaves, fruits, etc. Such information with a higher granularity, e.g., about plant elements (e.g., fruits) of a particular plant species, can provide useful information about the potential yield offered by a field, thanks to a certain expected number of seeds, or even about the risk that a particular weed may spread rapidly.

[0009] The problem of weed volume quantification is solved by applying a semantic segmentation technique using CNN topology, resulting in a higher pixel accuracy in weed segmentation than can be achieved by known segmentation approaches such as standard PSPNet.

[0010] Embodiments of the invention comprise a computer-implemented method for identifying plant species in a crop field, and a computer program product having computer readable instructions stored in a memory of a computer system and that, when executed by one or more processors of the computer system, cause the one or more processors to perform the method. Further embodiments relate to a computer system configured to perform the computer-implemented method (e.g., when executing the aforementioned computer program product).

[0011] A computer-implemented method for identifying plant species in a crop field uses a particular convolutional neural network, referred to herein as a dual-task CNN. The dual-task CNN has a topology that is configured to perform two different tasks. Each task is associated with its associated loss function, and the entire dual-task CNN is trained considering the two (different) loss functions. In this approach, the first task (the classification task performed by the intermediate module) guides the second task (the segmentation task performed by the semantic segmentation module of the dual-task CNN) leading to an improvement in the overall 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 the dual-task CNN performs a first task in determining the plant species present on the test input image. As a result, the first task is associated with a first loss function. The determination of the plant species corresponds to a classification task. Thus, the intermediate module can be implemented by a classification neural network or a recurrent neural network (e.g., based on a residual network using a RESNET* backbone, such as the 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, for example, crop and weed plants. In addition, when using a recurrent neural network, information about the ratio of plant species present is provided. Both CNN types provide information about the plant species present in a test input image having crop and weed plants.

[0013] When a classification neural network is used as the intermediate module, the first loss function is advantageously "weighted binary cross entropy" where each sample (pixel) is weighted according to the class it belongs to. The intermediate module uses "sigmoid" as the last activation layer to support the presence of multiple classes simultaneously. For example, an analyzed section of a test input image (i.e., a tile of the image) may simultaneously contain pixels belonging to corn plants, weed plants of different weed species and soil. The sigmoid activation layer can handle such multiple classes simultaneously when making predictions regarding the presence of various classes on a text input image.

[0014] Binary cross-entropy and categorical cross-entropy are known to experts in the field. The weighted categorical cross-entropy below is similar to the categorical cross-entropy, but with weights w c has been added.

number

number

[0015] If the intermediate module is implemented by a recurrent neural network, the first loss function is advantageously the "mean squared error" or "average error". The intermediate module may use a "linear" or "sigmoid" as the last activation layer to simultaneously support the presence of multiple classes.

[0016] The segmentation module of the dual-task CNN performs a second task in segmenting the test input image and determining a class for each pixel of the test input image. The class comprises 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 categorical cross entropy". For example, the segmentation module may be implemented by a pyramid pooling module (e.g., based on PSPNet, DeepLab or 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 considering the first and second loss functions. This joint training of two modules with two different loss functions has the effect that 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. Training traditional PSPNet for semantic segmentation (see 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) relies on a two-stage training step in which an initial result is generated by supervision using an intermediate segmentation loss, and the second step learns the subsequent residual together with a final loss. In this way, the optimization of deep learning neural networks is decomposed into two optimization tasks, with each optimization task being simpler to solve. However, although this approach can yield good results, the learning from the first (intermediate) loss disappears while training the network with the second (final) loss. Despite the advantages that can be realized when using traditional PSPNet for semantic segmentation, it lacks the ability to extract classes that are present in only a few percent of the pixels of the analyzed image. This problem is solved by the disclosed extension of traditional segmentation modules (e.g., PSPNet) by adding a second classification or regression task (performed by the intermediate module) that is trained simultaneously with the segmentation task (performed by the segmentation module).This provides a guide for the simultaneous learning process with two loss functions.

[0018] In contrast to the traditional PSPNet approach, where a neural network is split into two different problems that are trained sequentially with a single loss function that is active at any given time as a training strategy, in the approach disclosed herein, both tasks (classification and segmentation tasks) are trained at the same time (i.e., simultaneously) by a simple weighted addition of the respective loss functions of both tasks.

[0019] The dual-task CNN topology disclosed herein extends traditional semantic segmentation networks to a real dual-task network, where the network weights are simultaneously optimized for two loss functions, in this way 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. In the following, a training dataset for a dual-task CNN is described, which combines different data subsets, where one data subset contains manually annotated images and a further data subset contains automatically annotated images. The weight of a sample can be associated with the data subset to which the subject belongs. Samples from the data subset containing automatically annotated images may have a higher weight than samples from the manually annotated dataset. Typically, the manually annotated data subset contains pixels classified by humans as "other" or "unknown". Such pixels may have their weights reduced (e.g., by a number in the range of 10 to 1000) to reduce their impact on the training of the dual-task CNN while still having a small amount of weight remaining to allow domain adaptation to the actual images. As a result, the weight reduction cannot be negative in any way.

[0020] Advantageously, the dual-task CNN modules are jointly trained on an image training dataset that includes a combination of two training data subsets, one subset including manually annotated training images and the other subset including automatically annotated training images.

[0021] For example, the first data subset may include images representing an 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 pixels of the training images belong. Typically, a human user looks at each of the images of the first dataset and marks certain subsections of the image as belonging to a particular class (e.g., crop species, weeds, seeds, soil). In one implementation, the manual pixel annotation may be at a higher level of granularity in that not only are the pixels of plants of a particular plant species annotated as each plant species, but in a hierarchical manner, the particular plant species may also have subclasses for annotation of various plant elements such as stems, leaves, fruits, etc. That is, annotation may be done using tags such as corn1, corn1:leaf, corn1:fruit, weed1, weed1:leaf, weed1:fruit, etc. In many cases, such annotations are quite inaccurate at the pixel level, since users simply input annotations for the designated regions by specifying rectangles (or other shapes, including freeform shapes) on the image. Given the natural distribution of classes in training images, it is clear that such manual annotations are only rough approximations.

[0022] For this purpose, the first data subset is complemented (augmented) by a second subset containing training images with pixel-level correct automatically generated annotations. Obtaining automatically annotated training images may be realized in different ways.

[0023] For example, the second data subset may include images representing multiple plants of different plant species originally derived from a single plant image. Each single plant image then represents a single plant of a particular species. A test image can then be synthesized by extracting image parts belonging to each single plant from the single plant images and pasting the extracted image parts onto a soil background image. As a result, multiple single plant images may be associated with different plant species. However, for each single plant image, the respective species is known (as it is known that each pixel of the extracted section represents a part of a plant of the respective species) and the extracted image parts that are later pasted onto the soil background image are associated with each annotation at pixel level. Thus, the pixels of the second data subset have been automatically annotated with the class (species) to which they belong, known from the original single plant images.

[0024] For example, the other data subset with automatically generated annotations can be a third data subset containing real 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 contains only single species plants, the pixels can be easily automatically annotated with corresponding class annotations corresponding to each plant species. For example, well-known leaf segmentation algorithms can be used to extract all pixels from the original real single species image and annotate them with the corresponding class information.

[0025] The trained dual-task CNN is then applied to test input images in the following manner: The test input is received by a computer system running the dual-task CNN. The test input includes images representing plants belonging to different species. For example, the images may represent crop plants of a particular crop species in a field and weed plants of one or more weed species that are among (i.e., spread among) the crop plants.

[0026] The computer system includes an image tile extractor that extracts tiles from a test input image having dimensions of the shape of the input of the intermediate module. Typically, the test input image is expected to be of high resolution. It is assumed that the dual-task CNN is also trained on images with similar resolution. For example, images with a resolution of 1024x1024 to 10,000x10,000 pixels or more are considered high-resolution images. However, the shape of the input of the intermediate module (first layer) will be lower in dimension (e.g., the shape of the input of a typical RESNET50-based classification neural network can be (473, 473, 3)). Thus, the image tile extractor divides the test input image into image tiles that fit the shape of the input of the intermediate module.

[0027] In what follows, each of the extracted tiles is processed separately and at the end of the segmentation task, the segmented tiles are reconstructed into a global segmented image. For each extracted tile, an 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 feature map with all the features classified by the intermediate modules.

[0028] The segmentation module uses the intermediate feature maps to generate a mask image, where each pixel on the mask is associated with a value between 0 and 1 (i.e., a value in the [0, 1] interval) that represents the probability of said pixel belonging to the associated class. This is achieved by extracting multi-scale features and contextual information from the intermediate feature maps and concatenating the extracted information to perform semantic segmentation.

[0029] Finally, the generated masks (for each tile) are combined into a final image. The final reconstructed image corresponds to the original test input image with additional information for each pixel indicating whether it belongs to a particular plant species and, if so, which species it belongs to. For example, color coding may be used, where each plant species is assigned a unique color and the pixel color of the pixels in the final image is adjusted with the assigned color.

[0030] When a segmentation module is implemented by a pyramid pooling module to perform semantic segmentation, it typically includes four separate filters with different receptive fields that scan the intermediate feature map provided by the intermediate module and create four arrays for multi-scale feature detection that integrate information of different scales and sizes.

[0031] Furthermore, the pyramid pooling module typically includes multiple upsampling layers configured to restore the image size of each sequence to the size of the intermediate feature map using bilinear interpolation. Furthermore, the convolutional layer of the pyramid pooling module extracts context information from the four separated filters and concatenates the context information with the different scale and size information to generate a final feature map of the same size as the intermediate feature map. Furthermore, the pyramid pooling module typically includes a fully connected layer to calculate the final pixel-wise prediction as the generated mask with a final activation layer "softmax". The "softmax" activation function is advantageous because it changes the numbers known as logits into probabilities that sum to 1. Logits are the raw scores output by the last layer of the neural network before activation takes place. In general, the "softmax" function outputs a vector that represents a probability distribution over a list of potential outcomes. When applied to the problem of plant species segmentation, the pixels are mutually exclusive in that each pixel can belong to exactly one class (e.g., a pixel can be either soil or a particular species of plant, but not both at the same time). Thus, "softmax" predicts for each pixel the probability of belonging to a particular class (e.g., plant species or soil).

[0032] Additional aspects of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit the invention as so described. [Brief description of the drawings]

[0033] [Figure 1] FIG. 1 includes a block diagram of a computer system for identifying plant species in a field using a dual-task convolutional neural network according to one embodiment. [Diagram 2]1 is a schematic flow chart of a computer-implemented method for identifying plant species in a field according to one embodiment. [Diagram 3] 1 illustrates an example topology of a dual-task convolutional neural network according to one embodiment. [Figure 4A] 1 illustrates the generation of a first training data subset using manual annotation. [Figure 4B] 13 illustrates the generation of a second training data subset using automatic annotation. [Figure 4C] 13 illustrates the generation of a third training data subset using automatic annotation. [Figure 4D] Illustrated is a scenario in which a single plant image 44 represents further elements of a plant. [Diagram 5] A diagram showing an example of a typical computing device and a typical mobile computing device that may be used with the techniques described herein. [Figure 6] 1 illustrates smart agricultural machinery as part of a distributed computing environment. [Figure 7] 1 shows an example of a smart spray system. [Figure 8] 1 illustrates a control protocol for a smart spray system that controls weeds, diseases, or insects via a chemical control mechanism. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0034] FIG. 1 includes a block diagram of a computer system 100 for identifying plant species (e.g., crop or weed species) in an agricultural field using a dual-task convolutional neural network 120 according to one embodiment. FIG. 2 is a schematic flow chart of a computer-implemented method 1000 for identifying plant species in an agricultural field according to one embodiment. The method 1000 may be performed by the computer system 100. In the detailed description below, the method 1000 of FIG. 2 is disclosed in conjunction with the system 100 of FIG. 1. Accordingly, the description will refer to the reference numbers used in both figures. Furthermore, FIG. 3 illustrates an example topology of a dual-task convolutional neural network 122 according to one embodiment. Thus, when the example embodiment is discussed with respect to components or modules of the computer system 100, the description will also refer to the reference numbers of FIG. 3 in conjunction with the description of FIG. 1.

[0035] The purpose of the computer system 100 is to support the farmer to identify the species and location of plants growing among the crop plants in a section 1 of a field (arable land or greenhouse). Such sections are sometimes called plots in the literature. In the drawings, different object shapes are used to distinguish different plant species. In the example, a triangle is used to represent a crop plant of a certain species grown in the field. All other shapes represent weed plants of different weed species. The dotted background represents the soil part of the section 1 (i.e. the part of the ground that is not hidden 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 10000px) takes an image of the section 1 and provides it to the computer system 100 as a test input image 91, where it is received 1100 by a corresponding interface 110. The test input image 91 represents, in a schematic way, the crop plants of the crop species 10 (triangle) in the field to which the section 1 belongs. Furthermore, the test input 91 represents weed plants of one or more weed species 11, 12, 13 between the aforementioned crop plants. The weed plants are spread among the crop plants (crop species 10). In case of natural fields, weeds of different weed species can spread very regularly or appear in specific populations. In the example, there are two populations: a population of weed plants of species 11 (e.g., crabgrass), a population of weed plants of species 13 (e.g., foxtail), and a population of weed plants of species 12 (e.g., pigweed). As shown in the schematic example, the plants in the image 91 may have overlapping parts. For example, some crop plants overlap other crop plants and overlap some weed plants (as shown diagrammatically in FIG. 1). Weed plants may also overlap crop plants.

[0036] Besides the interface 110 for receiving the test input images (and also the training images), 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 that is output to a user (e.g., a farmer). Image processing to achieve semantic segmentation of the text input images is performed by a Dual Task Convolutional Neural Network 120 (DTCNN). The DTCNN 120 has two sub-modules: - an intermediate module 121 for performing a first task in determining the weed species 11, 12, 13 present on a test input image 91. The first task is associated with a first loss function LF1 for the purpose of optimization of DTCNN. The first task of the DTCNN model (classification) is to analyze the input image tile by tile and predict the presence of different classes in each sub-portion (i.e. tile) of the input image. - a segmentation module 122 for performing a second task of segmenting the test input image 91 in order to determine a class for each pixel of the test input image 91. Naturally, the classes per pixel are exclusive in that a particular pixel can only belong to a single class. Once an image tile has passed the classification task, it is reduced to a feature map that is passed to the segmentation module. The classes include the determined weed species (and also the crop species and the soil species). The second task is associated with a second, different loss function LF2. The generated 1700 output of the segmentation module per tile is a correspondence mask per class. This mask is represented by an image having the same size as the tile, where each pixel is associated with a value in the interval [0,1] that represents the likelihood that the pixel belongs to the associated class. The closer the value is to 1, the more likely the pixel belongs to the class. Values ​​above a predefined threshold are considered to belong to the class. This binary mask is considered as the segmentation task output generated 1700 by the segmentation module.

[0037] A final post-processing step interprets and combines the masks to reconstruct all the tiles into a final segmented image.

[0038] The DTCNN model exhibits a degree of invariance to different lighting conditions (e.g., of plot 1), overlapping leaves, backgrounds and multi-scale detection, which outperforms models used in prior art approaches.

[0039] Before applying DTCNN 120 to the test input, the network is trained on images from the training dataset, whereby the intermediate module 121 and the segmentation module 122 are trained jointly taking into account the first and second loss functions LF1, LF2. This is done straightforwardly by minimizing over the two loss functions as follows: Combination loss = segmentation loss + alpha * classification loss Here, alpha can be a number in the range of [0,100]. As a result, the “segmentation loss” is associated with LF2 and the “classification loss” is associated with LF1. For example, one may choose alpha=0.2 and consider the weighted categorical cross-entropy loss function LF2 for the segmentation task and the weighted categorical cross-entropy loss function LF1 for the classification task. That is, the training of both modules occurs in parallel with the optimization of the two associated loss functions. As mentioned above, prior art segmentation networks such as the PSPNet topology have two subsequent training stages, but the training of the first stage is almost lost when training the second stage. In contrast, a joint training approach with separate loss functions for each task can measure the performance of each task separately through each loss function, while simultaneously setting the weights of the entire topology of DTCNN 120, which includes 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 inherent features that describe the type of image 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. DTCNN has three main properties: - Extraction of spatial information. Although the model can segment groups of leaves, it is actually classifying every pixel in the image one by one. As a result, the network focuses on a single pixel, but at the same time, it can extract spatial information to segment the object. 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 feature resolution. Leaves of different weed species can be very similar. There may be images where the difference between two types of leaves is visible across a high-resolution test input image of just 20 pixels or so. This means that DTCNN needs to learn filters that focus on small groups of pixels to detect such minor differences. This is also true for learning filters that detect different plant sub-elements (e.g. fruits, stems, etc.). - Multi-scale detection. Typically, the scale of leaves varies from image to image. Often, different plants at different growth stages are represented in the same image. Thus, DTCNN must recognize leaves of the same type (i.e., leaves of the same plant species) of different ages and sizes coexisting in the same image. For example, at later growth stages, the plant may already bear fruits. Thus, learning fruit features specific to a particular species can also help in recognizing said species.

[0041] Pyramid Scene Parsing Network (PSPNet) is a deep learning model published in 2017 by Zhao et al. (see above) that specializes in semantic segmentation for scene understanding. It involves classifying each pixel of an image as part of an object taking into account the color, shape and position of each element in the image. PSPNet is a standard semantic segmentation network that aggregates two main properties: multi-scale information (pyramidal modules) and contextual information. 2012 PASCAL VOC dataset (M. Everingham, L. VanGool, C.K. Williams, J. Winn and A. Zisserman, "The pascal visual object classes (voc) challenge", International journal of computer vision. In,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,,vol. 88, no. 2, pp. 303-338, 2010). intelligence), Vol. 40, No. 4, pp. 834-848, 2018, cf.) or piecewise (G. Lin, C. Shen, A. van den Hengel, A.The results were better than other models such as I. 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. Moreover, PSPNet seems to be well suited to the parameters required to solve the weed identification problem, since it has a pyramid pooling layer (for multi-scale detection), and is specialized for semantic segmentation (high resolution) and scene analysis (contextual information). That said, one skilled in the art may use any other semantic segmentation module known in the art as the basis for the segmentation module 122.

[0042] However, the results of applying traditional PSPNet topologies to real field situation images are not satisfactory. The problem is that training semantic segmentation datasets often present very different classes. Different models are specialized in collecting all this information to predict each pixel, since differences are found in color, shape and texture. On the other hand, the classes presented in images with crops and different weed species are very similar classes in shape and color. The differences are mainly found in the fine borders and edges of plant leaves (or other characteristic plant elements such as plant fruits). Moreover, real field images typically exhibit overlapping leaves, lighting changes and different multi-scale and growth stage morphologies. For these reasons, pre-trained networks do not work well on 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 help classify planes and aircraft. However, in plant image datasets, the background and adjacent objects often look nearly identical to the target of identification. Using that information can actually mislead the classification. Furthermore, all leaves are nearly 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 their parts, and color does not provide additional information. Therefore, training of DTCNN120 focuses on edges and boundaries.

[0044] To benefit from the benefits of the semantic segmentation module in its application to the plant image dataset, a classification task is added to the topology of DTCNN120. The model is trained to classify small parts of the image simultaneously, learning pixel-wise classification. This variant of traditional semantic segmentation nets, such as PSPNet, improves the grouping of pixels (using the classification task) without compromising the attention to detecting minor differences (using the segmentation task). As a result, 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 at the same time, taking into account both loss functions at the same time.

[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 dimensions of the shape of the input of the intermediate module 121. The input to the CNN is always a 4D array. That is, the input data has a shape of (batch size, height, width, depth), where the first dimension represents the number of images to be 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 regression CNN 121-2 based on a RESNET architecture, such as the RESNET50 topology or other suitable members of the RESNET family of topologies. The dimensions of the first layer of the intermediate module determine the dimensions of the tiles into which the image is divided by the extraction unit 130 for further processing on tiles. For example, when using the RESNET50 CNN topology, the dimensions of the tiles are configured to fit the shape of the (473, 473, 3) input.

[0046] The intermediate module 121 predicts 1300 for each tile the presence of one or more plant species present in each tile. The output of the intermediate module includes a classification result 121o2 providing the plant species (as classes) present in the test input image (obviously, besides the class of weed species, the classification results also include classes of crop species and soil), and further includes a corresponding intermediate feature map with the extracted features associated with the identified classes. Only the intermediate feature map 121o1 is output 1400 to the segmentation module 122 for further processing. The size of the intermediate feature map is a small fraction (e.g. 1 / 8) of the size of the input image (corresponding to the size of the tile).

[0047] The example embodiment of FIG. 3 shows the segmentation module 122 implemented with a pyramid pooling module based on the PSPNet topology. It is noted that in test runs of the system, PSPNet outperformed other semantic segmentation topologies. However, one skilled in the art may implement the segmentation module 122 using other segmentation topologies. In a PSPNet implementation, the intermediate feature map 121o1 is typically processed by a pooling layer 122-1 that performs an initial filter function in selecting the feature with the highest activation from the intermediate feature map (i.e., the feature with the largest local neighborhood of activation).

[0048] The selected features are then forwarded to the filtering layer 122-2, which implements four separate filters with different receptive fields that scan the intermediate feature map 121o1 for the selected features and integrate information of different scales and sizes to create four arrays for multi-scale feature detection.

[0049] The right filter of the filtering layer 122-2 is the coarsest level and performs global average pooling on each feature map to produce a single binary output. The next filter on the left is the second level that splits the feature map into 2×2 subregions and then performs average pooling on each subregion. The next filter on the left is the third level that splits the feature map into 3×3 subregions and then performs average pooling on each subregion. The filter on the left is the finest level that splits the feature map into 6×6 subregions and then performs pooling on each subregion. In the example with N=4 filter levels and M=2048 number of 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 that are configured to restore the image size of each array to the size of the intermediate feature map 121o1 using bilinear interpolation. In general, bilinear interpolation is performed to upsample each low-dimensional feature map to be the same size as the original feature map.

[0051] The following convolutional layer 122-4 is configured to extract context information from the four separate filters and combine 1600 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. In other words, all the different levels of the upsampled feature map are combined with the original feature map. These feature maps are fused as a global prior distribution. Sometimes in the literature, the convolutional layer 122-4 providing the final feature map 122-4o is considered as the last of the pyramid pooling module. However, in the context of this document, the pixel-wise prediction layer 122-5 is also considered as a layer of the pyramid pooling module.

[0052] The pixel-wise prediction layer 122-5 is a convolutional layer that uses the final feature map to generate a final prediction map. For example, it may be implemented by a fully connected layer 122-5 to compute the final pixel-wise prediction as a generated mask with a final activation layer "softmax" (i.e., a normalized exponential function). The advantages of softmax activation have been explained above. The final prediction result is a pixel-wise segmentation 122o of the currently processed image tile.

[0053] Once all the extracted tiles have been processed by the DTCNN 120, the image reconstruction module 140 reconstructs a fully segmented image 92, corresponding to the size of the original image and including for each pixel the class to which it belongs. For example, the reconstructed image 92 can use a color coding to indicate the class of each pixel. In the schematic of FIG. 1, the segmented image 92 uses different textures to distinguish the various classes of pixels. For example, a surface with pixels classified as belonging to class 10 (crops) is represented by a brick texture. Naturally, textures cannot be used to mark single pixels. However, distinct colors with specific color values ​​for each class can be used. Therefore, textures are only used as simplified markings in the schematic to show the marking concept behind it. For example, pixels belonging to weed plants of class 11 (first weed species) are marked with a grey shaded texture, pixels belonging to weed plants of class 12 (second weed species) are marked with a checkerboard texture, pixels belonging to weed plants of class 13 (third weed species) are marked with a striped texture, and finally, pixels belonging to the soil background class in image 92 are marked with a dotted texture 19.

[0054] Figures 4A to 4C show 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 DTCNN includes at least a first data subset generated using manual annotation of images as disclosed in Figure 4A and a further subset generated with automatic annotation as disclosed in either of Figures 4B and 4C.

[0055] FIG. 4A illustrated the creation of manually annotated training images of a first data subset of training data. An original image 41, representing a real situation in a field with crop plants of a crop species and weed plants of one or more weed species between the crop plants, is provided to a human user for manual annotation. The user tries to assign different elements in the image to corresponding classes (e.g. crop species, weed species, soil). The image 41 and its elements in the example of FIG. 4Aa correspond to the image 91 and its elements in FIG. 1. The result of the manual annotation task is for each training image belonging to the first data subset manual pixel annotations 41-1, 41-2, 41-3 indicating the species to which the pixels of each training image belong. The texture used in the annotated image 41-a corresponds to the texture described with respect to the image 92 in FIG. 1. In the example of FIG. 4A, the result of the manual annotation is shown only diagrammatically in the top right corner of the original image 41. Although the schematic diagram implies that the annotation is correct at pixel level, this is not the case in reality for manually annotated images. Typically, there are many pixels in manually annotated images that are either assigned to the wrong class or not assigned to any class at all due to the user's failure to recognize a particular plant. In other words, the manual annotation is noisy in the sense that many pixels are incorrectly annotated.

[0056] Typically, a user simply selects rectangles in an image and assigns such rectangles to classes. Rectangle R1 may be used to classify pixels within the rectangle as crop species 41-2. However, R1 also contains pixels related to weed species 41-1 and 41-2. The user may further indicate rectangles R2 and R3 that are within or overlap R1 and assign them to the respective weed species classes. It is clear that such annotation methods cannot lead to correct annotation at pixel level. To support the user in the manual annotation task, the computer system may provide the user with some classification support functions.

[0057] For example, the system may provide automated soil segmentation, using a robust and simple color-based segmentation algorithm to automatically remove the presence of ground (soil) and automatically remove it from the manual segmentation. An example algorithm is based on a simple thresholding on 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 a refined segmentation.

[0058] Furthermore, the system may provide support for overlapping plant parts, which makes annotation more complicated to accurately segment all classes, especially at later phenological stages. To mitigate this, the system's manual annotation feature allows marking an annotation inside another annotation (e.g. R2 in R1). In this case, the inner annotation (assigned to R2) is removed from the segmentation that belongs to the outer annotation (assigned to R1). This simplifies the annotation process, since it is not necessary to accurately annotate all species. It is sufficient to only annotate overlapping species with an "enclosure" annotation or other annotation indicating overlap.

[0059] To generate the first image data subset, the following conditions were valid in a test run of the system: A large-scale image acquisition campaign was carried out in 2017 in two different locations in Germany and Spain. A set of 24 plots, each 2.0x2.5m, was planted. In these plots, two rows of corn (Zea mays) were planted together with six different weed species, three "grass-leaf" weeds (foxtail, crabgrass, barnyard grass) and three "broadleaf" weeds (velvetleaf, pigweed, redroot pigweed). Each plot was imaged in top and oblique views using two different devices: a Canon EOS 700D SLR camera and a Samsung A8 mobile phone. To facilitate image acquisition, a metal structure was built to hold the two mobile phones and the two SLR cameras, and top images (height 2.0m, focal length 18mm) and perspective images (height 1.6m, angle 30 degrees, focal length 18mm) were taken. Four such images may be taken simultaneously to save time, but this does not affect the quality of the training data.

[0060] Images were taken three times a week, twice a day, over a nine-week period to collect different phenological stages of maize and weeds. The study started in May 2017 and ended in June 2017. After removing overexposed and / or blurred images, a total of 1679 images were manually segmented into seven object classes named according to their corresponding EPPO codes (ZEAMX, SETVE, DIGSA, ECHCG, ABUTH, CHEAL, AMARE).

[0061] Although the target weeds were planted at specific locations, unknown weeds growing wild in the experimental plots made this task more complicated. To address this issue, two new classes (common broadleaf weeds and common grassy 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 plots were separated into training, testing and validation plots: eight plots were used for training, two for validation and the other two for testing.

[0063] The first data subset was then combined into a training image dataset with 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 described in FIG. 4B. The second set consists of synthetically generated images, which can be correctly automatically annotated at pixel level. The final synthetically generated images 42-a of the second subset represent multiple weed plants of different weed species obtained from the original single plant images 42, each single plant image representing a single plant 12 of a single species. Single plant elements are extracted from the single plant images (e.g. with a leaf segmentation algorithm) and pasted onto a soil background image 42-b. Thus, the second data subset can be fully automatically annotated at pixel level with annotations 42-1, 42-3, 42-4 of pixels belonging to each weed species, since the extracted single plant elements (shown with different textures in the image 42-s) belong to known plant species. Such automatic annotation is much less noisy than manual annotation, since the pixels extracted by the leaf segmentation algorithm substantially only include pixels that truly belong to a single plant and can then be automatically annotated with the known species of plant of 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 to annotate and prone to errors 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 of the second subset, including image communities generated by single plant images, in combination with the first subset. For this purpose, an additional acquisition campaign of single plants was carried out.

[0066] The composite dataset featured three new weed species: pigweed, American morning glory and bindweed. It consisted of images, each image representing a single plant on a 80x80cm plot in a greenhouse. There were two greenhouses from Spain. Each of them was sown with a different species: 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. One image was taken per weekday (Monday to Friday) from day 0 to day 80, depending on each individual plant. The final (second) data subset contained 6906 images of single plants at different growth stages of nine different species, since not all of them lasted until the last day.

[0067] Since only one plant appears in each image, all images in the subset are labeled. Using a deep learning model for leaf segmentation, the entire dataset could be automatically annotated. The synthetic plant community generation algorithm is able to take segmented images of real leaves and paste them onto a real background image. The use of a single plant dataset allows us to automatically segment leaves and / or plants and store them in a candidate repository. After identifying which candidates were viable, the final folder contained 11096 images unevenly divided into 9 species. The community generation algorithm takes the candidates from the repository and pastes them onto the soil image in a specific way.

[0068] To generate these images, several random regions are created, associated with three parameters that describe each region: the model parameters are plant species, growth stage and density. The plant species are grown according to the parameters of the region, following a Monte Carlo approach. The pipeline of this algorithm is as follows: (i) The growing areas are made into ellipses 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 plant candidate. (iv) Depending on the location point, whether the candidate is within a cultivated area or not (if not, the potential candidate is rejected). (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 that growing region. If the sampled number is greater than the “density” threshold, the candidate is rejected. (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 that contain several plant species at various stages of growth with non-uniform densities. The second data subset was made of 5000 synthetic images. Of the 5000 generated plot images, 80% were kept for training, 10% for validation, and another 10% for testing.

[0070] 4C shows a third data subset that can alternatively be used in combination with the first data subset to form a training image dataset. Of course, all three data subsets can be combined into a training dataset. The third dataset includes images 43-a representing multiple weed plants of a single weed species. The images of the third data subset are also automatically annotated with annotations 42-3, 43-1, 43-4 of pixels belonging to a single weed species.

[0071] While the first data subset exhibits unbalanced classes and noisy annotations, the synthetic second data subset may have some issues with respect to adequately mimicking real plant communities growing with overlapping plant elements. An example of a situation with unbalanced classes is having one class associated with 30% of the pixels and another class associated with only 0.0001% of the pixels. In addition to this, there may be unknown pixels that could be 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 routinely checked and manually removed whenever a plant of another species appeared. Having a single species per plot implies that all images were already labeled and therefore automatic segmentation is feasible. There were three densities (number of crop plants per area) of plots: high, medium and sparse. The 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 Spanish and German images, especially in terms of soil / background.

[0072] Using a leaf segmentation algorithm (e.g., the leaf segmentation algorithm described above), we obtain automatically generated labeled masks for each image that serve as ground-truth labels for semantic segmentation. Although this segmentation method still makes some mistakes at the pixel level, the third data subset can be considered 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 since it shows several species in the same image, whereas the third data subset, although only one species is present, shows better texture, overlap, shading and shape (i.e. more information) of the real field image.

[0074] Different training experiments were performed by including combinations of the three data subsets. All experiments were evaluated against validation and testing on the first data subset. In some experiments, more than one image training dataset was used for training. As 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. Once a data subset runs out of images (i.e., the generator retrieves the last image of each subset), it starts over for each subset while incrementing the images of the other subsets.

[0075] To avoid bias, as already mentioned, each data subset was split into 80% training images, another 10% validation, and the last 10% testing.

[0076] Data augmentation was applied every 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. Shearing is not recommended since the semantic segmentation method disclosed herein extracts tiles from images and it is important to maintain consistency.

[0077] The program code was implemented in the Keras deep learning library using TensorFlow as the background. Decay per epoch = 10 -6 Stochastic gradient descent was used as the optimizer for both tasks, with learning rate lr=0.001, momentum=0.9 and Nesterov accelerated gradient descent at 100 kb / s. To address the class imbalance present in the data subsets, Balanced Accuracy (BAC) was selected as the most suitable algorithm performance metric (the use of "normal" accuracy is not recommended in such cases).

[0078] For training DTCNN, we used an NVIDIA Tesla V100 GPU with 16GB memory. Considering the size of the input images, the batch size was set to 6. Following the same methodology described by A. Johannes et al. 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, and by A. Picon et al. in “Deep convolutional neural networks for mobile capture device-based crop disease classification in the wild”, Computers and Electronics in Agriculture, 2018, a validation subset of the first data subset and the calculated values ​​of balanced accuracy (BAC) and Dice-Sorensen coefficient were used to calculate the thresholds that maximize the validation set for different weed species.

[0079] Various experiments were tested using the test images from the first data subset, as they represent real field situations. To measure the impact of using different trained datasets, several models were trained combining different data subsets. Two sets of experiments were used: one set focused on validating the performance of the proposed dual-task CNN based on the PSPNet topology for the segmentation module, and another set was used to measure the impact of combining different data subsets.

[0080] Two experiments focused on verifying that our implementation of dual-task PSPNet outperforms the usual single-task PSPNet are as follows (the experiments are named according to the topology and number of data subsets used): - PSPNet 1st + 3rd. In this experiment, we use the baseline PSPNet trained on images from both the 1st and 3rd data subsets. This combination was selected as the best data subset combination for training. - Dual-task PSPNet 1st + 3rd. This experiment is similar to the previous one, but we replace the traditional PSPNet network architecture with the disclosed dual-task PSPNet.

[0081] The obtained results show that the use of a dual-task (classification and segmentation) CNN obtains an average Dice-Sorensen coefficient (DSC) of ~48% compared to ~45% obtained when using a traditional architecture. Furthermore, the balanced accuracy is slightly improved. Both models show peak performance for images recorded during the second week after seeding (middle stage). Moreover, dual-task PSPNet 1+3 scores better than PSPNet, especially in the early stages. However, over time its performance degrades faster than PSPNet. The worst DTCNN predictions (for images recorded during the fourth week after seeding) obtain values ​​similar to the traditional PSPNet predictions.

[0082] The impact of different data subsets on the performance of the dual-task CNN was verified by the following experiments.

[0083] DTCNN 1. In this experiment, training was only performed on the 1st data subset, which had several issues: low number of images, high complexity, inaccurate annotations and high class imbalance.

[0084] DTCNN 2. In this experiment, the synthetic 2 data subset was used for training. Since synthetic images exhibit differences in spatial distribution, illumination, background and scale, a performance degradation due to domain shift was expected. To ensure that the automatic annotation of pixels annotates each pixel with the correct class, the information about the proper leaf shape and edges is suitable for training on near-perfect ground truth annotations.

[0085] DTCNN No. 3. In this experiment, the single-species (No. 3) data subset is used for training. Although plant images are captured under real conditions, plant community interactions cannot be captured from this dataset.

[0086] DTCNN 1st + 2nd. In this experiment, images from the 1st and 2nd data subsets are combined for training. The 2nd data subset allows to reduce the effect of class imbalance and poor quality annotations from the 1st data subset by incorporating synthetic images.

[0087] DTCNN 1st + 3rd. In this experiment, the 1st and 3rd data subsets of images are combined for training. The 3rd data subset allows to reduce the impact of class imbalance and poor quality annotations from the 1st data subset by including single-species images from the 3rd data subset.

[0088] DTCNN 1st + 2nd + 3rd. The final model imputs to all data subsets.

[0089] In conclusion, when the first data subset of interest is combined with one of the supporting datasets (second, third), the domain shift is reduced and more accurate results are obtained. The best results were obtained when the first and third data subsets were used in combination to train the DTCNN.

[0090] FIG. 4D illustrates a scenario in which a single plant image 44 (used for automatic annotation in FIG. 4B) represents further elements of a plant. In this image 44, besides the leaves 12l, one can see the stem 12s and the fruit 12f of the plant. For many plants, the fruit has a different color than the color of the leaves of the stem. In such a case, existing segmentation methods can be used to segment the pixels belonging to the fruit 12f and the pixels belonging to the leaves 12l of the plant (or other elements of the plant that have the same color as the leaves). Then, in a similar way as described with respect to FIG. 4B, the leaves of the plant as well as its fruit can be pasted into the synthetically generated image 44-s. In combination 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 the plant 12* (in addition to the objects 44-1, 44-3 and 44-4 already known from FIG. 4B).

[0091] It should be noted that those skilled in the art can also use the color differences between the fruits and leaves of the plants to improve on the method described in Fig. 4C to generate an automatically annotated image that includes objects representing the leaves and fruits of each plant. As for annotation of other plant elements (e.g., stems) that are similarly colored to the leaves, manual annotation of such elements may be used.

[0092] When using automatically annotated images that also contain 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 fruit of the plant (e.g., crop). Typically, only one crop species is grown in a field. In such a case, it is sufficient to train the DTCNN using automatically annotated images containing leaves and fruits of this crop species and images of other plant species (weeds), as explained above. FIG. 5 is a diagram illustrating an example of a generic computing device 900 and a generic mobile computing 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 suitable computers. Ideally, the device 900 has a GPU configured to process machine learning algorithms. The generic computing device 900 may correspond to the computer system 100 of FIG. 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 a user captures test input images and provides them to computing device 900, and then receives from the computing device a segmented image showing the location of various weed plants and their respective species on the image. As a result, computing device 950 may also include output device 50 of Figure 1. The components illustrated herein, their connections and relationships, and their functions are intended to be illustrative only and are not intended to limit example implementations of the invention(s) described and / or claimed herein.

[0093] The computing device 900 includes a processor 902, a memory 904, a storage device 906, a high-speed interface 908 connecting the memory 904 and a high-speed expansion port 910, and a low-speed interface 912 connecting a low-speed bus 914 and the storage device 906. Each of the components 902, 904, 906, 908, 910, and 912 may be interconnected using various buses, mounted on a common motherboard, or in other manners as desired. The processor 902 may process instructions for execution within the computing device 900, including instructions stored in the memory 904 or the storage device 906, to display graphical information for a GUI on an external input / output device, such as a display 916 connected to the high-speed interface 908. In other implementations, multiple processing units and / or multiple buses may be used, as well as multiple memories and memory types, as desired. Multiple computing devices 900 may also be connected (e.g., as a server bank, a group of blade servers, or a processing device), with each device providing a portion of the required operations.

[0094] The memory 904 stores information within the computing device 900. In one implementation, the memory 904 is a volatile memory unit or units. In another implementation, the memory 904 is a non-volatile memory unit or units. The memory 904 may also be other forms of computer-readable media, such as a magnetic or optical disk.

[0095] The storage device 906 can provide mass storage for the computing device 900. In one implementation, the storage device 906 can be or include a computer-readable medium such as a floppy disk device, a hard disk device, an optical disk device, or a tape device, a flash memory or other similar solid-state memory device, or an array of devices including a storage area network or other configuration of devices. The computer program product can be tangibly embodied in an information carrier. The computer program product can also include instructions that, when executed, perform one or more methods as described above. The information carrier is a computer or machine-readable medium, such as the memory 904, the storage device 906, or the memory of the processor 902.

[0096] The high-speed control 908 manages the bandwidth consuming operations of the computing device 900, while the low-speed control 912 manages the lower bandwidth consuming operations. Such allocation of functions is merely exemplary. In one implementation, the high-speed control 908 is connected to the memory 904, the display 916 (e.g., through a graphics processor or accelerator), and a high-speed expansion port 910 that may accept various expansion cards (not shown). In an implementation, the low-speed control 912 is connected to the storage device 906 and the 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, a pointing device, a scanner, or a network device, such as a switch or a router, such as through a network adapter.

[0097] Computing device 900 may be implemented in a number of 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. It may also be implemented in a personal computer, such as a laptop computer 922. Alternatively, components from computing device 900 may be combined with other components in a mobile device (not shown), such as device 950. Each such device may include one or more computing devices 900, 950, and the entire system may be composed of multiple computing devices 900, 950 in communication with each other.

[0098] Computing device 950 includes, among other components, a processor 952, a memory 964, an input / output device such as a display 954, a communication interface 966, and a transceiver 968. Device 950 may also be provided with a storage device such as a microdrive or other device to provide additional storage. Each of the components 950, 952, 964, 954, 966, and 968 are interconnected using various buses, and some of the components may be mounted on a common motherboard or in other manners as desired.

[0099] The processor 952 can execute instructions within the computing device 950, including instructions stored in the memory 964. The processor may be implemented as a chipset of chips including multiple separate analog and digital processing units. The processor may be provided for, for example, control of a user interface, coordination of applications executed by the device 950, and other components of the device 950, such as wireless communication by the device 950, etc.

[0100] The processor 952 may communicate with a user through a control interface 958 and a display interface 956 connected to a display 954. The display 954 may be, for example, a TFT LC (thin film transistor liquid crystal display) or OLED (organic light emitting diode) display or other suitable display technology. The display interface 956 may comprise appropriate circuitry for driving the display 954 to present graphical and other information to the user. The control interface 958 may receive commands from the user and convert them for submission to the processor 952. Additionally, an external interface 962 may be provided in communication with the processor 952 to enable short-range communication of the 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 multiple interfaces may be used.

[0101] The memory 964 stores information within the computing device 950. The memory 964 can be implemented as one or more computer-readable media, volatile or non-volatile memory units. Expansion memory 984 may also be provided and connected to the device 950 through an expansion interface 982, which may include, for example, a SIMM (single in-line memory module) card interface. Such expansion memory 984 may provide extra storage space for the device 950 or may store applications or other information for the device 950. In particular, the expansion memory 984 may include instructions for performing or supplementing the above processes, and may also include security information. Thus, for example, the expansion memory 984 may act as a security module for the device 950 and may be programmed with instructions that allow secure use of the 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 an unhackable manner.

[0102] The memory may include, for example, flash memory and / or NVRAM memory, as described below. In one implementation, the computer program product is tangibly embodied in an information carrier. The computer program product includes instructions that, when executed, perform one or more methods, such as those described above. The information carrier is, for example, a computer or machine-readable medium, such as memory 964, expansion memory 984, or memory on processor 952, which may be received via transceiver 968 or external interface 962.

[0103] The device 950 may communicate wirelessly through a communication interface 966, which may include digital signal processing circuitry as necessary. The communication interface 966 may provide for communication under various modes or protocols, such as GSM voice calls, SMS, EMS or MMS messaging, CDMA, TDMA, PDC, WCDMA, CDMA2000 or GPRS, among others. Such communication may occur, for example, through a radio frequency transceiver 968. Additionally, short-range communication may occur, such as using BLUETOOTH, WiFi or other such transceivers (not shown). Additionally, a GPS (Global Positioning System) receiver module 980 may provide additional navigation and location related wireless data to the device 950, which may be used as needed by applications executing on the device 950.

[0104] Device 950 may also communicate audibly using an audio codec 960, which may receive spoken information from a user and convert it into usable digital information. Audio codec 960 may also generate audible sounds for the user, such as through a speaker in a handset of device 950. Such sounds may include sounds from a voice telephone call, may include recorded sounds (e.g., voice messages, music files, etc.), and may include sounds generated by applications running on device 950.

[0105] Computing device 950 may be implemented in a number of different forms, as shown in the figure, such as a mobile phone 980, or as part of a smartphone 982, personal digital assistant, or other similar mobile device.

[0106] Various implementations of the systems and techniques described herein can be realized in digital electronic circuitry, integrated circuits, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, coupled to receive data and instructions from, and transmit data and instructions to, the storage system, the at least one input device, and the at least one output device.

[0107] These computer programs (also known as programs, software, software applications or code) include machine instructions for a programmable processor and can be implemented in high-level procedural and / or object-oriented programming languages ​​and / or assembly / machine languages. 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 disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) by which the user can provide input to the computer. Other types of devices can also be used to provide interaction with a user. For example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback). Also, input from the user can be received in any form, including acoustic, speech, or tactile input.

[0109] The systems and techniques described herein can be implemented in a computing device that includes a back-end component (e.g., as a data server), or includes a middleware component (e.g., an application server), or includes a front-end component (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or is any combination of such back-end, middleware, and front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), and the Internet.

[0110] Computing devices may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

[0111] Several embodiments have been described. However, it will be understood that various modifications may be made without departing from the spirit and scope of the invention.

[0112] Additionally, the logic flow depicted in the figures need not be in the particular order shown or sequential order to achieve desired results. Additionally, other steps may be provided or steps may be deleted from the described flows, and other components may be added to or deleted from the described systems. Accordingly, other embodiments are within the scope of the following claims.

[0113] Furthermore, embodiments of the invention, in particular the method of the invention, may be used to interact with agricultural machinery and to operate, control and / or monitor the agricultural machinery. As a preferred embodiment of the invention, the method of the invention further comprises a step of outputting a signal, such as a control signal or an on-off signal, for operating, controlling and / or monitoring the agricultural machinery. As an advantageous embodiment of the invention, the method of the invention further comprises a step of outputting a signal, such as a control signal or an on-off signal, for operating, controlling and / or monitoring the agricultural machinery depending on the result of the weed identification or plant identification step of the method of the invention. Even more preferably, when 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 for operating the agricultural machinery for spraying or applying or preparing to spray or apply a herbicide or other crop protection agent targeted to this specific weed. Advantageously, when a particular weed is identified and exceeds a particular predefined threshold value related to this particular weed (e.g., relating to the amount of weed, the amount of weed volume, the area (e.g., hectares) or the number of geographic locations where this weed is identified), a control or on-off signal is output to operate the agricultural machinery in a manner targeted to this particular weed. For example, a control signal is output to operate the agricultural machinery to spray or apply, or in preparation for spraying or applying, a herbicide or other crop protection agent targeted to this particular weed. The agricultural machinery may include one or more treatment mechanisms for treating plants in the field. The treatment mechanisms include chemical, mechanical, electrical treatment mechanisms or combinations of such treatment 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 in the field conditions as the smart machine moves through the field. The control system may be configured to control the treatment mechanisms based on the detected field conditions.

[0114] In one embodiment, the treatment mechanism is a chemical treatment mechanism. In such an embodiment, the agricultural machinery includes a sprayer having one or more nozzles for applying a chemical or crop protection agent to a field.

[0115] In one embodiment, the detection system includes one or more detection components for detecting conditions in a field as the agricultural machine traverses the field. The detection components may be optical detection components, such as a camera that captures images of the field. The optical detection component may be, for example, an image recording device 90 (see FIG. 1).

[0116] In further embodiments, the agricultural machine includes one or more processing elements associated with one or more detection components. In such embodiments, the detection components may be located in front of the treatment elements when viewed in the drive direction. In this way, the detection components can sense field conditions and the system can analyze the sensed field conditions and control the treatment elements based on such analysis. This allows targeted treatment while the agricultural machine is traversing the field based on real-time field conditions present at the time of treatment.

[0117] In a further embodiment, the sprayer includes multiple nozzles associated with multiple optical detection components. In such an embodiment, the optical detection components are positioned in front of the nozzles when viewed from the drive direction. Further, each of the optical detection components is associated with a nozzle such that the field of view of the optical component and the spray shape of the associated nozzle at least partially overlap as the sprayer moves through the field.

[0118] In a further embodiment, the control system is configured to analyze the condition of the sensed field as provided by the detection system, and based on such analysis, the control system is further configured to generate a control signal for actuating the treatment mechanism when the position of the treatment mechanism reaches the position of the analyzed field.

[0119] FIG. 6 illustrates a smart agricultural machine 210 as part of a distributed computing environment.

[0120] Smart agricultural machine 210 may be a smart sprayer and includes a connectivity system 212. The connection system 212 is configured to communicatively connect the smart agricultural machine 210 to the 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 of the distributed computing environment. One computing resource 212, 214, 216 may be a data management system 214 that may be configured to transmit data to the smart agricultural machine 210 or receive data from the smart agricultural machine 210. For example, data may be transmitted from the smart agricultural machine 10 to the data management system 214 as a detection map or as a spraying map including data recorded during spraying. An additional computing resource 212, 214, 216 may be a field management system 216 that may be configured to provide a control protocol, activation code, 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. Additionally, the additional computing resources 212, 214, 216 may be client computers 216 that may be 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 to be performed on a particular field using the smart agricultural machinery 210, or field analysis data to provide insight into the health of a particular field.

[0121] FIG. 7 shows an example of a smart atomizer system.

[0122] The system includes a tractor having a sprayer 220 for applying a pesticide, such as a herbicide, fungicide, or insecticide. The sprayer 220 may be removably or directly attached to the tractor. The sprayer 220 includes a boom having a number of nozzles 222 disposed along the boom of the sprayer 220. The nozzles 222 may be fixedly or movably disposed along the boom at regular or irregular intervals. Each nozzle 222 includes a controllable valve for regulating fluid discharge from the nozzle 222 into the field.

[0123] One or more tanks 24 are fluidly connected to the nozzles 222 through pipes 226. Each tank 224 holds one or more components of the fluid mixture to be dispersed onto the field. This 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 release of fluid from the tank 224 to the pipes 226. Such a device allows for control of the mixture released onto the field.

[0124] Further, 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 fixedly or movably arranged 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 located in front of the nozzle 222 (as viewed from the drive direction). 1, the detection components 230 are optical detection components, and each detection component 230 is associated with a single nozzle 222 such that the field of view includes or at least overlaps the spray shape of each nozzle 222 on the field when the nozzle reaches each position. In other arrangements, each detection component 30 may be associated with more than one nozzle 222, and more than one detection component 30 may be associated with each nozzle 222.

[0126] The detection components 230, tank valves and nozzle valves are communicatively connected to a control system 232. In the embodiment shown in FIG. 1, the control system 232 is located in the main sprayer housing and is hardwired to each component. In another embodiment, the detection components 230, tank valves or nozzle valves may be wirelessly connected to the control system 232. In yet another embodiment, more than one control system 232 may be distributed in the sprayer housing or tractor and communicatively connected to the detection components 230, tank valves or nozzle valves.

[0127] The control system 232 is configured to control and / or monitor the detection components, the tank valves or the nozzle valves according to a control protocol. In this regard, the control system 232 may comprise multiple modules. One module, for example, controls the detection components and collects data, such as images of the field. A further module analyzes the collected data, such as images, to derive parameters for the tank or nozzle valve control. Furthermore, the further module controls the tank and / or the nozzle valve based on such derived parameters.

[0128] FIG. 8 shows the control protocol for a smart sprayer system to control weeds, diseases or insects via chemical control mechanisms.

[0129] When the smart sprayer initiates a spraying operation in a field, a control protocol of the smart sprayer system may be triggered. In a first step 240, the optical detection components are triggered to provide data, such as an image of the field. In a second step 242, the provided data, such as an image, provided by each optical detection component is analyzed for 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 a 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, or prepare to spray or apply, a specific herbicide or crop protection agent targeted to the identified weed. In a fourth step 246, such control signals are provided to each tank and / or nozzle valve.

[0130] Thanks to the system setup, each tank and nozzle valve can be controlled individually. Thus, if only one image shows the presence of weeds, only each nozzle associated with the optical detection component with a spray shape that covers the field of view of that optical detection component is triggered. Similarly, if multiple images show the presence of weeds, after image analysis using the method of the present invention, each nozzle associated with those optical detection components with a spray shape that covers the field of view of those optical detection components is triggered.

[0131] In addition to such targeted treatment, the control of the tank valves allows for the adjustment of the composition of the treatment depending on the conditions sensed by the optical detection components in the field. For example, a first tank may contain a first herbicide with a first active ingredient composition, and a second tank may contain a second herbicide with a second active ingredient composition. Depending on the results of the image analysis using the method of the present invention, the valves of the first or second or both tanks may be triggered to provide each herbicide for application to the field.

[0132] In another advantageous embodiment, a variable rate application (VRA) map for spraying crop protection agents may be generated based on image analysis using the method of the present invention, where the images to be analyzed are obtained, for example, through an image recording device 90 that may be attached to an agricultural machine, an unmanned aerial vehicle (e.g., a drone), or any mobile device. This variable rate application (VRA) map may later be used by other agricultural machines, unmanned aerial vehicles, mobile devices to apply herbicides or crop protection agents.

[0133] In another advantageous embodiment, the image analysis using the method of the invention can also be used to monitor the application of a herbicide or crop protection agent in terms of its effectiveness, timeliness and completeness, for example 1 day, 2 days, 3 days, 4 days, 5 days, 6 days, 7 days, 10 days, 2 weeks, 3 weeks, 4 weeks after the application has been carried out. As a result of this image analysis, in particular depending on the result of the weed identification or plant identification step in the method of the invention, a signal may be output, such as a control signal or an on-off signal for operating, controlling and / or monitoring agricultural machinery.

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.

Citation Information

Patent Citations

  • Single-stage video behavior detection method

    CN108805083A

  • Recognizing weeds in their natural environment

    JP2019520631A

  • Recognition of weed in a natural environment

    US20190220666A1

  • Recognition of weed in a natural environment

    WO2017194399A1