Identification method and system for agricultural covering material, storage medium and equipment

Through the SAM model and semi-supervised training method, combined with remote sensing image enhancement and data set optimization, the problems of low recognition efficiency and insufficient accuracy in traditional methods are solved, and efficient and automated identification of agricultural cover materials is achieved, which is suitable for diversified terrain conditions.

CN119027803APending Publication Date: 2024-11-26YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST

Patent Information

Application Number
CN202410987139.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the field of agricultural cover material identification, traditional methods are inefficient and susceptible to subjective errors, making it difficult to meet the monitoring and management needs of large-scale land area. Especially under diversified terrain conditions, how to combine deep learning models to make full use of weak annotated data and Labeling data to achieve efficient and accurate identification is still a challenge.

Method used

The SAM model is combined with the semi-supervised training method, and the remote sensing image is enhanced and the data set is constructed. The coarse segmentation results and point box prompts are used to optimize the model, and the refined mask and confidence scores are generated, and the segmentation results are fused to achieve fine-grained recognition. Dynamically adjust the training process to reduce labeling costs and improve identification accuracy.

Benefits of technology

It greatly reduces the labeling cost, realizes the automated identification of agricultural cover materials, improves the identification efficiency and accuracy, and adapts to different terrain conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027803A_ABST
    Figure CN119027803A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a recognition method for an agricultural covering material, and the method comprises the steps: collecting a remote sensing image of the agricultural covering material, carrying out the enhancement of the remote sensing image, and determining a data set; training a first recognition model according to the data set until training is completed; optimizing the trained first recognition model according to an SAM mask optimization semi-supervised training method, and determining a second recognition model; and identifying the remote sensing image of the agricultural covering material to be detected according to the second identification model. According to the method, remote sensing image processing and machine learning technologies are combined, automatic identification of agricultural covering materials can be realized, and the identification efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition and deep learning technology, and in particular to a method, system, storage medium and device for identifying agricultural covering materials. Background Art

[0002] In the field of agricultural covering material identification, traditional identification methods mainly rely on manual interpretation and manual drawing. This method is inefficient and susceptible to subjective errors, and it is difficult to meet the monitoring and management needs of large-scale land areas. With the rapid development of remote sensing technology, high-quality and high-resolution remote sensing images have provided new opportunities for agricultural covering materials and hidden dangers monitoring. However, accurately identifying and classifying agricultural covering materials from remote sensing images, especially under diverse terrain conditions, remains a technical challenge.

[0003] SAM (Segment Anything Model), as a remote sensing image segmentation model based on deep learning, demonstrates the ability to perform zero-sample segmentation of any target in remote sensing images. SAM does not require any labeled data and can segment targets only through point or box prompts. This feature provides a new solution for scenarios where labeled data is scarce or of poor quality. However, how to combine the advantages of SAM to design an agricultural covering material recognition algorithm that can fully utilize weakly labeled data, effectively utilize labeled data, and take into account both cost and accuracy is still a technical problem to be solved. Summary of the invention

[0004] Based on this, it is necessary to propose an identification method for agricultural covering materials to address the above problems.

[0005] A method for identifying agricultural covering materials, the method comprising the following steps:

[0006] Collecting remote sensing images of agricultural covering materials, and enhancing the remote sensing images to determine a data set;

[0007] Training the first recognition model according to the data set until the training is completed;

[0008] Optimize the first recognition model after training according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0009] The remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0010] In the above solution, the first recognition model is trained according to the data set until the training is completed, and then the method further includes:

[0011] Using the first recognition model to recognize the data set to obtain a rough segmentation result;

[0012] Binarizing the rough segmentation result to obtain a corresponding binary mask;

[0013] Several points and several boxes are identified in the binary mask as the first spatial cues for the SAM model.

[0014] In the above solution, the identifying of a plurality of points and a plurality of boxes in the binary mask specifically includes:

[0015] Randomly select m points in the binary mask and place them in the set S p middle:

[0016] S p =[(x p1 ,y p1 ),...,(x Pm ,y pm )];

[0017] According to the size of the connected area in the binary mask, several boxes are determined and placed in the set S b middle:

[0018] S b =[S b1 ,...,S bq ]

[0019]

