Target detection method, electronic device and computer-readable storage medium

By combining image and text modal data, the similarity between the target image features and the reference features is calculated, and the problem of low detection accuracy of existing target detection technology in special scenarios is solved, achieving more efficient and accurate target detection.

CN119206383BActive Publication Date: 2025-03-21ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411713967.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing object detection technology has low detection accuracy in special scenarios such as weak light, and the training degree of the model directly affects the detection accuracy.

Method used

The detection result is determined by acquiring the characteristics of the target image and calculating the similarity with the predetermined reference image characteristics and reference text characteristics. This method combines image and text modal data to improve the accuracy and efficiency of detection.

Benefits of technology

The efficiency and accuracy of target detection are improved, especially in special scenarios such as weak light, and the false detection rate is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206383B_ABST
    Figure CN119206383B_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 target image feature corresponding to a target image; obtaining a first similarity between the target image feature and a reference image feature matching a reference category, and a second similarity between the target image feature and a reference text feature matching the reference category; wherein the reference image feature is determined based on a plurality of reference images matching the reference category; based on the first similarity and the second similarity, determining a detection result of the target image. In the above manner, the present application can improve the efficiency and accuracy of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Object detection is a key technology in the field of computer vision, and is widely used in security, industrial quality inspection, and medical fields. Currently, existing object detection mainly relies on trained neural network models, and trained neural network models are prone to false detection when performing object detection in special scenarios. For example, for objects in scenes with low light, the detection accuracy is low. In addition, the degree of model training will directly affect its accuracy in object detection.

[0003] In view of this, how to improve the accuracy of target detection has become an urgent problem to be solved. Summary of the invention

[0004] 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 efficiency and accuracy of target detection.

[0005] To solve the above technical problems, a technical solution adopted in the present application is: to provide a target detection method, including: obtaining a target image feature corresponding to a target image; obtaining a first similarity between the target image feature and a reference image feature matching a reference category, and a second similarity between the target image feature and a reference text feature matching the reference category; wherein the reference image feature is determined based on multiple reference images matching the reference category; based on the first similarity and the second similarity, determining the detection result of the target image.

[0006] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the target detection method mentioned in the above technical solution.

[0007] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium storing program instructions that can be executed by a processor, wherein the program instructions are used to implement the target detection method mentioned in the above technical solution.

[0008] The beneficial effect of the present application is that, different from the prior art, the target detection method proposed in the present application obtains the target image feature corresponding to the target image, and calculates the target image feature with the predetermined reference image feature to obtain a first similarity, and calculates the target image feature with the predetermined reference text feature to obtain a second similarity. The detection result is determined based on the first similarity and the second similarity obtained using different modal data, thereby improving the efficiency and accuracy of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] 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:

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

[0011] Figure 2 yes Figure 1 The flowchart before step S101 corresponds to an implementation method;

[0012] Figure 3 yes Figure 1 Step S102 corresponds to a flow chart of another implementation method;

[0013] Figure 4 It is a flowchart of an implementation method of obtaining reference image features and reference text features in this application;

[0014] Figure 5 yes Figure 1 Step S103 corresponds to a flow chart of another implementation method;

[0015] Figure 6 yes Figure 5 Step S502 corresponds to a flowchart of another implementation method;

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

[0017] Figure 8 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0018] 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, and different embodiments can be adaptively combined. 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.

[0019] 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:

[0020] S101: Acquire target image features corresponding to the target image.

[0021] In one embodiment, a target image is acquired, wherein the target image includes an object for which target detection is required.

[0022] Furthermore, image features are extracted from the target image to obtain corresponding target image features.

[0023] S102: Obtain a first similarity between a target image feature and a reference image feature matching a reference category, and a second similarity between a target image feature and a reference text feature matching a reference category; wherein the reference image feature is determined based on a plurality of reference images matching the reference category.

[0024] In one embodiment, in response to a plurality of reference categories being predetermined, and each reference category being matched with a corresponding reference image feature and at least one reference text feature, a first similarity between a target image feature and a reference image feature matched with each reference category is obtained, and a second similarity between the target image feature and each reference text feature is obtained. The target image feature, the reference image feature, and the reference text feature are all feature vectors.

[0025] S103: Determine a detection result of the target image based on the first similarity and the second similarity.

[0026] In one embodiment, a first detection category matching the target image is determined based on all the first similarities obtained. And a second detection category matching the target image is determined based on all the second similarities obtained. A detection result of the target image is determined based on the first detection category and the second detection category.

