Intelligent identification method and system for water hyacinth

By combining a multi-task recognition network and a negative class memory, the problem of verifying the connection between flowers and the plant itself in water hyacinth recognition was solved, thus improving the accuracy and reliability of water hyacinth recognition.

CN123182040APending Publication Date: 2026-11-27NANJING CENT CHINA GEOLOGICAL SURVEY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611695009.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing intelligent water hyacinth identification solutions are prone to misidentifying floating purple flowers or purple debris as water hyacinths during the flowering period, resulting in a high false positive rate and affecting the accuracy and reliability of identification.

Method used

The trained multi-task recognition network processes the water surface image to obtain water hyacinth candidate regions and performs granular differentiation, establishes the physical connection between flower organs and plant body, combines negative class memory for gating comparison, and outputs the final recognition result.

Benefits of technology

It improved the accuracy of identifying water hyacinth during both the non-flowering and flowering stages, reduced the false alarm rate, and enhanced the reliability of the identification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182040A_ABST
    Figure CN123182040A_ABST
Patent Text Reader

Abstract

The application provides an intelligent Eichhornia crassipes identification method and system, relates to the technical field of data processing, and obtains an Eichhornia crassipes candidate region and an initial result of a whole image by inputting a to-be-detected water surface image into a trained multi-task identification network, distinguishes the granularity of the Eichhornia crassipes candidate region, determines a body region and an organ region, determines the body region connected with the organ region in the neighborhood range of the organ region as a belonging plant region, establishes an organ attribution relationship between the organ region and the belonging plant region, determines an initial identification result based on the body region and the organ attribution relationship, performs gate comparison on the initial identification result, the initial result of the whole image and interference samples in a negative class memory, filters the initial identification result according to the gate comparison result, and outputs an Eichhornia crassipes identification result. The physical connection relationship between the flower organ and the plant body can be accurately verified, and the precision and reliability of the intelligent Eichhornia crassipes identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to data processing technology, and more particularly to a method and system for intelligent identification of water hyacinths. Background Technology

[0002] Water hyacinth, as an aquatic plant with extremely strong reproductive capacity, is prone to large-scale outbreaks on the water surface, blocking waterways, disrupting the aquatic ecological balance, and affecting water quality. Therefore, intelligent identification of water hyacinth in water monitoring images to achieve accurate monitoring of its distribution range and growth status is of vital application value for guiding the timely removal and ecological management of water hyacinth.

[0003] Currently, most existing intelligent water hyacinth identification solutions adopt conventional multi-class parallel detection architectures, mainly relying on the global color or texture features of the image for target determination. However, during the flowering period of water hyacinth, the purple flowers will cover a large area of ​​the green plant body, and there are often floating purple debris, isolated flowers, or floating canopies with similar shapes in natural waters. Existing methods cannot deeply verify the physical connection between the flower organs and the plant body. This technical limitation makes it very easy for existing solutions to misidentify isolated purple flowers or purple debris floating on the water surface as water hyacinth, resulting in a high negative false alarm rate, which affects the accuracy and reliability of water hyacinth identification during the flowering period.

[0004] Therefore, how to accurately verify the physical connection between flower organs and the plant body, and improve the accuracy and reliability of intelligent water hyacinth identification, has become an urgent problem to be solved. Summary of the Invention

[0005] This invention provides a method and system for intelligent identification of water hyacinth, which can more accurately verify the physical connection between flower organs and the plant body, thereby improving the accuracy and reliability of intelligent identification of water hyacinth.

[0006] A first aspect of the present invention provides a method for intelligent identification of water hyacinths, comprising:

[0007] A water surface image to be tested is acquired, and the water surface image to be tested is input into a trained multi-task recognition network to obtain water hyacinth candidate regions and preliminary judgment results of the whole image. The water hyacinth candidate regions are then distinguished by granularity to determine the body region and organ region.

[0008] The body region connected to the organ region within the neighborhood of the organ region is determined as the plant region to which it belongs. An organ attribution relationship is established between the organ region and the plant region to which it belongs. An initial identification result is determined based on the body region and the organ attribution relationship.

[0009] Obtain the negative class memory library constructed based on the negative class labeling, perform gating comparison between the initial recognition result, the initial judgment result of the whole image and the interference samples in the negative class memory library, filter the initial recognition result based on the gating comparison result, and output the water hyacinth recognition result.

[0010] Alternatively, in one possible implementation of the first aspect, the trained multi-task recognition network is trained in the following manner:

[0011] Obtain training images and the no-flowering-period, flowering-period, and negative class labels in the training images;

[0012] Based on the labeling granularity of the no-flowering period label, the flowering period label, and the negative class label, a plant body supervision region, a floral organ supervision region, and a negative example supervision region are generated. The flowering period plant body region connected to the floral organ supervision region is determined with the floral organ supervision region indicated by the flowering period label as the center.

[0013] Based on the plant body supervision region, the flower organ supervision region, the negative example supervision region, and the flowering period plant body region, a flower-removed view and a body-removed view are generated. A multi-task recognition network is trained based on the flower-removed view and the body-removed view to obtain the trained multi-task recognition network.

[0014] Optionally, in one possible implementation of the first aspect, generating a plant body supervision region, a floral organ supervision region, and a negative example supervision region based on the labeling granularity of the no-flowering-period label, the flowering-period label, and the negative class label, and determining a flowering-period plant body region connected to the floral organ supervision region, centered on the floral organ supervision region indicated by the flowering-period label, includes:

[0015] The labeling granularity is determined based on the object corresponding to each label. The labeling of the plant body in the non-flowering period label and the labeling of the flowering period label are determined as the plant body granularity, and the labeling of the flower organ in the flowering period label is determined as the flower organ granularity.

[0016] The regions corresponding to the non-flowering period and flowering period labels of the plant granularity are determined as the plant granularity supervision region, the regions corresponding to the flowering period labels of the flower organ granularity are determined as the flower organ supervision region, and the regions corresponding to the negative class labels are determined as the negative example supervision region.

[0017] Centered on the flower organ supervision region, within a preset range, based on the color and texture of each pixel in the training image, the range of the plant body that has an edge connection with the flower organ supervision region is determined. The flower organ supervision region and the range of the plant body are then merged to obtain the flowering plant body region.

[0018] Optionally, in one possible implementation of the first aspect, acquiring the water surface image to be tested and inputting the water surface image to be tested into a trained multi-task recognition network to obtain water hyacinth candidate regions and preliminary judgment results of the whole image includes:

[0019] The shared encoder of the trained multi-task recognition network extracts image features of the water surface image to be tested.

[0020] Based on the whole-image preliminary judgment branch of the trained multi-task recognition network, the image features are mapped to the whole image to obtain the preliminary judgment results of no flowering period, flowering period and negative class corresponding to the water surface image to be tested, which are used as the whole-image preliminary judgment results.

[0021] The candidate detection of the image features is performed based on the candidate detection branch of the trained multi-task recognition network to obtain the water hyacinth candidate region.

[0022] Optionally, in one possible implementation of the first aspect, the step of granularly distinguishing the candidate water hyacinth region to determine the body region and organ region includes:

[0023] For each of the water hyacinth candidate regions, the region area, the proportion of significant color regions, the intensity of the first color texture, the intensity of the second color texture, and the frequency of co-occurrence in the neighborhood are extracted respectively.

[0024] Among them, the significant color region is the set of pixels in the water hyacinth candidate region whose color saturation is higher than a preset saturation threshold, and the neighborhood co-occurrence frequency is the frequency of other water hyacinth candidate regions existing within a preset neighborhood range of the water hyacinth candidate region.

[0025] The first color texture intensity is the texture feature intensity corresponding to the first color in the water hyacinth candidate area, and the second color texture intensity is the texture feature intensity corresponding to the second color in the water hyacinth candidate area;

[0026] The candidate regions of water hyacinth with an area smaller than a preset area threshold, a significant color region proportion greater than a preset proportion threshold, a first color texture intensity greater than a second color texture intensity, and a neighborhood co-occurrence frequency greater than a preset frequency threshold are determined as the organ regions.

[0027] Candidate regions of water hyacinths that do not meet the above combination of features are identified as the main body region.

[0028] Optionally, in one possible implementation of the first aspect, determining the body region connected to the organ region within its neighborhood as the belonging plant region, establishing an organ attribution relationship between the organ region and the belonging plant region, and determining an initial identification result based on the body region and the organ attribution relationship, includes:

[0029] An extended search domain is established centered on the organ region, and the leaf cluster response and connector response within the extended search domain are extracted.

[0030] Candidate leaf clusters are determined based on the leaf cluster response, and the connection path between the organ region and the candidate leaf clusters is determined based on the connection portion response.

[0031] Calculate the spatial continuity feature, directional consistency feature, and path similarity of the connection path, and determine the body region corresponding to the candidate leaf cluster that meets the preset threshold condition as the plant region.

[0032] The organ region, the connection path, and the plant region to which they belong are mapped as organ nodes, connection nodes, and leaf cluster nodes, respectively, to construct an organ attachment evidence map.

[0033] Based on the maximum reliable path from the organ node to the leaf cluster node in the organ attachment evidence diagram, the organ attribution relationship and the corresponding attachment verification result are determined.

[0034] The ontology region is input into the plant body branch of the trained multi-task recognition network to obtain species evidence corresponding to the ontology region.

[0035] Based on the species evidence and the attachment verification results, an initial identification result is obtained.

[0036] Optionally, in one possible implementation of the first aspect, determining the organ affiliation relationship and the corresponding attachment verification result based on the maximum reliable path from the organ node to the leaf cluster node in the organ attachment evidence graph includes:

[0037] Based on the node distance, degree of expansion overlap, directional consistency, and feature similarity between the regions corresponding to the organ node, the connecting node, and the leaf cluster node, the edge weights between the organ node and the connecting node, and between the connecting node and the leaf cluster node are determined.

[0038] In the organ attachment evidence graph, all paths from the organ node to the leaf cluster node are searched, the product of the edge weights on each path is calculated, and the path with the largest edge weight product is determined as the maximum credible path.

[0039] The edge weight product of the maximum credible path is compared with a preset path threshold. When the edge weight product is greater than the preset path threshold, the organ affiliation relationship is determined to be valid, and the validity of the organ affiliation relationship is taken as the attachment verification result.

[0040] When the edge weight product is not greater than the preset path threshold, the organ affiliation relationship is determined to be invalid, and the invalidity of the organ affiliation relationship is taken as the attachment verification result.

[0041] Optionally, in one possible implementation of the first aspect, the step of obtaining the negative class memory constructed based on the negative class annotation, performing a gating comparison between the initial recognition result, the initial judgment result of the whole image, and the interference samples in the negative class memory, filtering the initial recognition result based on the gating comparison result, and outputting the water hyacinth recognition result includes:

[0042] Extract negative class region features from the region corresponding to the negative class label, encode the negative class region features as interference samples, and store them in the negative class memory;

[0043] The initial identification result is matched with the interference samples in the negative class memory, and the initial identification result is filtered according to the matching result and the initial judgment result of the whole image to output the water hyacinth identification result.

[0044] Optionally, in one possible implementation of the first aspect, the step of matching the initial identification result with interference samples in the negative class memory, and filtering the initial identification result based on the matching result and the initial judgment result of the whole image, to output the water hyacinth identification result, includes:

[0045] Extract the ontology region features corresponding to the initial recognition result, and perform similarity matching between the ontology region features and each interference sample in the negative class memory to obtain the interference similarity, which is used as the matching result;

