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

By intercepting the area with an energy value less than the threshold from the energy map of the X-ray security machine and using the object detection model for detection, the problems of missed and missed small-volume items in the prior art are solved, and higher detection accuracy and accuracy are achieved.

CN113554598BActive Publication Date: 2025-03-11ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110701826.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-24
Publication Date
2025-03-11
Estimated Expiration
2041-06-24

AI Technical Summary

Technical Problem

In the prior art, when using X-ray security machine to detect items, it is difficult to effectively identify smaller targets, such as small bullets, resulting in missed and missed detection.

Method used

By obtaining the energy map of the item to be detected, an area with an energy value less than the energy threshold is intercepted from it as the area to be detected, and the area is detected using the target detection model to identify the items therein. The method includes calculating the partition and stacking degree of the detection area to be detected to further improve the detection accuracy.

Benefits of technology

It effectively reduces the missed and missed detection rates of security inspection systems and improves the accuracy of detection of small-volume items, especially metal items that are difficult to penetrate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113554598B_ABST
    Figure CN113554598B_ABST
Patent Text Reader

Abstract

The present invention provides an object detection method, device, electronic device, and computer-readable storage medium, wherein the object detection method includes: obtaining an energy map corresponding to the object to be detected; obtaining a first area to be detected from the energy map, wherein the first area to be detected includes an area whose energy value is less than an energy threshold; detecting the first area to be detected using a target detection model to identify the object contained in the first area to be detected, wherein the input image size of the target detection model is a first size, the size of the first area to be detected is a second size, and the first size is larger than the second size. This is used to reduce missed detection and false detection of the security inspection system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Security inspection is becoming an indispensable part of every city. In densely populated areas such as urban rail transit, airports, logistics and express delivery centers, and large-scale event sites, security issues have always been a core issue, and security inspection is an effective means to prevent emergencies.

[0003] In the security inspection industry, X-rays are commonly used to inspect bags and luggage. X-ray-based security inspection machines are widely used in airports, railway stations, subway stations, bus stations, government buildings, embassies, conference centers, exhibition centers, hotels, shopping malls, large-scale events, post offices, schools, logistics industries, industrial inspections, etc. The image of the X-ray security inspection machine is a pseudo-color image obtained by combining the degree of penetration of X-rays into the items in the package and the color configuration scheme based on the differences in the absorption characteristics of different materials for X-rays. At present, the intelligent recognition of X-ray security inspection machine images basically relies on deep learning technology. The features of the X-ray security inspection machine input image are extracted through convolutional neural networks, and finally the contraband is identified and located through feature maps. However, for smaller targets, such as bullets, due to fewer features, they are generally missed. Summary of the invention

[0004] The present invention provides an object detection method, device, electronic equipment, and computer-readable storage medium, which are used to reduce missed detection and false detection of a security inspection system.

[0005] To solve the above technical problems, the first technical solution provided by the present invention is: providing an object detection method, comprising: obtaining an energy map corresponding to the object to be detected; obtaining a first area to be detected from the energy map, the first area to be detected including an area with an energy value less than an energy threshold; using a target detection model to detect the first area to be detected to identify the object contained in the first area to be detected, wherein the input image size of the target detection model is a first size, the size of the first area to be detected is a second size, and the first size is larger than the second size.

[0006] In one possible implementation, the step of using a target detection model to detect a first area to be detected to identify objects contained in the first area to be detected includes: dividing the first area to be detected to obtain multiple sub-areas; using the target detection model to detect the sub-areas to identify objects contained in the first area to be detected, the size of the sub-areas being a third size, and the third size being smaller than the second size.

[0007] In one possible implementation, the step of using a target detection model to detect a first area to be detected to identify objects contained in the first area to be detected includes: obtaining a second area to be detected from the first area to be detected, the second area to be detected containing an area with a stacking degree greater than a stacking threshold; and using a target detection model to detect the second area to be detected to identify objects contained in the second area to be detected.

