Target detection method, electronic device and computer readable storage medium

By super-resolution reconstruction and target filtering of images with resolution below the threshold, the traditional object detection method has solved the shortcomings in image quality and detection efficiency, and achieved higher detection accuracy and efficiency.

CN114494113BActive Publication Date: 2025-04-29ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111547905.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-04-29
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

When the traditional object detection method processes images with a resolution below the threshold, it is difficult to accurately detect the state information of the object and takes a long time.

Method used

By super-resolution reconstruction of sub-images with resolution below the threshold, image quality is improved, and the image is divided into multiple sub-images, filtering other targets, reducing interference to preset targets, thereby improving detection efficiency and accuracy.

Benefits of technology

The images filtered by quality enhancement and target mainly include preset targets with higher quality, which significantly improves the accuracy and detection efficiency of target state detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494113B_ABST
    Figure CN114494113B_ABST
Patent Text Reader

Abstract

The present application discloses a target detection method, an electronic device and a computer-readable storage medium, the method comprising: obtaining a first image, reconstructing a first sub-image in the first image whose resolution is lower than a first threshold value so that the resolution of the first sub-image exceeds the first threshold value, thereby converting the first image into a second image; wherein the first image contains a preset target and other targets; dividing the second image into a plurality of second sub-images, filtering other targets in at least part of the second sub-images, obtaining a second sub-image from which other targets have been filtered out and a second sub-image from which the preset target has been retained; splicing the second sub-image from which other targets have been filtered out and the second sub-image from which the preset target has been retained into a third image, and determining the state information of the preset target in the third image. The above scheme can improve the accuracy of detecting the state of the target and improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a target detection method, an electronic device, and a computer-readable storage medium. Background Art

[0002] Due to environmental factors, it is difficult to collect high-quality image data in some fields. When traditional classifiers detect targets in image data, even if they can determine the category of the target, it is difficult to determine the target's state information. In addition, it takes a long time for traditional classifiers to process a large amount of image data one by one. In view of this, how to improve the accuracy of detecting the state of the target and improve the detection efficiency has become an urgent problem to be solved. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a target detection method, an electronic device and a computer-readable storage medium, which can improve the accuracy of detecting the state of the target and improve the detection efficiency.

[0004] To solve the above technical problems, the first aspect of the present application provides a target detection method, including: obtaining a first image, reconstructing a first sub-image in the first image whose resolution is lower than a first threshold so that the resolution of the first sub-image exceeds the first threshold, thereby converting the first image into a second image; wherein the first image contains a preset target and other targets; dividing the second image into multiple second sub-images, filtering the other targets in at least part of the second sub-images, obtaining a second sub-image from which the other targets have been filtered out and a second sub-image from which the preset target is retained; splicing the second sub-image from which the other targets have been filtered out and the second sub-image from which the preset target is retained into a third image, and determining the status information of the preset target in the third image.

[0005] To solve the above technical problems, the second aspect of the present application provides an electronic device, which includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method described in the first aspect.

[0006] In order to solve the above technical problem, the third aspect of the present application provides a computer-readable storage medium on which program data is stored. When the program data is executed by a processor, the method described in the first aspect is implemented.

[0007] The above scheme, after obtaining a first image including a preset target and other targets, reconstructs a first sub-image in the first image whose resolution is lower than a first threshold value to improve the quality of a portion of the first sub-image in the first image, thereby converting the first image into a second image, dividing the second image into multiple second sub-images, filtering other targets in the second sub-image to reduce information interfering with the preset target, obtaining a second sub-image from which other targets have been filtered and a second sub-image from which the preset target is retained, and splicing the two into a third image, so that the third image has undergone quality enhancement and target filtering, thereby mainly including a preset target with higher quality, and when detecting the state of the preset target in the third image, the detection efficiency can be improved and the detection accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0009] Figure 1 It is a flowchart of an implementation method of the target detection method of the present application;

[0010] Figure 2 It is a flowchart of another implementation method of the target detection method of the present application;

[0011] Figure 3 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0012] Figure 4 It is a structural schematic diagram of an implementation method of a computer storage medium of the present application. DETAILED DESCRIPTION

[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0014] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0015] See also Figure 1 , Figure 1 : is a flow chart of an implementation method of a target detection method of the present application, the method comprising:

[0016] S101: Obtain a first image, reconstruct a first sub-image in the first image whose resolution is lower than a first threshold so that the resolution of the first sub-image exceeds the first threshold, thereby converting the first image into a second image, wherein the first image includes a preset target and other targets.