[0046] When the species evidence is not greater than the preset species threshold, or when the organ attribution relationship is not established and at least one of the following conditions is met: the initial identification result is greater than the preset negative class threshold, or the interference similarity is greater than the preset similarity threshold, the initial identification result is filtered and a non-water hyacinth rejection result is output.

[0047] When the species evidence is greater than the preset species threshold and the organ attribution relationship is established, output flowering water hyacinth;

[0048] When the species evidence is greater than the preset species threshold, the organ attribution relationship is not established, the initial negative class judgment result is not greater than the preset negative class threshold, and the interference similarity is not greater than the preset similarity threshold, output "water hyacinth without flowering period".

[0049] The water hyacinth identification results include rejection results for non-water hyacinths, water hyacinths in the flowering period, and water hyacinths in the non-flowering period.

[0050] A second aspect of the present invention provides a smart water hyacinth identification system, comprising:

[0051] The recognition module is used to acquire the water surface image to be tested, input the water surface image to be tested into the trained multi-task recognition network, obtain the water hyacinth candidate region and the initial judgment result of the whole image, perform granular differentiation on the water hyacinth candidate region, and determine the body region and organ region.

[0052] A module is established to determine the body region connected to the organ region within the neighborhood of the organ region as the plant region to which it belongs, to establish the organ attribution relationship between the organ region and the plant region to which it belongs, and to determine the initial identification result based on the body region and the organ attribution relationship.

[0053] The comparison module is used to obtain a negative class memory library constructed based on negative class annotations, perform gating comparison between the initial recognition result, the initial judgment result of the whole image and the interference samples in the negative class memory library, filter the initial recognition result based on the gating comparison result, and output the water hyacinth recognition result.

[0054] The beneficial effects of this invention are as follows:

[0055] 1. This invention can process the water surface image under test through a trained multi-task recognition network, and simultaneously obtain two types of judgment information: candidate regions of water hyacinth and preliminary judgment results of the whole image. On this basis, the candidate regions are distinguished by granularity, organ attribution relationships are established, and then the negative class memory bank is used for gating and filtering. This can improve the ability to distinguish between water hyacinth in the non-flowering period, water hyacinth in the flowering period and negative interference, and reduce false alarms and false negatives caused by relying solely on local color clues.

[0056] 2. This invention establishes an extended search domain centered on the organ region, extracts leaf cluster responses and connector responses, determines the connection path between the organ region and candidate leaf clusters, and constructs an organ attachment evidence map composed of organ nodes, connector nodes, and leaf cluster nodes. Based on the most reliable path, it determines the organ attribution relationship and the corresponding attachment verification results. This can verify from a physical structure perspective whether flower organs are truly attached to the water hyacinth plant, excluding purple flowers or other plants that have no attachment relationship with the water hyacinth plant from the flowering period determination, thereby improving the accuracy of flowering period identification.

[0057] 3. This invention extracts negative class region features from the region corresponding to the negative class label and encodes them as interference samples, storing them in the negative class memory. The initial identification result is matched with the interference sample, and the initial identification result is filtered in combination with the initial judgment result of the whole image. Based on species evidence, whether the organ attribution relationship is valid, the initial judgment result of the negative class and the interference similarity, the non-water hyacinth rejection result, flowering water hyacinth or non-flowering water hyacinth is output comprehensively, which can improve the reliability of the identification process. Attached Figure Description

[0058] Figure 1This is a flowchart illustrating a water hyacinth intelligent identification method provided in an embodiment of the present invention;

[0059] Figure 2 This is a schematic diagram of a process for determining an initial identification result provided by an embodiment of the present invention;

[0060] Figure 3 This is a schematic diagram of the structure of a water hyacinth intelligent identification system provided in an embodiment of the present invention;

[0061] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0062] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0063] See Figure 1 This is a flowchart illustrating a water hyacinth intelligent identification method provided in an embodiment of the present invention. Figure 1 The method shown can be implemented by software and / or hardware devices. It includes steps S1 to S3, as detailed below:

[0064] S1. Acquire the water surface image to be tested, input the water surface image to be tested into the trained multi-task recognition network, obtain the water hyacinth candidate region and the initial judgment result of the whole image, perform granular differentiation on the water hyacinth candidate region, and determine the body region and organ region.

[0065] The water surface image to be tested refers to the image of the water surface that needs to be identified using this method. It can be an aerial image taken by a drone, an image taken by a shore-based camera, or an image taken by a handheld device by an inspector. The image contains the water surface background and water hyacinths or other floating objects that may be present on the water surface. The trained multi-task recognition network refers to a neural network model that has been trained and can perform multiple recognition tasks on the input image simultaneously. This network can locate the target and classify the input image, outputting the area where water hyacinths may exist and the overall class judgment result of the entire image. The water hyacinth candidate region refers to the target region that the multi-task recognition network locates in the water surface image that may contain water hyacinths. This region may contain the plant body, flower organs, or both of the water hyacinth, or it may contain objects that look similar to water hyacinths. Interference objects and the initial image judgment result refer to the category judgment result of the multi-task recognition network on the entire water surface image to be tested. It is used to reflect whether the overall image is closer to water hyacinth in the non-flowering period, water hyacinth in the flowering period, or a negative scene. Granularity differentiation refers to the process of dividing the water hyacinth candidate region according to the different granularity levels of the target components. Water hyacinth is composed of two parts: the plant body and the flower organs. The two present different morphological, color, and texture features in the image. Granularity differentiation is to separate the part of the candidate region that belongs to the plant body and the part that belongs to the flower organs. The body region refers to the part of the water hyacinth candidate region that belongs to the water hyacinth plant body, including the area where the leaf clusters, petioles, floating leaves and other vegetative organs are located. The organ region refers to the part of the water hyacinth candidate region that belongs to the water hyacinth flower organs, including the area where the inflorescence, flowers and other reproductive organs are located.

[0066] It is understandable that water hyacinth exhibits different appearances at different growth stages. During the non-flowering stage, water hyacinth mainly presents as green leaf clusters and floating leaves, while during the flowering stage, in addition to the green plant body, water hyacinth also has purple inflorescences. If the candidate regions are not differentiated by granularity and are judged as a whole, the model tends to focus on the most prominent color areas, such as purple flowers during the flowering stage or purple impurities in the negative class, while ignoring the morphological characteristics of the plant body. Therefore, after distinguishing the candidate regions into the body region and the organ region, the plant body and the flower organs can be judged separately, and then the relationship between the two can be used for comprehensive identification, thereby improving the ability to distinguish between the non-flowering stage, the flowering stage, and the negative class.

[0067] Specifically, after acquiring the water surface image to be tested, the image can be input into the trained multi-task recognition network. The multi-task recognition network performs feature extraction and target localization on the input image, and outputs the candidate regions for water hyacinth and the initial judgment results of the whole image. The candidate regions for water hyacinth are given in the form of target boxes or region masks, and the initial judgment results of the whole image are given in the form of judgment values ​​for three categories: no flowering period, flowering period, and negative class. Then, the granularity of the candidate regions for water hyacinth can be distinguished. Based on the color, texture, and morphological features of each pixel or sub-region in the candidate region, the part of the candidate region belonging to the plant body is determined as the body region, and the part of the candidate region belonging to the flower organs is determined as the organ region.

[0068] In some embodiments, the trained multi-task recognition network is trained in the following manner:

[0069] A1, obtain the training image and the no-flowering-period label, flowering-period label, and negative class label in the training image.

[0070] Among them, training images refer to water surface images taken for training the multi-task recognition network. Similar to the water surface images to be tested, they include the water surface background and water hyacinths or other floating objects that may exist on the water surface. Non-flowering period annotation refers to the annotation of the plant parts of water hyacinths in the training images that are not in the flowering period. The annotation objects are the vegetative organs of water hyacinths such as leaf clusters, petioles, and floating leaves. Flowering period annotation refers to the annotation of the flower organs of water hyacinths in the training images that are in the flowering period. The annotation objects are the reproductive organs of water hyacinths such as inflorescences and flowers. Negative class annotation refers to the annotation of regions in the training images that are similar in appearance to water hyacinths but are not water hyacinth targets, such as purple-flowered plants, green floating leaves, water surface coverings, reflections, etc.

[0071] Understandably, training a multi-task recognition network requires supervisory signals. Water hyacinth exhibits different appearance characteristics at different growth stages and under different interference scenarios. Therefore, it is necessary to label the plant body of water hyacinth in the non-flowering stage, the flower organs of water hyacinth in the flowering stage, and the easily confused negative class regions separately, so that the network can learn the ability to distinguish between different categories.

[0072] Specifically, a large number of water surface images can be acquired as training images, and the target areas in each training image can be labeled by the annotators. During the labeling, the target is assigned a label based on its category, such as no flowering period, flowering period, or negative category. The labeling results are recorded in the form of label boxes or region masks to form the labeling file corresponding to the training images.

[0073] A2. Based on the labeling granularity of the no-flowering-period label, the flowering-period label, and the negative class label, generate a plant body supervision region, a flower organ supervision region, and a negative example supervision region. Using the flower organ supervision region indicated by the flowering-period label as the center, determine the flowering-period plant body region connected to the flower organ supervision region.

[0074] Here, label granularity refers to the hierarchical level of the target component corresponding to the label. Water hyacinth consists of two parts: the plant body and the floral organs. The plant body granularity corresponds to the larger vegetative organ region, while the floral organ granularity corresponds to the smaller reproductive organ region. The plant body supervised region is the region generated based on the corresponding plant body labels in the non-flowering period and flowering period labels, used to supervise the network to learn the characteristics of the water hyacinth plant body. The floral organ supervised region is the region generated based on the corresponding floral organ labels in the flowering period labels, used to supervise the network to learn the characteristics of the water hyacinth floral organs. The negative example supervised region is the region generated based on the negative class labels, used to supervise the network to learn the characteristics of easily confused regions. The flowering period plant body region refers to the region where the water hyacinth plant body is located, which is connected to the floral organ supervised region.

[0075] It is understandable that the three types of annotations have different granularities: the non-flowering period annotation corresponds to the plant body, the flowering period annotation corresponds to the floral organs, and the negative class annotation corresponds to easily confused regions. If the annotation granularity is not distinguished and the three types of annotations are directly input into the network as the same category, the network is prone to confuse features at different granularity levels. Therefore, the annotations can be converted into three types of supervised regions according to the annotation granularity, and supervised by the network to learn plant body features, floral organ features, and negative example features respectively. Since the flowering period annotation usually only labels the floral organs and not the plant body, it is necessary to find the plant body region connected to it with the floral organ supervised region as the center and complete the flowering period plant body region.

[0076] Specifically, the granularity of each label can be determined based on the objects corresponding to the no-flowering period label, flowering period label, and negative class label. Then, based on the granularity, the regions corresponding to the plant bodies in the no-flowering period label and flowering period label are determined as the plant body supervision region, the regions corresponding to the flower organs in the flowering period label are determined as the flower organ supervision region, and the regions corresponding to the negative class label are determined as the negative example supervision region. At the same time, the plant body range that has edge connectivity with the flower organ supervision region can be determined within a preset range based on the color and texture of each pixel in the training image, centered on the flower organ supervision region. The flower organ supervision region and the plant body range are then merged to obtain the flowering period plant body region.

[0077] Based on the above embodiments, step A2 can be implemented in the following ways:

[0078] A21. Determine the labeling granularity based on the object corresponding to each label. The labeling of the plant body corresponding to the non-flowering period label and the labeling of the flowering period label are determined as the plant body granularity, and the labeling of the flower organ corresponding to the flowering period label is determined as the flower organ granularity.

[0079] Among them, plant body refers to the vegetative organs of water hyacinth, including leaf clusters, petioles, floating leaves, etc. Plant body granularity refers to the target level corresponding to the label being the plant body level. Flower organs refer to the reproductive organs of water hyacinth, including inflorescences, flowers, etc. Flower organ granularity refers to the target level corresponding to the label being the flower organ level.

[0080] It is understandable that water hyacinth in the non-flowering period mainly manifests as the plant body, so the labeling of the non-flowering period corresponds to the plant body granularity. Water hyacinth in the flowering period has both plant body and flower organs, but the labeling may only label the flower organs or the plant body. Therefore, the labeling granularity can be determined based on the actual objects delineated by the labeling during the flowering period. By determining the labeling granularity of each label, a basis can be provided for the subsequent generation of the corresponding monitoring area.

[0081] Specifically, it can iterate through all non-flowering period and flowering period labels, read the image pixel features within each label box, and if the label box mainly presents a large area of ​​green vegetative canopy features, it is identified as the corresponding plant body and assigned a plant body granular label. If the label box mainly presents local and brightly colored purple reproductive organ features, it is identified as the corresponding flower organ and assigned a flower organ granular label. In this way, the manually labeled coarse-grained boxes are transformed into fine-grained labels with clear physical meaning.

[0082] A22, the regions corresponding to the non-flowering period label and flowering period label of the plant body granularity are determined as the plant body supervision region, the regions corresponding to the flowering period label of the flower organ granularity are determined as the flower organ supervision region, and the regions corresponding to the negative class label are determined as the negative example supervision region.

[0083] Understandably, once the labeling granularity is determined, the labels can be mapped to the corresponding supervised regions according to the granularity, enabling the network to learn plant body features, floral organ features, and counterexample features separately. If this mapping is not done and all labels are mixed together, the network will not be able to distinguish features at different granularity levels, which may affect the recognition accuracy.

[0084] Specifically, the regions corresponding to the non-flowering period and flowering period labels at the plant size level are designated as the plant size supervision region, the regions corresponding to the flowering period labels at the flower organ size level are designated as the flower organ supervision region, and the regions corresponding to the negative class labels are designated as the negative example supervision region.

[0085] A23, taking the flower organ supervision region as the center, within a preset range, based on the color and texture of each pixel in the training image, determine the plant body range that has an edge connection with the flower organ supervision region, and merge the flower organ supervision region with the plant body range to obtain the flowering plant body region.

[0086] The preset range refers to the spatial range obtained by expanding outward from the flower organ supervision region by a certain distance or scale. The plant body range refers to the image range of the water hyacinth plant body that is connected to the edge of the flower organ supervision region, determined by the color and texture of each pixel in the training image. Edge connectivity means that the flower organ supervision region and the plant body range are adjacent or overlapping in space, that is, the edges of the two regions are in contact with each other or partially overlap.

[0087] Understandably, the flowering period annotation usually only marks the flower organs, and there is no annotation of the plant body of water hyacinth during the flowering period in the existing annotations. Therefore, it is not possible to search in the existing annotations. Instead, the range of the plant body connected to the flower organs should be determined based on the training image itself. Water hyacinth flowers grow on the plant body, and the image around the flower organs usually shows green plant bodies connected to them. The range of the plant body actually connected to the flower organs can be determined based on the color and texture of the pixels. The flowering period plant body region obtained by fusing the two is not a simple expansion of the flower organ bounding box, but more in line with the real shape of water hyacinth. The completed flowering period plant body region can be used for subsequent supervised learning of plant body features.

[0088] Specifically, starting from the flower organ supervision region, the process gradually expands outward from the edge of the flower organ supervision region within a preset range. At each step, the adjacent pixels at the expansion front are checked. The expansion front refers to the outer boundary of the currently incorporated range. Pixels whose color and texture represent the appearance of a water hyacinth plant, i.e., green leaf clusters or floating leaves, are incorporated into the plant body range. When there are no more adjacent pixels that meet the conditions at the expansion front, the expansion stops. The connected range formed by all the incorporated pixels is taken as the determined plant body range. Then, the plant body range is merged with the flower organ supervision region. The merged area is the flowering plant body region.

[0089] A3. Based on the plant body supervision region, the flower organ supervision region, the negative example supervision region, and the flowering period plant body region, generate a flower-removed view and a body-removed view. Train the multi-task recognition network based on the flower-removed view and the body-removed view to obtain the trained multi-task recognition network.

[0090] Among them, the flower-removed view refers to the training view in which the flower organs in the training image are processed so that the flower organs of the water hyacinth are no longer displayed in the image, while the plant body is retained. The volume-removed view refers to the training view in which the plant body in the training image is processed so that the plant body of the water hyacinth is no longer displayed in the image, while the rest of the plant body is retained. The multi-task recognition network refers to the image processing network to be trained, which consists of a shared encoder and multiple task branches and can simultaneously learn multiple recognition tasks such as target localization, initial image judgment, and plant species judgment. After training, the trained multi-task recognition network is obtained.

[0091] Understandably, when identifying flowering periods, networks tend to over-rely on the most conspicuous purple flowers. They may make mistakes when flowers are obscured or when encountering isolated purple flowers. To help networks truly understand the respective roles of the plant body and floral organs, two types of counterfactual training scenarios can be artificially constructed. One scenario removes the flowers and leaves only the plant body, allowing the network to still recognize the plant without identifying it as flowering. The other scenario removes the plant body and leaves only the flowers or other parts, making the network understand that it should not identify a water hyacinth when the plant body is missing. Through comparative training with views of the plant body removed and those of the plant body removed, the network is forced to learn evidence of the plant body and floral organs separately, rather than simply relying on color, thereby improving the reliability of recognition.

[0092] Specifically, based on the plant body supervision region, floral organ supervision region, negative example supervision region, and flowering plant body region, the training images are processed to remove flowers and remove bodies respectively, resulting in flower-removed views and body-removed views. The original training image, flower-removed view, and body-removed view are then compared. Figure 1 The network was used to train a multi-task recognition network. During training, a plant body supervision region network was used to learn plant body features, a flower organ supervision region network was used to learn flower organ features, and a counterexample supervision region network was used to learn features of easily confused objects. The flowering plant body region was used as the plant body supervision for flowering samples, so that the completed flowering plant body range also participated in the learning of plant body features. On the flower-free view, the species evidence constrained by the network was kept consistent with the corresponding original training image, while the flowering evidence decreased compared to the corresponding original training image. This allowed the network to still identify the presence of water hyacinth based on the plant body when there were no flowers, but not to classify the image as flowering. On the volume-free view, the species evidence constrained by the network was decreased compared to the corresponding original training image, so that the network would not classify the presence of water hyacinth when the plant body was missing. After training, the trained multi-task recognition network was obtained. Species evidence refers to the confidence level of the multi-task recognition network in judging the presence of water hyacinth plants in the image, and flowering evidence refers to the confidence level of the multi-task recognition network in judging the presence of flowering water hyacinths in the image.

[0093] In some embodiments, step A3, "generating a flower-removed view and a body-removed view based on the plant body supervision region, the floral organ supervision region, the negative example supervision region, and the flowering plant body region," includes the following steps:

[0094] A31, based on the flower organ supervision region and the negative example supervision region, the flower organ region in the training image is masked, filled with content, or replaced with negative example texture to obtain a deflowered view.

[0095] Among them, the flower organ region refers to the actual location of the flower organ in the image indicated by the flowering period annotation. Content filling refers to removing the original flower pixels in the flower organ region and filling it with the background content around the region, such as the surrounding leaf clusters or water surface texture, so that the filled region visually blends naturally with the surrounding environment and the flower outline is not obvious. Negative example texture replacement refers to the method of replacing the flower organ region with the texture presented by the interference objects in the negative example supervision region. After replacement, the flower organ region presents the texture appearance of purple non-water hyacinth flowers or other easily confused objects.

[0096] Understandably, the purpose of removing the flower view is to create a picture without water hyacinth flowers to test whether the network still bases its flowering period determination on flowers. This can be achieved through methods such as masking, content filling, or negative example texture replacement. Content filling allows the picture to naturally show only the plant, enabling the network to learn to identify water hyacinths based on the plant even when there are no flowers. Negative example texture replacement further introduces purple but non-water hyacinth flowers as interference, preventing the network from determining the flowering period solely based on the color purple.

[0097] Specifically, the flower organ regions to be processed in the training image can be located first based on the flower organ supervision region, and the textures of various purple non-water hyacinth objects in the negative example supervision region can be referenced. Then, one or more processing methods can be selected according to the image situation. The occlusion method is to cover the flower organ region with occlusion blocks so that the flowers are no longer displayed. The content filling method is to first remove the flower pixels in the flower organ region, and then extract the background content from the surrounding leaf clusters or water surface to fill it in, so that the filling area is naturally connected with the surrounding area. The negative example texture replacement method is to replace the purple inflorescence texture in the flower organ region with the texture of other purple plants or purple debris in the negative example supervision region. During the processing, the plant body part outside the flower organ region is retained. The processed image is the flower-removed view.

[0098] A32, based on the plant body supervision area and the flowering plant body area, the plant body area in the training image is masked or replaced to obtain a volumeless view.

[0099] It is understandable that the plant body is the primary evidence of the existence of water hyacinth. If the network still identifies the image as water hyacinth after removing the plant body, it means that the network is drawing conclusions based on surface features such as flowers. Therefore, masking or replacing the plant body area can help the network learn during training not to identify water hyacinth when the plant body is missing. The flower organ area is retained when generating the volume-removed view because the volume-removed view is intended to test whether the network will determine the existence of water hyacinth based solely on flowers.

[0100] Specifically, the plant body region to be processed in the training image can be located first based on the plant body supervision region and the flowering plant body region. This region covers the leaf clusters, floating leaves, and the complete plant range after the flowering plant body is completed. Then, the part of this region other than the flower organ supervision region is masked or replaced. The masking method is to cover the plant body part with masking blocks, and the replacement method is to replace the original leaf clusters and floating leaf textures with water surface background or other non-plant body content, so that the water hyacinth plant body in the picture disappears. The flower organ supervision region is not processed, and the flowers in the picture remain as they are. The processed picture is the volume-removed view, which presents the flower organs that have lost the support of the plant body and the water surface background.

[0101] Based on the above embodiments, step S1, "acquiring the image of the water surface to be tested, inputting the image of the water surface to be tested into the trained multi-task recognition network, and obtaining the candidate region of water hyacinth and the preliminary judgment result of the whole image," includes the following steps:

[0102] S11, the image features of the water surface image to be tested are extracted based on the shared encoder of the trained multi-task recognition network.

[0103] In this context, the shared encoder refers to the feature extraction part in a multi-task recognition network that is used by all task branches. The shared encoder consists of multiple sequentially connected feature extraction units, with the output of the previous feature extraction unit serving as the input of the next feature extraction unit. A feature extraction unit is a neural network layer that processes the input data using weights learned during training. For example, it can use convolutional layers, attention layers, or a combination of both. Image features refer to the feature maps obtained after the shared encoder processes the input image step by step. The feature maps preserve the spatial layout of the image, and each position on the feature map corresponds to a local area in the water surface image to be tested. The values ​​on each channel of the feature map reflect the strength of the corresponding local area in terms of color, texture, structure, etc.