[0008] In one possible implementation, the step of obtaining the second area to be detected from the first area to be detected includes: dividing the first area to be detected to obtain multiple sub-areas; calculating the stacking degree of each sub-area, and taking the sub-area with a stacking degree greater than a stacking threshold as the second area to be detected.

[0009] In one possible implementation, the step of calculating the stacking degree of each sub-region includes: converting the sub-region into a grayscale image; calculating the color intensity corresponding to the grayscale image, and calculating the edge intensity corresponding to the grayscale image; and calculating the stacking degree of each sub-region based on the color intensity and the edge intensity.

[0010] In a possible implementation, the step of calculating the color intensity corresponding to the grayscale image includes: calculating the color intensity based on the grayscale value of the pixel and the proportion of the pixel corresponding to the grayscale value in the grayscale image.

[0011] In a possible implementation, the step of calculating the edge strength corresponding to the grayscale image includes: calculating a feature map corresponding to the grayscale image, and then obtaining a feature value corresponding to each pixel; and counting the number of pixels whose feature values ​​are greater than a strong edge point threshold, and then obtaining the edge strength.

[0012] In a possible implementation, the step of calculating the stacking degree of each sub-region based on the color intensity and the edge intensity includes: performing weighted summation on the color intensity and the edge intensity to obtain the stacking degree.

[0013] In a possible implementation, the step of dividing the first area to be detected to obtain a plurality of sub-areas includes: dividing the first area to be detected by a sliding window with a preset step size and a preset side length to obtain a plurality of sub-areas.

[0014] In a possible implementation manner, the method further includes: deduplicating objects included in the second area to be detected and the first area to be detected.

[0015] In a possible implementation manner, the method further includes: removing duplications from the first area to be detected and the objects included in the energy map.

[0016] To solve the above technical problems, the second technical solution provided by the present invention is: to provide an object detection device, including: an energy map acquisition module, used to obtain an energy map corresponding to the object to be detected; an interception module, used to obtain a first area to be detected from the energy map, the first area to be detected includes an area with an energy value less than an energy threshold; a detection module, used to detect the first area to be detected using a target detection model to identify the object contained in the first area to be detected, wherein the input image size of the target detection model is a first size, the size of the first area to be detected is a second size, and the first size is larger than the second size.

[0017] To solve the above technical problems, the third technical solution provided by the present invention is: to provide an electronic device, comprising: a memory and a processor, wherein the memory stores program instructions, and the processor calls the program instructions from the memory to execute any of the above methods.

[0018] In order to solve the above technical problems, the fourth technical solution provided by the present invention is: providing a computer-readable storage medium storing a program file, and the program file can be executed to implement any of the above methods.

[0019] The beneficial effect of the present invention is different from the prior art. The present invention obtains a first area to be detected from an energy map, and the first area to be detected includes an area whose energy value is less than an energy threshold; the first area to be detected is detected using a target detection model to identify the items contained in the first area to be detected, wherein the input image size of the target detection model is a first size, the size of the first area to be detected is a second size, and the first size is larger than the second size. This method can obtain a difficult-to-detect area, and magnify the items in the difficult-to-detect area to a certain extent and perform secondary detection to reduce missed detection and false detection of the security inspection system. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0021] Figure 1 It is a schematic diagram of the flow chart of the first embodiment of the object detection method of the present invention;

[0022] Figure 2 is a schematic diagram of the energy diagram;

[0023] Figure 3 It is a schematic flow chart of a second embodiment of the object detection method of the present invention;

[0024] Figure 4 A schematic diagram of dividing the first area to be detected into sub-areas;

[0025] Figure 5 It is a schematic flow chart of a third embodiment of the object detection method of the present invention;

[0026] Figure 6 A schematic diagram of a flow chart of an embodiment of calculating the degree of overlap;

[0027] Figure 7 It is a structural schematic diagram of an embodiment of an object detection device of the present invention;

