Recognition frame de-weighting method and device in image, electronic equipment and storage medium

By segmenting the filter rod image output from the filter rod recognition model and deduplication processing, the problem of inefficiency of the existing NMS method is solved, and the efficiency and accuracy of deduplication of the recognition frame is achieved.

CN120147344APending Publication Date: 2025-06-13CHINA TOBACCO GUANGDONG IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510311542.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the existing filter rod identification methods, the speed of the non-maximum suppression (NMS) process still needs to be improved, especially in the process of automatically identifying filter rods, the time complexity of the traditional NMS method is O(n2), resulting in inefficiency.

Method used

By obtaining the filter rod image and recognition frame information output from the filter rod recognition model, the filter rod image is segmented by the preset image segmentation method, the single removal range of the redundant recognition frame is reduced, and the recognition frame in the segmented image is deduplicated based on the preset redundant recognition frame removal method.

Benefits of technology

While ensuring the accuracy of the deduplication of the identification box, the efficiency of the deduplication of the redundant identification box is significantly improved and the time complexity is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147344A_ABST
    Figure CN120147344A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and a device for removing duplicate of an identification frame in an image, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first filter stick image output by a filter stick identification model and information of each first identification frame in the first filter stick image; the first identification frame information comprises a first identification frame coordinate and a first identification frame confidence coefficient; performing image segmentation on the first filter stick image based on a preset image segmentation mode to obtain at least one group of second filter stick images; based on a preset redundant recognition frame removal mode and the first recognition frame information corresponding to each group of second filter stick images, performing duplicate removal processing on the first recognition frame in each group of second filter stick images, and determining each piece of second recognition frame information corresponding to the first filter stick images. Through the technical scheme of the embodiment of the invention, the redundant recognition frame in the image can be accurately and conveniently deduplicated, and the efficiency of deduplication of the redundant recognition frame in the image is improved while the accuracy of deduplication of the redundant recognition frame in the image is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer vision technology, and in particular, to a method, device, electronic device, and storage medium for removing duplicate recognition frames in an image. Background Art

[0002] In the process of tobacco production, traditional filter rod recognition methods rely on manual inspection, which is not only inefficient but also prone to missed inspections and misjudgments.

[0003] In recent years, with the development of computer vision technology, object detection technology has provided a new solution for automatically recognizing filter rods. However, under the existing solutions, the speed of non-maximum suppression (NMS) still needs to be further improved. In particular, in the existing solutions for automatically recognizing filter rods, there are some studies or improvements related to deep learning. However, when using NMS to remove redundant bounding boxes after filter rod recognition, traditional NMS is still used for frame-by-frame comparison. This method takes a lot of time, and the comparison time is proportional to the square of the data scale to be compared, that is, the time complexity is O(n 2 ). Summary of the Invention

[0004] Embodiments of the present invention provide a method, device, electronic device, and storage medium for removing duplicate recognition frames in an image, so as to accurately and conveniently remove redundant recognition frames in the image and improve the efficiency of removing redundant recognition frames in the image.

[0005] In a first aspect, an embodiment of the present invention provides a method for removing duplicate recognition frames in an image, including:

[0006] Obtaining a first filter rod image output by a filter rod recognition model and information of each first recognition frame in the first filter rod image; the first recognition frame information includes: first recognition frame coordinates and first recognition frame confidence;

[0007] Performing image segmentation on the first filter rod image based on a preset image segmentation method to obtain at least one group of second filter rod images;

[0008] Based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to each group of second filter rod images, performing duplicate removal processing on the first recognition frames in each group of second filter rod images to determine the second recognition frame information corresponding to the first filter rod image.

[0009] Optionally, the method further includes: performing image segmentation on the first filter rod image based on a first segmentation width and a first segmentation height to obtain a first group of second filter rod images; performing image segmentation on the first filter rod image based on the first segmentation width, the first segmentation height, and the filter rod radius to obtain a second group of second filter rod images.

[0010] Optionally, the method further includes: determining a second segmentation width based on the first segmentation width and the filter rod radius, and determining a second segmentation height based on the first segmentation height and the filter rod radius; performing image segmentation on the first filter rod image based on the second segmentation width and the first segmentation height to obtain a first set of second filter rod sub-images; and / or performing image segmentation on the first filter rod image based on the first segmentation width and the second segmentation height to obtain a second set of second filter rod sub-images; and / or performing image segmentation on the first filter rod image based on the second segmentation width and the second segmentation height to obtain a third set of second filter rod sub-images.

[0011] Optionally, the method further includes: performing a subtraction process based on the first segmentation width and the filter rod radius to obtain the first segmentation width in the second segmentation width; using twice the filter rod radius as the first cyclic segmentation width in the second segmentation width; performing a subtraction process based on the first segmentation width and twice the filter rod radius to obtain the second cyclic segmentation width in the second segmentation width.

[0012] Optionally, the method further includes: removing duplicates from the first recognition frames in the first set of second filter rod images based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to the first set of second filter rod images, and determining the third recognition frame information corresponding to the first filter rod image; removing duplicates from the third recognition frames in the second set of second filter rod images based on a preset redundant recognition frame removal method and the third recognition frame information corresponding to the second set of second filter rod images, and determining the second recognition frame information corresponding to the first filter rod image.