[0104] Understandably, this scheme aims to accomplish two tasks simultaneously during the recognition process: first, to locate the suspected water hyacinth in the image; and second, to provide an overall trend for the entire image. These two tasks have different output formats, but both rely on an understanding of the same image. If a separate network is set up for each task and features are extracted separately, not only will computation be redundant, but contradictory results will also arise due to the different understandings of the image by the two networks. Therefore, a structure of a shared encoder plus multiple task branches can be adopted. The shared encoder acts as a common front end, extracting the visual features of the image uniformly. Each task branch acts as a specialist with different tasks, performing overall judgment and target localization based on the same set of features. This reduces redundant computation and ensures that the conclusions of each branch are based on the same image understanding, maintaining consistency. On the other hand, since images consist of a large number of pixels, the network cannot directly understand where leaves or flowers are from the pixels. It needs to refine the pixels into meaningful features step by step. The shallow layer captures the most basic information such as color and edges; the middle layer combines this information into texture and local contours; and the deep layer combines the local contours into complete target shapes such as leaves and inflorescences. All branches share this refinement result.

[0105] Specifically, after the image of the water surface to be tested enters the trained multi-task recognition network, it is first fed into the shared encoder. The shared encoder processes the image layer by layer from shallow to deep. The shallow layer performs local operations on the pixels to extract basic visual information such as color, brightness, and edge direction. The intermediate layer further combines the output of the shallow layer to obtain structural information such as texture and local contours of petals and leaves. The deep layer continues to combine the output of the intermediate layer to obtain comprehensive features that can characterize target parts such as leaf clusters and inflorescences. After layer-by-layer processing, the original pixel image is converted into one or more feature maps as image features. These image features simultaneously retain the morphological information and approximate location information of the target.

[0106] S12, based on the whole-image preliminary judgment branch of the trained multi-task recognition network, the image features are mapped to the whole image to obtain the preliminary judgment results of the no-flowering period, the preliminary judgment results of the flowering period, and the preliminary judgment results of the negative class corresponding to the water surface image to be tested, which are used as the whole-image preliminary judgment results.

[0107] The initial image classification branch in the multi-task recognition network is responsible for classifying the entire image. It consists of a summarization part and a mapping part. The summarization part aggregates information scattered across various locations within the image features into global information reflecting the overall appearance of the image. The mapping part converts this global information into classification values. Full-image mapping refers to the process by which the initial image classification branch integrates the image features of the entire image and maps them to class classification values ​​across the entire image. Full-image mapping does not target a specific local region within the image but rather maps the visual features of all locations within the entire image. Taking all sensory information into consideration, the preliminary judgment result for the non-flowering period refers to the judgment value given by the preliminary judgment branch of the whole image, reflecting the degree to which the whole image presents a scene of water hyacinth in the non-flowering period. The preliminary judgment result for the flowering period refers to the judgment value given by the preliminary judgment branch of the whole image, reflecting the degree to which the whole image presents a scene of water hyacinth in the flowering period. The preliminary judgment result for the negative class refers to the judgment value given by the preliminary judgment branch of the whole image, reflecting the degree to which the whole image presents a scene of the negative class. A negative class scene refers to a scene in which the whole image is mainly composed of interference objects that are similar in appearance to water hyacinths or does not present water hyacinth characteristics as a whole. The three preliminary judgment results together constitute the preliminary judgment result of the whole image.

[0108] Understandably, candidate regions only reflect the situation at individual locations in an image, while interference from interfering objects often occurs within local areas. For example, the color of a small patch of purple flowers in a local area is very similar to that of a water hyacinth inflorescence, making it difficult to distinguish from a local perspective. However, when the entire image is taken into view, the overall environment of the interfering object often differs from the real water hyacinth scene. In a real water hyacinth scene, one can usually see a typical layout of clusters of green leaves and water surface, while the water surface with dense interfering objects may present different characteristics such as scattered debris and dense reflections. If the recognition process relies only on the judgment of local areas, the local and overall information are separated. Once a local area is misled by interfering objects, there is a lack of basis for correction. Therefore, a whole-image initial judgment branch can be set up to perform a whole-image mapping of image features and provide initial judgment results for three categories from a global perspective: no flowering period, flowering period, and negative class. The whole-image initial judgment result and the subsequent judgment based on local areas are independent of each other and serve as references. When there is a discrepancy between the judgment of local areas and the global judgment, another source of information can be used for verification, thereby reducing the possibility of misjudgment caused by relying solely on local clues.

[0109] Specifically, the image features output by the shared encoder can be input into the initial image judgment branch. The summarization part of the initial image judgment branch summarizes information across locations of the feature map, such as compressing the feature map in the spatial dimension, and combining the responses distributed at various locations in the entire image on each channel into a value reflecting the overall performance of that channel. The summarization values ​​of each channel together constitute a global vector representing the overall appearance of the entire image. The global vector contains overall information about the color composition, texture distribution, and scene structure of the entire image. The mapping part of the initial image judgment branch weights and combines the components in the global vector, and outputs the judgment values ​​of the entire image belonging to the no-flowering period scene, the flowering period scene, and the negative class scene, respectively. The magnitude of each judgment value reflects the probability of the corresponding scene being true in the entire image. For example, each judgment value can be normalized to between zero and one. The larger the value, the higher the probability of the corresponding scene. Thus, the initial judgment results of the no-flowering period, the flowering period, and the negative class are obtained.

[0110] S13, perform candidate detection on the image features according to the candidate detection branch of the trained multi-task recognition network to obtain water hyacinth candidate regions.

[0111] The candidate detection branch is a task branch in the multi-task recognition network responsible for locating areas in an image where water hyacinths may exist. The candidate detection branch performs target localization based on the image features output by the shared encoder. Candidate detection refers to the process of searching for and defining target areas in an image that may contain water hyacinths. Based on the spatial layout preserved by the image features, the candidate detection branch determines which locations in the image contain suspected targets and determines the location and range of the corresponding areas. The regions output by the candidate detection branch are preliminary delineations of locations where water hyacinths may exist. They are candidate in nature, and each candidate region may indeed contain water hyacinths or may contain interfering objects that look similar to water hyacinths.

[0112] Understandably, the images of the water surface to be tested are usually large, and most of the area in the image is open water or other background unrelated to identification. If we directly perform granular differentiation and classification on every point in the image, on the one hand, the computational load is enormous, and on the other hand, the analysis of a large number of background locations is of no practical value. Therefore, the candidate detection branch can first screen the image based on image features to identify the locations where water hyacinths may exist. This allows subsequent granular differentiation, region connectivity judgment, and other processing to be concentrated on a small number of candidate regions, thereby significantly narrowing the scope of subsequent processing while ensuring that no target is missed. In addition, image features preserve the spatial layout of the image in the form of feature maps. The positions on the feature maps correspond to the regions in the image. Judgment on the feature maps can simultaneously determine whether the target exists and its position in the image, providing a direct basis for the localization of candidate regions. Candidate detection allows suspected targets to be included without rushing to eliminate interference, precisely to preserve complete verification objects for subsequent steps.

[0113] Specifically, the image features output by the shared encoder can be input into the candidate detection branch. The candidate detection branch determines whether there is a suspected water hyacinth target near each position of the feature map, and predicts the position and range of the corresponding area in the water surface image to be tested for the existing target. For example, it predicts the confidence level of the existence of the target at each position of the feature map, as well as the offset and size of the target area relative to that position. The prediction results are converted back to the coordinates of the water surface image to be tested, forming a candidate region represented in the form of a target box or region mask, thus obtaining the water hyacinth candidate region.

[0114] Based on the above embodiments, step S1, "differentiating the particle size of the water hyacinth candidate region to determine the body region and organ region," includes the following steps:

[0115] S14, for each of the water hyacinth candidate regions, extract the region area, the proportion of significant color regions, the intensity of the first color texture, the intensity of the second color texture, and the frequency of co-occurrence in the neighborhood.

[0116] The significant color region is the set of pixels within the water hyacinth candidate region whose color saturation is higher than a preset saturation threshold, and the neighborhood co-occurrence frequency is the frequency at which other water hyacinth candidate regions exist within a preset neighborhood range of the water hyacinth candidate region.

[0117] The first color texture intensity is the texture feature intensity corresponding to the first color in the water hyacinth candidate area, and the second color texture intensity is the texture feature intensity corresponding to the second color in the water hyacinth candidate area.

[0118] The term "region area" refers to the size of the area covered by the water hyacinth candidate region in the image of the water surface being tested. It can be represented by the number of pixels contained in the candidate region or the area of ​​the corresponding bounding box. The proportion of salient color region refers to the percentage of the entire water hyacinth candidate region covered by the salient color region. Color saturation refers to the vividness and intensity of pixel colors; the purer and more vivid the color, the higher the saturation. Common objects such as water surfaces and leaves typically have lower saturation, while brightly colored objects such as flowers have higher saturation. The primary color refers to the color presented by the water hyacinth's floral organs, such as purple hues. The secondary color refers to the color of the water hyacinth plant itself. The color presented by the body, such as green, refers to the frequency of other water hyacinth candidate areas existing within a preset neighborhood of the water hyacinth candidate area. The preset neighborhood range is the image range formed by expanding a preset range in all directions around the water hyacinth candidate area. The preset saturation threshold is a preset saturation value limit used to determine whether a pixel belongs to a significant color. Texture feature intensity refers to the strength of texture information at the location where the corresponding color is distributed. Texture refers to the pattern formed by repeated spatial changes in color or brightness in an image, such as the veins of a leaf or the spots on the surface of a petal.

[0119] Understandably, the plant body and flower organs are two stable and distinct components of water hyacinth in an image. Their differences in appearance are stable and can be directly measured from the image. Flower organs are small in size and area, with vibrant and intense colors and a high proportion of high-saturation pixels. The texture of the flower is stronger than that of the leaves in the area where the flower organ is located. Since the flower grows on the plant, there are usually other candidate areas around the candidate area of ​​the flower organ. Judging granularity based on only one feature is prone to error. For example, the area of ​​green debris on the water surface is also very small, but its color is completely different from that of the flower organ. Local reflections can increase the saturation of small areas, but the reflected areas do not have the texture of the flower. Isolated drifting flowers have no other candidate areas around them. The five features describe the candidate areas from different perspectives such as size, color, texture, and spatial relationship, complementing and corroborating each other, and can provide sufficient and reliable judgment basis for granularity distinction.

[0120] Specifically, the aforementioned candidate regions for water hyacinths can be statistically analyzed as follows: The number of pixels covered by the candidate region or the area of ​​the corresponding target box can be counted to obtain the region area. Each pixel in the candidate region is converted to a color space that can represent color saturation, such as the HSV color space. The number of pixels with saturation higher than a preset saturation threshold is counted, and their proportion of the total number of pixels in the candidate region is calculated to obtain the proportion of significant color regions within the region. The locations of pixels belonging to the first color within the candidate region are delineated, for example, by filtering according to the value range corresponding to purple colors. The richness and intensity of color or brightness fluctuations at these locations are statistically analyzed to obtain the first color texture intensity. Pixels belonging to the second color, i.e., green colors, are statistically analyzed in the same way to obtain the second color texture intensity. A preset neighborhood range is determined with the candidate region as the center, for example, the range covered by expanding the candidate region outward by several times is taken as the preset neighborhood range. The number or proportion of other water hyacinth candidate regions existing within the preset neighborhood range is counted to obtain the neighborhood co-occurrence frequency.