[0028] Figure 8 It is a structural schematic diagram of an embodiment of an electronic device of the present invention;

[0029] Fig. 9 It is a schematic diagram of the structure of an embodiment of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION

[0030] At present, the intelligent recognition of X-ray security inspection machine images basically relies on deep learning technology, which extracts the features of the X-ray security inspection machine input image through convolutional neural networks, and finally identifies and locates contraband through feature maps. Since small target objects, such as small bullets, have too small pixel areas in X-ray imaging, after the convolutional neural network extracts high-level semantic features, the overly large receptive field causes the features representing small bullets to be mixed with a large amount of irrelevant background information, resulting in the loss of key information, and ultimately leading to false detection and missed detection of small bullet contraband.

[0031] The prior art provides a method for intelligently identifying prohibited items based on X-ray security inspection machine images, which unifies the shape classification model and color classification model based on deep learning into one model to realize the identification of prohibited items. It relies on the shape classification model and the color classification model, but cannot accurately judge the shape and color of small bullets and backgrounds with complex overlaps.

[0032] The prior art also provides a method for detecting slender objects based on a convolutional neural network, which detects slender objects by constructing a slender object detection branch using a convolution kernel of an unconventional proportion and a default bounding box. This method uses a convolution kernel of an unconventional proportion and a default bounding box, but does not solve the problem of serious feature loss of small bullets in the neural network.

[0033] The prior art also provides an airport X-ray contraband image detection method based on an attention mechanism, which uses the activation value of a neural network feature map as an attention map and fuses it with an input map to obtain a contraband target detection map. The method uses the activation value of a neural network feature map as an attention map, but small objects such as small bullets have serious feature loss in the neural network, and their feature activation values ​​are missing, so it is impossible to obtain an attention map.

[0034] Therefore, the existing technologies are unable to solve the problem of missed detection and false detection of small-volume items. In response to this phenomenon, the present application provides an item detection method, which effectively reduces the false detection and missed detection of contraband. The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0035] See also Figure 1 , is a flow chart of a first embodiment of the object detection method of the present invention, which specifically includes:

[0036] Step S11: Obtaining the energy map corresponding to the object to be detected.

[0037] As an embodiment, the object to be inspected can be irradiated by an X-ray source. X-rays have different penetrating abilities on different materials, and there will be different degrees of energy attenuation when passing through an object, so that the energy distribution diagram of the object to be inspected can be collected on the receiving plate.

[0038] The energy diagram of a general X-ray security inspection machine has a value range of 0-68000. Figure 2 This is an example of mapping the energy of the energy map to the range of 0-255 and displaying it in the form of a grayscale image.

[0039] Step S12: Acquire a first area to be detected from the energy map, where the first area to be detected includes an area whose energy value is less than an energy threshold.

[0040] A first area to be detected is obtained from the energy map, where the first area to be detected includes an area where the energy value is less than an energy threshold.

[0041] Some objects are made of metal that is difficult for X-rays to penetrate, such as small bullets. Understandably, when X-rays irradiate objects made of materials that are difficult to penetrate, the energy value obtained is low, and the object is not easy to detect. Figure 2 As shown, the black area A is the area where the hard-to-penetrate material objects are located, and the objects in this area are difficult to identify. Therefore, it is necessary to cut out the area where the hard-to-penetrate material objects are located as the first area to be detected.

[0042] In a specific embodiment, an energy threshold may be set, the energy value in the energy map is compared with the energy threshold, and the area with an energy value less than the energy threshold is taken as the first area to be detected. In this way, the first area to be detected can be cut out.

[0043] In one embodiment, the energy map may also be processed by an X-ray image processing method and an image rendering algorithm to obtain an X-ray image, and the first area to be detected may be obtained based on the X-ray image.