[0013] Optionally, the method further includes: performing a rounding process on the coordinate values in the first recognition frame coordinates based on a preset coordinate adjustment method to obtain the rounded first recognition frame coordinates.

[0014] In a second aspect, an embodiment of the present invention further provides a device for removing duplicates of recognition frames in an image. The device includes:

[0015] An image acquisition module, configured to acquire a first filter rod image output by a filter rod recognition model and first recognition frame information of each first recognition frame in the first filter rod image; the first recognition frame information includes: first recognition frame coordinates and first recognition frame confidence levels;

[0016] A second filter rod image determination module, configured to perform image segmentation on the first filter rod image based on a preset image segmentation method to obtain at least one set of second filter rod images;

[0017] A second recognition frame information determination module, configured to remove duplicates from the first recognition frames in each set of second filter rod images based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to each set of second filter rod images, and determine the respective second recognition frame information corresponding to the first filter rod image.

[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes:

[0019] One or more processors;

[0020] A memory for storing one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for removing duplicate recognition frames in an image provided in any embodiment of the present invention.

[0022] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method for removing duplicate recognition frames in an image provided in any embodiment of the present invention.

[0023] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method for removing duplicate recognition frames in an image provided in any embodiment of the present invention.

[0024] The technical solution of the embodiment of the present invention includes: obtaining a first filter rod image output by a filter rod recognition model and information of each first recognition frame in the first filter rod image; the first recognition frame information includes: first recognition frame coordinates and first recognition frame confidence levels; performing image segmentation on the first filter rod image based on a preset image segmentation method, so as to narrow the single-time removal range of redundant recognition frames, obtaining at least one group of second filter rod images, and then, based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to each group of second filter rod images, performing redundant recognition frame removal processing on each first recognition frame in each group of second filter rod images one by one, and determining the information of each second recognition frame corresponding to the first filter rod image, which improves the efficiency of removing redundant recognition frames in the image while ensuring the accuracy of removing redundant recognition frames in the image.

[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0027] Figure 1 It is a flowchart of a method for removing duplicate recognition frames in an image provided in the first embodiment of the present invention;

[0028] Figure 2 It is a flowchart of a method for removing duplicate recognition frames in an image provided in the second embodiment of the present invention;

[0029] Figure 3 It is an example diagram of the upper left corner part of the first group of second filter rod images involved in the second embodiment of the present invention;

[0030] Figure 4 It is an example diagram of the upper left corner part of the first group of second filter rod sub-images involved in the second embodiment of the present invention;

[0031] Figure 5 It is an example diagram of the upper left corner part of the second group of second filter rod sub-images involved in the second embodiment of the present invention;

[0032] Figure 6 It is an example diagram of the upper left corner part of the third group of second filter rod sub-images involved in the second embodiment of the present invention;

[0033] Figure 7 It is a schematic structural diagram of a device for removing duplicate recognition frames in an image provided in the third embodiment of the present invention;

[0034] Figure 8 It is a schematic structural diagram of an electronic device for implementing the method for removing duplicate recognition frames in an image of the embodiment of the present invention. Detailed implementation manners

[0035] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0036] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0037] Embodiment 1

[0038] Figure 1 FIG. 1 is a flowchart of a method for removing duplicate recognition frames in an image according to Embodiment 1 of the present invention. This embodiment is applicable to the case of removing duplicate redundant recognition frames in an image. This method can be executed by a device for removing duplicate recognition frames in an image, and the device for removing duplicate recognition frames in an image can be implemented in the form of hardware and / or software, and the device for removing duplicate recognition frames in an image can be configured in an electronic device. As Figure 1 shown, the method includes:

[0039] S110. Obtain a first filter rod image output by a filter rod recognition model and information of each first recognition frame in the first filter rod image.

[0040] Among them, the first recognition frame information includes: the first recognition frame coordinates and the first recognition frame confidence. The filter rod recognition model may refer to a deep learning model with the recognition function of various types of filter rods. For example, the filter rod recognition model may be a pre-trained YOLO model. The first filter rod image may refer to an image in which the coordinates of all stacked filter rods are recognized. The first filter rod image may also show the first recognition frames corresponding to the recognized filter rods. There is an overlapping range between the first recognition frames. It can be understood that there are at least two first recognition frames for representing the same filter rod. The shape of the first recognition frame is a rectangle with each side tangent to the edge of the filter rod. The first recognition frame coordinates may refer to the vertex coordinates of the first recognition frame. For example, the first recognition frame coordinates may include the upper left corner coordinates and the lower right corner coordinates of the recognition frame. The first recognition frame confidence can be used to represent the measure of the reliability or certainty of the filter rod recognition model for the recognition result.

[0041] Specifically, based on the recognition frame duplicate removal instruction sent by the user, obtain the first filter rod image output by the filter rod recognition model and information of each first recognition frame in the first filter rod image.

[0042] Based on the above technical solution, the method further includes: before performing duplicate removal processing on the first recognition frame, performing rounding processing on the coordinate values in the coordinates of the first recognition frame based on a preset coordinate adjustment method to obtain the rounded coordinates of the first recognition frame.