[0121] S15, the candidate regions of water hyacinth with a region area smaller than a preset area threshold, a significant color region proportion greater than a preset proportion threshold, a first color texture intensity greater than a second color texture intensity, and a neighborhood co-occurrence frequency greater than a preset frequency threshold are determined as the organ regions.

[0122] Among them, the preset area threshold is a pre-set area limit for determining whether the area belongs to the size of flower organs; the preset proportion threshold is a pre-set proportion limit for determining whether the proportion of significant color areas is high enough; and the preset frequency threshold is a pre-set frequency limit for determining whether the co-occurrence frequency of the neighborhood is high enough. Each threshold can be pre-set based on the characteristic statistical results of the plant body area and flower organ area in the labeled samples, or it can be adjusted according to the actual shooting situation in the water area.

[0123] It is understandable that floral organs possess four characteristics compared to the plant body: small area, high proportion of high-saturation pixels, stronger flower color and texture than leaf color and texture, and frequent co-occurrence with other candidate areas. Each of these four conditions has its own function: the area condition excludes large areas such as patches of plant body; the proportion and texture conditions distinguish vibrant floral organs with dominant flower color from green plant body and green debris from a color perspective; and the co-occurrence condition utilizes the characteristic that flowers always appear alongside the plant to eliminate interference from isolated occurrences. When all four conditions are met simultaneously, the candidate area has the highest probability of being a floral organ. Using simultaneous satisfaction as the judgment condition can ensure that the candidate areas identified as organ areas have sufficient basis and reduce the possibility of misjudging interfering objects as floral organs.

[0124] Specifically, the area of ​​each water hyacinth candidate region can be compared with a preset area threshold, the proportion of salient color regions within the region can be compared with a preset proportion threshold, the intensity of the first color texture can be compared with the intensity of the second color texture, and the neighborhood co-occurrence frequency can be compared with a preset frequency threshold. When the area of ​​a water hyacinth candidate region is less than the preset area threshold, the proportion of salient color regions is greater than the preset proportion threshold, the intensity of the first color texture is greater than the intensity of the second color texture, and the neighborhood co-occurrence frequency is greater than the preset frequency threshold, that is, when all four conditions are met, the water hyacinth candidate region is determined as an organ region.

[0125] S16, the candidate regions of water hyacinths that do not meet the above feature combination are determined as the body region.

[0126] Understandably, candidate regions that do not meet the criteria for organ region determination are more likely to be part of the plant body. Therefore, these candidate regions can be identified as the ontological regions.

[0127] Specifically, all candidate regions of water hyacinth are traversed. For candidate regions that do not meet the following combination of features, namely, that the region area is less than a preset area threshold, the proportion of significant color regions is greater than a preset proportion threshold, the intensity of the first color texture is greater than the intensity of the second color texture, and the co-occurrence frequency of the neighborhood is greater than a preset frequency threshold, that is, candidate regions that do not meet at least one of the above four conditions, are determined as the ontology region.

[0128] S2, determine the body region connected to the organ region within the neighborhood of the organ region as the plant region to which it belongs, establish the organ affiliation relationship between the organ region and the plant region to which it belongs, and determine the initial identification result based on the body region and the organ affiliation relationship.

[0129] Among them, the neighborhood range refers to the spatial range obtained by extending outward from the organ region by a certain distance or scale, the plant region refers to the body region within the neighborhood range of the organ region that has a connection with the organ region, that is, the area where the water hyacinth plant to which the flower organ is attached is located, the organ affiliation relationship refers to the attachment relationship between the organ region and the plant region, and the initial identification result refers to the preliminary identification conclusion obtained based on the body region and the organ affiliation relationship.

[0130] Understandably, while purple flower areas can be detected through color features, isolated purple flowers are often seen floating on open water, or purple petals blown away by the wind. If a flower is identified solely as a water hyacinth, it would lead to a false alarm. In the true flowering stage of water hyacinth, the flower grows on the plant itself, and the two are physically connected. By locating connected parts around the flower and establishing their organ affiliation, we can rigorously verify that the flower is indeed growing on the plant. Therefore, we can verify whether a true attachment relationship exists between the flower and the plant. Only when the flower is indeed connected to the plant through a connecting part is it considered to belong to the water hyacinth plant, thus improving the accuracy of flowering stage identification.

[0131] For details, see Figure 2 This is a schematic diagram of a process for determining an initial identification result according to an embodiment of the present invention, such as... Figure 2 As shown, a neighborhood can be established with the organ region as the center. Within the neighborhood, ontology regions that are connected to the organ region are searched. The ontology regions that are connected to the organ region are identified as the plant regions to which they belong. Then, based on the spatial position and connection between the organ region and the plant region to which they belong, the organ attribution relationship between the organ region and the plant region to which they belong is established. Based on the species evidence corresponding to the ontology region and the organ attribution relationship, the initial identification result is obtained.

[0132] Based on the above embodiments, step S2 can be implemented in the following ways:

[0133] S21, establish an extended search domain centered on the organ region, and extract the leaf cluster response and connection response within the extended search domain.

[0134] The extended search domain refers to the search range obtained by expanding outward from the organ region by a certain distance or scale. The extended search domain can be set within the aforementioned neighborhood range or can be set independently as needed. The leaf cluster response refers to the degree to which each position in the extended search domain exhibits the characteristics of a water hyacinth leaf cluster. Leaf cluster characteristics include the color characteristics of green leaf clusters, the outline characteristics of floating leaves, and the texture characteristics of the leaf cluster surface. The leaf cluster response is usually represented in the form of a response map. The value of each position on the response map reflects the strength of the leaf cluster characteristics at that position. The connection response refers to the degree to which each position in the extended search domain exhibits the characteristics of a connection part. The connection part refers to the structure on the water hyacinth plant that connects the flower organs and the leaf cluster, such as the pedicel and the part where the pedicel connects to the inflorescence. The connection part usually appears as a thin strip structure in the image. The connection part response reflects the probability of such a connection structure existing at each position in the extended search domain.

[0135] Understandably, verifying whether a flower is attached to a plant requires two types of evidence: physical evidence, i.e., whether there are leaf clusters near the flower, and ligamentary evidence, i.e., whether there are connecting structures such as pedicels between the flower and the leaves. Since the flower organ region itself usually only covers the petals, neither type of evidence can be obtained from the flower organ region itself. Therefore, it is necessary to expand the search domain outward from the flower as the center and search over a larger area. The reason for limiting the search to the expanded search domain rather than searching the entire image is that the water hyacinth plant is not too far from the flower. Searching the entire image is both computationally wasteful and prone to involving irrelevant leaf clusters in the distance. The expanded search domain can also establish at least two different scales. The smaller search domain is used to capture leaf clusters and pedicels that are close to the flower organ, while the larger search domain is used to cover situations where the plant area is large or the pedicels are long, so that water hyacinths of different growth forms can be covered.

[0136] Specifically, each organ region can be used as the center, and the organ region can be expanded outward by a preset range or preset multiple to establish an extended search domain. For example, at least two extended search domains of different sizes can be established. Then, within the extended search domain, the degree to which features such as the color of green leaf clusters, the outline of floating leaves, and the texture of leaf clusters are presented at each position is statistically analyzed to obtain the leaf cluster response. The degree to which features such as slender strip-shaped connecting structures are presented at each position is statistically analyzed to obtain the connecting part response.

[0137] S22, determine candidate leaf clusters based on the leaf cluster response, and determine the connection path between the organ region and the candidate leaf clusters based on the connection portion response.

[0138] Among them, the candidate leaf cluster refers to the connected region formed by the positions that show the strongest response in the leaf cluster, that is, the set of leaf clusters that are suspected to be the plant to which the flower organ is attached. The connection path refers to the continuous route from the organ region to the candidate leaf cluster determined based on the response of the connecting part, that is, the route through which the possible connection channel between the flower and the candidate leaf cluster may pass.

[0139] It is understandable that the leaf cluster response and the connector response are distributed in terms of strength at each position. They are continuous clue information and cannot be used directly for judgment. They need to be transformed into specific and operable objects first. The positions that show stronger performance in the leaf cluster response are aggregated into candidate leaf clusters, which is equivalent to circling out the candidates that may be the plant body. The positions that show stronger performance in the connector response are connected into a connection path.

[0140] Specifically, the positions in the leaf cluster response that meet the preset requirements can be aggregated into connected regions. Each connected region is considered as a candidate leaf cluster. Then, based on the connection response, starting from the edge of the organ region, the response is gradually extended along the positions with stronger connection responses until each candidate leaf cluster is reached. The continuous route traversed during the extension is determined as the connection path between the organ region and the candidate leaf cluster. Thus, the candidate leaf clusters corresponding to each organ region and the connection paths between the organ region and each candidate leaf cluster are obtained.

[0141] S23, calculate the spatial continuity feature, directional consistency feature and path similarity of the connection path, and determine the body region corresponding to the candidate leaf cluster that meets the preset threshold condition as the plant region.

[0142] Among them, spatial continuity refers to the degree of coherence of the connecting path in space, reflecting whether the positions traversed by the path are continuously connected without interruption; directional consistency refers to the degree of conformity between the direction of the connecting path and the relative orientation between the flower organs and the candidate leaf clusters, reflecting whether the extension direction of the path conforms to the growth structure of the pedicel from the flower to the leaf; path similarity refers to the degree of similarity in image features between the organ regions connected by the connecting path and the candidate leaf clusters. The flowers and leaves of the same water hyacinth are usually consistent in features such as hue and texture. The preset threshold conditions are the pre-set value requirements that spatial continuity, directional consistency and path similarity need to achieve.

[0143] Understandably, candidate leaf clusters are only considered to have leaves nearby, and connecting paths are only considered to be possible passageways; neither is sufficient to determine ownership. The paths themselves need to be examined. The three tests are specific to each plant: spatial continuity test whether the path is coherent (a true pedicel is continuous in the image; an interrupted path indicates that the flower and leaf are not actually connected); consistent direction test whether the direction is reasonable (the pedicel should point from the flower to the leaf cluster; a chaotic or backward-facing path does not conform to the growth structure); and path similarity test whether the two ends resemble each other. If the characteristics of a candidate leaf cluster differ significantly from the flower organs and surrounding plants, the leaf cluster may actually belong to another plant. Only when all three tests are met can the plant be identified as belonging to a specific plant region.

[0144] Specifically, the spatial continuity of each connection path can be statistically analyzed. For example, the response at each position on the path can be checked for continuity and the proportion of continuity to obtain spatial continuity features. The consistency between the path extension direction and the orientation of the organ region pointing to the candidate leaf cluster can be calculated to obtain orientation consistency features. The similarity of image features between the organ regions at both ends of the path and the candidate leaf cluster can be calculated to obtain path similarity. The three features are compared with the corresponding preset threshold conditions. For candidate leaf clusters that meet the preset threshold conditions for all three features, the body region containing the candidate leaf cluster or overlapping with the candidate leaf cluster is determined as the plant region to which the organ region belongs.

[0145] S24, the organ region, the connection path, and the plant region to which they belong are mapped as organ nodes, connection nodes, and leaf cluster nodes, respectively, to construct an organ attachment evidence map.