[0044] In the prior art, there is a method of intercepting the area where the hard-to-penetrate material is located by human visual identification, that is, after obtaining the energy map, the user intercepts the unidentified area to obtain the second detection area, but this method requires human identification, which is prone to omission or misselection. In this embodiment, an energy threshold is set in the detection device, the energy value of the obtained energy map is compared with the energy threshold, and the area less than the energy threshold is directly used as the second area to be detected, which is more intelligent, does not require human participation, and reduces the possibility of omission or misselection, and improves the screening accuracy of the second area to be detected (that is, the area where the hard-to-penetrate material is located).

[0045] In this embodiment, the first area to be detected is screened by energy threshold, and irrelevant areas can be proposed, which relatively enlarges the volume of possible small-volume objects, retains the characteristic information of small-volume objects to the greatest extent, and solves the problem of serious lack of characteristics of small-volume objects.

[0046] Step S13: Detect the first area to be detected using the target detection model to identify objects contained in the first area to be detected.

[0047] As an embodiment, after the first area to be detected is intercepted, the target detection model is used to perform target detection on the first area to be detected again to identify objects contained in the first area to be detected.

[0048] As an embodiment, the size of the first area to be detected that is cut out is the second size, the input image size of the target detection model is the first size, and the first size is larger than the second size. If the target detection model is used to detect the first area to be detected, the first area to be detected needs to be preprocessed, that is, the first area to be detected needs to be scaled to the first size.

[0049] As an embodiment, assume that the input image size recognized by the target detection model is (w1, h1, c), where w1 is the width of the input image, h1 is the height of the input image, and c is the number of channels of the image. In general, w1 = h1. Assume that the size of the first area to be detected after scaling is (w2, h2, c), it should be ensured that the longest side of the first area to be detected after scaling is equal to the size of the input image of the target detection model, that is, the following relationship is satisfied:

[0050] max(w2,h2)=w1;

[0051] For example, the first area to be detected may be scaled using a bilinear difference algorithm. Finally, the missing part is filled with a value of 0 to the size of the input image recognized by the target detection model.

[0052] The target detection model is a deep learning detection algorithm, such as YOLO, RCNN, etc.

[0053] By means of this embodiment, the items in the first area to be detected can be magnified to a first degree relative to the items in the energy map, and then identified using the target detection model. The method of this embodiment relatively magnifies the volume of small-volume items that may exist, retains the characteristic information of small-volume items to the greatest extent, and solves the problem of serious lack of characteristics of small-volume items. The method of this embodiment can identify the items in the first area to be detected with a high probability, and reduce the situation of missed detection and false detection to a certain extent. Since the items to be detected have been detected by X-rays, the items in the remaining areas of the energy map except the first area to be detected have been identified. At this time, the items detected in the first area to be detected are mapped to the energy map, and all the items contained in the items to be detected can be obtained. Furthermore, the items detected in the first area to be detected and the items detected in the energy map can be deduplicated, and then the items detected in the first area to be detected are mapped to the energy map, and finally all the items contained in the items to be detected are obtained. The method of this embodiment can detect items that are difficult to penetrate materials, and reduce the situation of missed detection and false detection to a certain extent.

[0054] Please attend Figure 3 , is a flow chart of the second embodiment of the object detection method of the present invention. Among them, step S21 and step S22 are the same as the above Figure 1 The step S11 and the step S12 in the first embodiment shown are the same, except that, after the step S22, the present embodiment further includes:

[0055] Step S23: Divide the first area to be detected to obtain a plurality of sub-areas.

[0056] As an embodiment, the first area to be detected is divided to obtain a plurality of sub-areas. In one embodiment, the first area to be detected can be evenly divided to obtain a plurality of sub-areas. In another embodiment, the first area to be detected can also be divided by a sliding window with a preset step length to obtain a plurality of sub-areas with preset side lengths.

[0057] For example, if the size of the first area to be detected is (m, m, c), the size of the sub-area block is 1 / k of the original image, that is, (m / k, m / k, c). N sub-area blocks are obtained by sliding a window with a preset step size, such as a step size of m / 2k, that is:

[0058] N = (2k-1) 2 .

[0059] When m=4 and K=2, 9 sub-regions can be obtained from the first region to be detected by using a sliding window with a step size of 1. Figure 4 shown.

[0060] Step S24: Detect the sub-region using the target detection model to identify the objects contained in the first area to be detected, and the size of the sub-region is the third size.

[0061] As an embodiment, after the sub-regions are captured, the target detection model is used to perform target detection on each sub-region again to identify the objects contained in the sub-region.

[0062] As an embodiment, the size of the intercepted sub-region is the third size, the input image size of the target detection model is the first size, and the first size is larger than the second size. If the target detection model is used to detect the sub-region, the sub-region needs to be pre-processed, that is, the sub-region is scaled to the first size.

[0063] It can be understood that the sub-region is divided from the first area to be detected, so the third size is smaller than the second size. That is, in this embodiment, when the sub-region is detected using the target detection model, the degree of magnification of the sub-region is greater than the degree of magnification when the first area to be detected is detected, that is, through the method of this embodiment, the items in the sub-region can be magnified to a second degree relative to the items in the energy map, and then identified using the target detection model, which can identify the items in the sub-region with a high probability, and then identify the items contained in the first area to be detected. It should be noted that the second degree is greater than the first degree, that is, when performing detection, the degree of magnification of the items in the sub-region is greater than the degree of magnification of the items in the first area to be detected. This further reduces missed detections and false detections.

[0064] Since the items to be detected have been detected by X-rays, the items in the remaining areas of the energy map except the first area to be detected have been identified. After all sub-areas are detected, the items identified in all sub-areas can be mapped to the energy map, and all items contained in the items to be detected can be obtained. Furthermore, the items detected in all sub-areas and the items detected in the energy map can be deduplicated, and then the items detected in all sub-areas are mapped to the energy map, and finally all items contained in the items to be detected are obtained. The method of this embodiment can detect items made of materials that are difficult to penetrate, and further identify the problem of difficult identification of items due to severe stacking, and further reduce missed detections and false detections.

[0065] See also Figure 5 , is a flow chart of the third embodiment of the object detection method of the present invention. In this embodiment, step S31 and step S32 are the same as the above Figure 1 The step S11 and the step S12 in the first embodiment shown are the same, except that, after the step S32, the present embodiment further includes:

[0066] Step S33: acquiring a second area to be detected from the first area to be detected, wherein the second area to be detected includes an area with a stacking degree greater than a stacking threshold.

[0067] As an embodiment, the first area to be detected is divided to obtain a plurality of sub-areas. The specific division method is the same as that described above. Figure 3 The same as step S23 shown in FIG. Figure 4 As shown, no further description is given here.

[0068] The stacking degree of each sub-region is calculated, and the sub-region with a stacking degree greater than the stacking threshold is used as the second region to be detected. Figure 6 As shown, step S33 includes:

[0069] Step S41: Convert the sub-region into a grayscale image.

[0070] As an embodiment, since the sub-region is obtained by intercepting from the energy map, that is, the sub-region is also an energy map, the image of the sub-region is further converted into a grayscale image.

[0071] In another embodiment, the energy map needs to be processed by an X-ray image processing algorithm and a rendering algorithm, that is, the energy map is converted into an X-ray image. At this time, after the sub-region is obtained, the sub-region is further converted from the X-ray image to a grayscale image. A grayscale histogram corresponding to the grayscale image can be further calculated.

[0072] Step S42: Calculate the color intensity corresponding to the grayscale image, and calculate the edge intensity corresponding to the grayscale image.

[0073] As an embodiment, the color intensity is calculated based on the gray value of the pixel and the proportion of the pixel corresponding to the gray value in the gray image. Assuming that the proportion of the pixel with a gray value of H in the gray image is PH, the calculation formula of the color intensity Qc is:

[0074]

[0075] Wherein, N is the grayscale value, for example, 0 to 255.