[0043] Among them, the preset coordinate adjustment method may refer to a coordinate value rounding method. In the embodiments of the present invention, it is necessary to perform image segmentation on the first filter rod image and remove redundant recognition frames in the segmented image. Therefore, the advantage of performing rounding processing on the coordinate values in the coordinates of the first recognition frame is that it can avoid the coordinate values of the first recognition frame exactly falling on the image segmentation line, resulting in the situation of missed detection of the recognition frame, and further improve the accuracy of duplicate removal of the recognition frames in the image.

[0044] Specifically, the coordinate values in the coordinates of the first recognition frame are rounded by the method of rounding up or down at the fourth decimal place to obtain the rounded coordinates of the first recognition frame.

[0045] Exemplarily, a round function can be defined to perform rounding processing on the coordinate values in the coordinates of the first recognition frame. The round function can be expressed as

[0046] S120. Perform image segmentation on the first filter rod image based on a preset image segmentation method to obtain at least one group of second filter rod images.

[0047] Among them, the preset image segmentation method may refer to an image segmentation method preset for reducing the range of duplicate removal of redundant recognition frames at a single time. Each image segmentation method can correspondingly obtain a group of second filter rod images. All the segmented images (equivalent to filter rod sub-images) in each group of second filter rod images do not have overlapping regions. Each group of second filter rod images may include at least two filter rod sub-images.

[0048] Specifically, the first filter rod image is segmented into non-overlapping images according to the width per part being m and the height per part being n to obtain a group of second filter rod images. The first filter rod image is segmented again by adjusting the width per part and the height per part to obtain another group of second filter rod images.

[0049] Based on the above technical solution, "performing image segmentation on the first filter rod image based on a preset image segmentation method to obtain at least one group of second filter rod images" may include: performing image segmentation on the first filter rod image based on the first segmentation width and the first segmentation height to obtain the first group of second filter rod images; performing image segmentation on the first filter rod image based on the first segmentation width, the first segmentation height, and the filter rod radius to obtain the second group of second filter rod images.

[0050] Among them, the first segmentation width may refer to the length obtained by equally dividing the width of the first filter rod image preset in advance. The first segmentation height may refer to the length obtained by equally dividing the height of the first filter rod image preset in advance. The filter rod radius may refer to the radius of the filter rod recognized from the first filter rod image.

[0051] Specifically, according to the first segmentation width m and the first segmentation height n, the first filter rod image is segmented into non-overlapping images to obtain a first group of second filter rod images. The filter rod radius is used to adjust the length of the first segmentation width and / or the first segmentation height, and the first filter rod image is segmented into non-overlapping images again using the adjusted segmentation width and / or segmentation height to obtain a second group of second filter rod images. The purpose of segmenting to obtain the second group of second filter rod images is to divide the first recognition frames that may need to remove redundant recognition frames in the first group of second filter rod images but are distributed in different filter rod sub-images into the same filter rod sub-image, so that the second group of second filter rod images can be used to perform omission detection on the first group of second filter rod images, further improving the accuracy of removing redundant recognition frames.

[0052] It should be noted that there is a certain possibility that the first group of second filter rod images is the best division result, that is, after performing the operation of removing redundant recognition frames on the first group of second filter rod images, the second recognition frame information without redundant recognition frames can be obtained.

[0053] S130. Based on the preset redundant recognition frame removal method and the first recognition frame information corresponding to each group of second filter rod images, perform duplicate removal processing on the first recognition frames in each group of second filter rod images to determine the respective second recognition frame information corresponding to the first filter rod image.

[0054] Among them, the preset redundant recognition frame removal method may be but is not limited to NMS. Non-Maximum Suppression (NMS) is a technique used to remove redundant bounding boxes. When an object is surrounded by multiple overlapping prediction boxes, NMS can help select the best box, thereby improving the quality of the detection result. The traditional NMS technique compares the prediction boxes pairwise for IoU (Intersection over Union), and the time complexity is O(n 2 ), and in the case of a large number of coordinate points, the time consumption will be relatively high. The second recognition frame information may include the second recognition frame coordinates and the second recognition frame confidence. The second recognition frame may refer to a filter rod recognition frame without overlapping ranges in the first filter rod image. Through the technical solution of the embodiment of the present invention, a one-to-one correspondence can be established between the filter rods in the first filter rod image and the second recognition frames, that is, the filter rods and the second recognition frames are in one-to-one correspondence.

[0055] Specifically, for each group of second filter rod images, by using the method of pairwise comparison of IoU between recognition frames and the first recognition frame information corresponding to each filter rod sub-image in the current group of second filter rod images, duplicate removal processing is performed on the first recognition frames in each filter rod sub-image to obtain the second recognition frames in each filter rod sub-image, and the second recognition frame information corresponding to the second recognition frames in all filter rod sub-images is determined as the second recognition frame information corresponding to the current group of second filter rod images. Duplicate removal processing or intersection processing is performed on the second recognition frame information corresponding to all groups of second filter rod images to obtain the respective second recognition frame information corresponding to the first filter rod image.

[0056] Based on the above technical solution, "performing duplicate removal processing on the first recognition frames in each group of second filter rod images based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to each group of second filter rod images, and determining the respective second recognition frame information corresponding to the first filter rod image" may include: performing duplicate removal processing on the first recognition frames in the first group of second filter rod images based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to the first group of second filter rod images to determine the third recognition frame information corresponding to the first filter rod image; performing duplicate removal processing on the third recognition frames in the second group of second filter rod images based on a preset redundant recognition frame removal method and the third recognition frame information corresponding to the second group of second filter rod images to determine the second recognition frame information corresponding to the first filter rod image.