[0146] Among them, organ nodes refer to the nodes representing flower organs in the organ attachment evidence diagram. One organ region corresponds to one organ node. Connecting nodes refer to the nodes representing connecting paths in the organ attachment evidence diagram. One connecting path corresponds to one connecting node. Connecting nodes are the connection points between organ nodes and leaf cluster nodes. Leaf cluster nodes refer to the nodes representing the plant region in the organ attachment evidence diagram. One plant region corresponds to one leaf cluster node. The organ attachment evidence diagram is a graph structure composed of organ nodes, connecting nodes, leaf cluster nodes, and the lines connecting the nodes. It is used to record the attachment evidence between flower organs and the plant body in a structured form.

[0147] It is understandable that there is a spatial connection between the organ region, the connecting path, and the plant region to which it belongs. However, this connection is scattered at the image pixel level, which makes it inconvenient to directly perform path search and confidence calculation. By abstracting these three elements as nodes in a graph structure and abstracting the spatial connection between nodes as edges in the graph, the complex spatial relationship can be transformed into a graph structure, which makes it easier to determine the maximum reliable path between the flower organ and the plant region to follow through path search.

[0148] Specifically, each organ region can be mapped to an organ node, each connection path can be mapped to a connection node, and each plant region can be mapped to a leaf cluster node. Then, according to the actual connection order, connections are established between organ nodes and connection nodes, and between connection nodes and leaf cluster nodes, so that the connection structure between flower organs, connection parts and leaf clusters in the image is reflected in the image. In this way, an organ attachment evidence map with flowers, connection parts and leaves as the basic skeleton is constructed.

[0149] S25, based on the maximum credible path from the organ node to the leaf cluster node in the organ attachment evidence diagram, determine the organ attribution relationship and the corresponding attachment verification result.

[0150] Among them, the most credible path refers to the path with the highest overall credibility among all the paths from the organ node to the leaf cluster node in the organ attachment evidence map, which starts from the organ node, passes through the connecting node, and reaches the leaf cluster node. The attachment verification result refers to the verification conclusion on whether the flower organ is truly attached to the plant region, including two cases: the organ attribution relationship is established and the organ attribution relationship is not established.

[0151] It is understandable that there may be multiple paths between an organ node and a leaf cluster node, each with a different level of reliability. The path with the highest reliability represents the most reliable connection between the flower organ and the leaf cluster. Therefore, the organ affiliation and the corresponding attachment verification results can be determined through the path with the highest reliability.

[0152] Specifically, the maximum credible path from each organ node to the leaf cluster node is determined in the organ attachment evidence map. Based on the attachment credibility reflected by the maximum credible path, it is determined whether the organ affiliation relationship between the corresponding organ region and the corresponding plant region is valid. The conclusion of whether the relationship is valid or invalid is used as the attachment verification result for the corresponding organ region.

[0153] Based on the above embodiments, step S25 can be implemented in the following ways:

[0154] S251, based on the node distance, degree of expansion overlap, directional consistency and feature similarity between the regions corresponding to the organ node, the connecting node and the leaf cluster node, determine the edge weight between the organ node and the connecting node, and the edge weight between the connecting node and the leaf cluster node.

[0155] Among them, node distance refers to the distance between the centers of the regions represented by two nodes; expansion overlap degree refers to the degree to which the two expanded regions overlap after the regions represented by the two nodes are expanded outward by a preset amount. Truly connected structures will overlap after appropriate expansion, while separated structures are difficult to overlap even after expansion; directional consistency refers to the reasonableness of the connection direction between the regions represented by the two nodes, such as whether the connection path is smooth with the organ region or leaf cluster region; feature similarity refers to the similarity of image features between the regions represented by the two nodes; and edge weight is a value that measures the credibility of the connection between two nodes connected by a line in the organ attachment evidence map. The larger the edge weight, the more credible the connection between the two ends of the line.

[0156] It is understandable that the lines in the diagram only represent structural connections, but the reliability of these connections varies and needs to be quantified as edge weights before different pathways can be compared. Relying solely on any one factor can lead to being misled by appearances; a close center distance does not necessarily mean a true connection, and two regions may simply float side by side. Area overlap may be due to occlusion or camera angle. Therefore, we can consider both directional consistency and feature similarity, as well as whether the connection path is smooth and whether the appearances at both ends are coordinated. This allows the edge weights to comprehensively reflect evidence of both structural connection and appearance coordination. We can calculate the edge weights for the lines connecting organ nodes and connecting nodes, and for the lines connecting connecting nodes and leaf cluster nodes.

[0157] Specifically, for each line in the organ attachment evidence map, the distance between the centers of the regions represented by the nodes at both ends of the line is calculated to obtain the node distance. The regions represented by the nodes at both ends are expanded outward by a preset amplitude, and the degree of overlap between the two regions after expansion is calculated to obtain the degree of expansion overlap. The reasonableness of the connection orientation between the two regions is analyzed to obtain the directional consistency. The similarity between the image features of the regions represented by the nodes at both ends is calculated to obtain the feature similarity. The four factors are combined, for example, by normalizing and weighting the sum to obtain the edge weight of the line. The above processing is performed on each line between an organ node and a connecting node, and on each line between a connecting node and a leaf cluster node, to obtain the edge weight of each line in the organ attachment evidence map.

[0158] S252, in the organ attachment evidence graph, search all paths from the organ node to the leaf cluster node, calculate the product of the edge weights on each path, and determine the path with the largest edge weight product as the maximum credible path.

[0159] It's understandable that there may be multiple paths between organ nodes and leaf cluster nodes. Each path consists of several edges, and the weight of each edge represents the reliability of that connection. Multiplying the weights of all edges on a path, the larger the product, the higher the overall reliability of the path. However, simply taking the edge with the largest single weight cannot reflect the reliability of the entire path. Therefore, we can calculate the product of the weights of all edges on each path and determine the path with the largest product as the most reliable path.

[0160] Specifically, in the organ attachment evidence graph, all paths originating from each organ node and reaching each leaf cluster node via connecting nodes are searched. The edge weights of each connecting line on each path are multiplied sequentially to obtain the edge weight product of each path. The path with the largest edge weight product is determined as the most reliable path.

[0161] S253, compare the edge weight product of the maximum reliable path with a preset path threshold. When the edge weight product is greater than the preset path threshold, determine that the organ affiliation relationship is established, and use the establishment of the organ affiliation relationship as the attachment verification result.

[0162] Among them, the preset path threshold refers to the threshold set in advance to determine whether the maximum trustworthy path is trustworthy enough.

[0163] It is understandable that when the edge weight product is greater than the preset path threshold, it indicates that the connection between the flower organ and the leaf cluster is sufficiently reliable, and it can be determined that the flower organ is attached to the plant. Therefore, by comparing the edge weight product with the preset path threshold, it is possible to determine whether the organ affiliation relationship is valid.

[0164] Specifically, the edge weight product of the most reliable path can be compared with a preset path threshold. When the edge weight product is greater than the preset path threshold, it indicates that the overall reliability of the most reliable path meets the requirements, and there is a reliable attachment pathway between the flower organ and the plant region to which it belongs. This confirms that the organ affiliation relationship between the organ region and the plant region to which it belongs is established, and the establishment of the organ affiliation relationship is taken as the attachment verification result corresponding to the organ region.

[0165] S254, when the edge weight product is not greater than the preset path threshold, it is determined that the organ affiliation relationship is not valid, and the invalidity of the organ affiliation relationship is taken as the attachment verification result.

[0166] Understandably, when the product of edge weights is not greater than the preset path threshold, it indicates that the connection between the flower organ and the leaf cluster is not reliable enough, and the flower organ cannot be identified as attached to the plant. In this case, the organ attribution relationship is not established, and the failure of the organ attribution relationship is taken as the attachment verification result. In addition, when there is no path to any leaf cluster node in the organ attachment evidence graph for a certain organ region, it is also determined that the organ attribution relationship is not established, and the failure of the organ attribution relationship is taken as the attachment verification result for the corresponding organ region.

[0167] S26, input the ontology region into the plant body branch of the trained multi-task recognition network to obtain species evidence corresponding to the ontology region.

[0168] Among them, the plant body branch refers to the task branch in the multi-task recognition network responsible for determining whether a water hyacinth plant exists. In addition to the aforementioned whole-image initial judgment branch and candidate detection branch, the multi-task recognition network also includes the plant body branch. Similar to the whole-image initial judgment branch and candidate detection branch, the plant body branch receives image features output by the shared encoder. During the training phase, the plant body branch can be trained by the plant body supervision region and the flowering period plant body region to obtain the ability to judge plant species. Species evidence refers to the information output by the plant body branch for the body region, reflecting the confidence level of the body region belonging to the water hyacinth plant. The judgment object of the plant body branch depends on the input range. When the input is the whole image, the output is image-level species evidence. When the input is the body region, the output is the species evidence corresponding to the body region.

[0169] Understandably, attachment verification addresses whether a flower grows on a plant area, but whether that plant area itself is a water hyacinth is a separate issue. The establishment of a kinship relationship only indicates that the flower is connected to the area. Therefore, the plant body branch can be used to make a species-level judgment on the main body area separately to obtain species evidence. The judgment ability of the plant body branch is formed during the training phase using the plant body supervision area and the plant body area during the flowering period. This ability can be used in the identification phase. Species evidence and attachment verification results are independent of each other and complement each other, jointly supporting the subsequent initial identification results.

[0170] Specifically, for each ontology region, features corresponding to the location of the ontology region are extracted from the image features output by the shared encoder and input into the plant body branch of the trained multi-task recognition network. Alternatively, the image portion corresponding to the ontology region is cropped and input into the plant body branch. Based on its plant judgment ability learned during the training phase, the plant body branch makes a species judgment on the input ontology region and outputs the confidence level of the presence of a water hyacinth plant in the ontology region as species evidence for the ontology region. Species evidence can be represented in numerical form, for example, the confidence level is normalized to between zero and one. The larger the value, the higher the probability that the ontology region belongs to a water hyacinth plant. The preset species threshold is the value limit within this numerical range.

[0171] S27. Based on the species evidence and the attachment verification results, an initial identification result is obtained.

[0172] Understandably, species evidence answers whether the area contains water hyacinth plants, while attachment verification answers whether the flowers actually grow on the water hyacinth. Both aspects are indispensable. If both species and attachment are established, it can be preliminarily determined that the plant is in the flowering period. If the species is established but attachment is not established, it can be preliminarily determined that the plant is not in the flowering period. If the species is not established, a preliminary conclusion that the plant is not water hyacinth is given. Subsequent gating comparison outputs a rejection result. By combining the two pieces of evidence according to the above rules, a preliminary conclusion that simultaneously covers both the presence or absence of water hyacinth and the presence or absence of flowering is obtained, which is the initial identification result. At this point, the conclusion has not yet undergone negative class verification, so it is only transferred to subsequent steps as the initial identification result.

[0173] Specifically, for each body region, when species evidence indicates that the body region is a water hyacinth plant, if the attachment verification result of the organ region associated with the body region shows that the organ attribution relationship is valid, then the initial identification result corresponding to that location indicates a preliminary judgment of flowering water hyacinth. If the attachment verification results of the organ regions associated with the body region all show that the organ attribution relationship is invalid, or if there are no organ regions around the body region, then the initial identification result corresponding to that location indicates a preliminary judgment of non-flowering water hyacinth. When species evidence indicates that the body region is not a water hyacinth plant, the initial identification result corresponding to that location indicates a preliminary judgment of non-water hyacinth. Thus, the initial identification results for each location are obtained and transferred to subsequent steps for gating comparison and filtering.