[0017] Specifically, a first image including preset targets and other targets is obtained, a first sub-image having a resolution lower than a first threshold is determined in the first image, the first sub-image having a resolution lower than the first threshold is reconstructed so that the resolution of the first sub-image exceeds the first threshold, thereby improving the quality of the first sub-image having a resolution lower than the first threshold, and the reconstructed first sub-image is restored to a corresponding position on the first image, so that the first image is converted into a second image.

[0018] In one application method, a first image including a preset target and other targets is obtained, the first image is divided into multiple first sub-images of preset sizes, the first sub-images are analyzed using a pre-trained first model, and the first sub-images with a resolution lower than a first threshold are extracted. The extracted first sub-images are super-resolution reconstructed to improve the image quality of the first sub-images with a resolution lower than the first threshold, and the reconstructed first sub-images are restored to corresponding positions on the first image, thereby converting the first image into a second image.

[0019] In an application scenario, remote sensing image data collected by a camera on a drone is obtained, wherein trees in the remote sensing image data are preset targets, and targets other than trees are other targets. Affected by factors such as weather, illumination, angle, and distance, the probability that there are areas with a resolution lower than a first threshold on the remote sensing image data is also high. The remote sensing image data is divided into 64x64 first sub-images, and first sub-images with a resolution lower than the first threshold are extracted. Super-resolution reconstruction is performed on the first sub-images with a resolution lower than the first threshold, and the reconstructed first sub-images are obtained and restored to the corresponding position on the remote sensing image, thereby improving the quality of the remote sensing image. The first threshold is a resolution of 320×240.

[0020] S102: Segment the second image into a plurality of second sub-images, filter other objects in at least part of the second sub-images, and obtain second sub-images from which other objects have been filtered out and second sub-images from which preset objects are retained.

[0021] Specifically, the second image is divided into multiple second sub-images to obtain multiple second sub-images at the pixel level, and the second sub-images in which the proportion of other targets exceeds the second threshold are filtered to eliminate the pixels corresponding to other targets in the second sub-images in which the proportion of other targets exceeds the second threshold, and the second sub-images are divided into second sub-images from which other targets have been filtered out and second sub-images in which preset targets are retained.

[0022] In one application, the second image is segmented into multiple second sub-images of preset sizes, and the second sub-images are analyzed using a pre-trained second model to extract second sub-images in which the proportion of other targets exceeds a second threshold. The pixels in the second sub-images in which the proportion of other targets exceeds the second threshold are uniformly set to a color different from the preset targets, thereby filtering out the other targets, and dividing all segmented second sub-images into second sub-images from which the other targets have been filtered out and second sub-images in which the preset targets are retained.

[0023] In one application scenario, the preset targets in the second image are trees, and other targets include but are not limited to rocks, fields and bare soil. The second image is segmented into 64x64 second sub-images. After the second image is segmented into thousands of second sub-images, the targets included in the second sub-images are mainly targets of a single category. The second sub-images are input into the second model so that the second model uniformly sets the pixels in the image in which the proportion of other targets in the second image exceeds the second threshold to black, so as to obtain the second sub-image in which the preset targets have been filtered out, and the unfiltered second image is used as the second sub-image retaining the preset targets.

[0024] S103: splicing the second sub-image from which other objects have been filtered out and the second sub-image from which the preset object is retained into a third image, and determining state information of the preset object in the third image.

[0025] Specifically, the second sub-image from which other targets have been filtered and the second sub-image from which the preset target has been retained are spliced ​​in the order before segmentation to obtain a third image, wherein the third image has been quality enhanced and target filtered, so that the third image mainly includes the preset target with higher quality.

[0026] Furthermore, the third image is detected using a third model to obtain state information of a preset target in the third image, wherein the third model is pre-trained to distinguish different states of the preset target. When the third image mainly includes high-quality preset targets, the amount of data used by the third model to detect the third image is greatly reduced, and the detection accuracy of the state of the preset target can also be greatly improved.

[0027] In one application scenario, the preset targets in the third image are trees. The third model is pre-trained to distinguish between trees in a disease-free state and trees in a diseased state. The third image is input into the third model to obtain status information of the trees in the third image, and the data of the diseased state in the third image are determined, thereby facilitating the treatment of tree diseases and reducing the cost of manual exploration of the locations of diseased trees.