[0057] Among them, the third recognition frame information may refer to the recognition frame information corresponding to the third recognition frame obtained after the first redundant recognition removal.

[0058] Specifically, by using the method of pairwise comparison of IoU between recognition frames and the first recognition frame information corresponding to the first group of second filter rod images, duplicate removal processing is performed on the first recognition frames in the first group of second filter rod images to determine the third recognition frame information corresponding to the first filter rod image. The third recognition frame information corresponding to the second group of second filter rod images is screened out, and the recognition frame information corresponding to the third recognition frames not in the second group of second filter rod images is retained. By using the method of pairwise comparison of IoU between recognition frames and the screened third recognition frame information corresponding to the second group of second filter rod images, duplicate removal processing is performed on the third recognition frames in the second group of second filter rod images to obtain the recognition frame information corresponding to the non-redundant recognition frames in the second group of second filter rod images. The recognition frame information corresponding to the non-redundant recognition frames in the second group of second filter rod images and the recognition frame information corresponding to the third recognition frames not in the second group of second filter rod images that are retained are merged to determine the second recognition frame information corresponding to the first filter rod image.

[0059] The technical solution of the embodiment of the present invention obtains the first filter rod image output by the filter rod recognition model and the information of each first recognition frame in the first filter rod image; the first recognition frame information includes: the first recognition frame coordinates and the first recognition frame confidence; based on a preset image segmentation method, the first filter rod image is segmented, so as to narrow the single removal range of redundant recognition frames, obtain at least one group of second filter rod images, and then based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to each group of second filter rod images, perform redundant recognition frame de-duplication processing on each image of the first recognition frames in each group of second filter rod images, and determine the information of each second recognition frame corresponding to the first filter rod image, which improves the efficiency of redundant recognition frame de-duplication in the image while ensuring the accuracy of redundant recognition frame de-duplication in the image.

[0060] Embodiment 2

[0061] Figure 2 The flowchart of a method for removing duplicate recognition frames in an image provided by Embodiment 2 of the present invention. On the basis of the above embodiments, the process of determining the second group of second filter rod images is described in detail. The explanations of the same or corresponding terms in the above embodiments will not be repeated here. As Figure 2 shown, the method includes:

[0062] S210. Obtain the first filter rod image output by the filter rod recognition model and the information of each first recognition frame in the first filter rod image.

[0063] Among them, the first recognition frame information includes: the first recognition frame coordinates and the first recognition frame confidence.

[0064] Exemplarily, for the obtained first filter rod image, its width is w and its height is h, and the first recognition frame information is represented by a five-tuple list A. This list is inferred by object recognition tools such as yolo and contains the upper left corner coordinate values (x i1 , y i1 ), the lower right corner (x i2 , y i2 ) coordinate values and their corresponding confidence scores s i . Generate an empty list R and an empty dictionary D. The five-tuple list A can be expressed as follows:

[0065]

[0066] According to the set A, construct a set P, a set S, and a mapping f as follows:

[0067]

[0068] f: P → S f(x i , y i ) = s i ;

[0069] S220. Segment the first filter rod image based on the first segmentation width and the first segmentation height to obtain a first set of second filter rod images.

[0070] Among them, the first filter rod image is segmented into non-overlapping regions, segmented according to the first segmentation width m and the first segmentation height n, and the insufficient part does not need to be filled. The width is divided into parts, and the height is divided into parts. Figure 3 An example diagram of the upper left corner part of the first set of second filter rod images is given. See Figure 3 . The set I contains all the filter rod sub-images in the first set of second filter rod images. The set I can be expressed as:

[0071]

[0072] For all (x i1 , y i1 , x i2 , y i2 ) ∈ P, construct a set The relationship is Among them

[0073] In the embodiment of the present invention, perform NMS operation on all the coordinate points recognized within the range of all I ij , that is, perform NMS operation on the set Q ij . Calculate Among them, D(x i1 , y i1 , x i2 , y i2 ) represents the area of the rectangle with the coordinate (x i1 , y i1 ) as the upper left corner and (x i2 , y i2 ) coordinates as the lower right corner. IoU(D i , D j ) is equivalent to the overlapping degree of the two, and the value range is [0, 1]. For every two points in Q ij , if the obtained IoU value exceeds a certain range, the corresponding s i values can be extracted and compared with each other, and the coordinate with the largest s i value is output and put into the set R.

[0074] It should be noted that the above steps can also be understood as: traverse the coordinate list P to obtain the coordinate point p(x i1 , y i1 , x i2,y i2 ), put this coordinate into dictionary D, and the key value for the insertion is Traverse dictionary D, and perform conventional NMS operations on all coordinate lists under each key value respectively. Store the results in list R.

[0075] S230. Determine the second segmentation width based on the first segmentation width and the filter rod radius, and determine the second segmentation height based on the first segmentation height and the filter rod radius.