[0020] S bi =[(x bi ,y bi ,h bi ,w bi )].

[0021] In the above scheme, the optimization of the first recognition model after training according to the SAM mask optimization semi-supervised training method and determining the second recognition model specifically include:

[0022] The data set and / or the first spatial prompt are input into the SAM model to generate a first encoding feature z i and the second encoding feature z s ;

[0023] Generating a refined mask and a corresponding confidence score according to the SAM model;

[0024] A final fine-grained segmentation result is obtained according to the confidence score, the rough segmentation result and the refined mask.

[0025] In the above solution, obtaining the final fine-grained segmentation result according to the confidence score, the rough segmentation result and the refined mask specifically includes:

[0026] The three refined mask results generated for each rectangular box are preset to:

[0027]

[0028] The different confidence scores are preset as:

[0029]

[0030] The rough segmentation result and the refined mask result are fused according to different confidence scores to obtain the final fine-grained segmentation result. final :

[0031]

[0032] Among them, Norm represents the normalization operation.

[0033] In the above scheme, the optimization of the first recognition model after training according to the SAM mask optimization semi-supervised training method and determining the second recognition model specifically include:

[0034] Using the first recognition model to recognize the data set to obtain a rough segmentation result;

[0035] The rough segmentation result and point annotation and mask frame generation rules are used to generate a second spatial prompt, which is input into the SAM model to obtain a semi-supervised segmentation result;

[0036] The first recognition model is semi-supervised trained using the data set and the semi-supervised segmentation result to determine a second recognition model.

[0037] In the above scheme, the optimization of the first recognition model after training according to the SAM mask optimization semi-supervised training method and determining the second recognition model specifically include:

[0038] The focal binary cross entropy loss function is determined based on the binary cross entropy loss function and the focal loss function:

[0039]

[0040] Where N is the total number of samples, y i is the true label of the i-th sample, p i is the probability that the model predicts that the i-th sample is class 1, is the adjusted predicted probability for the correct category, γ is the adjustment parameter, is the weight for each category;

[0041] Determining whether the second recognition model is trained according to a comparison relationship between the focal binary cross entropy loss function and a threshold;

[0042] If the training of the second recognition model is completed, the remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0043] The present application also proposes a recognition system for agricultural covering materials, the system comprising: a data set acquisition unit, a model training unit and a recognition unit;

[0044] The data set acquisition unit is used to collect remote sensing images of agricultural covering materials, enhance the remote sensing images, and determine the data set;

[0045] The model training unit is used to train the first recognition model according to the data set until the training is completed; optimize the first recognition model after the training is completed according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0046] The recognition unit is used to recognize the remote sensing image of the agricultural covering material to be detected according to the second recognition model.

[0047] The present application also proposes a readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the following steps:

[0048] Collecting remote sensing images of agricultural covering materials, and enhancing the remote sensing images to determine a data set;

[0049] Training the first recognition model according to the data set until the training is completed;

[0050] Optimize the first recognition model after training according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0051] The remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0052] The present application also proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the following steps of the computer program:

[0053] Collecting remote sensing images of agricultural covering materials, and enhancing the remote sensing images to determine a data set;

[0054] Training the first recognition model according to the data set until the training is completed;

[0055] Optimize the first recognition model after training according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0056] The remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0057] The embodiment of the present invention has the following beneficial effects: remote sensing images of agricultural covering materials are collected, and the remote sensing images are enhanced to determine a data set; a first recognition model is trained according to the data set until the training is completed; the first recognition model after training is optimized according to the SAM mask optimization semi-supervised training method, and a second recognition model is determined; the remote sensing images of agricultural covering materials to be detected are recognized according to the second recognition model. The present invention combines remote sensing image processing and machine learning technology, greatly reduces the labeling cost, can realize the automatic recognition of agricultural covering materials, and improves the recognition efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] in:

[0060] Figure 1 Schematic diagram of a method flow for identifying agricultural covering materials in one embodiment. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0062] In the following description, a large number of specific details are given in order to provide a more thorough understanding of the present invention; however, it is obvious to those skilled in the art that the present invention can be implemented without one or more of these details; in other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described, and it should be understood that the present invention can be implemented in different forms and should not be interpreted as limited to the embodiments presented here; on the contrary, providing these embodiments will make the disclosure thorough and complete and fully convey the scope of the present invention to those skilled in the art.