[0076] As an embodiment, the feature map corresponding to the grayscale image is calculated to obtain the feature value corresponding to each pixel; the number of pixels whose feature values ​​are greater than the strong edge point threshold is counted to obtain the edge strength. For example, assuming that the feature value of a certain pixel n in sub-region I is Sn, and the strong edge point threshold is Sc, the number of pixels whose feature values ​​are greater than the strong edge point threshold Qs is:

[0077] Qs=count(Sn>Sc), n∈I.

[0078] As an embodiment, the number Qs of pixel points whose characteristic values ​​are greater than the strong edge point threshold is the edge strength.

[0079] Step S43: Calculate the stacking degree of each sub-region based on the color intensity and the edge intensity.

[0080] As an embodiment, the stacking degree of each sub-region may be calculated based on the color intensity Qc and the edge intensity Qs.

[0081] In a specific embodiment, the color intensity Qc and the edge intensity Qs are weighted and summed to obtain the stacking degree Q. Specifically:

[0082] Q = μ1Qc + μ2Qs;

[0083] Among them, μ1 is the weight of color intensity Qc, and μ2 is the weight of edge intensity Qs.

[0084] The calculated stacking degree Q of the sub-region is compared with the stacking threshold. If the stacking threshold Q is greater than the stacking threshold, the corresponding sub-region is used as the second region to be detected.

[0085] Step S34: Detect the second area to be detected using the target detection model to identify objects contained in the second area to be detected.

[0086] In this embodiment, after performing target detection on the first area to be detected, the stacking degree of the first area to be detected is further detected to obtain a second area to be detected whose stacking degree is greater than a stacking threshold. The second area to be detected is detected using the target detection model to identify the objects contained in the second area to be detected. In this way, the first area to be detected can be further identified to determine the objects contained in the first area to be detected.

[0087] That is, after performing a target detection on the first area to be detected (the area where the difficult-to-penetrate material is located), this embodiment further detects the severe stacking area of ​​the first area to be detected, and further performs target detection on the severe stacking area to reduce false detection and missed detection.

[0088] It should be noted that after detecting the items contained in the second area to be detected, the items contained in the second area to be detected are deduplicated, and further the items contained in the second area to be detected and the first area to be detected are deduplicated, and the items contained in the first area to be detected and the energy image are deduplicated. The items contained in the second area to be detected and the items contained in the second area to be detected are remapped to the energy image, and the deduplicated items contained in the second area to be detected, the items contained in the first area to be detected, and the items detected by the energy image are all the items contained in the items to be detected. The security inspection system displays all the items contained in the detected items to be detected on the display device for the security inspector to verify.

[0089] The method of this embodiment is of great significance to the detection rate of items in the security inspection system. It can detect prohibited items with a higher probability, such as small prohibited items such as small bullets, etc., and reduce false detection and missed detection.

[0090] See also Figure 7 , is a schematic diagram of the structure of an embodiment of the object detection device of the present invention, which specifically includes: an energy graph acquisition module 71 , an interception module 72 and a detection module 73 .

[0091] The energy map acquisition module 71 is used to acquire the energy map corresponding to the object to be inspected. As an embodiment, the object to be inspected can be irradiated by an X-ray source. X-rays have different penetrating abilities on different materials, and there will be different degrees of energy attenuation when passing through objects, so that the energy distribution map of the object to be inspected can be collected on the receiving board. The energy map of a general X-ray security inspection machine has a value range of 0-68000. Figure 2 This is an example of mapping the energy of the energy map to the range of 0-255 and displaying it in the form of a grayscale image.

[0092] The interception module 72 is used to obtain a first area to be detected from the energy map, where the first area to be detected includes an area whose energy value is less than an energy threshold.

[0093] In one embodiment, the interception module 72 is further used to divide the first area to be detected to obtain a plurality of sub-areas, and the size of the sub-areas is a third size, and the third size is smaller than the second size.