[0174] S3, obtain the negative class memory library constructed based on the negative class label, perform gating comparison between the initial recognition result, the initial judgment result of the whole image and the interference samples in the negative class memory library, filter the initial recognition result based on the gating comparison result, and output the water hyacinth recognition result.

[0175] Among them, negative class labeling refers to the labeling of areas in the water surface image that are similar in appearance to water hyacinths but do not belong to the water hyacinth target during the training process, such as purple plants, green floating leaves, water surface coverings, reflections, etc. Negative class memory refers to the data set pre-constructed based on negative class labels to store interference samples. Interference samples refer to data extracted from the regions corresponding to negative class labels that represent easily confused negative class target features. Gating comparison refers to the process of comparing the initial recognition result and the initial judgment result of the whole image with the interference samples in the negative class memory to determine whether the initial recognition result belongs to the negative class. Gating comparison result refers to the basis for judging whether the initial recognition result should be filtered after gating comparison. Water hyacinth recognition result refers to the final recognition conclusion output after gating comparison and filtering.

[0176] Understandably, the initial identification results are based on local structural evidence, that is, judgments are made based on species evidence and attachment verification results in the ontological region. However, although there are many types of disturbances on the water surface, the types that actually recur are limited, such as purple flowers, green floating leaves, water surface coverings, and reflections. Once these disturbances are identified, their appearance characteristics can be used as a basis for future comparisons. If only the discrimination ability formed by the network during training is relied upon, the network lacks the ability to cope with disturbance variants not seen during training. Furthermore, disturbances exhibit different appearances depending on the aquatic environment, lighting conditions, and shooting methods. A fixed model cannot cover all situations in advance. Therefore, Interference objects identified in the negative class annotation can be organized into interference samples and stored centrally in the negative class memory. This serves as the basis for unified comparison before output. Before the final output, the initial recognition result and the initial judgment result of the whole image are compared with the interference samples under gating. The initial recognition result represents the judgment at the local structure level, and the initial judgment result of the whole image represents the judgment at the global scene level. The two judgments are mutually verified with the interference file. Only the initial recognition result that does not show interference features is allowed to pass. Thus, the final output water hyacinth recognition result undergoes multiple checks through local structure judgment, global scene judgment, and interference file verification, ensuring the reliability of the recognition conclusion.

[0177] Specifically, a negative class memory bank, pre-constructed based on negative class annotations, is obtained. This negative class memory bank stores various interference samples. The initial identification results and the initial judgment results of the whole image are compared with the interference samples in the negative class memory bank using a gating system. This results in a gating comparison that reflects whether the initial identification results exhibit interference characteristics. Subsequently, the initial identification results are filtered based on the gating comparison results. Initial identification results that exhibit interference characteristics are removed, while those that do not exhibit interference characteristics are retained. The retained conclusions after filtering, along with the non-water hyacinth conclusions corresponding to the filtered parts, are used as the output water hyacinth identification results.

[0178] Based on the above embodiments, step S3 can be implemented in the following ways:

[0179] S31, extract negative class region features from the region corresponding to the negative class label, encode the negative class region features as interference samples, and store them in the negative class memory.

[0180] Among them, negative class region features refer to the feature information extracted from the region indicated by the negative class annotation that reflects the appearance characteristics of the corresponding interference object, such as the color distribution characteristics, texture characteristics, and contour shape characteristics of the region.

[0181] Understandably, the regions indicated by the negative class labels are the confirmed locations of the interference objects. Features are extracted from these regions and encoded as interference samples. Each interference sample is stored in a negative class memory. The memory can be built once and reused in each recognition. The negative class labels already exist during the training data processing. Building the memory using negative class labels does not require additional labeling costs. In addition, newly confirmed interference objects during the recognition process can also be added to the negative class memory in the same way, so that the memory can be continuously improved and its coverage can become wider as it is used.

[0182] Specifically, for the regions indicated by each negative class label, the negative class region features within the region are extracted, such as the appearance characteristics of color distribution, texture representation, and contour shape within the region. The extracted negative class region features are encoded into interference samples in a uniform form, and the interference type to which each interference sample belongs is recorded, such as purple flower negative class, green floating leaf negative class, water surface covering negative class, reflection negative class, etc. Each interference sample is stored in the negative class memory bank, resulting in the completed negative class memory bank, which is used for gating comparison during the recognition process.

[0183] S32, the initial identification result is matched with the interference samples in the negative class memory bank, and the initial identification result is filtered according to the matching result and the initial judgment result of the whole image, and the water hyacinth identification result is output.

[0184] The matching result refers to the information obtained by comparing the initial identification result with each interference sample in the negative class memory bank, which reflects the degree of similarity between the initial identification result and the interference sample.

[0185] Understandably, the filtering is based on two independent pieces of information: one is the matching result, which is the degree of similarity between the area corresponding to the initial identification result and the confirmed interference objects in the archive, reflecting the comparison at the local object level; the other is the initial judgment result of the whole image, which reflects the tendency at the global scene level. Relying on either one alone may lead to omissions. For example, if a certain interference object happens to appear in a water area with a lot of water hyacinths, the initial judgment result of the whole image may not be inclined to the negative class, but the interference object itself is highly similar to the interference samples in the archive. Or, if a real water hyacinth plant happens to appear on a water surface with a lot of debris, the initial judgment result of the whole image may have a high tendency to be the negative class, but the plant is not similar to any interference sample. Combining the matching result with the initial judgment result of the whole image, and then filtering in conjunction with the structural evidence already present in the initial identification result, can avoid the false filtering or omission caused by the deviation of a single line.

[0186] Specifically, the initial identification results can be matched with each interference sample in the negative class memory to obtain matching results that reflect the degree of similarity. Then, by combining the matching results and the initial judgment results of the whole image, it is determined whether each initial identification result shows interference characteristics. Based on this, the initial identification results are filtered, and the initial identification results that show interference characteristics are filtered out, while the initial identification results that do not show interference characteristics are retained. The filtered water hyacinth identification results are then output.

[0187] In some embodiments, step S32 may be implemented as follows:

[0188] S321, extract the ontology region features corresponding to the initial recognition result, and perform similarity matching between the ontology region features and each interference sample in the negative class memory to obtain the interference similarity, which is used as the matching result.

[0189] Among them, ontological region features refer to the feature information extracted from the ontological region corresponding to the initial recognition result that reflects the appearance characteristics of the region, such as the color distribution, texture representation, and contour shape within the ontological region. Interference similarity refers to the quantitative value of the similarity between ontological region features and interference samples. The higher the interference similarity, the closer the appearance of the ontological region is to the corresponding interference object.

[0190] Understandably, the initial identification results are based on the ontological region, which serves as proof of the presence of water hyacinth. The interference objects are mainly similar to the plant's appearance, such as green floating-leaved plants and water surface coverings, which are similar in appearance to water hyacinth leaf clusters. The ontological region features are compared one by one with each interference sample in the negative class memory bank, and the degree of similarity is quantified in numerical form, so that the matching results can be directly compared with the threshold and can be compared between different positions.

[0191] Specifically, for the ontology region corresponding to the initial recognition result, ontology region features are extracted, such as statistical analysis of appearance characteristics such as color distribution, texture representation, and contour shape within the ontology region. The ontology region features are compared with each interference sample in the negative class memory, and the similarity between the two features is calculated. For example, the distance between features is calculated and converted into a similarity value. The value with the highest similarity between the ontology region features and each interference sample is taken as the interference similarity. The obtained interference similarity is used as the matching result. In the case where there is no corresponding ontology region, there is no corresponding interference similarity, and it is handled separately in the subsequent decision branch.

[0192] S322, when the species evidence is not greater than a preset species threshold, or when the organ attribution relationship is not established and at least one of the following conditions is met: the initial identification result is greater than a preset negative class threshold, or the interference similarity is greater than a preset similarity threshold, the initial identification result is filtered and a non-water hyacinth rejection result is output.

[0193] Among them, the preset species threshold is a pre-set limit for determining whether species evidence indicates that the ontology region is a water hyacinth plant; the preset negative class threshold is a pre-set limit for determining whether the initial negative class judgment result is strong enough; the preset similarity threshold is a pre-set limit for determining whether the interference similarity is high enough; and the rejection result refers to the output result that is filtered and determined to be non-water hyacinth after gating comparison, indicating that the corresponding position is not output as water hyacinth.

[0194] Understandably, there are two independent triggering paths for rejection. The first path is that the species evidence is not greater than the preset species threshold. Whether the ontology region is a water hyacinth plant is a prerequisite for outputting water hyacinth. Although the flowers of the purple negative class plants are connected to their own leaf clusters and the attachment chain is complete, the species evidence of their leaf clusters judged by the plant body branches is lower than the threshold. The species evidence of isolated purple flowers classified into the ontology region is also lower than the threshold. Both types of interference are blocked at the first level. The second path is that the species is established but the organ attribution relationship is not established and the negative class evidence is strong enough. At this time, there is a lack of reliable flowering structure evidence at this position, and the global scene tends to be negative or the appearance is highly similar to the known interference samples, so it should also be filtered.

[0195] Specifically, when the species evidence is not greater than the preset species threshold, the initial identification result is filtered and a non-water hyacinth rejection result is output. When the species evidence is greater than the preset species threshold but the organ attribution relationship is not established, and at least one of the following conditions is met: the initial negative class judgment result is greater than the preset negative class threshold and the interference similarity is greater than the preset similarity threshold, the initial identification result is also filtered and a non-water hyacinth rejection result is output. In this case, the absence of an organ region around the body region is treated as an invalid organ attribution relationship.

[0196] S323, When the species evidence is greater than the preset species threshold and the organ attribution relationship is established, output flowering water hyacinth.

[0197] Among them, flowering water hyacinth refers to water hyacinth that has been determined to be in the flowering period.

[0198] Understandably, if the species evidence exceeds the preset species threshold, it means that the ontology region itself is a water hyacinth plant. If the organ attribution relationship is established, it means that the flower organs are indeed attached to the plant body. The two conditions are confirmed from the species level and the structural level, respectively, and neither can be missing. Purple-flowered negative category plants that only have connected flowers and leaves but do not match the species will be blocked by the species evidence condition. The case of only having a plant but no attached flower organs will not enter this branch. Therefore, we can directly output flowering water hyacinth.

[0199] Specifically, when the species evidence exceeds the preset species threshold and the organ attribution relationship is established, the initial identification result will be output as flowering water hyacinth.

[0200] S324, when the species evidence is greater than the preset species threshold, the organ attribution relationship is not established, the initial negative class judgment result is not greater than the preset negative class threshold, and the interference similarity is not greater than the preset similarity threshold, output "water hyacinth without flowering period".

[0201] The water hyacinth identification results include rejection results for non-water hyacinths, water hyacinths in the flowering period, and water hyacinths in the non-flowering period.

[0202] Among them, water hyacinth without flowering period refers to water hyacinth that is determined to be in the non-flowering period, that is, in a state of not flowering.

[0203] Understandably, if the species evidence exceeds the preset species threshold, it indicates that the ontological region is a water hyacinth plant. If the organ attribution relationship is not established, it means that there is a lack of verified flowering evidence at this location. The determination of flowering must be based on reliable evidence of flower organ attachment. In the absence of such evidence, flowering cannot be determined based on the appearance of the flower. At the same time, if the initial negative class judgment result is not greater than the preset negative class threshold, it means that the global scene does not favor the negative class. If the interference similarity is not greater than the preset similarity threshold, it means that the region is not similar to the known interference object. The main evidence has not been refuted by any negative class evidence. At this time, outputting the conclusion of no flowering period without relying on flower organ evidence is a conservative and safe stage determination method.

