Confidence coefficient threshold determination method and device and electronic equipment
By obtaining the area of the target recognition frame and determining the confidence threshold based on different shooting parameters, the problem of low recognition accuracy caused by the fixed confidence threshold is solved, and more efficient and accurate confidence threshold determination is achieved, which improves the recognition accuracy.
Patent Information
- Application Number
- CN202411539602.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-11
AI Technical Summary
When identifying objects for images with different shooting conditions, since the confidence threshold is fixed, it is impossible to flexibly adjust according to different shooting conditions, resulting in low recognition accuracy.
By obtaining the object recognition box area of the object to be identified in the target image selected by box selection, the target confidence threshold for identification is determined based on the area, and the threshold value is determined based on the different confidence levels corresponding to the different recognition box areas corresponding to different shooting parameters.
It realizes automatic determination of the confidence threshold of the image based on different shooting conditions, improves the determination efficiency and accuracy of the confidence threshold, reduces false positives, and improves the accuracy of identifying objects.
Smart Images

Figure CN119600081A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and in particular relates to a confidence threshold determination method, device and electronic equipment. Background Art
[0002] In an image recognition scenario, an image recognition algorithm is generally used to identify objects in an image, and an output result of the recognition algorithm is related to a confidence threshold associated with the recognition.
[0003] In the related art, when identifying an object to be identified, an identification box including image information of the object to be identified is generally selected in an image including image information of the object to be identified, and the object to be identified is identified based on the identification box. The confidence thresholds corresponding to identification boxes of different sizes are generally fixed thresholds.
[0004] The recognition frame and the confidence threshold generally correspond one to one. In the related art, when identifying the object to be identified in multiple images with different shooting conditions and corresponding objects to be identified, the recognition frame of the same size is used by default, that is, the same confidence threshold is used by default, so that the confidence threshold cannot be flexibly adjusted according to different shooting conditions. When identifying the object to be identified, there are many false positives and the recognition accuracy is low. Summary of the invention
[0005] The embodiment of the present application provides an implementation scheme different from the prior art to solve the technical problem that when performing object recognition on images with different shooting conditions, the confidence threshold is fixed and it is impossible to flexibly adjust the confidence threshold according to different shooting conditions, resulting in poor recognition accuracy when identifying the object.
[0006] In a first aspect, the present application provides a confidence threshold determination method, comprising: obtaining a target recognition frame area of an object to be identified in a framed target image; determining a target confidence threshold for identifying the object to be identified based on the target recognition frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different recognition frame areas corresponding to different shooting parameters.
[0007] In a second aspect, the present application provides a confidence threshold determination device, comprising: an acquisition unit, used to acquire a target recognition frame area of an object to be identified in a framed target image; a determination unit, used to determine a target confidence threshold for identifying the object to be identified based on the target recognition frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different recognition frame areas corresponding to different shooting parameters.
[0008] In a third aspect, the present application provides an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any method in the first aspect or any possible implementation manner of the first aspect by executing the executable instructions.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements any method in the first aspect or any possible implementation manner of the first aspect.
[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect or any possible implementation manner of the first aspect.
[0011] The solution provided by the present application obtains the target recognition frame area of the object to be recognized in the framed target image; and determines the target confidence threshold for recognizing the object to be recognized based on the target recognition frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different recognition frame areas corresponding to different shooting parameters. The confidence threshold of the current image is automatically determined based on different shooting conditions, which improves the efficiency and accuracy of determining the confidence threshold, thereby improving the false alarm of the object and improving the accuracy of recognizing the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0013] Figure 1 A flowchart of a confidence threshold determination method provided in one embodiment of the present application;
[0014] Figure 2 A schematic diagram of the structure of a confidence threshold determination device provided in one embodiment of the present application;
[0015] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, but cannot be understood as limiting the present application.
[0017] The terms "first" and "second" etc. in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0018] In an image recognition scenario, an image recognition algorithm is generally used to identify objects in an image, and an output result of the recognition algorithm is related to a confidence threshold associated with the recognition.
[0019] In the related art, when identifying an object to be identified, an identification box including the image information of the object to be identified is generally selected in an image including the image information of the object to be identified, and the object to be identified is identified based on the identification box. The confidence thresholds corresponding to identification boxes of different sizes are generally determined manually based on a large amount of sample data. The process of determining the confidence threshold is relatively complicated, takes a long time, and has a low determination efficiency.
[0020] The recognition box and the confidence threshold generally correspond one to one. In the related art, when identifying the object to be identified in multiple images with different shooting conditions and corresponding objects to be identified, the same confidence threshold is used by default, which makes it impossible to flexibly adjust the confidence threshold according to different shooting conditions, resulting in low recognition accuracy when identifying the object to be identified.
[0021] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0022] Figure 1 A flow chart of a confidence threshold determination method provided by an exemplary embodiment of the present application is provided. The method comprises the following steps S101-S102:
[0023] S101, obtaining the target recognition frame area of the object to be recognized in the frame-selected target image;
[0024] Optionally, the method is applicable to a monitoring camera device, such as a camera device for shooting at a fixed position, and may also be applicable to an image processing device including a camera device and a server or only including a camera device.
[0025] Optionally, in the aforementioned S101, obtaining the target recognition frame area of the object to be recognized in the frame-selected target image includes:
[0026] The target recognition frame area of the object to be recognized in the framed target image is obtained by a target detection algorithm, wherein the target recognition frame area is the area corresponding to the minimum recognition frame that contains all features of the object to be recognized. S102, based on the target recognition frame area, a target confidence threshold for recognizing the object to be recognized is determined, wherein the target confidence threshold is determined based on different confidences corresponding to different recognition frame areas corresponding to different shooting parameters.
[0027] In a specific implementation, different target recognition frame areas correspond to different shooting parameters, and different shooting parameter intervals correspond to different confidence levels. By using different confidence levels corresponding to different recognition frame areas corresponding to different shooting parameters, the target confidence threshold when the target recognition frame area identifies the object to be identified is determined. This allows the confidence threshold of the object to be identified in the current image to be automatically determined based on different shooting conditions, thereby improving the efficiency and accuracy of determining the confidence threshold, thereby improving the false alarm situation of the object and improving the accuracy of identifying the object.
[0028] In some optional embodiments of the present application, in the aforementioned S103, the determining of the target confidence threshold for identifying the object to be identified based on the area of the target identification frame includes the following S1031-S1032:
[0029] S1031, obtaining a first preset corresponding relationship, wherein the first preset corresponding relationship includes a plurality of identification box areas and a confidence threshold corresponding to each identification box area;
[0030] S1032: Determine a target confidence threshold for identifying the object to be identified based on the first preset corresponding relationship and the area of the target identification frame.
[0031] Optionally, in S1032, based on the first preset correspondence, the target confidence threshold for identifying the object to be identified is determined based on the target identification box area, including: according to the first preset correspondence, the confidence threshold corresponding to the identification box area that is the same as the target identification box area is used as the target confidence threshold for identifying the object to be identified.
[0032] In some optional embodiments of the present application, the method further includes: determining, for each recognition frame area among the multiple recognition frame areas, a confidence threshold corresponding to the recognition frame area, and determining the first preset correspondence relationship based on each recognition frame area and the confidence threshold corresponding to each recognition frame area. Specifically, for each recognition frame area among the multiple recognition frame areas, "determining the confidence threshold corresponding to the recognition frame area" is performed, wherein the recognition frame area in "determining the confidence threshold corresponding to the recognition frame area" refers to the recognition frame area among the multiple recognition frame areas that is undergoing determination processing.
[0033] Optionally, the determining a confidence threshold corresponding to the area of the identification box includes the following steps S01-S03:
[0034] S01, calculating the square root of the area of the identification frame to obtain the target shooting parameter corresponding to the area of the identification frame;
[0035] S02, obtaining a plurality of preset shooting parameter intervals and a confidence threshold corresponding to each shooting parameter interval;
[0036] In some optional embodiments of the present application, regarding the manner of determining each shooting parameter interval, the method further includes the following S001-S003:
[0037] S001, obtaining the preset areas of multiple sample recognition frames;
[0038] S002, determining a plurality of sample shooting parameters corresponding to the plurality of sample identification frame areas based on the plurality of sample identification frame areas;
[0039] Optionally, the sample identification frame area corresponds to the sample shooting parameter one by one.
[0040] Optionally, for each sample identification frame area, when the sample shooting parameter corresponding to the sample identification frame area is the shooting distance, determining the corresponding sample shooting parameter based on the sample identification frame area specifically includes:
[0041] The square root of the area of the sample identification frame is used as the shooting distance corresponding to the area of the sample identification frame.
[0042] Optionally, the shooting distance refers to the distance between the image processing device and the object to be identified.
[0043] Optionally, the error of estimating the shooting distance based on the square root of the area is relatively large, but the present application does not require high accuracy of the distance, and only needs to know the relative distance relationship between objects, so in the present application, the error can be ignored. In some other embodiments, the shooting distance can be calculated by other methods with higher calculation accuracy in the prior art, which will not be described in detail here.
[0044] S003. Partition the multiple sample shooting parameters to obtain the multiple shooting parameter intervals.
[0045] In some optional embodiments of the present application, in S003, the multiple sample shooting parameters are shooting distances, and partitioning the multiple sample shooting parameters to obtain the multiple shooting parameter intervals includes:
[0046] The maximum distance and the minimum distance among the plurality of sample shooting parameters are obtained, a distance range is determined based on the maximum distance and the minimum distance, and the distance range is equally divided based on a preset number of intervals to obtain the plurality of shooting parameter intervals.
[0047] In some optional embodiments of the present application, the method further includes: determining, for each shooting parameter interval in the multiple shooting parameter intervals, a confidence threshold corresponding to the shooting parameter interval;
[0048] Specifically, for each of the multiple shooting parameter intervals, "determining the confidence threshold corresponding to the shooting parameter interval" is performed, wherein the shooting parameter interval in "determining the confidence threshold corresponding to the shooting parameter interval" refers to the shooting parameter interval that is being determined among the multiple shooting parameter intervals.
[0049] Optionally, the determining the confidence threshold corresponding to the shooting parameter interval includes the following steps S2-S6:
[0050] S2, obtaining the sample confidence corresponding to each sample identification frame area among the multiple sample identification frame areas;
[0051] Specifically, the sample confidence corresponding to the area of each sample identification frame can be determined by a second preset corresponding relationship.
[0052] S3, determining a target sample parameter belonging to the shooting parameter interval from the plurality of sample shooting parameters;
[0053] S4, determining a target sample area corresponding to the target sample parameter from the areas of the multiple sample identification frames;
[0054] S5. Obtain the target sample confidence corresponding to the target sample area; specifically, the second preset correspondence includes each sample identification frame area and the sample confidence corresponding to the sample identification frame area. In S5, obtaining the target sample confidence corresponding to the target sample area may include: using the sample confidence corresponding to the sample identification frame area that is the same as the target sample area in the second preset correspondence as the target sample confidence corresponding to the target sample area.
[0055] S6. Determine a confidence threshold corresponding to the shooting parameter interval based on the target sample confidence.
[0056] In some optional embodiments of the present application, when there are multiple target sample confidences, and the target sample corresponding to each target sample confidence in the multiple target sample confidences is collected based on a moving object, in S6, determining the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence includes the following steps S61-S63:
[0057] S61, calculating a first mean of the confidence of the target sample;
[0058] The aforementioned S61 can be calculated by the following formula:
[0059]
[0060] Among them, n d is the number of target sample confidences; c j refers to the confidence of the jth target sample; μ i|d Refers to the first mean of the target sample confidence.
[0061] S62, determining a first variance based on the first mean and the target sample confidence;
[0062] The aforementioned S62 can be calculated by the following formula:
[0063]
[0064] Among them, σ i|d refers to the first variance; μ i|d Refers to the first mean of the target sample confidence. n d is the number of target sample confidences; c j Refers to the confidence of the j-th target sample.
[0065] S63: Determine a confidence threshold corresponding to the shooting parameter interval based on the first mean and the first variance.
[0066] In some optional embodiments of the present application, when the target sample is collected based on a stationary object, in S63, determining the confidence threshold corresponding to the shooting parameter interval based on the first mean and the first variance includes the following steps S631-S632:
[0067] S631, obtaining preset sensitivity information, where the sensitivity information is used to indicate the detection accuracy of the image processing device;
[0068] S632: Determine a confidence threshold corresponding to the shooting parameter interval based on the sensitivity information, the first mean, and the first variance.
[0069] The aforementioned S632 can be calculated by the following formula:
[0070] Confidence threshold corresponding to the shooting parameter interval = μ-α*σ
[0071] Among them, μ is the first mean, α is the sensitivity information, where α varies in the range of [0,1.0], and the larger the value, the more sensitive the detection is, and σ is the first variance.
[0072] Optionally, after obtaining the first mean and the first variance, the method further includes the following steps S701-S702:
[0073] S701, determining a confidence probability distribution of the shooting parameter interval based on the first mean and the first variance;
[0074] Optionally, determining the confidence probability distribution of the shooting parameter interval based on the first mean and the first variance includes:
[0075] The confidence probability distribution of the shooting parameter interval is determined based on the first mean and the square of the first variance.
[0076] Specifically, the confidence probability distribution of the shooting parameter interval determined based on the first mean and the square of the first variance can be calculated by the following formula:
[0077]
[0078] Among them, P i|d is the confidence probability distribution of the shooting parameter interval. For the explanation of other characters in the above formula, please refer to the above content and will not be repeated here.
[0079] Optionally, the confidence probability distribution may be a Gaussian distribution (normal distribution). In some scenarios, other probability models may also be used, such as Poisson distribution, binomial distribution, etc.
[0080] S702: Determine an interval confidence level corresponding to the shooting parameter interval based on a confidence level probability distribution.
[0081] In summary, it can be seen that the interval confidence of the shooting parameter interval is determined by using multiple confidences belonging to the shooting parameter interval, so that the accuracy of the interval confidence is relatively high.
[0082] Optionally, the interval confidence level and the confidence level threshold corresponding to the aforementioned shooting parameter interval have the same meaning, and both are confidence level thresholds corresponding to the shooting parameter interval.
[0083] Optionally, the determining of the interval confidence corresponding to the shooting parameter interval based on the confidence probability distribution in S702 includes the following steps S7021-S7022:
[0084] S7021. Obtain preset sensitivity information, where the sensitivity information is used to indicate the detection accuracy of the image processing device;
[0085] S7022. Determine an interval confidence level corresponding to the shooting parameter interval based on the sensitivity information and the confidence level probability distribution.
[0086] Optionally, the aforementioned S7022 can be calculated by the following formula:
[0087] Interval confidence level = μ i|d -α*σ i|d
[0088] Among them, μ i|d is the first mean value in the confidence probability distribution corresponding to the shooting parameter interval, σ i|d is the first variance corresponding to the shooting parameter interval in the confidence probability distribution. α is the sensitivity information.
[0089] In some optional embodiments of the present application, when there are multiple target sample confidences, and the target sample corresponding to each target sample confidence in the multiple target sample confidences is collected based on a moving object, in S6, determining the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence includes the following S31-S34:
[0090] S31, calculating a first sum and a first square sum of the confidences of the target samples;
[0091] Optionally, the first sum of the target sample confidences may be calculated using the following formula:
[0092]
[0093] in, For the first and is the number of target sample confidences, c j Refers to the confidence of the j-th target sample.
[0094] Optionally, the first sum of squares of the target sample confidences may be calculated using the following formula:
[0095]
[0096] in, is the first sum of squares, is the number of target sample confidences, Refers to the square value of the confidence of the j-th target sample.
[0097] S32, determining a second mean based on the first sum and the number of confidences of the target sample;
[0098] Optionally, the aforementioned S32 can be calculated by the following formula:
[0099]
[0100] in, is the second mean. The meanings of other characters in the formula here can refer to the above explanations about related characters.
[0101] S33, determining a second variance based on the first sum, the first sum of squares, and the number of confidence levels of the target sample;
[0102] Optionally, the aforementioned S33 can be calculated by the following formula:
[0103]
[0104] in, is the second variance. The meanings of other characters in the formula here can be found in the above explanations of related characters.
[0105] S34. Determine a confidence threshold corresponding to the shooting parameter interval based on the second mean and the second variance.
[0106] Optionally, in the aforementioned S34, determining a confidence threshold corresponding to the shooting parameter interval based on the second mean and the second variance includes the following steps S0041-S0042:
[0107] S0041. Obtaining preset sensitivity information, where the sensitivity information is used to indicate the detection accuracy of the image processing device;
[0108] S0042. Determine a confidence threshold corresponding to the shooting parameter interval based on the sensitivity information, the second mean, and the second variance.
[0109] Optionally, in S0042, the confidence threshold corresponding to the shooting parameter interval determined based on the sensitivity information, the second mean, and the second variance may be calculated by the following formula:
[0110] Confidence threshold = μ-α*σ
[0111] Among them, μ is the second mean, α is the sensitivity information, where α varies in the range of [0,1.0], and the larger the value, the more sensitive the detection is, and σ is the second variance.
[0112] S03: Using the confidence threshold corresponding to the target shooting parameter interval in which the target shooting parameter is located among the multiple shooting parameter intervals as the confidence threshold corresponding to the identification frame area.
[0113] In some optional embodiments of the present application, the method further includes: identifying the object to be identified based on the target confidence threshold.
[0114] In order to improve the accuracy of the target confidence threshold corresponding to the target recognition frame area, the sub-recognition frame area of the real-time recognition of the object to be recognized containing motion and the sub-confidence corresponding to the sub-recognition frame area are used as update samples to update the confidence threshold corresponding to the shooting parameter interval. The method further includes the following S0001-S0004:
[0115] S0001, determining a moving object to be identified among the objects to be identified;
[0116] S0002, determining the area of a sub-recognition frame for identifying the moving object to be identified, taking the area of the sub-recognition frame as a sample recognition frame area, and adding the sub-recognition frame area to the multiple sample recognition frame areas;
[0117] S0003, obtaining a sub-confidence corresponding to the area of the sub-identification frame, and using the sub-confidence as a sample confidence corresponding to the area of the sub-identification frame;
[0118] S0004. Execute the aforementioned steps S3-S6 to obtain the confidence threshold corresponding to the shooting parameter interval.
[0119] In summary, by taking the sub-recognition frame area of the moving object to be identified in real-time and the sub-confidence corresponding to the recognition frame area as samples, and updating the confidence threshold corresponding to the shooting parameter interval, the confidence threshold corresponding to the shooting parameter interval can be updated as the number and type of samples increase, thereby improving the accuracy of the confidence threshold corresponding to the shooting parameter interval.
[0120] Optionally, the recognition box can be used to select objects with relatively fixed shapes, such as human heads, vehicles, etc. For objects with non-fixed shapes, the non-fixed objects can be described by two-dimensional variables, such as the width and aspect ratio of the recognition box. For non-fixed objects, the two-dimensional variables need to be discretized.
[0121] Optionally, the method can be applied to detect multi-dimensional attributes of objects, such as head detection (one-dimensional attribute, distance), human figure detection (two-dimensional attribute, distance, shape), and higher-dimensional attributes, such as three-dimensional and four-dimensional, such as flame detection (three-dimensional attribute, distance, shape, brightness). Among them, the confidence threshold can be determined by the distance attribute (one-dimensional attribute) when applied to one-dimensional attributes, and the confidence threshold can be determined by referring to the method of determining the confidence threshold of one-dimensional attributes for other dimensional attributes. The attributes of an object are not limited to distance, shape, and brightness.
[0122] In summary, this solution obtains the target recognition frame area of the object to be recognized in the framed target image; determines the target confidence threshold for recognizing the object to be recognized based on the target recognition frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different recognition frame areas corresponding to different shooting parameters. This realizes automatic determination of the confidence threshold based on different shooting conditions (shooting distances), improves the determination efficiency, improves the accuracy of the confidence threshold, thereby reducing false positives and improving the accuracy of object recognition.
[0123] Specifically, the confidence threshold determination method proposed in this scheme can be applied in monitoring scenarios by discretizing the statistical confidence distribution of attributes and determining the confidence threshold based on the confidence distribution and the attribute value of the detection object. The confidence distribution can be updated through real-time statistics to obtain a more appropriate confidence threshold for the captured scene, thereby effectively reducing the false alarms of the target detection algorithm, and there is no need for technical personnel to experiment with the statistical confidence distribution in advance, thereby improving the accuracy and efficiency of object recognition.
[0124] Figure 2 A schematic diagram of a confidence threshold determination device provided for an exemplary embodiment of the present application; comprising:
[0125] An acquisition unit 21 is used to acquire the target recognition frame area of the object to be recognized in the frame-selected target image;
[0126] The determination unit 22 is used to determine a target confidence threshold for identifying the object to be identified based on the target identification frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different identification frame areas corresponding to different shooting parameters.
[0127] Optionally, the device is used to determine the target confidence threshold for identifying the object to be identified based on the target identification frame area, specifically for: obtaining a first preset correspondence relationship, the first preset correspondence relationship including multiple identification frame areas and confidence thresholds corresponding to each identification frame area; determining the target confidence threshold for identifying the object to be identified based on the first preset correspondence relationship and the target identification frame area.
[0128] Optionally, the device determines, for each identification frame area among the multiple identification frame areas, a confidence threshold corresponding to the identification frame area, and determines the first preset corresponding relationship based on each identification frame area and the confidence threshold corresponding to each identification frame area; in determining the confidence threshold corresponding to the identification frame area, it is specifically used to: calculate the square root of the identification frame area to obtain the target shooting parameter corresponding to the identification frame area; obtain multiple preset shooting parameter intervals and the confidence threshold corresponding to each shooting parameter interval; and use the confidence threshold corresponding to the target shooting parameter interval in the multiple shooting parameter intervals as the confidence threshold corresponding to the identification frame area.
[0129] Optionally, the device is also used to obtain multiple preset sample identification frame areas; determine multiple sample shooting parameters corresponding to the multiple sample identification frame areas based on the multiple sample identification frame areas; partition the multiple sample shooting parameters to obtain the multiple shooting parameter intervals; for each shooting parameter interval in the multiple shooting parameter intervals, determine the confidence threshold corresponding to the shooting parameter interval; wherein, the determination of the confidence threshold corresponding to the shooting parameter interval is specifically used to: obtain the sample confidence corresponding to each sample identification frame area in the multiple sample identification frame areas; determine the target sample parameters belonging to the shooting parameter interval from the multiple sample shooting parameters; determine the target sample area corresponding to the target sample parameters from the multiple sample identification frame areas; obtain the target sample confidence corresponding to the target sample area; and determine the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence.
[0130] Optionally, when the target sample confidence is multiple, the device is used to determine the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence, specifically for: calculating a first mean of the target sample confidence; determining a first variance based on the first mean and the target sample confidence; determining the confidence threshold corresponding to the shooting parameter interval based on the first mean and the first variance.
[0131] Optionally, the device is used to determine the confidence threshold corresponding to the shooting parameter interval based on the first mean and the first variance, specifically for: obtaining preset sensitivity information, the sensitivity information being used to indicate the detection accuracy of the image processing device; and determining the confidence threshold corresponding to the shooting parameter interval based on the sensitivity information, the first mean, and the first variance.
[0132] Optionally, when the target sample confidence is multiple, the device is used to determine the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence, specifically for: calculating a first sum and a first sum of squares of the target sample confidences; determining a second mean based on the first sum and the number of target sample confidences; determining a second variance based on the first sum, the first sum of squares, and the number of target sample confidences; and determining the confidence threshold corresponding to the shooting parameter interval based on the second mean and the second variance.
[0133] Optionally, the multiple sample shooting parameters in the device are shooting distances, and the device is used to partition the multiple sample shooting parameters to obtain the multiple shooting parameter intervals, specifically for: obtaining the maximum distance and the minimum distance among the multiple sample shooting parameters, determining the distance range based on the maximum distance and the minimum distance, and equally dividing the distance range based on a preset number of intervals to obtain the multiple shooting parameter intervals.
[0134] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here. Specifically, the device may perform the above method embodiment, and the above and other operations and / or functions of each module in the device are the corresponding processes in each method in the above method embodiment, respectively, and no further description is given here for the sake of brevity.
[0135] The above describes the device of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0136] Figure 3 is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:
[0137] The memory 301 and the processor 302, the memory 301 is used to store the computer program and transmit the program code to the processor 302. In other words, the processor 302 can call and run the computer program from the memory 301 to implement the method in the embodiment of the present application.
[0138] For example, the processor 302 may be configured to execute the above method embodiments according to instructions in the computer program.
[0139] In some embodiments of the present application, the processor 302 may include but is not limited to:
[0140] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0141] In some embodiments of the present application, the memory 301 includes but is not limited to:
[0142] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0143] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0144] like Figure 3 As shown, the electronic device may also include:
[0145] The transceiver 303 may be connected to the processor 302 or the memory 301 .
[0146] The processor 302 may control the transceiver 303 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include an antenna, and the number of antennas may be one or more.
[0147] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0148] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0149] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0150] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0151] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0152] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0153] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A confidence threshold determination method, characterized in that: include: Obtain the target recognition frame area of the object to be recognized in the frame-selected target image; A target confidence threshold for identifying the object to be identified is determined based on the target identification frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different identification frame areas corresponding to different shooting parameters.
2. The method according to claim 1, characterized in that The step of determining a target confidence threshold for identifying the object to be identified based on the target identification frame area includes: Acquire a first preset corresponding relationship, wherein the first preset corresponding relationship includes a plurality of identification box areas and a confidence threshold corresponding to each identification box area; A target confidence threshold for identifying the object to be identified is determined based on the first preset corresponding relationship and the area of the target identification frame.
3. The method according to claim 2, characterized in that The method further includes: determining, for each identification frame area of the plurality of identification frame areas, a confidence threshold corresponding to the identification frame area, and determining the first preset corresponding relationship based on each identification frame area and the confidence threshold corresponding to each identification frame area; The determining of the confidence threshold corresponding to the area of the identification frame includes: Calculating the square root of the area of the identification frame to obtain the target shooting parameter corresponding to the area of the identification frame; Obtaining a plurality of preset shooting parameter intervals and a confidence threshold corresponding to each shooting parameter interval; The confidence threshold corresponding to the target shooting parameter interval in which the target shooting parameter is located among the multiple shooting parameter intervals is used as the confidence threshold corresponding to the identification frame area.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining preset areas of multiple sample recognition frames; Determine a plurality of sample shooting parameters corresponding to the plurality of sample identification frame areas based on the plurality of sample identification frame areas; Partitioning the plurality of sample shooting parameters to obtain the plurality of shooting parameter intervals; For each shooting parameter interval among the multiple shooting parameter intervals, determining a confidence threshold corresponding to the shooting parameter interval; Wherein, determining the confidence threshold corresponding to the shooting parameter interval includes: Obtaining the sample confidence corresponding to each sample identification frame area among the multiple sample identification frame areas; Determining, from the plurality of sample shooting parameters, target sample parameters belonging to the shooting parameter interval; Determining a target sample area corresponding to the target sample parameter from the multiple sample identification frame areas; Obtaining the target sample confidence corresponding to the target sample area; A confidence threshold corresponding to the shooting parameter interval is determined based on the target sample confidence.
5. The method according to claim 4, characterized in that When there are multiple target sample confidence levels, determining the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence level includes: Calculating a first mean of the target sample confidences; Determine a first variance based on the first mean and the target sample confidence; A confidence threshold corresponding to the shooting parameter interval is determined based on the first mean and the first variance.
6. The method according to claim 5, characterized in that The determining, based on the first mean and the first variance, a confidence threshold corresponding to the shooting parameter interval includes: Acquiring preset sensitivity information, where the sensitivity information is used to indicate the detection accuracy of the image processing device; A confidence threshold corresponding to the shooting parameter interval is determined based on the sensitivity information, the first mean, and the first variance.
7. The method according to claim 4, characterized in that When there are multiple target sample confidence levels, determining the confidence threshold corresponding to the shooting parameter interval based on the target sample confidence level includes: Calculating a first sum and a first sum of squares of the target sample confidences; Determining a second mean based on the first sum and the target sample confidence level; determining a second variance based on the first sum, the first sum of squares, and the number of target sample confidences; A confidence threshold corresponding to the shooting parameter interval is determined based on the second mean and the second variance.
8. The method according to claim 4, characterized in that The multiple sample shooting parameters are shooting distances, and the partitioning of the multiple sample shooting parameters to obtain the multiple shooting parameter intervals includes: The maximum distance and the minimum distance among the plurality of sample shooting parameters are obtained, a distance range is determined based on the maximum distance and the minimum distance, and the distance range is equally divided based on a preset number of intervals to obtain the plurality of shooting parameter intervals.
9. A confidence threshold determination device, characterized in that: include: An acquisition unit, used for acquiring a target recognition frame area of an object to be recognized in a frame-selected target image; A determination unit is used to determine a target confidence threshold for identifying the object to be identified based on the target identification frame area, wherein the target confidence threshold is determined based on different confidences corresponding to different identification frame areas corresponding to different shooting parameters.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.
Citation Information
Cited By
Edge gateway parameter configuration and optimization method for reducing false alarm rate of video AI identification
CN120223525A