[0094] In one embodiment, the interception module 72 is further used to obtain a second area to be detected from the first area to be detected, and the second area to be detected includes an area with a stacking degree greater than a stacking threshold. As an embodiment, the interception module 72 divides the first area to be detected to obtain a plurality of sub-areas; calculates the stacking degree of each sub-area, and takes the sub-area with a stacking degree greater than the stacking threshold as the second area to be detected. As an embodiment, the interception module 72 divides the first area to be detected with a sliding window of a preset step length to obtain a plurality of sub-areas with a preset side length.

[0095] As an embodiment, the interception module 72 converts the sub-region into a grayscale image; calculates the color intensity corresponding to the grayscale image, and calculates the edge intensity corresponding to the grayscale image; and calculates the stacking degree of each sub-region based on the color intensity and the edge intensity.

[0096] In one embodiment, the interception module 72 calculates the color intensity based on the grayscale value of the pixel and the proportion of the pixel corresponding to the grayscale value in the grayscale image. The interception module 72 calculates the feature map corresponding to the grayscale image, and then obtains the feature value corresponding to each pixel; counts the number of pixels whose feature values ​​are greater than the strong edge point threshold, and then obtains the edge intensity. The interception module 72 performs weighted summation on the color intensity and the edge intensity, and then obtains the stacking degree.

[0097] The detection module 73 is used to detect the first area to be detected using a target detection model to identify objects contained in the first area to be detected, wherein the input image size of the target detection model is a first size, the size of the first area to be detected is a second size, and the first size is larger than the second size.

[0098] In one embodiment, the detection module 73 is used to detect the sub-region using the target detection model to identify the objects contained in the first area to be detected, and the size of the sub-region is the third size.

[0099] In one embodiment, the detection module 73 is used to detect the second area to be detected by using the target detection model to identify the objects contained in the second area to be detected.

[0100] In one embodiment, the detection module 73 is further configured to remove duplicates of objects included in the second area to be detected and the first area to be detected, and to remove duplicates of objects included in the first area to be detected and the energy map.

[0101] The detection module 73 is also used to remap the items contained in the second area to be detected and the items contained in the second area to be detected to the energy image. The items contained in the second area to be detected after deduplication, the items contained in the first area to be detected, and the items detected by the energy image are all the items contained in the items to be detected. The security inspection system displays all the items contained in the detected items to be detected on the display device for the security inspector to verify.

[0102] The device of this embodiment is of great significance to the detection rate of items in the security inspection system. It can detect prohibited items with a higher probability, such as small prohibited items such as small bullets, etc., and reduce false detection and missed detection.

[0103] See also Figure 8 , is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, the electronic device includes a memory 202 and a processor 201 connected to each other.

[0104] The memory 202 is used to store program instructions for implementing any one of the above methods.

[0105] The processor 201 is used to execute program instructions stored in the memory 202 .

[0106] The processor 201 may also be referred to as a CPU (Central Processing Unit). The processor 201 may be an integrated circuit chip having signal processing capabilities. The processor 201 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0107] The memory 202 can be a memory stick, a TF card, etc., which can store all the information in the electronic device of the device, including the input raw data, computer programs, intermediate operation results and final operation results are all stored in the memory. It stores and retrieves information according to the location specified by the controller. With the memory, the electronic device has a memory function to ensure normal operation. The memory of the electronic device can be divided into main memory (internal memory) and auxiliary memory (external memory) according to its use, and there is also a classification method of dividing it into external memory and internal memory. External memory is usually a magnetic medium or an optical disk, etc., which can store information for a long time. Memory refers to the storage component on the motherboard, which is used to store the data and programs currently being executed, but is only used to temporarily store programs and data. If the power is turned off or the power is cut off, the data will be lost.

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

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

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

[0111] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a system server, or a network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present application.

[0112] See also Fig. 9, which is a schematic diagram of the structure of the computer-readable storage medium of the present invention. The storage medium of the present application stores a program file 203 that can implement all the above methods, wherein the program file 203 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of each implementation method of the present application. The aforementioned storage device includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., which can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.