[0027] Specifically, the maximum first similarity is determined from all first similarities corresponding to the target image, and the reference category corresponding to the maximum first similarity is used as the first detection category. Also, the maximum second similarity is determined from all second similarities corresponding to the target image, and the reference category corresponding to the maximum second similarity is used as the second detection category. In response to the first detection category and the second detection category being consistent, the detection result of the target image is determined, that is, the first detection category or the second detection category is used as the target detection category of the target image.

[0028] The target detection method proposed in the present application obtains the target image features corresponding to the target image, and calculates the target image features with the predetermined reference image features to obtain the first similarity, and with the predetermined reference text features to obtain the second similarity. The detection result is determined based on the first similarity and the second similarity obtained using different modal data, thereby improving the efficiency and accuracy of target detection.

[0029] See also Figure 2 , Figure 2 yes Figure 1 The process flow diagram before step S101 corresponds to an implementation method. Specifically, the target image in step S101 is obtained by processing the image to be detected based on the trained target detection model. Based on this, the process before step S101 includes:

[0030] S201: Acquire an image to be detected.

[0031] In one embodiment, an image to be detected is acquired, wherein the image to be detected contains at least one target to be detected.

[0032] In one implementation scenario, the image to be detected may be acquired in real time by a corresponding image acquisition device, or may be an image received through other acquisition methods, such as an image received through a network, or an image selected from a database.

[0033] In another embodiment, after the image to be detected is acquired, the image to be detected is preprocessed to improve the clarity of the image to be detected, wherein the preprocessing process includes removing noise and the like.

[0034] S202: Input the image to be detected into the target detection model, determine the initial target in the image to be detected, and the initial category matched by the initial target; wherein the initial category match has confidence.

[0035] In one embodiment, the acquired image to be detected is input into a target detection model, so that the target detection model detects all initial targets in the image to be detected, and the initial category and confidence level of each initial target match.

[0036] In one implementation scenario, the target detection model is obtained by training with multiple training samples, and the image to be detected is input into the target detection model so that the target detection model outputs the coordinate information, initial category and confidence corresponding to each initial target in the image to be detected. The specific structure of the target detection model can refer to the existing neural network model structure.

[0037] S203: For an initial target whose confidence is less than a confidence threshold, a region of the initial target in the image to be detected is used as a target image.

[0038] In one embodiment, for each detected initial target, it is determined whether the corresponding confidence is greater than or equal to the confidence threshold. If so, it is determined that the accuracy of the initial target detection is high, and the corresponding initial category is used as the target detection category of the initial target. If not, the area corresponding to the initial target is extracted from the image to be detected according to the corresponding coordinate information as the target image.

[0039] The above scheme first uses the target detection model to perform target detection on the image to be detected, takes the area of ​​the initial target in the image to be detected whose corresponding confidence is less than the confidence threshold as the target image, and uses the target image to perform subsequent detection steps, thereby improving the accuracy of target detection.

[0040] See also Figure 3 , Figure 3 yes Figure 1 Step S102 in the flowchart corresponds to another embodiment. Specifically, the implementation process of step S102 includes:

[0041] S301: Acquire a reference image feature matching each reference category and at least one reference text feature matching each reference category.

[0042] In one embodiment, a plurality of reference categories are determined, and reference image features matching each reference category and reference text features matching each reference category are obtained.

[0043] In one implementation scenario, each reference category match has a unique reference image feature and a unique reference text feature, wherein the reference image feature is obtained based on multiple reference images corresponding to the reference category match, and the reference text feature is obtained based on the reference text corresponding to the reference category match.

[0044] In another embodiment, each reference category match has a unique reference image feature, and each reference category match has multiple reference text features, wherein each reference text feature is obtained based on the reference text of the corresponding reference category match, and different reference texts of each reference category match have the same semantics.

[0045] S302: For each reference category, obtain a first similarity between the target image feature and the reference image feature.

[0046] In one embodiment, for each reference category, a first similarity between the target image feature and the corresponding reference image feature is obtained.

[0047] Specifically, the cosine distance between the target image feature and the reference image feature is calculated, and the cosine distance is used as the corresponding first similarity. The specific calculation formula of the first similarity is as follows:

[0048]

[0049] in, , represents the total number of reference categories; Represents the target image features With reference category Matched reference image features The first similarity between Represents the target image features The model, Represents the reference image features Model.

[0050] S303: Obtain a second similarity between the target image feature and each reference text feature.

[0051] In one implementation, a second similarity between the target image feature and each reference text feature is obtained.

[0052] Specifically, the cosine distance between the target image feature and the reference text feature is calculated, and the cosine distance is used as the corresponding second similarity. The specific calculation formula of the second similarity is as follows:

[0053]

[0054] in, , Represents the total number of reference text features; Represents the target image features Reference text features The second similarity between Represents the target image features The model, Represents reference text features Model.

[0055] In another embodiment, in response to each reference category matching multiple reference text features, for each reference category, any reference text feature is randomly selected from the multiple reference text features matching the reference category to calculate the second similarity. The specific calculation process of the second similarity can refer to the above embodiment and will not be elaborated in detail here.

[0056] In addition, it should be noted that the execution order of the above steps S302 and S303 may also be other. For example, step S302 and step S303 may be executed simultaneously, or step S303 may be executed first and then step S302.

[0057] The above scheme obtains the first similarity and the second similarity by directly calculating the target image features with the predetermined reference image features and reference text features, thereby simplifying the target detection process and improving the detection efficiency.

[0058] See also Figure 4 , Figure 4 1 is a flow chart of an implementation method of obtaining reference image features and reference text features. Specifically, the reference image features and reference text features mentioned in the above corresponding implementation methods are obtained based on the following steps:

[0059] S401: Determine multiple reference categories, obtain multiple reference images matching each reference category, and obtain at least one reference text matching each reference category; wherein all reference texts matching the same reference category have the same semantics.

[0060] In one embodiment, a plurality of reference categories are predetermined, and for each reference category, a plurality of matching reference images and at least one reference text are acquired.

[0061] Specifically, the reference category is determined according to the application scenario; for example, when the application scenario of the target detection method proposed in the present application is road target detection, multiple reference categories including bicycles, motorcycles, and cars are determined according to the road scene. Multiple reference images matching each reference category can be acquired using a corresponding image acquisition device, or can also be acquired through a network or from a database; for example, when the reference category is a bicycle, multiple images containing bicycles are acquired as reference images.

[0062] Furthermore, the reference text matched by each reference category can be obtained by describing the reference category by relevant technicians; for example, when the reference category is a car, the corresponding description texts "A photo of a car" and "A photo of a automobile" are obtained as matching reference texts. The same reference category can be described and generated into different reference texts by replacing synonyms, so that the reference text generation efficiency is improved while ensuring that different reference texts matched by the same reference category have the same semantics.

[0063] In another embodiment, the reference text can also be obtained by using an intelligent analysis model. The intelligent analysis model is a large language model with better data analysis capabilities. Generate a task text "Generate description text based on reference category", and input the reference category and task text into the intelligent analysis model so that the intelligent analysis model automatically generates the corresponding reference text. For example, input "Generate description text based on reference category 'Sedan'" into the intelligent analysis model to obtain at least one reference text with the same semantics.

[0064] In a specific application scenario, the above-mentioned large language model may include but is not limited to deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), long short-term memory networks (LSTM), and generative pre-trained Transformer models, etc. No specific restrictions are made on the specific structure and specific deployment of the large language model. In addition, it should be noted that the specific structure and specific deployment of the intelligent analysis model mentioned in other implementations of this application can refer to this implementation.

[0065] S402: For each reference category, based on all reference images matched with the reference category, obtain reference image features matched with the reference category.

[0066] In one embodiment, a feature extraction model is obtained, the feature extraction model includes an image processing branch and a text processing branch, the image processing branch is used to extract features from an input image, and the text processing branch is used to extract features from an input text. All reference images matched by each reference category are input to the image processing branch in the feature extraction model to obtain a first image feature of each reference image output by the image processing branch.

[0067] Furthermore, based on all first image features matched by the reference category, corresponding reference image features are obtained.

[0068] Specifically, after the first reference image feature of each reference image is acquired, for each reference category, an average value is calculated for all corresponding first image features to obtain a reference image feature matching the corresponding reference category.

[0069] In one implementation scenario, the feature extraction model is a pre-trained model, such as a CLIP (Contrastive Language-Image Pretraining) model. The feature extraction model can be obtained through an existing open source algorithm.

[0070] S403: Based on each reference text, obtain corresponding reference text features.

[0071] In one embodiment, all the obtained reference texts are input into the text processing branch in the feature extraction model to obtain the reference text features of each reference text output by the text processing branch.

[0072] In another embodiment, all the reference texts obtained are input into the text processing branch in the feature extraction model to obtain the first text feature of each reference text output by the text processing branch. For each reference category, the third similarity between the corresponding reference image feature and each corresponding first text feature is calculated, and the first text feature corresponding to the maximum third similarity is used as the reference text feature matched with the corresponding reference category. The process of obtaining the third similarity can refer to the process of obtaining the first similarity or the second similarity in the corresponding embodiment above, and will not be elaborated in detail here.