[0076] Based on the above technical solution, "determine the second segmentation width based on the first segmentation width and the filter rod radius" may include: perform a subtraction operation based on the first segmentation width and the filter rod radius to obtain the first segmentation width in the second segmentation width; use twice the filter rod radius as the first cyclic segmentation width in the second segmentation width; perform a subtraction operation based on the first segmentation width and twice the filter rod radius to obtain the second cyclic segmentation width in the second segmentation width.

[0077] Among them, the first segmentation width may refer to the first segmentation distance when performing width segmentation from one side of the image to the other side. The first segmentation width is only used in the first segmentation, and the first cyclic segmentation width and the second cyclic segmentation width are used for cyclic segmentation in subsequent segmentations. The first cyclic segmentation width may refer to the first segmentation width in the cyclic segmentation operation after segmentation using the first segmentation width. The second cyclic segmentation width may refer to the second segmentation width in the cyclic segmentation operation after segmentation using the first segmentation width.

[0078] Specifically, taking the first segmentation width as m and the filter rod radius as r as an example. Perform a subtraction operation based on the first segmentation width m and the filter rod radius r to obtain the first segmentation width (m - r) in the second segmentation width; use twice the filter rod radius as the first cyclic segmentation width (2r) in the second segmentation width; perform a subtraction operation based on the first segmentation width m and twice the filter rod radius 2r to obtain the second cyclic segmentation width (m - 2r) in the second segmentation width. The image sequence obtained by segmenting using the second segmentation width is (m - r), (2r), (m - 2r), (2r), (m - 2r), and continues in the order of (2r), (m - 2r).

[0079] Based on the above technical solution, "determine the second segmentation height based on the first segmentation height and the filter rod radius" may include: perform a subtraction operation based on the first segmentation height and the filter rod radius to obtain the first segmentation height in the second segmentation height; use twice the filter rod radius as the first cyclic segmentation height in the second segmentation height; perform a subtraction operation based on the first segmentation height and twice the filter rod radius to obtain the second cyclic segmentation height in the second segmentation height.

[0080] Among them, the first segmentation height may refer to the first segmentation distance when performing height segmentation from one side of the image to the other side. The first segmentation height is only used in the first segmentation, and the first cyclic segmentation height and the second cyclic segmentation height are used for cyclic segmentation in subsequent segmentations. The first cyclic segmentation height may refer to the first segmentation height in the cyclic segmentation operation after segmentation using the first segmentation height. The second cyclic segmentation height may refer to the second segmentation height in the cyclic segmentation operation after segmentation using the first segmentation height.

[0081] Specifically, taking the first segmentation height as n and the filter rod radius as r as an example. By performing a subtraction operation based on the first segmentation height n and the filter rod radius r, the first segmentation height (n - r) in the second segmentation height is obtained; twice the filter rod radius is used as the first cyclic segmentation height (2r) in the second segmentation height; by performing a subtraction operation based on the first segmentation height n and twice the filter rod radius 2r, the second cyclic segmentation height (n - 2r) in the second segmentation height is obtained. The image sequence obtained by segmenting using the second segmentation height is (n - r), (2r), (n - 2r), (2r), (n - 2r), and continues in the order of (2r), (n - 2r).

[0082] S240. Perform image segmentation on the first filter rod image based on the second segmentation width and the first segmentation height to obtain the first set of second filter rod sub-images; and / or perform image segmentation on the first filter rod image based on the first segmentation width and the second segmentation height to obtain the second set of second filter rod sub-images; and / or perform image segmentation on the first filter rod image based on the second segmentation width and the second segmentation height to obtain the third set of second filter rod sub-images.

[0083] Among them, the second set of second filter rod images includes: the first set of second filter rod sub-images and / or the second set of second filter rod sub-images and / or the third set of second filter rod sub-images. Figure 4 An example diagram of the upper left corner part of the first set of second filter rod sub-images is given. Figure 5 An example diagram of the upper left corner part of the second set of second filter rod sub-images is given. Figure 6 An example diagram of the upper left corner part of the third set of second filter rod sub-images is given.

[0084] Specifically, taking the second set of second filter rod images including: the first set of second filter rod sub-images, the second set of second filter rod sub-images, and the third set of second filter rod sub-images as an example.

[0085] For the first set of second filter rod sub-images. Traverse the coordinates in R again, but segment them according to I ij and I i,j+1 's segmentation line, expand the width of r to the left and right to obtain a new image set I * (equivalent to the first set of second filter rod sub-images), and the coordinates within R that conform to the image set I* The coordinates required (equivalent to the coordinates within the image set I * range) are placed in the set Q * (equivalent to the coordinates of the third recognition box corresponding to the second filter rod sub-image in the first group), and these coordinates are deleted from R, that is See Figure 4 , the image set I * can be represented as U in the figure 11 , U 12 , U 21 , U 22 ... U mn . The image set I * is represented as follows:

[0086]

[0087] Pair the recognition boxes in the same sub-image in the set Q * two by two using NMS, and put the filtered coordinate values back into the set R.

[0088] It should be noted that the above steps can also be understood as: clearing the dictionary D, traversing the list R, obtaining the coordinate list P and its corresponding confidence score list S. Traverse the coordinate list P to get the coordinate point p(x i1 , y i1 , x i2 , y i2 ), determine whether it is within a distance of r to the left and right of the column dividing line. If not, skip it. If so, store the coordinate point p in the dictionary D with the key value of and delete the coordinate point p from R.