[0204] Specifically, when the species evidence is greater than the preset species threshold, the organ attribution relationship is not established, the initial negative class judgment result is not greater than the preset negative class threshold, and the interference similarity is not greater than the preset similarity threshold, the initial identification result will be output as water hyacinth without flowering period. The final output water hyacinth identification result will be one of the following three: non-water hyacinth rejection result, flowering water hyacinth, and water hyacinth without flowering period.

[0205] See Figure 3This is a schematic diagram of a smart water hyacinth identification system provided in an embodiment of the present invention. The system includes:

[0206] The recognition module is used to acquire the water surface image to be tested, input the water surface image to be tested into the trained multi-task recognition network, obtain the water hyacinth candidate region and the initial judgment result of the whole image, perform granular differentiation on the water hyacinth candidate region, and determine the body region and organ region.

[0207] A module is established to determine the body region connected to the organ region within the neighborhood of the organ region as the plant region to which it belongs, to establish the organ attribution relationship between the organ region and the plant region to which it belongs, and to determine the initial identification result based on the body region and the organ attribution relationship.

[0208] The comparison module is used to obtain a negative class memory library constructed based on negative class annotations, perform gating comparison between the initial recognition result, the initial judgment result of the whole image and the interference samples in the negative class memory library, filter the initial recognition result based on the gating comparison result, and output the water hyacinth recognition result.

[0209] Figure 3 The apparatus of the illustrated embodiment can be used to perform corresponding actions. Figure 1 The steps in the method embodiments shown are implemented in a similar manner and have similar technical effects, and will not be repeated here.

[0210] See Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. The electronic device 40 includes: a processor 41, a memory 42, and a computer program; wherein...

[0211] The memory 42 is used to store the computer program, and the memory may also be flash memory. The computer program is, for example, an application program or functional module that implements the above method.

[0212] The processor 41 is configured to execute the computer program stored in the memory to implement the various steps performed by the device in the above method. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0213] Alternatively, the memory 42 can be either standalone or integrated with the processor 41.

[0214] When the memory 42 is a device independent of the processor 41, the device may further include:

[0215] Bus 43 is used to connect the memory 42 and the processor 41.

[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for intelligent identification of water hyacinths, characterized in that, include: A water surface image to be tested is acquired, and the water surface image to be tested is input into a trained multi-task recognition network to obtain water hyacinth candidate regions and preliminary judgment results of the whole image. The water hyacinth candidate regions are then distinguished by granularity to determine the body region and organ region. The body region connected to the organ region within the neighborhood of the organ region is determined as the plant region to which it belongs. An organ attribution relationship is established between the organ region and the plant region to which it belongs. An initial identification result is determined based on the body region and the organ attribution relationship. Obtain the negative class memory library constructed based on the negative class labeling, perform gating comparison between the initial recognition result, the initial judgment result of the whole image and the interference samples in the negative class memory library, filter the initial recognition result based on the gating comparison result, and output the water hyacinth recognition result.

2. The method according to claim 1, characterized in that, The trained multi-task recognition network was obtained through the following method: Obtain training images and the no-flowering-period, flowering-period, and negative class labels in the training images; Based on the labeling granularity of the no-flowering period label, the flowering period label, and the negative class label, a plant body supervision region, a floral organ supervision region, and a negative example supervision region are generated. The flowering period plant body region connected to the floral organ supervision region is determined with the floral organ supervision region indicated by the flowering period label as the center. Based on the plant body supervision region, the flower organ supervision region, the negative example supervision region, and the flowering period plant body region, a flower-removed view and a body-removed view are generated. A multi-task recognition network is trained based on the flower-removed view and the body-removed view to obtain the trained multi-task recognition network.

3. The method according to claim 2, characterized in that, The process involves generating a plant body supervision region, a floral organ supervision region, and a negative example supervision region based on the labeling granularity of the no-flowering-period label, the flowering-period label, and the negative class label. Then, using the floral organ supervision region indicated by the flowering-period label as the center, the process determines the flowering-period plant body region connected to the floral organ supervision region, including: The labeling granularity is determined based on the object corresponding to each label. The labeling of the plant body in the non-flowering period label and the labeling of the flowering period label are determined as the plant body granularity, and the labeling of the flower organ in the flowering period label is determined as the flower organ granularity. The regions corresponding to the non-flowering period and flowering period labels of the plant granularity are determined as the plant granularity supervision region, the regions corresponding to the flowering period labels of the flower organ granularity are determined as the flower organ supervision region, and the regions corresponding to the negative class labels are determined as the negative example supervision region. Centered on the flower organ supervision region, within a preset range, based on the color and texture of each pixel in the training image, the range of the plant body that has an edge connection with the flower organ supervision region is determined. The flower organ supervision region and the range of the plant body are then merged to obtain the flowering plant body region.

4. The method according to claim 1, characterized in that, The process of acquiring the water surface image to be tested, inputting the water surface image to be tested into a trained multi-task recognition network, and obtaining water hyacinth candidate regions and preliminary judgment results for the entire image includes: The shared encoder of the trained multi-task recognition network extracts image features of the water surface image to be tested. Based on the whole-image preliminary judgment branch of the trained multi-task recognition network, the image features are mapped to the whole image to obtain the preliminary judgment results of no flowering period, flowering period and negative class corresponding to the water surface image to be tested, which are used as the whole-image preliminary judgment results. The candidate detection of the image features is performed based on the candidate detection branch of the trained multi-task recognition network to obtain the water hyacinth candidate region.

5. The method according to claim 1, characterized in that, The step of granular differentiation of the candidate water hyacinth regions to determine the body region and organ region includes: For each of the water hyacinth candidate regions, the region area, the proportion of significant color regions, the intensity of the first color texture, the intensity of the second color texture, and the frequency of co-occurrence in the neighborhood are extracted respectively. Among them, the significant color region is the set of pixels in the water hyacinth candidate region whose color saturation is higher than a preset saturation threshold, and the neighborhood co-occurrence frequency is the frequency of other water hyacinth candidate regions existing within a preset neighborhood range of the water hyacinth candidate region. The first color texture intensity is the texture feature intensity corresponding to the first color in the water hyacinth candidate area, and the second color texture intensity is the texture feature intensity corresponding to the second color in the water hyacinth candidate area; The candidate regions of water hyacinth with an area smaller than a preset area threshold, a significant color region proportion greater than a preset proportion threshold, a first color texture intensity greater than a second color texture intensity, and a neighborhood co-occurrence frequency greater than a preset frequency threshold are determined as the organ regions. Candidate regions of water hyacinths that do not meet the above combination of features are identified as the main body region.

6. The method according to claim 4, characterized in that, The process involves determining the body region connected to the organ region within its neighborhood as the plant region to which it belongs, establishing an organ attribution relationship between the organ region and the plant region to which it belongs, and determining an initial identification result based on the body region and the organ attribution relationship, including: An extended search domain is established centered on the organ region, and the leaf cluster response and connector response within the extended search domain are extracted. Candidate leaf clusters are determined based on the leaf cluster response, and the connection path between the organ region and the candidate leaf clusters is determined based on the connection portion response; Calculate the spatial continuity feature, directional consistency feature, and path similarity of the connection path, and determine the body region corresponding to the candidate leaf cluster that meets the preset threshold condition as the plant region. The organ region, the connection path, and the plant region to which they belong are mapped as organ nodes, connection nodes, and leaf cluster nodes, respectively, to construct an organ attachment evidence map. Based on the maximum reliable path from the organ node to the leaf cluster node in the organ attachment evidence diagram, the organ attribution relationship and the corresponding attachment verification result are determined. The ontology region is input into the plant body branch of the trained multi-task recognition network to obtain species evidence corresponding to the ontology region. Based on the species evidence and the attachment verification results, an initial identification result is obtained.

7. The method according to claim 6, characterized in that, The step of determining the organ affiliation relationship and the corresponding attachment verification result based on the maximum reliable path from the organ node to the leaf cluster node in the organ attachment evidence graph includes: Based on the node distance, degree of expansion overlap, directional consistency, and feature similarity between the regions corresponding to the organ node, the connecting node, and the leaf cluster node, the edge weights between the organ node and the connecting node, and between the connecting node and the leaf cluster node are determined. In the organ attachment evidence graph, all paths from the organ node to the leaf cluster node are searched, the product of the edge weights on each path is calculated, and the path with the largest edge weight product is determined as the maximum credible path. The edge weight product of the maximum credible path is compared with a preset path threshold. When the edge weight product is greater than the preset path threshold, the organ affiliation relationship is determined to be valid, and the validity of the organ affiliation relationship is taken as the attachment verification result. When the edge weight product is not greater than the preset path threshold, the organ affiliation relationship is determined to be invalid, and the invalidity of the organ affiliation relationship is taken as the attachment verification result.

8. The method according to claim 7, characterized in that, The process of acquiring a negative class memory database constructed based on negative class annotations, performing a gated comparison between the initial recognition result, the initial judgment result of the whole image, and the interference samples in the negative class memory database, filtering the initial recognition result based on the gated comparison result, and outputting the water hyacinth recognition result includes: Extract negative class region features from the region corresponding to the negative class label, encode the negative class region features as interference samples, and store them in the negative class memory; The initial identification result is matched with the interference samples in the negative class memory, and the initial identification result is filtered according to the matching result and the initial judgment result of the whole image to output the water hyacinth identification result.

9. The method according to claim 8, characterized in that, The process of matching the initial identification result with interference samples in the negative class memory, filtering the initial identification result based on the matching result and the initial judgment result of the whole image, and outputting the water hyacinth identification result includes: Extract the ontology region features corresponding to the initial recognition result, and perform similarity matching between the ontology region features and each interference sample in the negative class memory to obtain the interference similarity, which is used as the matching result; When the species evidence is not greater than the preset species threshold, or when the organ attribution relationship is not established and at least one of the following conditions is met: the initial identification result is greater than the preset negative class threshold, or the interference similarity is greater than the preset similarity threshold, the initial identification result is filtered and a non-water hyacinth rejection result is output. When the species evidence is greater than the preset species threshold and the organ attribution relationship is established, output flowering water hyacinth; When the species evidence is greater than the preset species threshold, the organ attribution relationship is not established, the initial negative class judgment result is not greater than the preset negative class threshold, and the interference similarity is not greater than the preset similarity threshold, output "water hyacinth without flowering period". The water hyacinth identification results include rejection results for non-water hyacinths, water hyacinths in the flowering period, and water hyacinths in the non-flowering period.

10. A smart water hyacinth identification system, characterized in that, include: The recognition module is used to acquire the water surface image to be tested, input the water surface image to be tested into the trained multi-task recognition network, obtain the water hyacinth candidate region and the initial judgment result of the whole image, perform granular differentiation on the water hyacinth candidate region, and determine the body region and organ region. A module is established to determine the body region connected to the organ region within the neighborhood of the organ region as the plant region to which it belongs, to establish the organ attribution relationship between the organ region and the plant region to which it belongs, and to determine the initial identification result based on the body region and the organ attribution relationship. The comparison module is used to obtain a negative class memory library constructed based on negative class annotations, perform gating comparison between the initial recognition result, the initial judgment result of the whole image and the interference samples in the negative class memory library, filter the initial recognition result based on the gating comparison result, and output the water hyacinth recognition result.