[0063] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present invention. When used herein, the singular forms "a", "an" and "said / the" are also intended to include the plural forms, unless the context clearly indicates otherwise, and it should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0064] Existing agricultural covering material identification methods, including those based on traditional image processing and those based on machine learning or deep learning, have some limitations. Traditional image processing methods have difficulty in processing complex image features, while methods based on machine learning or deep learning usually require a large amount of labeled data, and have insufficient recognition capabilities for small-sized targets and complex backgrounds, and have poor adaptability to different terrain conditions.

[0065] In order to overcome these limitations, weak semi-supervised learning methods have been proposed in the prior art. The weak semi-supervised method uses part of the labeled data and a large amount of weakly labeled data for model training, and uses some techniques to utilize the information of the weakly labeled data to improve the generalization ability of the model. This method can reduce the demand for labeled data and reduce labor costs, while retaining certain supervision information and improving the accuracy of the model. However, the weak semi-supervised method also faces some challenges, such as the need to design a suitable mechanism to utilize weakly labeled data to avoid introducing noise or bias, and the need to balance the ratio of labeled data to weakly labeled data to avoid overfitting or underfitting.

[0066] A method for identifying agricultural covering materials proposed in the present application effectively optimizes the training process, improves recognition efficiency and reduces training costs. The semi-supervised and weakly supervised training methods combined with the SAM model enable the algorithm to effectively learn even with limited labeled data, greatly reducing the dependence on a large number of labeled samples and reducing the labeling cost. At the same time, through the design of a loss dynamic balance algorithm, the focus can be flexibly adjusted at different training stages, further optimizing the training effect method. The present invention greatly reduces the labeling cost and improves the recognition accuracy by integrating advanced model structures and innovative training strategies, providing an effective method for solving technical problems in the identification of agricultural covering materials.

[0067] To facilitate understanding, the relevant terms involved in this application are first introduced below.

[0068] (1) SAM model, a large image segmentation model, mainly composed of three parts: Image Encoder, Prompt Encoder and Mask Decoder. Its zero-shot generalization capability and flexible architecture enable it to perform well in various application scenarios;

[0069] (2) Weak semi-supervised training. The weak semi-supervised method refers to using only part of the labeled data and a large amount of weakly labeled data when training the model. Some techniques are used to utilize the information of the weakly labeled data to improve the generalization ability of the model.

[0070] In order to thoroughly understand the present invention, a detailed structure will be presented in the following description to illustrate the technical solution proposed by the present invention; optional embodiments of the present invention are described in detail as follows, but in addition to these detailed descriptions, the present invention may also have other implementation methods.

[0071] like Figure 1 As shown, in one embodiment, a method for identifying agricultural covering materials is provided, and the method for identifying agricultural covering materials includes steps S101 to S104, which are described in detail as follows:

[0072] S101, collecting remote sensing images of agricultural covering materials, enhancing the remote sensing images, and determining a data set;

[0073] Among them, agricultural cover materials refer to various substances covering the surface of farmland, such as vegetation, land use, crops and land cover; high-quality remote sensing images can provide accurate information for subsequent analysis, and enhancing remote sensing images can highlight key information in the image, reduce noise interference, and help improve the accuracy of the recognition model.

[0074] Preferably, after obtaining the agricultural covering materials, the initial three-band (red, green and blue) remote sensing images are identified, and then a small amount of pixel-level annotation data sets and a large amount of point annotation data sets of agricultural greenhouses and mulch films are established through a combination of artificial and intelligent methods, and the agricultural covering material data sets are enhanced, including contrast perturbation, image rotation, overexposure processing, color perturbation, tone separation, contrast enhancement, brightness adjustment, image sharpening, image shearing, weather filters, haze processing and random cutting, etc. Image processing algorithms are used to simulate imaging effects under different time and seasonal conditions, enrich the diversity of the data set, and thus improve the generalization ability and robustness of the model.

[0075] S102, training the first recognition model according to the data set until the training is completed;

[0076] Specifically, based on the enhanced few-sample pixel-level annotated dataset, an agricultural covering material recognition algorithm for various terrains is used for training to obtain an old recognition model (first recognition model) of greenhouses and ground films.

