A target detection method, device, equipment, storage medium and program product
Patent Information
- Application Number
- CN202310456122.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-18
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-04-18
AI Technical Summary
然而,利用深度学习模型进行目标检测时,对预测框缺乏可靠性来源分析,若某个尺度的预测框出错,则极有可能使得目标检测的检测结果造成影响
[0028] The embodiments of this application have the following beneficial effects: In addition to determining candidate regions for the target object, the electronic device also determines the distribution control parameters of the probability distribution that the region parameters of the candidate regions follow, and models and analyzes the reliability of the candidate regions through the distribution control parameters to obtain analytical information that clearly shows the impact of different factors on the candidate regions. Finally, the analytical information provides guidance for the process of determining the final detection result based on the candidate regions, reducing the possibility of the final detection result being affected when the candidate region prediction is wrong, thereby improving the detection accuracy of the target.
Smart Images

Figure CN116977698B_ABST
Abstract
Description
Technical Field
[0001] This application relates to artificial intelligence technology, and more particularly to a target detection method, apparatus, device, storage medium, and program product. Background Technology
[0002] Object detection is an important branch of artificial intelligence, widely used in fields such as smart healthcare, autonomous driving, driverless cars, and drones. With the development of deep learning, object detection is largely achieved through deep learning models. However, when using deep learning models for object detection, there is a lack of reliability analysis for predicted bounding boxes. If a predicted bounding box at a certain scale is incorrect, it can significantly impact the detection results. Therefore, related technologies suffer from relatively low object detection accuracy. Summary of the Invention
[0003] This application provides a target detection method, apparatus, device, computer-readable storage medium, and computer program product, which can improve the detection accuracy of target detection.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides a target detection method, including:
[0006] For a target object, at least one candidate region is determined in the input image, and at least one distribution control parameter is determined corresponding to the at least one candidate region, wherein the distribution control parameter is a parameter that controls the probability distribution followed by the region parameters of the candidate region;
[0007] Based on the distribution control parameters corresponding to each candidate region, the reliability of each candidate region is analyzed to obtain the analysis information corresponding to each candidate region; wherein, the analysis information is used to provide the impact of different factors on the reliability of the candidate region;
[0008] Based on at least one of the candidate regions and at least one of the parsing information, a corresponding detection result is determined for the target object.
[0009] This application provides a target detection device, including:
[0010] An information determination module is used to determine at least one candidate region in an input image for a target object, and to determine at least one distribution control parameter corresponding to at least one candidate region, wherein the distribution control parameter refers to a parameter that controls the probability distribution followed by the region parameters of the candidate region;
[0011] The reliability analysis module is used to analyze the reliability of each candidate region based on the distribution control parameters corresponding to each candidate region, and obtain the analysis information corresponding to each candidate region; wherein, the analysis information is used to provide the impact of different factors on the reliability of the candidate region;
[0012] The result determination module is used to determine the corresponding detection result for the target object based on at least one of the candidate regions and at least one of the parsing information.
[0013] In some embodiments of this application, the information determination module is further configured to predict N initial prediction regions in the input image where the target object is located at M scales, and N initial control parameters corresponding to the N initial prediction regions; wherein M and N are both positive integers, and N≥M; and based on the N initial prediction regions and the N initial control parameters, determine at least one candidate region, and at least one distribution control parameter corresponding to the at least one candidate region.
[0014] In some embodiments of this application, the M scales include at least two scales; the information determination module is further configured to extract a prediction region to be fused from each of the N initial prediction regions for each scale; fuse the at least two prediction regions to be fused to obtain a scale fusion region corresponding to at least two scales, and determine the scale fusion region as at least one of the candidate regions; fuse the at least two initial control parameters corresponding to the at least two prediction regions to be fused to obtain a fusion control parameter corresponding to the scale fusion region, and determine the fusion control parameter as at least one of the distribution control parameters.
[0015] In some embodiments of this application, the information determination module is further configured to, based on the amount of observation evidence corresponding to each initial prediction region, select reliable prediction regions at each scale from the N initial prediction regions; determine the reliable prediction regions at each scale as at least one candidate region; and determine the initial control parameters corresponding to the reliable prediction regions among the N initial control parameters as at least one distribution control parameter.
[0016] In some embodiments of this application, at least one candidate region includes multiple candidate regions, and at least one parsing information includes multiple parsing information; the result determination module is further configured to determine the corresponding reliability level for each candidate region based on each parsing information; and determine the candidate region with the highest reliability among the multiple candidate regions as the detection result corresponding to the target object.
[0017] In some embodiments of this application, the probability distribution includes: a normal inverse gamma distribution defined by the mean and variance variables of the region parameters; the distribution control parameters include: a center control parameter, a variance control parameter, a first variable control parameter, and a second variable control parameter; wherein, the center control parameter is used to control the distribution center of the normal inverse gamma distribution, the variance control parameter is used to control the variance of the normal inverse gamma distribution, the first variable control parameter is used to control the concentration of the variance variable in the normal inverse gamma distribution, and the second variable control parameter is used to control the concentration of the mean variable in the normal inverse gamma distribution.
[0018] In some embodiments of this application, the reliability analysis module is further configured to: determine a random influence factor for each candidate region based on the variance control parameter and the first variable control parameter; determine a cognitive influence factor for each candidate region based on the variance control parameter, the first variable control parameter, and the second variable control parameter; and perform reliability analysis on each candidate region based on at least one of the random influence factor and the cognitive influence factor to obtain the analysis information corresponding to each candidate region.
[0019] In some embodiments of this application, the reliability analysis module is further configured to perform difference calculation on the first variable control parameter and the preset factor to obtain the variable difference; and to determine the ratio between the variance control parameter and the variable difference as the random influence factor for each candidate region.
[0020] In some embodiments of this application, the reliability analysis module is further configured to calculate the difference between the first variable control parameter and the preset factor to obtain the variable difference; to determine the product of the variable difference and the second variable control parameter as the variable product; and to determine the ratio of the second variable control parameter and the variable product as the cognitive influence factor for each candidate region.
[0021] In some embodiments of this application, the target detection device further includes: a model training module, configured to predict, using an initial detection model, the training prediction region where the training target object is located in the training image at each of the M scales, and the training control parameters corresponding to the training prediction region; determine the loss value at each scale based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale; and update the parameters of the initial detection model using the loss value at each scale until the model training termination condition is met, thereby obtaining the information prediction model.
[0022] In some embodiments of this application, the model training module is further configured to perform maximum likelihood estimation for each scale using the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, and determine the maximum likelihood estimate value as the loss value for each scale.
[0023] This application provides an electronic device, including:
[0024] Memory is used to store executable instructions for a computer;
[0025] The processor, when executing computer-executable instructions stored in the memory, implements the target detection method provided in the embodiments of this application.
[0026] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the target detection method provided in this application.
[0027] This application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implement the target detection method provided in this application.
[0028] The embodiments of this application have the following beneficial effects: In addition to determining candidate regions for the target object, the electronic device also determines the distribution control parameters of the probability distribution that the region parameters of the candidate regions follow, and models and analyzes the reliability of the candidate regions through the distribution control parameters to obtain analytical information that clearly shows the impact of different factors on the candidate regions. Finally, the analytical information provides guidance for the process of determining the final detection result based on the candidate regions, reducing the possibility of the final detection result being affected when the candidate region prediction is wrong, thereby improving the detection accuracy of the target. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the architecture of the target detection system provided in the embodiments of this application;
[0030] Figure 2 This is provided by the embodiments of this application. Figure 1 A schematic diagram of the server structure in the diagram;
[0031] Figure 3 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 1 ;
[0032] Figure 4 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 2 ;
[0033] Figure 5 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 3 ;
[0034] Figure 6 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 4 ;
[0035] Figure 7 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 5 ;
[0036] Figure 8 This is a schematic diagram of the training process of the information prediction model provided in the embodiments of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0039] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0041] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0042] 1) Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0043] 2) Computer Vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing and measuring targets, and then performs image processing to make the computer-processed images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data.
[0044] 3) Object detection refers to finding objects of interest in an image and determining the category and location of these objects. Object detection is one of the core problems in computer vision technology.
[0045] 4) Probability distribution refers to the pattern used to describe the probability of a random variable taking a value.
[0046] 5) Control parameters refer to parameters that control the shape and curve of a probability distribution. By setting control parameters, a specific probability distribution can be obtained. For example, expectation and variance are two control parameters of a normal distribution; that is, by adjusting expectation and variance, a specific normal distribution can be obtained.
[0047] 6) Random uncertainty refers to the impact of noise in the input image on prediction accuracy, and can also be called data uncertainty.
[0048] 7) Cognitive uncertainty refers to the impact on prediction accuracy caused by the insufficient performance of deep learning models, and can also be called model uncertainty.
[0049] With the research and advancement of artificial intelligence (AI) technology, it is being studied and applied in various fields, such as smart homes, wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with further technological development, AI will be applied in even more areas and play an increasingly important role.
[0050] Object detection is an important branch of artificial intelligence, widely used in fields such as smart healthcare, autonomous driving, driverless cars, and drones. With the development of deep learning, object detection is mostly implemented through deep learning models, which can include a series of convolutional layers and prediction units. A deep learning model can be obtained through the following process: Given an input image x and its annotation information y, features are extracted from the input image x through convolutional layers. This process can be expressed as g = f(x; θ), where g represents the convolutional layer features of the input image x. Based on the convolutional layer features extracted by the convolutional layers, the prediction unit predicts whether a target center exists within the image region it is responsible for. If no target center exists, its classification score cl is constrained to approach 0, and the constraint loss of the classification score cl is L. cl =(cl-0) 2 If a target center exists internally, the constrained loss of the classification score cl is L = (cl-1). 2 It calculates the Euclidean distance between the target center position inside the image and a certain corner of the input image (such as the top left or top right corner, which can be used as an anchor point) to obtain the loss L. c =(pc-c) 2 After predicting the target center, the width pw and height ph of the target object are predicted, and the loss L is calculated based on the actual bounding box values. w h = (pw - w) 2 +(ph-h) 2 Finally, based on all the losses obtained, L = L cl +L c +L wh The parameters θ of the deep learning model are optimized. During the forward inference process, i.e., when performing object detection on an unlabeled input image, the prediction results are obtained by predicting the target center, width, and height of the unlabeled input image.
[0051] However, in real-world object detection tasks, the size of target objects is not uniform; that is, the scale of target objects varies. In this case, the performance of the deep learning model obtained using the above method becomes unstable. To address this, related technologies introduce a multi-cooperative prediction method into the deep learning model. In this case, the deep learning model obtains the following: given an input image x and its annotation information y, the input image x is divided into three different scales according to pre-set scale conditions. Then, feature extraction is performed using convolutional layers. This process can be expressed as g k =f(x;θ),k=1,2,3, where, g kLet x be the convolutional layer features at the k-th scale of the input image. The prediction unit predicts the target center within the image region at each scale. If there is no target center, the classification score will still be constrained to approach 0. The constraint loss of the classification score cl is L. cl =(cl-0) 2 If a target center exists, the prediction unit predicts bounding boxes for the target center at each scale and calculates the loss L for the target center location. c Calculate the loss L for the bounding box. w h; Finally, utilize all the losses at each scale L = L cl +L c +L w h optimizes the parameters θ of the deep learning model. During the forward inference process, the deep learning model will work together at each scale to remove overlapping prediction boxes and feed back the final prediction boxes as the final detection results.
[0052] As explained above, while deep learning models can perform single-scale or multi-scale object detection in related technologies, the lack of modeling and analysis of uncertainties (such as cognitive and stochastic uncertainties) in the predicted bounding boxes at each scale leads to a lack of reliability source analysis for the predicted boxes. This results in a lack of effective guidance when determining the final detection result from the predicted boxes at each scale. Consequently, if a predicted box at a certain scale is incorrect, it is highly likely to affect the object detection result. Therefore, it is evident that related technologies suffer from low object detection accuracy.
[0053] This application provides a target detection method, apparatus, device, computer-readable storage medium, and computer program product, which can improve the detection accuracy of target detection. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and vehicle terminals, or it can be implemented as a server. The following will describe exemplary applications when the electronic device is implemented as a server.
[0054] See Figure 1 , Figure 1This is a schematic diagram of the architecture of the target detection system provided in this application embodiment. To support a target detection application, in the target detection system 100, terminals (terminals 400-1 and 400-2 are shown as examples) are connected to the server 200 via a network 300. The network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. The target detection system 100 also includes a database 500 for providing data support to the server 200. The database 500 can be independent of the server 200 or it can be located within the server 200. Figure 1 This illustrates the scenario where database 500 is independent of server 200.
[0055] Terminals 400-1 and 400-2 are used to call the image acquisition device to capture images of the scene in which it is located, and transmit the captured images as input images to the server 200 via the network 300.
[0056] Server 200 is used to determine at least one candidate region in the input image for a target object, and to determine at least one distribution control parameter corresponding to the at least one candidate region, wherein the distribution control parameter is a parameter that controls the probability distribution followed by the region parameters of the candidate region; based on the distribution control parameter corresponding to each candidate region, the reliability of each candidate region is analyzed to obtain the analysis information corresponding to each candidate region; based on at least one candidate region and at least one analysis information, the corresponding detection result is determined for the target object, and the detection result is sent to terminal 400-1 and terminal 400-2.
[0057] Terminals 400-1 and 400-2 display the input image and the detection results of the target object in graphical interfaces 410-1 and 410-2, respectively, for the user to view.
[0058] The embodiments of this application can be implemented with the help of cloud technology, which refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to realize the computation, storage, processing, and sharing of data.
[0059] Cloud computing is a general term encompassing network technologies, information technologies, integration technologies, management platforms, and application technologies based on the cloud computing business model. It allows for the creation of resource pools, on-demand resource utilization, and flexibility. Cloud computing technology will become a crucial support. The backend services of cloud computing systems require substantial computing and storage resources, which necessitate the use of cloud computing.
[0060] For example, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals 400-1 and 400-2 can be smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart home appliances, vehicle terminals, etc., but are not limited to these. Terminals and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0061] See Figure 2 , Figure 2 This is provided by the embodiments of this application. Figure 1 A schematic diagram of the structure of a server (an embodiment of an electronic device) in the diagram. Figure 2 The server 200 shown includes at least one processor 210, memory 250, at least one network interface 220, and a user interface 230. The various components in server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to implement communication between these components. In addition to a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 240.
[0062] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0063] User interface 230 includes one or more output devices 231 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0064] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices physically located away from the processor 210.
[0065] Memory 250 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 250 described in this application embodiment is intended to include any suitable type of memory.
[0066] In some embodiments, memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0067] Operating system 251 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0068] The network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220, such as Bluetooth, WiFi, and Universal Serial Bus (USB).
[0069] Presentation module 253 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 231 (e.g., a display screen, a speaker, etc.) associated with user interface 230;
[0070] The input processing module 254 is used to detect and translate one or more user inputs or interactions from one or more input devices 232.
[0071] In some embodiments, the target detection device provided in this application can be implemented in software. Figure 2 A target detection device 255 stored in memory 250 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an information determination module 2551, a reliability analysis module 2552, a result determination module 2553, and a model training module 2554. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.
[0072] In other embodiments, the target detection device provided in this application can be implemented in hardware. As an example, the target detection device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the target detection method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0073] In some embodiments, a terminal or server (both possible implementations of electronic devices) can implement the target detection method provided in this application by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a people behavior detection APP or a smart doorbell APP; it can also be a mini-program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin.
[0074] This application can be applied to target detection scenarios such as smart healthcare, autonomous driving, and driverless vehicles. Below, we will describe the target detection method provided by this application embodiment in conjunction with exemplary applications and implementations of the electronic device provided in the embodiments of this application.
[0075] See Figure 3 , Figure 3 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 1 , will combine Figure 3 The steps shown are explained.
[0076] S101. For the target object, determine at least one candidate region in the input image, and determine at least one distribution control parameter corresponding to the at least one candidate region.
[0077] This application embodiment is implemented in the scenario of target detection of an input image, that is, determining the region where the target object is located in the input image. The input image can be received by the electronic device from other terminals, or it can be obtained from its own storage space or database. After the electronic device receives the input image, it first determines the regions in the input image where the target object may appear. Each region is a candidate region called the detection result of the target object, so the electronic device can obtain at least one candidate region. At the same time, the electronic device also determines the corresponding distribution control parameters for each candidate region, so the electronic device can obtain at least one distribution control parameter. That is, the number of distribution control parameters is the same as the number of candidate regions.
[0078] It should be noted that the distribution control parameter refers to the parameter that controls the probability distribution followed by the regional parameters of the candidate region. The regional parameters of the candidate region may include the center position of the candidate region, the width, height, and other border information of the candidate region, as well as the coordinates of the vertices of the candidate region, etc., which are not limited in this embodiment.
[0079] The probability distribution followed by the regional parameters is used to determine the probability of occurrence of the regional parameters. In the embodiments of this application, the probability distribution can be a normal distribution, a gamma distribution, or a normal-inverse-gamma distribution; this application does not limit the specific distribution.
[0080] It should be noted that, in the embodiments of this application, the distribution control parameter refers to the collective term for all parameters capable of controlling the shape of the probability distribution, and does not refer to a specific parameter. For example, expectation and variance are collectively referred to as the distribution control parameters of the normal distribution. In other words, in the embodiments of this application, the distribution control parameter may include one or more parameters.
[0081] In this embodiment of the application, the target object can be an object such as a car or a pedestrian. In this case, the input image can be an image of a road, a square, or other location. Alternatively, the target object can be an object such as a lesion or organ in the medical field. In this case, the input image can be a medical image.
[0082] See Figure 4 , Figure 4 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 2 In some embodiments of this application, Figure 3 S101, which is the process of determining at least one candidate region in the input image for the target object and determining at least one distribution control parameter corresponding to the at least one candidate region, can be implemented by S1011-S1012, as follows:
[0083] S1011. At M scales, predict N initial prediction regions of the target object in the input image, and N initial control parameters corresponding to the N initial prediction regions.
[0084] At each of the M scales, the electronic device predicts the region where the target object is located in the input image, as well as the control parameters of the probability distribution followed by the region's parameters, obtaining at least one initial predicted region and at least one initial control parameter. When region prediction is performed at each of the M scales, the electronic device will obtain a total of N initial predicted regions and N initial control parameters, where M and N are both positive integers, and N ≥ M. That is, the number of initial predicted regions is greater than or equal to the number of scales requiring region prediction.
[0085] In some embodiments of this application, the electronic device can read in the input image through an information prediction model that can simultaneously perform region prediction and parameter prediction. The information prediction model can then perform region prediction for the target object at each scale to obtain N initial prediction regions. Simultaneously, the control parameters of the probability distribution that the region parameters of each initial prediction region follow are predicted, thus obtaining the initial control parameters corresponding to each initial prediction region.
[0086] In other embodiments of this application, the electronic device can also read in the input image using a parameter prediction model capable only of parameter prediction. The model uses control parameters for the probability distribution of the target object predictor parameters at each scale. Based on these control parameters, a corresponding image region can be uniquely determined (e.g., by looking up a table, or by directly extracting the parameter used to control the center position of the probability distribution (this parameter is the same as the center position of the target center and the bounding box)). This image region is then used as the initial prediction region. In this way, the electronic device can obtain N initial prediction regions and N initial control parameters.
[0087] S1012. Based on N initial prediction regions and N initial control parameters, determine at least one candidate region and at least one distributed control parameter corresponding to the at least one candidate region.
[0088] After obtaining N initial prediction regions and N initial control parameters, the electronic device will combine the initial prediction regions and initial control parameters to determine at least one candidate region for the target object, as well as at least one distributed control parameter corresponding to the at least one candidate region.
[0089] See Figure 5 , Figure 5 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 3In some embodiments of this application, the M scales include at least two scales, thereby, Figure 4 S1012, which is the specific implementation process of determining at least one candidate region based on N initial prediction regions and N initial control parameters, and at least one distributed control parameter corresponding to at least one candidate region, can be implemented through S1012a-S1012c, as follows:
[0090] S1012a. Extract the prediction region to be fused from the N initial prediction regions for each scale.
[0091] The electronic device extracts regions from N initial prediction regions for each of at least two scales. The extracted regions are then fused with regions extracted from other scales to obtain the prediction region to be fused for each scale.
[0092] It should be noted that when each scale contains more than one initial prediction region, the electronic device can perform only one round of filtering for the prediction regions to be fused at each scale, thus enabling only one round of region fusion for each scale. In this case, the electronic device randomly selects the prediction regions to be fused for each scale from the initial prediction regions at each scale. Alternatively, the electronic device can perform multiple rounds of filtering for the prediction regions to be fused at each scale, thus enabling multiple rounds of region fusion for each scale. In this case, in each round, the electronic device selects the prediction regions to be fused for each scale from the initial prediction regions that have not yet been selected at each scale.
[0093] S1012b: Fuse at least two predicted regions to be fused to obtain a scale fusion region corresponding to at least two scales, and determine the scale fusion region as at least one candidate region.
[0094] The electronic device can directly perform weighted fusion of at least two prediction regions to be fused according to set weights to obtain a scale-fused region. Alternatively, the electronic device can first select a parameter from the initial control parameters corresponding to each prediction region to be fused that can characterize the amount of observational evidence corresponding to each prediction region to be fused (the amount of observational evidence for the prediction region to be fused is the same as the amount of observational evidence for the initial prediction region), and then use the normalized value of this parameter as a weight to perform weighted fusion of at least two prediction regions to be fused to obtain a scale-fused region. After one or more rounds of region fusion, the electronic device determines all the obtained scale-fused regions as candidate regions, thereby obtaining at least one candidate region.
[0095] Understandably, the scale fusion region integrates the regional prediction results of the target object at multiple scales, thereby reducing the adverse effects of various factors on the candidate region during regional prediction and making the candidate region more accurate.
[0096] S1012c, fuse at least two initial control parameters corresponding to at least two prediction regions to be fused to obtain fusion control parameters corresponding to the scale fusion region, and determine the fusion control parameters as at least one distributed control parameter.
[0097] For each scale of the prediction region to be fused, the electronic device extracts the corresponding initial control parameters from all the initial control parameters to obtain at least two initial control parameters corresponding to at least two prediction regions to be fused. Then, the at least two control parameters are fused to obtain fused control parameters, which correspond to the scale fusion region. The electronic device will directly fuse the control parameters as at least one distributed control parameter corresponding to at least one candidate region.
[0098] It should be noted that when the initial fusion parameters contain multiple different parameters, the electronic device can sum the parameters in the initial fusion parameters at different scales to complete the parameter fusion. Alternatively, it can directly sum some parameters and add certain tail terms (such as adding preset values or values determined by other parameters) to other parameters based on the summation to complete the parameter fusion.
[0099] At this point, the electronic device has completed the process of determining candidate regions and their distribution control parameters based on multi-scale fusion.
[0100] See Figure 6 , Figure 6 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 4 In some embodiments of this application, Figure 4 S1012, which is the specific implementation process of determining at least one candidate region based on N initial prediction regions and N initial control parameters, and at least one distributed control parameter corresponding to at least one candidate region, can be implemented through S1012d-S1012e, as follows:
[0101] S1012d: Based on the amount of observational evidence corresponding to each initial prediction region, reliable prediction regions at each scale are selected from the N initial prediction regions.
[0102] The electronic device can determine the corresponding amount of observational evidence for each initial prediction region, then compare this amount with an evidence threshold, filtering out initial prediction regions with observational evidence exceeding the threshold. Alternatively, it can sort the observational evidence amounts of all initial prediction regions and filter out the initial prediction regions corresponding to the observational evidence amounts at the head of the sequence (e.g., the first 3, the first 1, etc.) to obtain reliable prediction regions. By performing the above process for each initial prediction region at each scale, the electronic device can obtain reliable prediction regions at each scale.
[0103] It should be noted that the amount of observational evidence corresponding to each initial prediction region refers to the amount of feature information obtained from the input image when determining each initial prediction region. Among the initial control parameters, there are parameters that are correlated with the amount of observational evidence. The electronic device can determine the amount of observational evidence for each initial prediction region based on these parameters (for example, by looking up a table, or by directly using the parameter as the amount of observational evidence).
[0104] S1012e. Determine at least one candidate region for the reliable prediction region at each scale, and determine at least one distributed control parameter among the N initial control parameters that corresponds to the reliable prediction region.
[0105] The electronic device identifies reliable prediction regions selected for each scale as candidate regions, thus obtaining at least one candidate region. Simultaneously, the electronic device filters initial control parameters from N initial control parameters, selecting those corresponding to the reliable prediction regions, and uses these filtered initial control parameters as the distributed control parameters corresponding to each candidate region. In this way, the electronic device obtains at least one distributed control parameter.
[0106] It is understandable that the amount of observational evidence can reflect the reliability of the initial prediction region to a certain extent. However, for prediction regions with very low reliability, there is no value in further reliability analysis. Therefore, in this embodiment, the initial prediction region will be screened based on the amount of observational evidence, and unreliable initial prediction regions will be eliminated to reduce the number of candidate regions that need to be analyzed for reliability in the future.
[0107] At this point, the electronic device has completed the process of determining candidate regions and their corresponding distribution control parameters based on region screening.
[0108] In other embodiments of this application, Figure 3S101, which is the process of determining at least one candidate region in the input image for the target object and determining at least one distribution control parameter corresponding to the at least one candidate region, can also be achieved through the following processing: using a region detection model, performing region prediction in the input image for the target object to obtain at least one candidate region, and calculating the similarity between each candidate region and a preset region, and using the control parameter of the region parameter of the preset region with the highest similarity as the distribution control parameter of each candidate region.
[0109] S102. Based on the distribution control parameters corresponding to each candidate region, perform reliability analysis on each candidate region to obtain the analysis information corresponding to each candidate region.
[0110] After obtaining the candidate regions and their corresponding distribution control parameters, the electronic device can use these parameters to analyze the reliability of each candidate region. Reliability here refers to the uncertainty of the candidate region, indicating its trustworthiness. The analyzed information obtained by the electronic device can explain the source of this uncertainty: whether it stems from noise in the input image or from the performance of the deep learning model used to predict the candidate region, and the extent of that impact. Therefore, the analyzed information provides insights into the influence of different factors on the reliability of the candidate regions.
[0111] It should be noted that when the probability distribution is different, the distribution control parameters corresponding to the candidate region will also be different. Therefore, the way to determine the analytical information corresponding to the candidate region based on the distribution control parameters will also be different.
[0112] In some embodiments of this application, the probability distribution includes a normal inverse gamma distribution defined by the mean and variance variables of the region parameters. In this case, the distribution control parameters include a central control parameter, a variance control parameter, a first variable control parameter, and a second variable control parameter.
[0113] It should be noted that the centrality control parameter is used to control the distribution center of the normal inverse gamma distribution, the variance control parameter is used to control the variance of the normal inverse gamma distribution, the first variable control parameter is used to control the central tendency of the variance variable in the normal inverse gamma distribution, and the second variable control parameter is used to control the central tendency of the mean variable in the normal inverse gamma distribution.
[0114] Based on this, see Figure 7 , Figure 7 This is a flowchart illustrating the target detection method provided in the embodiments of this application. Figure 5 In some embodiments of this application, Figure 3S102, which is the process of analyzing the reliability of each candidate region based on the distribution control parameters corresponding to each candidate region, and obtaining the analytical information corresponding to each candidate region, can be implemented through S1021-S1023, as follows:
[0115] S1021. Based on the variance control parameter and the first variable control parameter, determine the random influence factor for each candidate region.
[0116] The electronic device extracts variance control parameters and first variable control parameters from the distributed control parameters. Based on these two parameters, it estimates the random uncertainty for each candidate region and determines the resulting factor as the random influence factor. Thus, the random influence factor characterizes the random uncertainty of the candidate region (random uncertainty describes the inherent noise in the input image, which causes unavoidable errors and cannot be mitigated by increasing the input data), that is, the degree to which the candidate region is affected by the performance of the deep learning model during prediction.
[0117] In some embodiments, the specific process of determining the random impact factor of each candidate region based on the variance control parameter and the first variable control parameter can be achieved by the following steps: calculating the difference between the first variable control parameter and the preset factor to obtain the variable difference; and determining the ratio between the variance control parameter and the variable difference as the random impact factor for each candidate region.
[0118] The value of the preset factor can be set according to the actual situation, for example, it can be set to 1 or 3, and this embodiment of the application does not limit it. If the preset factor is set to 1, then the above calculation process is actually the calculation process of the variance of the mean variable of the normal inverse gamma distribution. Therefore, the obtained random influence factor is essentially the variance of the mean variable of the normal inverse gamma distribution.
[0119] For example, this application provides a formula for determining the random impact factor, see equation (1):
[0120]
[0121] Where β is the variance control parameter, α is the first variable control parameter, 1 is the preset factor, and Var[μ] is the random influence factor, which is the variance of the mean variable.
[0122] In other embodiments, the specific process of determining the random influence factor of each candidate region based on the variance control parameter and the first variable control parameter can be achieved by the following steps: searching a random factor table (which records different values of random factors for different variance control parameters and first variable control parameters) based on the variance control parameter and the first variable control parameter, and determining the found random factors as the random influence factor of each candidate region.
[0123] S1022. Based on the variance control parameter, the first variable control parameter, and the second variable control parameter, determine the cognitive influence factor for each candidate region.
[0124] The electronic device simultaneously extracts the variance control parameter, the first variable control parameter, and the second variable control parameter from the distributed control parameters. Combining the three parameters obtained, it estimates the cognitive uncertainty of each candidate region. The determined cognitive uncertainty (caused by poor model performance, which may be due to poor model training, insufficient training data, etc., and is unrelated to a single input image, and can be mitigated through targeted adjustments) is used as the cognitive influence factor for each candidate region.
[0125] In some embodiments, the cognitive influence factor of each candidate region is determined based on the variance control parameter, the first variable control parameter, and the second variable control parameter. This can be achieved through the following process: calculating the difference between the first variable control parameter and the preset factor to obtain the variable difference; multiplying the variable difference by the second variable control parameter to determine the variable product; and determining the ratio of the second variable control parameter to the variable product to determine the cognitive influence factor of each candidate region.
[0126] The value of the preset factor can be set according to the actual situation, and this application embodiment does not limit it. If the preset factor is set to 1, then the above calculation process is actually the calculation process of the expected value of the variance variable of the normal inverse gamma distribution. Therefore, the obtained cognitive influence factor is essentially the expected value of the variance variable of the normal inverse gamma distribution.
[0127] For example, this application provides a formula for calculating the cognitive influence factor, see equation (2):
[0128]
[0129] Where β is the variance control parameter, α is the first variable control parameter, γ is the second variable parameter, 1 is the preset factor, and E[σ] 2 [ ] is the cognitive influencing factor, which is the expected value of the variance variable.
[0130] In other embodiments, determining the cognitive influence factor for each candidate region based on the variance control parameter, the first variable control parameter, and the second variable control parameter can also be achieved through the following process: multiple initial influence factors corresponding to the variance control parameter are selected from multiple preset factors; based on the mean of the first and second variable control parameters, the multiple initial influence factors are selected again to obtain the cognitive influence factor. It should be noted that in the embodiments of this application, different values of the parameters will correspond to different initial influence factors.
[0131] S1023. Based on at least one of the random impact factor and the cognitive impact factor, perform reliability analysis on each candidate region to obtain the analysis information corresponding to each candidate region.
[0132] After obtaining the random impact factor and the cognitive impact factor, the electronic device can directly determine either the random impact factor or the cognitive impact factor as the analytical information of the candidate region, or it can determine the analytical information of the candidate region by weighted fusion of the random impact factor and the cognitive impact factor, so as to complete the analysis of the reliability of each candidate region. The embodiments of this application are not limited here.
[0133] In other embodiments of this application, the probability distribution includes a normal distribution, and the distribution control parameters include expectation and variance. In this case, Figure 3 S102, which is the process of reliably analyzing each candidate region based on the distribution control parameters corresponding to each candidate region, and obtaining the analytical information corresponding to each candidate region, can be achieved through the following processing: querying the information table according to the expectation and variance respectively, the information table stores different analytical information; and determining the analytical information that both the expectation and variance hit is the analytical information corresponding to each candidate region.
[0134] At this point, the electronic device has completed the process of reliably analyzing each candidate region.
[0135] S103. Based on at least one candidate region and at least one parsing information, determine the corresponding detection result for the target object.
[0136] After obtaining the parsing information corresponding to each candidate region, the electronic device combines the influence of different factors provided in the parsing information on the reliability of the candidate region, and determines the final detection result of the target object from the input image by filtering at least one candidate region or fusing at least one candidate region, that is, the region where the target object is actually located.
[0137] In some embodiments of this application, at least one candidate region includes multiple candidate regions, and at least one parsing information includes multiple parsing information. Figure 3 The specific process of S103, which is to determine the corresponding detection result for the target object based on at least one candidate region and at least one parsing information, can be achieved through the following processing: determine the corresponding reliability for each candidate region based on each parsing information; and determine the candidate region with the highest reliability among multiple candidate regions as the detection result corresponding to the target object.
[0138] The parsed information may include at least one of a cognitive influence factor (a factor describing cognitive uncertainty) and a random influence factor (a factor describing random uncertainty) for the candidate region. When both the cognitive influence factor and the random influence factor exist in numerical form, the electronic device can use the reciprocal of either the cognitive influence factor or the random influence factor as the reliability, or it can use the reciprocal of a weighted sum of the cognitive influence factor and the random influence factor as the reliability. When both the cognitive influence factor and the random influence factor exist in the form of levels, the electronic device can use a lookup table to find the table that provides the correspondence between influence factors and reliability levels, and use the reliability level of at least one of the cognitive influence factor and the random influence factor as the reliability level of each candidate region.
[0139] In other embodiments of this application, Figure 3 The specific process in S103, which involves determining the corresponding detection result for the target object based on at least one candidate region and at least one piece of parsing information, can also be achieved through the following processing: The electronic device matches multiple pieces of parsing information with preset information (matching can be achieved through similarity), and determines the candidate region corresponding to the parsing information that matches the preset information as the final detection result for the target object. At this point, the electronic device has completed the process of determining the final detection result for the target object.
[0140] Understandably, compared to related technologies, which lack modeling and analysis of uncertainties (such as cognitive uncertainty and random uncertainty) for prediction boxes at each scale, resulting in a lack of reliability source analysis for prediction boxes and ultimately leading to low accuracy of target detection results, in this embodiment, the electronic device, in addition to determining candidate regions for the target object, also determines the distribution control parameters of the probability distribution followed by the regional parameters of the candidate regions. It then uses these distribution control parameters to model and analyze the reliability of the candidate regions, obtaining analytical information that clearly defines the impact of different factors on the candidate regions. Finally, this analytical information provides guidance for determining the final detection result based on the candidate regions, reducing the possibility of errors in candidate region prediction affecting the final detection result, thus improving the accuracy of target detection.
[0141] In some embodiments of this application, at M scales, N initial prediction regions of the target object in the input image are predicted, along with N initial control parameters corresponding to the N initial prediction regions, and this is achieved through an information prediction model. The information prediction model is trained using labeled training images.
[0142] Figure 8 This is a schematic diagram illustrating the training process of the information prediction model provided in this application embodiment. See also... Figure 8 The information prediction model is obtained through the following processing:
[0143] S201. Using the initial detection model, at each of the M scales, predict the training prediction region where the training target object is located in the training image, and the training control parameters corresponding to the training prediction region.
[0144] In this embodiment of the application, the initial detection model can be an untrained neural network model or a neural network model pre-trained using unlabeled data.
[0145] S202. Based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, determine the loss value for each scale.
[0146] The training prediction region where the training target object is located in the training image is basically the same as the center control parameter in the training control parameters. Therefore, the electronic device can directly use the center control parameter in the training control parameters as the training prediction region to complete the prediction of the training prediction region.
[0147] In some embodiments, the loss value for each scale is determined based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale. This can be achieved by the following process: performing maximum likelihood estimation for each scale using the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, and determining the maximum likelihood estimate as the loss value for each scale.
[0148] For example, this application provides a formula for calculating the loss value (this formula corresponds to the case where the probability distribution is a normal inverse gamma distribution), see equation (3):
[0149]
[0150] Where γ is the second variable control parameter in the training control parameters, α is the first variable control parameter in the training control parameters, y is the labeled region, δ is the center control parameter in the training control parameters, and Ω = 2β(1+γ). F(·) represents the gamma function, and L is the loss value.
[0151] In other embodiments, the loss value for each scale is determined based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale. This can also be achieved by the following process: calculating the regional difference between the training prediction region and the labeled region of the training target object, and adjusting the regional difference through the training control parameters to obtain the loss value for each scale.
[0152] S203. Update the parameters of the initial detection model using the loss value at each scale until the model training termination condition is met, thus obtaining the information prediction model.
[0153] In this embodiment of the application, the model training termination condition may be that the loss value reaches the loss threshold or that the number of iterations during training reaches the number threshold. This embodiment of the application does not limit the condition.
[0154] At this point, the electronic device has completed the training process of the information prediction model, which makes it easier to directly predict the initial prediction region and initial control parameters from the input image using the information prediction model.
[0155] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0156] The embodiments of this application are implemented in the scenario of target recognition in medical images.
[0157] In this embodiment of the application, in addition to outputting the center position and bounding box length (collectively referred to as the initial prediction region) of the target (referred to as the target object), the deep learning model (referred to as the information prediction model) also outputs four parameters (δ, γ, α, β) of the normal inverse gamma distribution that the center position and bounding box length follow. That is, the center position and bounding box length follow the normal inverse gamma distribution controlled by the parameters (δ, γ, α, β). Then, uncertainty estimation is performed through these four parameters, and the subsequent bounding box selection process is guided by the uncertainty obtained from the estimation.
[0158] It should be noted that the overall inverse gamma distribution in this embodiment is defined by a mean variable and a variance variable, and its mean variable follows a normal distribution, i.e., μ ~ N(δ,σ). 2 γ -1 The variance variable follows an inverse gamma distribution, i.e., σ 2 ~Γ -1 (α,β).
[0159] When training a deep learning model, the electronic device fits the loss value at each scale through maximum likelihood estimation, so that the loss value can be shown in Equation (3).
[0160] In this embodiment, the concept of virtual observation in Bayesian learning is used to estimate uncertainty. Thus, the random uncertainty in this embodiment can be defined as the variance of the mean variable, which can be calculated by equation (1), and the cognitive uncertainty can be defined as the expectation of the variance variable, which can be calculated by equation (2).
[0161] In this application embodiment, two multi-scale collaborative target detection methods based on uncertainty are provided, including bounding box filtering based on uncertainty and bounding box fusion based on uncertainty.
[0162] Uncertainty-based bounding box selection essentially involves trimming bounding boxes with high uncertainty to obtain reliable bounding boxes with lower uncertainty (called reliable prediction regions). Then, based on the uncertainty level of these reliable bounding boxes, target detection bounding boxes (called detection results) at corresponding scales are selected. More specifically, the electronic device first calculates the amount of observation evidence based on α and γ, for example, using 2α+γ as the amount of observation evidence. Then, it compares the amount of observation evidence with a threshold τ. When 2α+γ<τ, the current bounding box at the current scale is determined to be unreliable and discarded. The remaining reliable bounding boxes (called reliable prediction regions) are used as candidate bounding boxes. Next, the uncertainty of the candidate bounding boxes (called candidate regions) at each scale is compared, that is, the uncertainty obtained by the above estimation method is compared, and the scale result with lower uncertainty is selected. At the same time, overlapping bounding boxes are removed, and the bounding box with the least uncertainty is retained as the final detection result.
[0163] Uncertainty-based bounding box fusion merges bounding boxes from multiple scales into a single bounding box containing multi-scale information. During fusion, the amount of observed evidence is used as the balancing weight. This is because if there is more observed evidence at a certain scale, its uncertainty is likely lower, and it should therefore have a larger weight in the fusion process; conversely, if there is less observed evidence, its weight should be reduced. The specific fusion process can be achieved using equation (4):
[0164]
[0165] Here, the bounding box at the i-th scale (called the initial predicted bounding box) is denoted as δ. i (This is because the bounding box has the same parameter δ as the normal inverse gamma distribution), and the amount of observed evidence can be expressed as γ. i and α i (This is because the amount of observed evidence is proportional to α and γ), but due to the use of α i This will result in a non-closed solution (mean δ) i From γ i α was obtained from virtual observations. i This represents a virtual observation when obtaining variance; therefore, only γ is selected. i (This also ensures the accuracy of fusion by serving as a weight), therefore, only γ is used in this embodiment. i As weights.
[0166] Meanwhile, to ensure the ability to estimate subsequent uncertainties, the electronic device also needs to fuse the remaining parameters of the normal inverse gamma distribution using closed-form solutions, so that the final fused bounding box still follows the normal inverse gamma distribution. Table 1 provides the fusion methods for the remaining parameters, namely γ, α, and β.
[0167] Table 1
[0168]
[0169] Finally, the electronic device estimates the uncertainty of the fused bounding box (called the scale fusion region) based on the fused parameters, and removes overlapping bounding boxes based on the uncertainty, that is, retains the bounding box with the minimum uncertainty as the final detection result.
[0170] At this point, the electronic device is able to complete the target detection process for medical images.
[0171] It is understood that in the embodiments of this application, user information is involved, such as input images, medical images and other related data. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0172] The following description continues to illustrate the exemplary structure of the target detection device 255 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the target detection device 255 in the memory 250 may include:
[0173] Information determination module 2551 is used to determine at least one candidate region in an input image for a target object, and to determine at least one distribution control parameter corresponding to at least one candidate region, wherein the distribution control parameter refers to a parameter that controls the probability distribution followed by the region parameters of the candidate region;
[0174] The reliability analysis module 2552 is used to analyze the reliability of each candidate region based on the distribution control parameters corresponding to each candidate region, and obtain the analysis information corresponding to each candidate region; wherein, the analysis information is used to provide the impact of different factors on the reliability of the candidate region;
[0175] The result determination module 2553 is used to determine the corresponding detection result for the target object based on at least one candidate region and at least one parsing information.
[0176] In some embodiments of this application, the information determination module 2551 is further configured to predict N initial prediction regions in the input image where the target object is located at M scales, and N initial control parameters corresponding to the N initial prediction regions; wherein M and N are both positive integers, and N≥M; and determine at least one candidate region and at least one distribution control parameter corresponding to the at least one candidate region based on the N initial prediction regions and the N initial control parameters.
[0177] In some embodiments of this application, the M scales include at least two scales; the information determination module 2551 is further configured to extract a prediction region to be fused from each of the N initial prediction regions for each scale; fuse at least two prediction regions to be fused to obtain a scale fusion region corresponding to at least two scales, and determine the scale fusion region as at least one of the candidate regions; fuse at least two initial control parameters corresponding to at least two prediction regions to be fused to obtain a fusion control parameter corresponding to the scale fusion region, and determine the fusion control parameter as at least one of the distribution control parameters.
[0178] In some embodiments of this application, the information determination module 2551 is further configured to, based on the amount of observation evidence corresponding to each initial prediction region, select reliable prediction regions at each scale from the N initial prediction regions; determine the reliable prediction regions at each scale as at least one candidate region; and determine the initial control parameters corresponding to the reliable prediction regions among the N initial control parameters as at least one distribution control parameter.
[0179] In some embodiments of this application, at least one candidate region includes multiple candidate regions, and at least one parsing information includes multiple parsing information; the result determination module 2553 is further configured to determine the corresponding reliability level for each candidate region based on each parsing information; and determine the candidate region with the highest reliability among the multiple candidate regions as the detection result corresponding to the target object.
[0180] In some embodiments of this application, the probability distribution includes: a normal inverse gamma distribution defined by the mean and variance variables of the region parameters; the distribution control parameters include: a center control parameter, a variance control parameter, a first variable control parameter, and a second variable control parameter; wherein, the center control parameter is used to control the distribution center of the normal inverse gamma distribution, the variance control parameter is used to control the variance of the normal inverse gamma distribution, the first variable control parameter is used to control the concentration of the variance variable in the normal inverse gamma distribution, and the second variable control parameter is used to control the concentration of the mean variable in the normal inverse gamma distribution.
[0181] In some embodiments of this application, the reliability analysis module 2552 is further configured to determine the random influence factor of each candidate region based on the variance control parameter and the first variable control parameter; determine the cognitive influence factor of each candidate region based on the variance control parameter, the first variable control parameter and the second variable control parameter; and perform reliability analysis on each candidate region according to at least one of the random influence factor and the cognitive influence factor to obtain the analysis information corresponding to each candidate region.
[0182] In some embodiments of this application, the reliability analysis module 2552 is further configured to perform difference calculation on the first variable control parameter and the preset factor to obtain the variable difference; and to determine the ratio between the variance control parameter and the variable difference as the random influence factor for each candidate region.
[0183] In some embodiments of this application, the reliability analysis module 2552 is further configured to perform difference calculation on the first variable control parameter and the preset factor to obtain the variable difference; to determine the product of the variable difference and the second variable control parameter as the variable product; and to determine the ratio of the second variable control parameter and the variable product as the cognitive influence factor for each candidate region.
[0184] In some embodiments of this application, the target detection device 255 further includes: a model training module 2554, configured to, using an initial detection model, predict the training prediction region of the training target object in the training image at each of the M scales, and the training control parameters corresponding to the training prediction region; determine the loss value at each scale based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale; and update the parameters of the initial detection model using the loss value at each scale until the model training termination condition is met, thereby obtaining the information prediction model.
[0185] In some embodiments of this application, the model training module 2554 is further configured to perform maximum likelihood estimation for each scale using the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, and determine the maximum likelihood estimate value as the loss value for each scale.
[0186] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the target detection method described in this application.
[0187] This application provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they cause the processor to execute the target detection method provided in this application. For example, ... Figure 3 The target detection method is shown.
[0188] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0189] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0190] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0191] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0192] In summary, through the embodiments of this application, in addition to determining candidate regions for the target object, the electronic device also determines the distribution control parameters of the probability distribution followed by the regional parameters of the candidate regions. By using the distribution control parameters to model and analyze the reliability of the candidate regions, analytical information is obtained that clarifies the impact of different factors on the candidate regions. Finally, the analytical information provides guidance for the process of determining the final detection result based on the candidate regions, reducing the possibility of the final detection result being affected when the candidate region prediction is incorrect, thereby improving the detection accuracy of the target.
[0193] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A target detection method, characterized in that, The method includes: For a target object, at least one candidate region is determined in an input image, and at least one distribution control parameter is determined corresponding to the at least one candidate region. The distribution control parameter is a parameter that controls the probability distribution followed by the region parameters of the candidate region. The probability distribution includes a normal inverse gamma distribution defined by the mean and variance variables of the region parameters. The distribution control parameter includes a variance control parameter, a first variable control parameter, and a second variable control parameter. The variance control parameter controls the variance of the normal inverse gamma distribution, the first variable control parameter controls the concentration of the variance variable in the normal inverse gamma distribution, and the second variable control parameter controls the concentration of the mean variable in the normal inverse gamma distribution. Based on the variance control parameter and the first variable control parameter, a random influence factor is determined for each candidate region; based on the variance control parameter, the first variable control parameter, and the second variable control parameter, a cognitive influence factor is determined for each candidate region; based on at least one of the random influence factor and the cognitive influence factor, reliability analysis is performed on each candidate region to obtain analytical information corresponding to each candidate region; wherein, the analytical information is used to provide the impact of different factors on the reliability of the candidate region; Based on at least one of the candidate regions and at least one of the parsing information, a corresponding detection result is determined for the target object.
2. The method according to claim 1, characterized in that, The step of determining at least one candidate region in the input image for the target object, and determining at least one distribution control parameter corresponding to at least one candidate region, includes: At M scales, N initial prediction regions of the target object in the input image are predicted, along with N initial control parameters corresponding to the N initial prediction regions; where M and N are both positive integers. ; Based on N initial prediction regions and N initial control parameters, at least one candidate region is determined, and at least one distribution control parameter corresponding to the at least one candidate region is determined.
3. The method according to claim 2, characterized in that, The M scales include: at least two scales; the determination of at least one candidate region and at least one distribution control parameter corresponding to the at least one candidate region based on the N initial prediction regions and the N initial control parameters includes: From the N initial prediction regions, the prediction regions to be fused are extracted for each scale; At least two predicted regions to be fused are fused to obtain a scale fused region corresponding to at least two scales, and the scale fused region is determined as at least one candidate region. At least two initial control parameters corresponding to at least two of the predicted regions to be fused are fused to obtain the fusion control parameters corresponding to the scale fusion region, and the fusion control parameters are determined as at least one of the distribution control parameters.
4. The method according to claim 2, characterized in that, The step of determining at least one candidate region and at least one distribution control parameter corresponding to at least one candidate region based on N initial prediction regions and N initial control parameters includes: Based on the amount of observational evidence corresponding to each initial prediction region, reliable prediction regions at each scale are obtained from the N initial prediction regions. The reliable prediction region at each scale is determined as at least one candidate region, and the initial control parameter corresponding to the reliable prediction region among the N initial control parameters is determined as at least one distribution control parameter.
5. The method according to any one of claims 1 to 4, characterized in that, At least one of the candidate regions includes: a plurality of candidate regions; at least one of the parsing information includes: a plurality of parsing information. The step of determining the corresponding detection result for the target object based on at least one candidate region and at least one parsed information includes: Based on each piece of parsed information, a corresponding level of reliability is determined for each candidate region; The candidate region with the highest reliability among the multiple candidate regions is determined as the detection result corresponding to the target object.
6. The method according to any one of claims 1 to 4, characterized in that, The distributed control parameters also include: central control parameters; The central control parameter is used to control the distribution center of the normal inverse gamma distribution.
7. The method according to claim 1, characterized in that, The step of determining the random influence factor for each candidate region based on the variance control parameter and the first variable control parameter includes: The difference between the first variable control parameter and the preset factor is calculated to obtain the variable difference. The ratio between the variance control parameter and the variable difference is determined as the random influence factor for each candidate region.
8. The method according to claim 1, characterized in that, The step of determining the cognitive influence factor for each candidate region based on the variance control parameter, the first variable control parameter, and the second variable control parameter includes: The difference between the first variable control parameter and the preset factor is calculated to obtain the variable difference. The product of the variable difference and the second variable control parameter is determined as the variable product; The ratio of the product of the second variable control parameter and the variable is determined as the cognitive influence factor for each candidate region.
9. The method according to claim 2, characterized in that, At M scales, N initial prediction regions of the target object in the input image are predicted, along with N initial control parameters corresponding to these N initial prediction regions. This is achieved through an information prediction model, which is obtained through the following processing: Using the initial detection model, at each of the M scales, the training prediction region where the training target object is located in the training image is predicted, as well as the training control parameters corresponding to the training prediction region; Based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, the loss value for each scale is determined; The parameters of the initial detection model are updated using the loss value at each scale until the model training termination condition is met, thus obtaining the information prediction model.
10. The method according to claim 9, characterized in that, The step of determining the loss value at each scale based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale includes: Using the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, maximum likelihood estimation is performed for each scale, and the maximum likelihood estimate is determined as the loss value for each scale.
11. A target detection device, characterized in that, The device includes: An information determination module is used to determine at least one candidate region in an input image for a target object, and to determine at least one distribution control parameter corresponding to the at least one candidate region. The distribution control parameter refers to a parameter that controls the probability distribution followed by the region parameters of the candidate region. The probability distribution includes a normal inverse gamma distribution defined by the mean and variance variables of the region parameters. The distribution control parameter includes a variance control parameter, a first variable control parameter, and a second variable control parameter. The variance control parameter is used to control the variance of the normal inverse gamma distribution, the first variable control parameter is used to control the concentration of the variance variable in the normal inverse gamma distribution, and the second variable control parameter is used to control the concentration of the mean variable in the normal inverse gamma distribution. The reliability analysis module is used to determine the random influence factor of each candidate region based on the variance control parameter and the first variable control parameter; determine the cognitive influence factor of each candidate region based on the variance control parameter, the first variable control parameter, and the second variable control parameter; and perform reliability analysis on each candidate region according to at least one of the random influence factor and the cognitive influence factor to obtain analysis information corresponding to each candidate region; wherein, the analysis information is used to provide the impact of different factors on the reliability of the candidate region; The result determination module is used to determine the corresponding detection result for the target object based on at least one of the candidate regions and at least one of the parsing information.
12. The apparatus according to claim 11, characterized in that, The information determination module is further configured to predict N initial prediction regions of the target object in the input image at M scales, and N initial control parameters corresponding to the N initial prediction regions; wherein M and N are both positive integers. Based on the N initial prediction regions and the N initial control parameters, at least one candidate region is determined, and at least one distribution control parameter corresponding to the at least one candidate region is determined.
13. The apparatus according to claim 12, characterized in that, The M scales include at least two scales; the information determination module is further configured to extract a prediction region to be fused from each of the N initial prediction regions for each scale; fuse the at least two prediction regions to be fused to obtain a scale fusion region corresponding to at least two scales, and determine the scale fusion region as at least one of the candidate regions; fuse the at least two initial control parameters corresponding to the at least two prediction regions to be fused to obtain a fusion control parameter corresponding to the scale fusion region, and determine the fusion control parameter as at least one of the distribution control parameters.
14. The apparatus according to claim 12, characterized in that, The information determination module is further configured to select reliable prediction regions at each scale from the N initial prediction regions based on the amount of observation evidence corresponding to each initial prediction region. The reliable prediction region at each scale is determined as at least one candidate region, and the initial control parameter corresponding to the reliable prediction region among the N initial control parameters is determined as at least one distribution control parameter.
15. The apparatus according to any one of claims 11 to 14, characterized in that, At least one of the candidate regions includes: a plurality of candidate regions; at least one of the parsing information includes: a plurality of parsing information. The result determination module is further configured to determine the corresponding reliability level for each candidate region based on each of the parsed information; and to determine the candidate region with the highest reliability among the multiple candidate regions as the detection result corresponding to the target object.
16. The apparatus according to any one of claims 11 to 14, characterized in that, The distribution control parameters further include: center control parameters; wherein, the center control parameters are used to control the distribution center of the normal inverse gamma distribution.
17. The apparatus according to claim 11, characterized in that, The reliability analysis module is further configured to calculate the difference between the first variable control parameter and the preset factor to obtain the variable difference; and to determine the ratio between the variance control parameter and the variable difference as the random influence factor for each candidate region.
18. The apparatus according to claim 11, characterized in that, The reliability analysis module is further configured to calculate the difference between the first variable control parameter and the preset factor to obtain the variable difference; to determine the product of the variable difference and the second variable control parameter as the variable product; and to determine the ratio of the second variable control parameter and the variable product as the cognitive influence factor for each candidate region.
19. The apparatus according to claim 12, characterized in that, The method involves predicting N initial prediction regions of the target object in the input image at M scales, and N initial control parameters corresponding to the N initial prediction regions, through an information prediction model. The apparatus further includes: a model training module, which is used to predict the training prediction region of the training target object in the training image and the training control parameters corresponding to the training prediction region at each of the M scales using an initial detection model; determine the loss value for each scale based on the training control parameters, the training prediction region, and the labeled region of the training target object at each scale; and update the parameters of the initial detection model using the loss value at each scale until the model training termination condition is met, thereby obtaining the information prediction model.
20. The apparatus according to claim 19, characterized in that, The model training module is further configured to perform maximum likelihood estimation for each scale using the training control parameters, the training prediction region, and the labeled region of the training target object at each scale, and to determine the maximum likelihood estimate as the loss value for each scale.
21. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the target detection method according to any one of claims 1 to 10.
22. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by a processor, they implement the target detection method according to any one of claims 1 to 10.
23. A computer program product, comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, the target detection method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Target tracking method and device, computer equipment and storage medium
CN111275741A