[0089] Specifically, for the second group of second filter rod sub-images. Traverse the coordinates in R again, but divide them according to the dividing line between I ij and I i+1,j , and expand the height by r above and below to obtain a new image set I ** (equivalent to the second group of second filter rod sub-images), and place the coordinates in R that meet the requirements of the image set I ** (equivalent to the coordinates within the image set I ** range) in the set Q ** , and delete these coordinates from R, that is See Figure 5 , the image set I ** can be represented as V in the figure 11 , V 12 , V 21 , V 22 ... V mn . The image set I ** is represented as follows:

[0090]

[0091] Pair the recognition boxes in the same sub-image in set Q ** in pairs using NMS, and put the obtained coordinate values back into set R.

[0092] It should be noted that the above steps can also be understood as: clear dictionary D, and traverse list R to obtain the coordinate list P and its corresponding confidence score list S. Traverse the coordinate list P to get the coordinate point p(x i1 , y i1 , x i2 , y i2 ). Determine whether it is within a distance of r above and below the row dividing line. If not, skip it. If so, store the coordinate point p in dictionary D with the key value of and delete the coordinate point p from R.

[0093] Specifically, for the second filter rod sub-image in the third group. Traverse the coordinates in R again, but divide them at the splitting points of I ij , I i+1,j , I i,j+1 , I i+1,j+1 . Expand by a length of r in all directions (up, down, left, and right) to obtain a new image set I *** (equivalent to the second filter rod sub-image in the third group). Put the coordinates in R that meet the requirements of the image set I *** (equivalent to the coordinates within the image set I *** ) into set Q *** and delete these coordinates from R, that is see Figure 6 , the image set I *** can be represented as W 11 , W 12 , W 21 , W 22 ... W mn in the figure. The image set I *** is represented as follows:

[0094]

[0095] Pair the recognition boxes in the same sub-image in set Q *** in pairs using NMS, and put the obtained coordinate values back into set R.

[0096] It should be noted that the above steps can also be understood as: clear dictionary D, and traverse list R. Traverse the coordinate list P to get the coordinate point p(x i1 , y i1 , x i2 , y i2), determine whether it is within a distance of r on both the left and right of the column dividing line and within a distance of r above and below the row dividing line. If not, skip it. If so, store the coordinate point p in the dictionary D with the key value and delete the coordinate point p from R. After removing duplicates from the list R and outputting, the coordinates of each second recognition frame corresponding to the first filter rod image are obtained.

[0097] S250. Based on the preset redundant recognition frame removal method and the first recognition frame information corresponding to each group of second filter rod images, perform duplicate removal processing on the first recognition frames in each group of second filter rod images to determine the information of each second recognition frame corresponding to the first filter rod image.

[0098] The technical solution of the embodiment of the present invention determines the second segmentation width based on the first segmentation width and the filter rod radius, and determines the second segmentation height based on the first segmentation height and the filter rod radius; performs image segmentation on the first filter rod image based on the second segmentation width and the first segmentation height to obtain the first group of second filter rod sub-images, thereby realizing segmenting the possibly remaining unremoved redundant recognition frames near each column dividing line in the first group of second filter rod images into the sub-images that can remove duplicates for duplicate removal processing of the redundant recognition frames, and further improving the accuracy of duplicate removal of the redundant recognition frames in the first filter rod image. And / or perform image segmentation on the first filter rod image based on the first segmentation width and the second segmentation height to obtain the second group of second filter rod sub-images, thereby realizing segmenting the possibly remaining unremoved redundant recognition frames near each row dividing line in the first group of second filter rod images into the sub-images that can remove duplicates for duplicate removal processing of the redundant recognition frames, and further improving the accuracy of duplicate removal of the redundant recognition frames in the first filter rod image. And / or perform image segmentation on the first filter rod image based on the second segmentation width and the second segmentation height to obtain the third group of second filter rod sub-images, thereby realizing segmenting the possibly remaining unremoved redundant recognition frames in the overlapping area near each column dividing line and near each row dividing line in the first group of second filter rod images into the sub-images that can remove duplicates for duplicate removal processing of the redundant recognition frames, and further improving the accuracy of duplicate removal of the redundant recognition frames in the first filter rod image.

[0099] It should be noted that based on the above technical solution, it is possible to try to simply analyze the time complexity. Assume that each image has n points. First, analyze the extreme case, that is, all coordinate points are in the same frame. At this time, the time complexity of checking the frame is O(1), and the number of NMS operations is i.e., O(n 2 ), and the time complexity of the overall algorithm is O(n 2)。If, very fortunately, the split box has exactly one coordinate point, that is, n boxes are split. At this time, the time complexity of box querying is O(n), the number of NMS operations is 0, and the time complexity of the overall algorithm is O(n). In a more general case, assume that a total of i rows and j columns are divided, with a total of ij boxes. The box has a height of h and a width of w, and is evenly distributed. Then the filter rod target in each box is Correspondingly, in the second, third, and fourth times, (i - 1)*j, i*(j - 1), and (i - 1)*(j - 1) boxes are split respectively. Each box contains approximately Among them, the number of NMS operations is respectively All of them can be added up to obtain the time complexity O(p) of this algorithm. Through practice, it is found that O(p) is directly proportional to ijn and inversely proportional to wh. In the case where r is slightly larger (starting to increase rapidly after r > 20), O(p) is 4 directly proportional to r, Generally, i, j, w, h, and r are all fixed values. Therefore, when r is not too large, the time complexity of this algorithm shows a linear relationship with n.