[0073] The above scheme determines the reference image features and reference text features that match each reference category, so that after obtaining the target image features corresponding to the target image, the detection results are determined based on the first similarity between the target image features and the reference image features, and the second similarity between the target image features and the reference text features, and the detection results of the target detection model are further tested and verified, thereby improving the efficiency of target detection.

[0074] Moreover, when the application scenario switches, only the target detection model mentioned in the above corresponding implementation mode needs to be adaptively trained, thereby improving the flexibility and efficiency of target detection. For example, when the application scenario switches to product detection, in order to improve the accuracy of the corresponding product type detection, the target detection model is adaptively trained using images matching different product types as training samples, so that the target detection model has the ability to detect product types. In addition, reference images and reference texts matching different product types are obtained, and the corresponding reference image features and reference text features are directly obtained using the feature extraction model without adjusting the parameters in the feature extraction model.

[0075] In addition, it should be noted that the target image features of the target image in the above step S101 are obtained based on the feature extraction model. That is, after acquiring the target image, step S101 inputs the target image into the image processing branch in the above feature extraction model to obtain the target image features.

[0076] See also Figure 5 , Figure 5 yes Figure 1 Step S103 in the flowchart corresponds to another embodiment. Specifically, the implementation process of step S103 includes:

[0077] S501: Based on all first similarities, obtain a first score for matching a target image with each reference category; and based on all second similarities, obtain a second score for matching a target image with each reference text feature.

[0078] In one embodiment, after obtaining the first similarity between the target image and each reference category, each first similarity is normalized to obtain a first score for the target image to match each reference category. And, after obtaining the second similarity corresponding to the target image, each second similarity is normalized to obtain a second score for the target image to match each reference text feature.

[0079] Specifically, each first similarity and each second similarity are normalized by using a softmax function to obtain a more intuitive and easy-to-understand first score and second score. The specific calculation formulas of the first score and the second score are as follows:

[0080]

[0081]

[0082] in, Represents the target image and reference category The first score of the match. Represents the target image and reference text Matched second score.

[0083] S502: Based on the first score and the second score, obtain a detection result of the target image matching.

[0084] In one embodiment, the reference category that matches the first score with the largest value is used as the first detection category, and the reference category that matches the second score with the largest value is used as the second detection category.

[0085] Specifically, the maximum first score is selected from all the first scores obtained, and the reference category to which the reference image feature corresponding to the maximum first score belongs is used as the first detection category. Also, the maximum second score is selected from all the second scores, and the reference category to which the reference text feature corresponding to the maximum second score belongs is used as the second detection category.

[0086] Furthermore, based on the first detection category and the second detection category, a detection result of the target image matching is obtained.

[0087] Specifically, when the first detection category and the second detection category are the same, the detection result corresponding to the initial target in the target image is determined, that is, the first detection category or the second detection category is used as the target detection category corresponding to the initial target in the target image.

[0088] See also Figure 6 , Figure 6 yes Figure 5 Step S502 in the flowchart corresponds to another embodiment. Specifically, the implementation process of step S502 includes:

[0089] S601: Obtain comparison information of the first detection category and the second detection category.

[0090] In one embodiment, the determined first detection category is compared with the second detection category to obtain comparison information, wherein the comparison information is used to indicate whether the first detection category is consistent with the second detection category.

[0091] S602: Determine a first score threshold that matches the first score and a second score threshold that matches the second score, and obtain a detection result based on the comparison information, the first score and its matching first score threshold, and the second score and its matching second score threshold.

[0092] In one embodiment, in order to improve the accuracy of detection and reduce the probability of false detection, a first score threshold matching the first score and a second score threshold matching the second score are predetermined, and the detection result is obtained according to the comparison information, the first score, the first score threshold, the second score and the second score threshold. The first score threshold and the second score threshold may be estimated by relevant technical personnel, or may be obtained by reverse deduction after multiple experiments.

[0093] In one implementation scenario, in response to the comparison information indicating that the first detection category is consistent with the second detection category, the first score with the largest value is greater than the first score threshold, and the second score with the largest value is greater than the second score threshold, the first detection category or the second detection category is used as the target detection category for the initial target match in the target image.

[0094] Alternatively, in response to the comparison information indicating that the first detection category is consistent with the second detection category, but at least one of the first score with the largest value and the second score with the largest value is less than or equal to the corresponding score threshold, it indicates that there is an error in target detection of the target image, and the target image is marked as a detection failure.

[0095] Alternatively, in response to the comparison information indicating that the first detection category is inconsistent with the second detection category, the target image is marked as detection failure.