[0077] The effectiveness of model training depends on factors such as the richness of the data set, the balance of data distribution, the complexity of the model and the training strategy. If the data set is large and diverse enough and the model is selected appropriately, the trained model will have good generalization ability and can accurately identify different types of agricultural covering materials.

[0078] In some embodiments, the first recognition model is trained according to the data set until the training is completed, and then the method further includes:

[0079] Using the first recognition model to recognize the data set, and obtaining a rough segmentation result;

[0080] Binarize the rough segmentation result to obtain the corresponding binary mask;

[0081] Several points and boxes are identified in the binary mask as the first spatial cues for the SAM model.

[0082] Specifically, the SAM model needs to combine image data as well as points and boxes to segment image objects, and the first spatial cue is the input data of the SAM model.

[0083] Preferably, based on the film point and mask box generation rules, the rough segmentation result is binarized to obtain a binary mask, wherein pixels with a value of 1 represent the agricultural covering material area.

[0084] In some embodiments, identifying a number of points and a number of boxes in the binary mask specifically includes:

[0085] Randomly select m points in the binary mask and place them in the set S p middle:

[0086] S p =[(x p1 ,y p1 ),...,(x pm ,y pm )];

[0087] S p is a set of randomly selected points in the binary mask. These points will be used to guide the model to identify the key locations of agricultural covering materials. The set S p Each element (x_{pi},y_{pi}) in corresponds to a specific coordinate point on the mask, where i ranges from 1 to m, where m is the number of selected points.

[0088] According to the size of the connected area in the binary mask, several boxes are determined and placed in the set S b middle:

[0089] S b =[S b1 ,...,S bq ]

[0090]

[0091] S bi =[(x bi ,y bi ,h bi ,w bi )].

[0092] S b is a box set, which contains the coordinate information of multiple boxes. These boxes are automatically determined according to the size of the connected area in the mask. The set S b Each box S_{bi} in is composed of four values, namely (x_{bi}, y_{bi}, h_{bi), w_{bi}), which represent the coordinates of the upper left corner of the box (x_{bi}, _{bi)), and the height h_{bi} and width _{bi} of the box, respectively. These boxes are used to capture and locate the boundaries or areas of agricultural covering materials on the mask, where i ranges from 1 to 9, 9 is the number of boxes, and (x,y)_b describes the value of the mask at the point (x,y), which is determined based on the rough segmentation result and a threshold. If the segmentation result f of the point (x,y) exceeds the threshold, the value of (x,y)_b is 1, otherwise it is 0. The v(x,y)_b here is actually the process of converting the rough segmentation result into a two-dimensional mask, which is used to clearly divide the areas of agricultural covering materials and non-covering materials.

[0093] S103, optimizing the trained first recognition model according to the SAM mask optimization semi-supervised training method, and determining the second recognition model;

[0094] The first recognition model after training is optimized according to the SAM (semi-supervised learning method) mask optimization semi-supervised training method. This step is to further improve the performance of the model. The semi-supervised learning method can use unlabeled data to assist model training, thereby alleviating the problem of insufficient labeled data to a certain extent. If the SAM mask optimization method is properly designed, the optimized second recognition model will have higher recognition accuracy and stronger robustness.

[0095] In some embodiments, optimizing the first recognition model after training according to the SAM mask optimization semi-supervised training method and determining the second recognition model specifically includes:

[0096] The dataset and / or the first spatial prompt are input into the SAM model to generate the first encoded feature z i and the second encoding feature z s ;

[0097] Generate a refined mask and corresponding confidence score based on the SAM model;

[0098] According to the confidence score, the rough segmentation result and the refined mask, the final fine-grained segmentation result is obtained.