[0028] The above scheme, after obtaining a first image including a preset target and other targets, reconstructs a first sub-image in the first image whose resolution is lower than a first threshold value to improve the quality of a portion of the first sub-image in the first image, thereby converting the first image into a second image, dividing the second image into multiple second sub-images, filtering other targets in the second sub-image to reduce information interfering with the preset target, obtaining a second sub-image from which other targets have been filtered and a second sub-image from which the preset target is retained, and splicing the two into a third image, so that the third image has undergone quality enhancement and target filtering, thereby mainly including a preset target with higher quality, and when detecting the state of the preset target in the third image, the detection efficiency can be improved and the detection accuracy can be improved.

[0029] See also Figure 2 , Figure 2 : is a flow chart of another embodiment of the target detection method of the present application, the method comprising:

[0030] S201: Obtain a first image, and divide a region in the first image whose resolution is lower than a first threshold into a plurality of first sub-images.

[0031] Specifically, the first image includes a preset target and other targets, and the first image is filtered, brightened, and cropped to obtain an updated first image.

[0032] Furthermore, after obtaining the first image, a region in the first image with a resolution lower than a first threshold is extracted, and the region in the first image with a resolution lower than the first threshold is divided into a plurality of first sub-images of preset sizes.

[0033] In one application, a first image is obtained, the first image is screened to obtain an area in the first image with a resolution lower than a first threshold, and the area in the first image with a resolution lower than the first threshold is divided into 64x64 first sub-images to obtain the first sub-image.

[0034] S202: Input the first sub-image into the first model, and reconstruct the first sub-image using the first model so that the resolution of the first sub-image exceeds a first threshold.

[0035] Specifically, the first sub-image is input into the first model, and the pixels on the first sub-image are reconstructed by the first model so that the resolution of the first sub-image exceeds a first threshold.

[0036] In one application, the first sub-image is input into the first model, and the first model is used to perform super-resolution reconstruction on the first sub-image, thereby improving the resolution of the first sub-image whose resolution is lower than a first threshold.

[0037] In a specific application scenario, the first model is a generative adversarial network (GAN), and the first sub-image is input into the first model so that the generator in the first model reconstructs the first sub-image.

[0038] Specifically, the first model is obtained after pre-training with a first training image set, and the images in the first training image set include preset targets and other targets.

[0039] Furthermore, the first model includes a generator and an adversary, and the training process of the first model includes: screening out a reference image set whose at least part of the resolution exceeds a first threshold from a first training image set; dividing the images in the first training image set into multiple first training sub-images; and training the generator and the adversary using the first training sub-images and the reference image set to obtain a trained first model.

[0040] In one application, a first training image set is obtained, wherein at least 50% of the training images in the first training image set have a resolution lower than a first threshold, a portion of training images having a resolution exceeding the first threshold are extracted from the first training image set to form a reference image set, the images in the first training image set are classified by category, and the first training image set is divided into a training set and a test set, the images in the training set are segmented into a plurality of first training sub-images, the first training sub-images are input into a generator in a first model to obtain a first intermediate image, an adversary is used to compare the resolution of the first intermediate image and the reference image set, and a loss for this training is generated, and parameters in the generator and the adversary are adjusted based on the loss for this training until a convergence condition is met to obtain a trained first model.

[0041] Furthermore, the images in the test set are divided into a plurality of first training sub-images, and the trained first model is tested to determine whether the trained first model meets the requirements. The trained first model can determine images with a resolution lower than a first threshold, and reconstruct images with a resolution lower than the first threshold, so that the resolution of the reconstructed first image is consistent with the image in the reference image set, so that the first model has the ability to distinguish and reconstruct images with a resolution lower than the first threshold.

[0042] S203: Restoring the reconstructed first sub-image to a corresponding area on the first image to obtain a second image.

[0043] Specifically, the reconstructed first sub-image is restored to a corresponding area on the first image according to the position of the first sub-image on the first image, thereby converting the first image into the second image and improving the overall image quality of the second image.

[0044] S204: Divide the second image into a plurality of second sub-images.

[0045] Specifically, the second image is segmented to obtain a plurality of second sub-images.

[0046] In one application, the second image is divided into 64×64 second sub-images.

[0047] S205: Input the second sub-image into the second model, use the second model to obtain the second sub-image in which the proportion of other targets exceeds the second threshold, and eliminate the pixels corresponding to other targets in the second sub-image in which the proportion of other targets exceeds the second threshold, and output the second sub-image from which other targets have been filtered out and the second sub-image with the preset targets retained.