[0113] The above are only implementation modes of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for detecting an object, characterized in that: include: Obtaining an energy map corresponding to the object to be detected; Acquire a first area to be detected from the energy map, where the first area to be detected includes an area where the energy value is less than an energy threshold; Detecting the first area to be detected using a target detection model to identify objects contained in the first area to be detected, wherein an input image size of the target detection model is a first size, a size of the first area to be detected is a second size, and the first size is larger than the second size; The detecting the first area to be detected by using the target detection model to identify the objects contained in the first area to be detected includes: Dividing the first area to be detected to obtain a plurality of sub-areas; converting the sub-region into a grayscale image; Calculating the color intensity corresponding to the grayscale image, and calculating the edge intensity corresponding to the grayscale image; Calculate the stacking degree of each of the sub-regions based on the color intensity and the edge intensity; Taking the sub-region with a stacking degree greater than the stacking threshold as the second region to be detected; The second area to be detected is detected using the target detection model to identify objects contained in the second area to be detected.

2. The method according to claim 1, characterized in that The step of detecting the first area to be detected by using the target detection model to identify objects contained in the first area to be detected includes: Dividing the first area to be detected to obtain a plurality of sub-areas; The sub-region is detected by using the target detection model to identify objects contained in the first area to be detected, and the size of the sub-region is a third size, which is smaller than the second size.

3. The method according to claim 1, characterized in that The step of calculating the color intensity corresponding to the grayscale image comprises: The color intensity is calculated based on the grayscale value of the pixel and the proportion of the pixel corresponding to the grayscale value in the grayscale image.

4. The method according to claim 3, characterized in that: The step of calculating the edge strength corresponding to the grayscale image comprises: Calculate the feature map corresponding to the grayscale image, and then obtain the feature value corresponding to each pixel; The number of pixel points whose characteristic values ​​are greater than the strong edge point threshold is counted to obtain the edge strength.

5. The method according to claim 3, characterized in that: The step of calculating the stacking degree of each of the sub-regions based on the color intensity and the edge intensity comprises: The color intensity and the edge intensity are weightedly summed to obtain the stacking degree.

6. The method according to claim 1, characterized in that The step of dividing the first area to be detected to obtain a plurality of sub-areas includes: The first area to be detected is divided into a plurality of sub-areas by a sliding window with a preset step size and a preset side length.

7. The method according to claim 1, characterized in that The method further comprises: Deduplication is performed on the objects included in the second area to be detected and the first area to be detected.

8. The method according to claim 1, characterized in that The method further comprises: Deduplication is performed on the first area to be detected and the objects included in the energy map.

9. An object detection device, characterized in that: include: An energy map acquisition module is used to acquire an energy map corresponding to the object to be detected; An interception module, used for acquiring a first area to be detected from the energy map, wherein the first area to be detected includes an area where the energy value is less than an energy threshold; A detection module, configured to detect the first area to be detected using a target detection model to identify items contained in the first area to be detected, wherein the input image size of the target detection model is a first size, the size of the first area to be detected is a second size, and the first size is larger than the second size; the detection module is configured to divide the first area to be detected to obtain a plurality of sub-areas; convert the sub-areas into grayscale images; calculate the color intensity corresponding to the grayscale image, and calculate the edge intensity corresponding to the grayscale image; The stacking degree of each sub-region is calculated based on the color intensity and the edge intensity; the sub-region with a stacking degree greater than a stacking threshold is used as the second area to be detected; and the second area to be detected is detected using the target detection model to identify the objects contained in the second area to be detected.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: A program file is stored, and the program file can be executed to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Article detection method, device and system and computer readable storage medium

    CN110751079A

  • Object detection apparatus detection method and program

    US20140140576A1

  • Detector, and detecting system and method for dividing energy regions intelligently

    US20180059264A1