[0099] Among them, the first coding feature z i : It is the feature representation generated by the image encoder of the SAM model after encoding the input image [. This feature captures the global information of the image, including texture, color, shape, etc., and is the basis for the subsequent generation of segmentation masks; the second encoding feature z s : It is the feature obtained after the prompt encoder (Prompt Encoder) of the SAM model encodes the spatial prompt (i.e., the first spatial prompt, including points and boxes). These spatial prompts can be the position information of points or boxes. They are converted into feature vectors to guide the decoder of the SAM model to generate segmentation masks for specific areas.

[0100] Generate a refined mask: The mask decoder of the SAM model uses the feature z i and z s Generate a refined segmentation mask m and the corresponding confidence score s; the confidence score s measures the reliability of the segmentation mask and can be used for subsequent segmentation result fusion and optimization.

[0101] Fusion segmentation results: After obtaining multiple refined masks and their confidence scores, these results are combined with the coarse segmentation results and weighted fusion is performed according to different confidence scores to obtain the final fine-grained segmentation result. This step takes into account the global information of the coarse segmentation result and the local details of the refined mask to improve the accuracy and precision of the segmentation.

[0102] Optimizing the recognition model: By combining the refined mask, the rough segmentation results, and the confidence score, the first recognition model can be optimized to obtain a second recognition model with better performance. This process takes advantage of the semi-supervised learning ability of the SAM model, which can improve the recognition ability of the model through unlabeled data and spatial hints even when there is limited labeled data. The above final fine-grained segmentation result is the final classification result of agricultural mulch materials.

[0103] Preferably, each rectangular box shares the same point constraint, generating q different segmentation masks. In the SAM mask optimization framework, SAM is configured to generate three masks and different confidence scores for each rectangular box.

[0104] In some embodiments, a final fine-grained segmentation result is obtained according to the confidence score, the rough segmentation result and the refined mask, specifically including:

[0105] The three refined mask results generated for each rectangular box are preset to:

[0106]

[0107] Preset different confidence scores to:

[0108]

[0109] The rough segmentation result and the refined mask result are fused according to different confidence scores to obtain the final fine-grained segmentation result O final :

[0110]

[0111] Among them, Norm represents the normalization operation.

[0112] In some embodiments, optimizing the first recognition model after training according to the SAM mask optimization semi-supervised training method and determining the second recognition model specifically includes:

[0113] Using the first recognition model to recognize the data set, and obtaining a rough segmentation result;

[0114] The rough segmentation results, point annotations, and mask frame generation rules are used to generate the second space prompts, which are input into the SAM model to obtain the semi-supervised segmentation results O final _s;

[0115] Using the dataset and semi-supervised segmentation results O final _sPerform semi-supervised training on the first recognition model to determine the second recognition model.

[0116] In some embodiments, optimizing the first recognition model after training according to the SAM mask optimization semi-supervised training method and determining the second recognition model specifically includes:

[0117] The focal binary cross entropy loss function is determined based on the binary cross entropy loss function and the focal loss function:

[0118]

[0119] Where N is the total number of samples, y i is the true label of the i-th sample, p i is the probability that the model predicts that the i-th sample is class 1, is the adjusted predicted probability for the correct category, γ is the adjustment parameter, is the weight for each category;

[0120] Determining whether the second recognition model is trained according to a comparison relationship between the focal binary cross entropy loss function and the threshold;

[0121] If the training of the second recognition model is completed, the remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0122] Preferably, a threshold a is set to determine whether the predicted greenhouse and mulch film recognition model test indicators reach the threshold. If not, the test data is reflowed for manual re-interpretation and labeling. The workload of manual secondary labeling can be controlled by setting the value of threshold a.

[0123] Specifically, the binary cross entropy loss function is:

[0124]

[0125] Where N is the number of samples, y i is the true label of the i-th sample, which takes the value of 0 or 1, p i is the probability that the model predicts that the i-th sample is category 1;

[0126] The Focal loss function is:

[0127] FLoss(p t )=-α t (1-p t ) γ log(p t )

[0128] In the formula, p t is the probability predicted by the model for the correct category, γ is a tuning parameter used to reduce the weight of easy-to-classify samples, α t It is the weight for each category, which is used to further solve the problem of category imbalance;

[0129] Combining the binary cross entropy loss and the focal loss, we can get the overall formula of the focal binary cross entropy loss function:

[0130]

[0131] Where N is the total number of samples, y i is the true label of the i-th sample, which takes the value of 0 or 1, p i is the probability that the model predicts that the i-th sample is class 1. is the adjusted predicted probability for the correct category. γ is the adjustment parameter used to reduce the weight of easy-to-classify samples. is the weight for each category, which is used to solve the category imbalance problem.