[0048] Specifically, the second sub-image is input into the second model, and the second model is used to determine the second sub-image in which the proportion of other targets exceeds the second threshold, thereby eliminating the pixels corresponding to the other targets in the second sub-image in which the proportion of other targets exceeds the second threshold, so that the second model outputs the second sub-image from which other targets have been filtered out and the second sub-image that has not been filtered, wherein the proportion of other targets in the unfiltered second sub-image is less than or equal to the second threshold and must include the preset target, so the unfiltered second sub-image is the second sub-image that retains the preset target, thereby completing the filtering of other targets in the second sub-image and improving the efficiency of subsequent processing.

[0049] In one application, the second model is obtained after pre-training with a second training image set, the images in the second training image set include preset targets and other targets, the second model is a residual neural network model, the second threshold is 90%, and the second sub-image is input into the second model so that the second model performs an elimination operation on pixels in the second sub-image where the proportion of other targets exceeds the second threshold, wherein the elimination operation includes uniformly setting the pixels to a color that is significantly different from the preset target, and when the second image is divided into thousands of second sub-images, the probability that the target included in the second sub-image is one target is high, and when the proportion of other targets in the second sub-image exceeds the second threshold, the pixels in the second sub-image can be eliminated.

[0050] Furthermore, the training process of the second model includes: dividing the second training image set into multiple second training sub-images; dividing the second training sub-images into a first subset and a second subset; wherein the proportion of other targets in the second training sub-image corresponding to the first subset does not exceed a second threshold, and the proportion of other targets in the second training sub-image corresponding to the second subset exceeds the second threshold; using the first subset and the second subset to train the second model to obtain the trained second model.

[0051] Specifically, the resolution of the image input into the second model has been processed by the first model. Therefore, the proportion of training images in the second training image set whose resolution exceeds the first threshold exceeds 80%, thereby improving the adaptability of the second model training stage and the actual application stage. The images in the second training image set are divided into multiple second training sub-images, and the second training sub-images are divided into two groups based on the proportion of other targets in the second training sub-images, wherein the proportion of other targets in the second training sub-images corresponding to the first subset does not exceed the second threshold, and the proportion of other targets in the second training sub-images corresponding to the second subset exceeds the second threshold. The second model is trained using the first subset and the second subset to obtain a second model that can distinguish between other targets and preset targets.

[0052] In an application scenario, the steps of training a second model using a first subset and a second subset to obtain a trained second model include: inputting the first subset and the second subset into the second model to obtain a third subset; determining a difference loss corresponding to the second model based on difference information between the third subset and the first subset and difference information between the third subset and the second subset; wherein the difference loss is negatively correlated with the proportion of the first subset in the third subset, and the difference loss is positively correlated with the proportion of the second subset in the third subset; adjusting parameters in the second model based on the difference loss until a first convergence condition is met to obtain a trained second model.

[0053] Specifically, the first subset and the second subset are input into the second model to obtain the third subset, and the difference information between the third subset and the first subset and the difference information between the third subset and the second subset are compared to obtain the difference loss of the second model, wherein the higher the proportion of the first subset in the third subset, the smaller the difference loss, and the higher the proportion of the second subset in the third subset, the larger the difference loss. That is, the second model is used to distinguish the first subset from the second subset, retain the first subset as much as possible and eliminate the second subset, and adjust the parameters in the second model based on the difference loss. When the first convergence condition is met, the trained second model is obtained, wherein the first convergence condition can be that the difference loss is 0, so that the trained second model can completely distinguish the first subset from the second subset, and eliminate the pixels in the second training sub-image corresponding to the second subset.

[0054] Furthermore, when the second sub-image is input into the second model, the second model eliminates the pixels corresponding to the image in which the proportion of other targets in the second sub-image exceeds the second threshold, thereby clearing most of the background information that is not related to the preset target, thereby facilitating the subsequent judgment of the status of the preset target and improving the accuracy of the judgment.

[0055] S206: splicing the second sub-image from which other objects have been filtered out and the second sub-image from which the preset object is retained into a third image in the order in which the second image is segmented.

[0056] Specifically, all the second sub-images are spliced ​​into a third image in the order of segmentation, wherein all the second sub-images include second sub-images from which other objects have been filtered out and second sub-images from which preset objects are retained.

[0057] S207: extracting feature information of the third image, inputting the feature information of the third image into the third model, performing state recognition based on the feature information of the third image using the third model, and obtaining state information of a preset target in the third image.