[0096] It should be noted that, in the above implementation, the first score threshold and the second score threshold are predetermined to constrain the detection results, thereby preventing the first detection category from being inconsistent with the second detection category, but the maximum first score and the maximum second score are both greater than the corresponding score threshold. That is, by using the first score threshold and the second score threshold, when the first detection category is inconsistent with the second detection category, the maximum first score is less than or equal to the corresponding first score threshold, or the maximum second score is less than or equal to the corresponding second score threshold, thereby reducing the probability of false detection.

[0097] See also Figure 7 , Figure 7 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device comprises: a memory 10 and a processor 20 coupled to each other. The memory 10 stores program instructions, and the processor 20 is used to execute the program instructions to implement the target association method mentioned in any of the above embodiments. Specifically, the electronic device includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 20 can also be called a CPU (Center Processing Unit). The processor 20 may be an integrated circuit chip with signal processing capabilities. The processor 20 may also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 20 may be implemented by an integrated circuit chip.

[0098] See also Figure 8 , Figure 8The storage medium 30 stores program instructions 40 that can be executed by a processor, and when the program instructions 40 are executed by the processor, the target association method mentioned in any of the above embodiments is implemented.

[0099] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0100] 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 embodiment.

[0101] 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.

[0102] 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. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute 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.

[0103] 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: include: Obtaining target image features corresponding to the target image; Obtaining a first similarity between the target image feature and a reference image feature matching a reference category, and a second similarity between the target image feature and a reference text feature matching the reference category; wherein the reference image feature is determined based on a plurality of reference images matching the reference category; there are a plurality of reference categories, and the plurality of reference categories are predetermined; Determining a detection result of the target image based on the first similarity and the second similarity; Wherein, determining the detection result of the target image based on the first similarity and the second similarity includes: obtaining a first score for matching the target image with each of the reference categories based on all of the first similarities; and obtaining a second score for matching the target image with each of the reference text features based on all of the second similarities; and obtaining a detection result for matching the target image based on the first score and the second score. Wherein, obtaining the detection result of the target image matching based on the first score and the second score includes: taking the reference category matched by the first score with the largest value as the first detection category, and taking the reference category matched by the second score with the largest value as the second detection category; obtaining the detection result of the target image matching based on the first detection category and the second detection category; Wherein, obtaining the detection result of the target image matching based on the first detection category and the second detection category includes: obtaining comparison information of the first detection category and the second detection category; determining a first score threshold that matches the first score and a second score threshold that matches the second score, and obtaining the detection result based on the comparison information, the first score and the first score threshold that matches it, and the second score and the second score threshold that matches it.

2. The target detection method according to claim 1, wherein: Before acquiring the target image feature corresponding to the target image, the method includes: Acquire the image to be detected; Inputting the image to be detected into a target detection model, determining an initial target in the image to be detected and an initial category matched by the initial target; wherein the initial category match has a confidence level; For the initial target whose confidence is less than a confidence threshold, a region of the initial target in the image to be detected is used as the target image.

3. The target detection method according to claim 1, characterized in that: The obtaining of a first similarity between the target image feature and a reference image feature matching a reference category, and a second similarity between the target image feature and a reference text feature matching a reference category, comprises: Acquire the reference image feature matching each of the reference categories and at least one of the reference text features matching each of the reference categories; For each of the reference categories, obtaining a first similarity between the target image feature and the reference image feature; and, A second similarity between the target image feature and each of the reference text features is obtained.

4. The target detection method according to claim 1, characterized in that: The reference image feature and the reference text feature are obtained based on the following steps, including: Determine a plurality of reference categories, obtain a plurality of reference images matching each of the reference categories, and obtain at least one reference text matching each of the reference categories; wherein all the reference texts matching the same reference category have the same semantics; For each of the reference categories, based on all the reference images matched by the reference category, obtaining the reference image features matched by the reference category; and, Based on each of the reference texts, the corresponding reference text features are obtained.

5. The target detection method according to claim 4, characterized in that: The step of acquiring, for each of the reference categories, reference image features matched by the reference category based on all the reference images matched by the reference category, includes: For each of the reference categories, input all the matched reference images into the image processing branch in the feature extraction model to obtain the first image feature of each of the reference images; Acquire the reference image feature based on all the first image features matched by the reference category; The acquiring the corresponding reference text feature based on each of the reference texts includes: The reference text is input into the text processing branch in the feature extraction model to obtain the reference text features of the reference text.

6. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the target detection method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the target detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Target identification method, electronic equipment and computer readable storage medium

    CN118298150A