[0132] Preferably, when combining BCELoss and Focal Loss, the weight adjustment mechanism of Focal Loss is used to modify the basic binary cross entropy loss of each sample. First, the basic binary cross entropy loss of each sample is calculated. Second, for each sample, the weight factor (1-p t ) γ and α t , this weight factor reduces the easy classification (i.e., p t The loss of samples close to 0 or 1) is reduced, while the loss of samples that are difficult to classify is increased. Finally, the calculated weight factor is applied to the binary cross entropy loss of each sample. In this way, the model is guided to pay more attention to samples that are difficult to classify during training, while paying less attention to samples that are easy to classify. Such a loss function is particularly suitable for datasets with imbalanced categories and can help improve the model's recognition ability on minority categories.

[0133] Specifically, the mask optimization weak supervision training method uses a point supervision loss function. Point annotations and inference points are still matrices at the data level, so FocalBCELoss is also used in the point annotation weak supervision link and is named FocalBCELossP.

[0134] Preferably, since there is an order of magnitude difference between the mask-based FocalBCELoss and the point-based FocalBCELossP, and FocalBCELossP is very important in correcting the accuracy and recall of the model, a loss dynamic balance algorithm is designed. Inspired by learning rate adjustment algorithms such as Warmup, the ratio of FocalBCELoss to FocalBCELossP is maintained at the order of 10-2 in the first 50 rounds to increase the understanding of the model semantics by FocalBCELossP and point annotations. After 50 rounds, the ratio of FocalBCELoss to FocalBCELossP is maintained near 1 to balance the learning of mask and semantic information.

[0135] S104, identifying the remote sensing image of the agricultural covering material to be detected according to the second recognition model.

[0136] In summary, the weak semi-supervised training method for agricultural covering material recognition model combined with SAM model optimization of the present invention is mainly composed of three modules. Module one is a SAM mask optimization semi-supervised training method composed of mask point and mask box generation rules, a SAM mask optimization method based on points and Boxes, an old recognition model and a new recognition model; module two is a SAM mask optimization weakly supervised training method composed of mask point and mask box generation rules, a SAM mask optimization method based on points and Boxes, a point annotation data set and a new recognition model; module three is a loss dynamic balance algorithm controlled by the optimized focal binary cross entropy loss function. These three modules are connected in parallel to form a weak semi-supervised training method for agricultural covering material recognition model combined with SAM model optimization, which can realize the automatic recognition of agricultural covering materials and improve the recognition efficiency and accuracy.

[0137] The present application also proposes a recognition system for agricultural covering materials, the system comprising: a data set acquisition unit, a model training unit and a recognition unit;

[0138] A data set acquisition unit, used for collecting remote sensing images of agricultural covering materials, enhancing the remote sensing images, and determining data sets;

[0139] A model training unit is used to train the first recognition model according to the data set until the training is completed; optimize the first recognition model after the training is completed according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0140] The recognition unit is used to recognize the remote sensing image of the agricultural covering material to be detected according to the second recognition model.

[0141] The present application also proposes a readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the following steps:

[0142] Collect remote sensing images of agricultural covering materials, enhance the remote sensing images, and determine the data set;

[0143] Training the first recognition model according to the data set until the training is completed;

[0144] Optimize the first recognition model after training according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0145] The remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0146] The present application also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to perform the following steps:

[0147] Collect remote sensing images of agricultural covering materials, enhance the remote sensing images, and determine the data set;

[0148] Training the first recognition model according to the data set until the training is completed;

[0149] Optimize the first recognition model after training according to the SAM mask optimization semi-supervised training method, and determine the second recognition model;

[0150] The remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

[0151] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0152] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0153] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present application. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. The above disclosure is only a preferred embodiment of the present invention, and of course it cannot be used to limit the scope of the rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope covered by the present invention.

Claims

1. A method for identifying agricultural covering materials, characterized in that: The method comprises: Collecting remote sensing images of agricultural covering materials, and enhancing the remote sensing images to determine a data set; Training the first recognition model according to the data set until the training is completed; Optimize the first recognition model after training according to the SAM mask optimization semi-supervised training method, and determine the second recognition model; The remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