[0058] Specifically, feature information in the third image is extracted and input into the third model, and the third model is used to identify the state of the preset target in the third image based on the feature information, wherein the state information includes the first state and the second state of the preset target, so that the third model outputs the state information corresponding to the preset targets in different areas in the third image.

[0059] In an application scenario, the preset target is a tree, the first state of the preset target is a disease-free state of the tree, and the second state of the preset target is a diseased state of the tree. The third model is pre-trained to distinguish the states of the preset target based on the feature information in the image. After obtaining the third image, the feature information in the third image is extracted and input into the third model, so that the third model recognizes the states of the preset targets in different areas of the third image based on the feature information, thereby obtaining which areas of the third image are disease-free and which areas of the third image are diseased, and mapping the positions of the diseased trees on the third image to the actual space, thereby reducing the manpower and material resources spent on identifying diseased trees.

[0060] Furthermore, the third model is obtained after pre-training with a third training image set, and the images in the third training image set include preset targets and other targets.

[0061] In one application, the third model includes multiple sub-classifiers, and the training process of the third model includes: extracting feature information corresponding to the preset target of the first state, the preset target of the second state and other targets in the image of the third training image set, and setting corresponding identifiers to obtain training feature information; using the training feature information including the identifier to train each sub-classifier separately; in response to satisfying the second convergence condition, determining the weight corresponding to each sub-classifier based on the prediction loss corresponding to each sub-classifier; cascading all sub-classifiers and performing weighted summation on all sub-classifiers to obtain the trained third model.

[0062] Specifically, feature information corresponding to the preset target of the first state, the preset target of the second state and other targets is extracted, and respective corresponding identifiers are set for the preset target of the first state, the preset target of the second state and other targets, and respective corresponding identifiers are set for the preset target of the first state, the preset target of the second state and other targets, and the respective corresponding identifiers are respectively corresponding to the respective corresponding feature information, and training feature information is obtained, and the training feature information including the identifier is respectively input into each sub-classifier, and the predicted state output by each sub-classifier is compared with the input feature information and identifier, and the prediction loss of each sub-classifier is determined, and the parameters in the sub-classifier are adjusted based on the loss of each sub-classifier until the second convergence condition is met, and the prediction loss corresponding to each sub-classifier is obtained using the test image, and the weight corresponding to each sub-classifier is determined based on the prediction loss corresponding to each sub-classifier. Wherein, the second convergence condition can be the number of iterative optimizations, and when the number of iterative optimizations exceeds the second convergence condition, all sub-classifiers corresponding to the third model are cascaded and weighted summation is performed on all sub-classifiers to obtain the trained third model.

[0063] Furthermore, the feature information in the third image is input into the trained third model, and the third model directly analyzes the feature information, and the feature information is mainly feature information of the preset target, so as to improve the detection efficiency, wherein the feature information includes but is not limited to the texture and color on the image, and each sub-classifier in the third model outputs the corresponding state analysis result based on the feature information, and the state analysis results corresponding to each sub-classifier are weighted and summed to determine the state information of the preset target in the third image, thereby reducing the error caused by a single recognition method and improving the accuracy of detecting the state of the target.

[0064] In this embodiment, the preset targets are respectively improved through the first model in the area of ​​the first image where the resolution is lower than the first threshold to obtain a second image, and the pixels in the second sub-image divided from the second image where the proportion of other targets exceeds the second threshold are filtered through the second model, thereby filtering out most of the background information other than the preset targets to obtain a third image, and the feature information in the third image is analyzed through the third model to determine the status information of the preset targets in the third image, thereby improving the accuracy of detecting the status of the target and improving the detection efficiency.

[0065] See also Figure 3 , Figure 3 It is a structural diagram of an embodiment of an electronic device of the present application, wherein the electronic device 30 includes a memory 301 and a processor 302 coupled to each other, wherein the memory 301 stores program data (not shown), and the processor 302 calls the program data to implement the target detection method in any of the above embodiments. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.

[0066] See also Figure 4 , Figure 4 It is a structural diagram of an implementation method of a computer storage medium of the present application. The computer storage medium 40 stores program data 400. When the program data 400 is executed by the processor, the target detection method in any of the above-mentioned embodiments is implemented. For the description of related contents, please refer to the detailed description of the above-mentioned method embodiments, which will not be repeated here.

[0067] It should be noted that the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present implementation scheme.