[0100] In a certain practice, let i = 10, j = 17, r = 20, w = 200, h = 200, and n is approximately 4600. Theoretically, the NMS operation comparison of the technical solution of this invention's embodiment is about 150,000 times, while the traditional NMS operation needs to compare about 10.5 million times. The technical solution of this invention's embodiment can achieve a speed increase of about 70 times. In fact, 17,910 pictures are also selected for nms operation. The average time consumption of the traditional nms algorithm is 15s per picture, and the average time consumption of the algorithm of this invention's embodiment is 0.08s per picture. The technical solution of this invention's embodiment can achieve a speed increase close to 180 times and save a lot of computing power.

[0101] The following is an embodiment of the recognition box duplicate removal device in the image provided by this invention's embodiment. This device and the recognition box duplicate removal method in the above-mentioned embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the recognition box duplicate removal device in the image, reference can be made to the embodiment of the recognition box duplicate removal method in the above-mentioned image.

[0102] Embodiment III

[0103] Figure 7 This is a schematic structural diagram of an image recognition box duplicate removal device provided by Embodiment III of this invention. As Figure 7 shown, this device includes: an image acquisition module 710, a second filter rod image determination module 720, and a second recognition box information determination module 730.

[0104] Among them, the image acquisition module 710 is configured to acquire a first filter rod image output by a filter rod recognition model and information of each first recognition box in the first filter rod image; the first recognition box information includes: the coordinates of the first recognition box and the confidence of the first recognition box; the second filter rod image determination module 720 is configured to perform image segmentation on the first filter rod image based on a preset image segmentation method to obtain at least one group of second filter rod images; the second recognition box information determination module 730 is configured to perform duplicate removal processing on the first recognition boxes in each group of second filter rod images based on a preset redundant recognition box removal method and the first recognition box information corresponding to each group of second filter rod images, and determine the information of each second recognition box corresponding to the first filter rod image.

[0105] In the technical solution of the embodiment of the present invention, by acquiring the first filter rod image output by the filter rod recognition model and the information of each first recognition box in the first filter rod image; the first recognition box information includes: the coordinates of the first recognition box and the confidence of the first recognition box; performing image segmentation on the first filter rod image based on a preset image segmentation method, thereby reducing the single removal range of redundant recognition boxes, obtaining at least one group of second filter rod images, and then performing duplicate removal processing on the redundant recognition boxes of each image one by one in each group of second filter rod images based on a preset redundant recognition box removal method and the first recognition box information corresponding to each group of second filter rod images, and determining the information of each second recognition box corresponding to the first filter rod image, while ensuring the accuracy of duplicate removal of redundant recognition boxes in the image, the efficiency of duplicate removal of redundant recognition boxes in the image is improved.

[0106] On the basis of the above technical solution, the second filter rod image determination module 720 may include:

[0107] The first group of second filter rod image determination sub-module is configured to perform image segmentation on the first filter rod image based on the first segmentation width and the first segmentation height to obtain the first group of second filter rod images;

[0108] The second group of second filter rod image determination sub-module is configured to perform image segmentation on the first filter rod image based on the first segmentation width, the first segmentation height and the filter rod radius to obtain the second group of second filter rod images.

[0109] On the basis of the above technical solution, the second group of second filter rod image determination sub-module may include:

[0110] The second segmentation length determination unit is configured to determine the second segmentation width based on the first segmentation width and the filter rod radius, and determine the second segmentation height based on the first segmentation height and the filter rod radius;

[0111] A second filter rod image determination unit, configured to perform image segmentation on the first filter rod image based on the second segmentation width and the first segmentation height to obtain a first set of second filter rod images; and / or perform image segmentation on the first filter rod image based on the first segmentation width and the second segmentation height to obtain a second set of second filter rod images; and / or perform image segmentation on the first filter rod image based on the second segmentation width and the second segmentation height to obtain a third set of second filter rod images.

[0112] Based on the above technical solution, the second segmentation length determination unit is specifically configured to: perform a subtraction process based on the first segmentation width and the filter rod radius to obtain the first segmentation width in the second segmentation width; use twice the filter rod radius as the first cyclic segmentation width in the second segmentation width; perform a subtraction process based on the first segmentation width and twice the filter rod radius to obtain the second cyclic segmentation width in the second segmentation width.

[0113] Based on the above technical solution, the second recognition frame information determination module 730 is specifically configured to: perform a duplicate removal process on the first recognition frames in the first set of second filter rod images based on a preset redundant recognition frame removal method and the first recognition frame information corresponding to the first set of second filter rod images to determine the third recognition frame information corresponding to the first filter rod image; perform a duplicate removal process on the third recognition frames in the second set of second filter rod images based on a preset redundant recognition frame removal method and the third recognition frame information corresponding to the second set of second filter rod images to determine the second recognition frame information corresponding to the first filter rod image.

[0114] Based on the above technical solution, the apparatus further includes:

[0115] A first recognition frame coordinate rounding module, configured to perform a rounding process on the coordinate values in the first recognition frame coordinates based on a preset coordinate adjustment method before performing the duplicate removal process on the first recognition frames to obtain the rounded first recognition frame coordinates.

[0116] The recognition frame duplicate removal apparatus in the image provided by the embodiments of the present invention can execute the recognition frame duplicate removal method in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the recognition frame duplicate removal method in the image.

[0117] It should be noted that in the above embodiments of the recognition frame duplicate removal in the image, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.

[0118] Embodiment 4

[0119] Figure 8FIG. 0 shows a schematic structural diagram of an electronic device 10 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital assistants, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0120] As Figure 8 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0121] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0122] The processor 11 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for removing duplicate recognition frames in an image.

[0123] In some embodiments, the method for removing duplicate recognition frames in an image can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for removing duplicate recognition frames in an image described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for removing duplicate recognition frames in an image by any other suitable means (e.g., by means of firmware).

[0124] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0125] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a dedicated computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0126] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0127] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0128] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0129] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs that run on respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0130] An embodiment of the present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the method for removing duplicate recognition frames in an image provided in any embodiment of the present application.

[0131] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet). This program product and the method for removing duplicate recognition frames in an image disclosed in each embodiment of the present application belong to the same inventive concept, and thus will not be elaborated herein.

[0132] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0133] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for removing duplicate recognition frames in an image, characterized in that: include: Acquire a first filter stick image output by a filter stick recognition model and information of each first recognition frame in the first filter stick image; The first identification frame information includes: first identification frame coordinates and first identification frame confidence; Performing image segmentation on the first filter stick image based on a preset image segmentation method to obtain at least one set of second filter stick images; Based on a preset redundant identification frame removal method and the first identification frame information corresponding to each group of second filter stick images, the first identification frames in each group of second filter stick images are deduplicated to determine each second identification frame information corresponding to the first filter stick image.

2. The method according to claim 1, characterized in that The step of performing image segmentation on the first filter stick image based on a preset image segmentation method to obtain at least one set of second filter stick images includes: Performing image segmentation on the first filter stick image based on a first segmentation width and a first segmentation height to obtain a first group of second filter stick images; The first filter rod image is segmented based on the first segmentation width, the first segmentation height and the filter rod radius to obtain a second group of second filter rod images.

3. The method according to claim 2, characterized in that The step of performing image segmentation on the first filter stick image based on the first segmentation width, the first segmentation height and the filter stick radius to obtain a second group of second filter stick images comprises: Determine a second segmentation width based on the first segmentation width and the filter rod radius, and determine a second segmentation height based on the first segmentation height and the filter rod radius; Performing image segmentation on the first filter stick image based on the second segmentation width and the first segmentation height to obtain a first group of second filter stick sub-images; and / or Performing image segmentation on the first filter stick image based on the first segmentation width and the second segmentation height to obtain a second group of second filter stick sub-images; and / or The first filter stick image is segmented based on the second segmentation width and the second segmentation height to obtain a third group of second filter stick sub-images.

4. The method according to claim 3, characterized in that The method of determining the second segmentation width based on the first segmentation width and the filter rod radius comprises: Subtracting the first segmentation width from the filter rod radius to obtain the first segmentation width in the second segmentation width; Using twice the filter rod radius as the first cycle division width in the second division width; A subtraction process is performed based on the first segmentation width and twice the filter rod radius to obtain a second cycle segmentation width in the second segmentation width.

5. The method according to claim 1, characterized in that The method of removing duplicate first identification frames in each group of second filter stick images based on a preset redundant identification frame removal method and first identification frame information corresponding to each group of second filter stick images, and determining each second identification frame information corresponding to the first filter stick image, comprises: Based on a preset redundant identification frame removal method and the first identification frame information corresponding to the first group of second filter stick images, performing deduplication processing on the first identification frame in the first group of second filter stick images to determine the third identification frame information corresponding to the first filter stick image; Based on the preset redundant identification frame removal method and the third identification frame information corresponding to the second group of second filter stick images, the third identification frame in the second group of second filter stick images is deduplicated to determine the second identification frame information corresponding to the first filter stick image.

6. The method according to claim 1, characterized in that Before performing deduplication processing on the first recognition frame, the method further includes: The coordinate values ​​in the first recognition frame coordinates are rounded based on a preset coordinate adjustment method to obtain rounded first recognition frame coordinates.

7. A device for removing duplicate recognition frames in an image, characterized in that: The device comprises: An image acquisition module is used to acquire a first filter stick image output by a filter stick recognition model and first recognition frame information in the first filter stick image; the first recognition frame information includes first recognition frame coordinates and first recognition frame confidence; A second filter stick image determination module, configured to perform image segmentation on the first filter stick image based on a preset image segmentation method to obtain at least one set of second filter stick images; The second identification frame information determination module is used to perform deduplication processing on the first identification frame in each group of second filter stick images based on a preset redundant identification frame removal method and the first identification frame information corresponding to each group of second filter stick images, and determine the second identification frame information corresponding to the first filter stick image.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for removing duplicate recognition frames in an image as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for removing duplicate recognition frames in an image as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for removing duplicate recognition frames in an image as described in any one of claims 1 to 6.