2. The method for identifying agricultural covering materials according to claim 1, characterized in that: The first recognition model is trained according to the data set until the training is completed, and then the method further includes: Using the first recognition model to recognize the data set to obtain a rough segmentation result; Binarizing the rough segmentation result to obtain a corresponding binary mask; Several points and several boxes are identified in the binary mask as the first spatial cues for the SAM model.

3. The method for identifying agricultural covering materials according to claim 2, characterized in that: The identifying of a plurality of points and a plurality of boxes in the binary mask specifically includes: Randomly select m points in the binary mask and place them in the set S p middle: S p =[(x p1 ,and p1 ),...,(x pm ,and pm )]; According to the size of the connected area in the binary mask, several boxes are determined and placed in the set S b middle: S b =[S b1 ,...,S bq ] S bi =[(x bi ,y bi ,h bi ,w bi )]。 4. The method for identifying agricultural covering materials according to claim 3, characterized in that: The method of optimizing the semi-supervised training according to the SAM mask is used to optimize the first recognition model after training, and determine the second recognition model, which specifically includes: The data set and / or the first spatial prompt are input into the SAM model to generate a first encoding feature z i and the second encoding feature z s ; Generating a refined mask and a corresponding confidence score according to the SAM model; A final fine-grained segmentation result is obtained according to the confidence score, the rough segmentation result and the refined mask.

5. The method for identifying agricultural covering materials according to claim 4, characterized in that: The step of obtaining a final fine-grained segmentation result according to the confidence score, the rough segmentation result and the refined mask specifically includes: The three refined mask results generated for each rectangular box are preset to: The different confidence scores are preset as: The rough segmentation result and the refined mask result are fused according to different confidence scores to obtain the final fine-grained segmentation result. final : Among them, Norm represents the normalization operation.

6. The method for identifying agricultural covering materials according to claim 5, characterized in that: The method of optimizing the semi-supervised training according to the SAM mask is used to optimize the first recognition model after training, and determine the second recognition model, which specifically includes: Using the first recognition model to recognize the data set to obtain a rough segmentation result; The rough segmentation result and point annotation and mask frame generation rules are used to generate a second spatial prompt, which is input into the SAM model to obtain a semi-supervised segmentation result; The first recognition model is semi-supervised trained using the data set and the semi-supervised segmentation result to determine a second recognition model.

7. The method for identifying agricultural covering materials according to claim 6, characterized in that: The method of optimizing the semi-supervised training according to the SAM mask is used to optimize the first recognition model after training, and determine the second recognition model, which specifically includes: The focal binary cross entropy loss function is determined based on the binary cross entropy loss function and the focal loss function: Where N is the total number of samples, y i is the true label of the i-th sample, p i is the probability that the model predicts that the i-th sample is class 1, is the adjusted predicted probability for the correct category, γ is the adjustment parameter, is the weight for each category; Determining whether the second recognition model is trained according to a comparison relationship between the focal binary cross entropy loss function and a threshold; If the training of the second recognition model is completed, the remote sensing image of the agricultural covering material to be detected is recognized according to the second recognition model.

8. A system for identifying agricultural covering materials, characterized in that: The system comprises: a data set acquisition unit, a model training unit and a recognition unit; The data set acquisition unit is used to collect remote sensing images of agricultural covering materials, enhance the remote sensing images, and determine the data set; The model training unit is used to train the first recognition model according to the data set until the training is completed; optimize the first recognition model after the training is completed according to the SAM mask optimization semi-supervised training method, and determine the second recognition model; The recognition unit is used to recognize the remote sensing image of the agricultural covering material to be detected according to the second recognition model.

9. A readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to execute the steps of the method according to any one of claims 1 to 7.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Mask R-CNN-based cotton tip identification and detection method

    CN114049621A

  • Tooth change detection method and system, electronic equipment and storage medium

    CN116433608A

  • Machine vision-based atmospheric natural environment test industrial product identification and segmentation method

    CN116824135A

  • Mountain fire detection method and device, computer equipment and storage medium

    CN117612101A

  • Image sample expansion method and system fusing AI large model and semantic segmentation technology

    CN117690033A

Cited By

  • Information processing method, information processing device, and program

    WO2026163494A1