[0068] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0069] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0070] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A target detection method, characterized in that: The method comprises: Obtaining a first image, reconstructing a first sub-image in the first image whose resolution is lower than a first threshold so that the resolution of the first sub-image exceeds the first threshold, thereby converting the first image into a second image; wherein the first image includes a preset target and other targets; The second image is divided into a plurality of second sub-images, and the other targets in at least part of the second sub-images are filtered to obtain a second sub-image from which the other targets have been filtered out and a second sub-image from which the preset targets are retained; specifically comprising: dividing the second image into a plurality of second sub-images; inputting the second sub-image into a second model, using the second model to obtain a second sub-image from which the proportion of the other targets exceeds a second threshold, and eliminating the pixels corresponding to the other targets in the second sub-image from which the proportion of the other targets exceeds the second threshold, and outputting the second sub-image from which the other targets have been filtered out and the second sub-image from which the preset targets are retained; wherein the second model is obtained after pre-training with a second training image set, and the images in the second training image set include the preset targets and the other targets; The second sub-image from which other objects have been filtered out and the second sub-image from which the preset object is retained are spliced ​​into a third image, and the state information of the preset object is determined in the third image.

2. The target detection method according to claim 1, characterized in that: The step of reconstructing a first sub-image in the first image whose resolution is lower than a first threshold so that the resolution of the first sub-image exceeds the first threshold, thereby converting the first image into a second image, comprises: dividing a region in the first image with a resolution lower than a first threshold into a plurality of the first sub-images; Inputting the first sub-image into a first model, and reconstructing the first sub-image using the first model so that a resolution of the first sub-image exceeds the first threshold; Restoring the reconstructed first sub-image to a corresponding area on the first image to obtain a second image; The first model is obtained after pre-training with a first training image set, and the images in the first training image set include the preset target and the other targets.

3. The target detection method according to claim 2, characterized in that: The first model includes a generator and an adversary, and the training process of the first model includes: Screening out a reference image set having at least a portion of resolution exceeding the first threshold from the first training image set; dividing the image in the first training image set into a plurality of first training sub-images; The generator and the adversary are trained using the first training sub-image and the reference image set to obtain a trained first model.

4. The target detection method according to claim 1, characterized in that: The training process of the second model includes: dividing the second training image set into a plurality of second training sub-images; Dividing the second training sub-image into a first subset and a second subset; wherein the proportion of the other objects in the second training sub-image corresponding to the first subset does not exceed the second threshold, and the proportion of the other objects in the second training sub-image corresponding to the second subset exceeds the second threshold; The second model is trained using the first subset and the second subset to obtain the trained second model.

5. The target detection method according to claim 4, characterized in that: The step of training the second model using the first subset and the second subset to obtain the trained second model comprises: Inputting the first subset and the second subset into the second model to obtain a third subset; Determine a difference loss corresponding to the second model based on difference information between the third subset and the first subset and difference information between the third subset and the second subset; wherein the difference loss is negatively correlated with the proportion of the first subset in the third subset, and the difference loss is positively correlated with the proportion of the second subset in the third subset; Based on the difference loss, the parameters in the second model are adjusted until a first convergence condition is met, thereby obtaining the trained second model.

6. The target detection method according to claim 1, characterized in that: The step of splicing the second sub-image from which other targets have been filtered out and the second sub-image from which the preset target is retained into a third image, and determining the state information of the preset target in the third image comprises: splicing the second sub-image from which other objects have been filtered out and the second sub-image from which the preset object is retained into the third image in the order in which the second image is segmented; Extracting feature information of the third image, inputting the feature information of the third image into a third model, using the third model to perform state recognition based on the feature information of the third image, and obtaining state information of the preset target in the third image; the state information includes a first state and a second state of the preset target; The third model is obtained after pre-training with a third training image set, and the images in the third training image set include the preset target and the other targets.

7. The target detection method according to claim 6, characterized in that: The third model includes a plurality of sub-classifiers, and the training process of the third model includes: Extracting feature information corresponding to the preset target in the first state, the preset target in the second state, and the other targets respectively on the images in the third training image set, and setting corresponding identifiers to obtain training feature information; Using the training feature information including the identifier to train each of the sub-classifiers respectively; In response to satisfying the second convergence condition, determining a weight corresponding to each of the sub-classifiers based on the prediction loss corresponding to each of the sub-classifiers; All the sub-classifiers are cascaded and weighted sum is performed on all the sub-classifiers to obtain the trained third model.

8. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Image processing method and device, computer equipment and computer readable storage medium

    CN111681165A

  • Data processing method and device, electronic equipment and storage medium

    CN113657137A