Detection method and device of security inspection equipment, electronic equipment and storage medium
The detection method enhances image prominence and uses target detection models to automate the evaluation of X-ray security inspection equipment, addressing inconsistent manual standards and improving calibration efficiency.
Patent Information
- Application Number
- CN202411341810.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-31
Smart Images

Figure CN119228763A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a detection method, device, electronic device and storage medium for security inspection equipment. Background Art
[0002] The image index test of X-ray security inspection equipment is achieved by collecting images of the national standard test body A for image resolution and the national standard test body B for material resolution. It is commonly used in various basic test application scenarios such as type inspection, shipment, and acceptance. The international test body A is divided into four test indicators, namely, the four image indicators of line resolution (TEST1), penetration resolution (TEST2), spatial resolution (TEST3), and penetration (TEST4) of the security inspection equipment. The international test body B is divided into four test indicators, namely, the four image indicators of organic matter resolution (TEST5 and TEST6), mixture resolution (TEST7), inorganic matter resolution (TEST8), and effective material resolution (TEST9 and TEST10) of the security inspection equipment.
[0003] In actual applications, in order to evaluate each image indicator, the national standard test body A and the international test body B need to be placed in different positions based on typical values and application values, multiple images are collected, and the specific equipment performance indicator level is judged based on the staff's experience, which leads to too low calibration and detection efficiency of the national standard test body of security inspection equipment. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a detection method, device, electronic device and storage medium for security inspection equipment, so as to improve the calibration detection efficiency of the national standard test body of security inspection equipment. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a detection method for security inspection equipment, including:
[0006] Acquire a first image of the test object captured by the security inspection device;
[0007] Performing region recognition on the first image to obtain target detection regions for detecting preset test indicators;
[0008] Determining a display enhancement mode for each of the target detection areas according to each of the preset test indicators, wherein the display enhancement mode is used to enhance the display prominence of the detection object in the target detection area;
[0009] For each of the target detection areas, the display of the target detection area is enhanced by using the display enhancement method to obtain an image to be detected of the target detection area;
[0010] The target detection model is used to perform target detection on the image to be detected, and the detection result of the preset test index of the security inspection equipment is obtained.
[0011] In a second aspect, an embodiment of the present application provides a detection device for security inspection equipment, including:
[0012] An image acquisition module, used to acquire a first image of the test object collected by the security inspection device;
[0013] A region recognition module, used to perform region recognition on the first image to obtain a target detection region for detecting a preset test indicator;
[0014] A display enhancement mode determination module, used to determine the display enhancement mode of each target detection area according to each preset test index, wherein the display enhancement mode is used to enhance the display prominence of the detection object in the target detection area;
[0015] A display enhancement module, for performing display enhancement on each target detection area by using the display enhancement method to obtain an image to be detected of the target detection area;
[0016] The target detection module is used to perform target detection on the image to be detected using a target detection model to obtain the detection result of the preset test index of the security inspection equipment.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0018] Memory, used to store computer programs;
[0019] The processor is used to implement any of the above-mentioned security inspection equipment detection methods when executing the program stored in the memory.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the detection method of any of the security inspection equipment described above is implemented.
[0021] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned methods for detecting security inspection equipment.
[0022] Beneficial effects of the embodiments of the present application:
[0023] The detection method of the security inspection equipment provided in the embodiment of the present application obtains a first image of the test body collected by the security inspection equipment; performs region recognition on the first image to obtain a target detection area for detecting preset test indicators; determines the display enhancement method of each target detection area according to each preset test indicator, and for each target detection area, performs display enhancement on the target detection area using the display enhancement method to obtain an image to be detected in the target detection area. The display prominence enhancement with different effects is performed for different types of detection objects, so that the target detection of the image to be detected can achieve a more detailed detection of the detection object, thereby obtaining a more accurate detection result; the target detection model is used to perform target detection on the image to be detected, and the detection result of the preset test indicator of the security inspection equipment is obtained. There is no need for manual detection and judgment, and the detection results of multiple preset test indicators can be obtained at one time by using a trained target detection model, which not only solves the problem of inconsistent evaluation standards caused by manual detection, but also improves the calibration detection efficiency of the national standard test body of the security inspection equipment.
[0024] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0026] Figure 1-1 A schematic diagram of a flow chart of a detection method for security inspection equipment provided in an embodiment of the present application;
[0027] Figure 1-2 An example diagram of a national standard test body A provided in an embodiment of the present application;
[0028] Figure 1-3 An example diagram of a national standard test body B provided in an embodiment of the present application;
[0029] Figure 2 A possible implementation method of step S103 provided in an embodiment of the present application;
[0030] Figure 3 A possible implementation method of step S101 provided in an embodiment of the present application;
[0031] Figure 4 A possible implementation method of step S302 provided in an embodiment of the present application;
[0032] Figure 5Another possible implementation method of step S302 provided in the embodiment of the present application;
[0033] Figure 6 A possible implementation method of step S104 provided in an embodiment of the present application;
[0034] Figure 7 A possible implementation method of step S603 provided in an embodiment of the present application;
[0035] Figure 8 Another possible implementation method of step S603 provided in the embodiment of the present application;
[0036] Fig. 9 An example flow chart of a detection method for security inspection equipment provided in an embodiment of the present application;
[0037] Fig.10 A schematic diagram of the structure of a detection device for security inspection equipment provided in an embodiment of the present application;
[0038] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0040] In the related technology, in order to evaluate each indicator, the national standard test body A and the international test body B need to be placed in different positions based on typical values and application values, and multiple images need to be collected. The specific equipment performance indicator level is judged based on the experience of the staff, resulting in the problem of low efficiency in the execution of the image indicator test process, that is, the calibration and detection efficiency of the national standard test body of the security inspection equipment is too low.
[0041] In order to solve at least one of the above problems, the embodiments of the present application provide a detection method, device, electronic device and storage medium for security inspection equipment.
[0042] The following is a detailed description of the detection method of the security inspection equipment provided in the embodiment of the present application. Figure 1-1 , Figure 1-1 A flow chart of a detection method for a security inspection device provided in an embodiment of the present application includes:
[0043] Step S101: acquiring a first image of a test object captured by a security inspection device.
[0044] Security inspection equipment refers to X-ray security inspection equipment. The test object passes through the irradiation area of the X-ray tube of the security inspection equipment. Different materials and thicknesses of the test object have different degrees of absorption and scattering of X-rays. These attenuation signals are received by the detector of the security inspection equipment to form an X-ray attenuation grayscale map, thereby obtaining the first image of the test object.
[0045] The test body refers to the national standard test body, including the national standard test body A for image resolution and the national standard test body B for material resolution, respectively. Figure 1-2 and Figure 1-3 The test body includes multiple areas, which are used to evaluate different image indicators (preset test indicators).
[0046] In one embodiment of the present application, the preset test indicators include line resolution, penetration resolution, spatial resolution, penetration, organic matter resolution, mixture resolution, inorganic matter resolution, and effective material resolution.
[0047] The national standard test body A includes four areas: TEST1, TEST2, TEST3, and TEST4, which are used to evaluate the four image indicators of line resolution, penetration resolution, spatial resolution, and penetration. The national standard test body B includes six areas: TEST5, TEST6, TEST7, TEST8, TEST9, and TEST10. Among them, TEST5 and TEST6 are used to evaluate the organic matter resolution index, TEST7 is used to evaluate the mixture resolution index, TEST8 is used to evaluate the inorganic matter resolution, and TEST9 and TEST10 are used to evaluate the effective material resolution.
[0048] Specifically, line resolution refers to the ability of the equipment to distinguish a single solid copper wire; penetration resolution refers to the ability of the equipment to distinguish a single solid copper wire under a specified thickness of alloy aluminum steps; spatial resolution refers to the ability of the equipment to distinguish line pairs, and a line pair refers to a group of evenly arranged metal wires, and the interval between the two wires is the same as the diameter of the wire; penetration refers to the ability of the equipment to penetrate the object being inspected; organic resolution refers to the ability of the equipment to distinguish equivalent organic matter; mixture resolution refers to the ability of the equipment to distinguish equivalent mixtures; inorganic resolution refers to the ability of the equipment to distinguish equivalent inorganic matter; effective material resolution refers to the ability of the equipment to distinguish substances with different equivalent atomic numbers under a specified thickness of steel steps.
[0049] Exemplarily, before collecting the first image, the security inspection device should also adjust the parameters to be tested of the security inspection device, such as tube voltage, tube current, conveyor belt speed, etc. The test object is placed normally (application value) or near the source (typical value) in the channel in turn for bagging operation, and multiple first images of the test object are collected.
[0050] Step S102: performing region recognition on the first image to obtain target detection regions for detecting preset test indicators.
[0051] The first image of the test object is subjected to region recognition, and each target detection region for detecting each preset test index is determined, and the preset test index corresponds to the target detection region one by one. Exemplarily, when collecting the first image of the test object, multiple images can be collected at the same time, each image index is detected by at least one image, and the target detection region corresponding to the image index is detected in each corresponding image.
[0052] Exemplarily, a pre-trained lightweight target detection model may be used to realize region recognition of the first image, for example, the yolo series (a target detection model), the nanodet series (a target detection model), etc. The lightweight target detection model is trained in advance using sample images of the test body with the target area annotated, so that the target detection model can identify the target detection area corresponding to the predicted test index in the first image.
[0053] Step S103: determining a display enhancement method for each target detection area according to each preset test index.
[0054] The display enhancement method is used to enhance the display prominence of the detection object in the target detection area.
[0055] Each preset test indicator has a different focus. In order to better determine the capability level of each indicator, the detection objects in the target area detected are different. For example, the detection object of the line resolution indicator is a metal wire (copper wire), and the detection object of the penetration indicator is a metal cake (lead cake). The image quality collected by the same security inspection equipment for different detection objects is similar. In order to better highlight the detection objects with different focus, different display enhancement methods are used to enhance the display of each target detection area to enhance the display prominence of each detection object. Specifically, different types of image enhancement algorithms can be used for implementation. Exemplarily, it can be selected according to the type of detection object. For example, for linear detection objects, an image enhancement method that can enhance linear patterns is selected, for planar detection objects, an image enhancement method that can enhance the entire surface pattern is selected, and for detection objects with color differentiation, an image enhancement method with prominent colors is selected, etc.
[0056] Step S104, for each of the target detection areas, using the display enhancement method to perform display enhancement on the target detection area to obtain an image to be detected of the target detection area;
[0057] Step S105, using the target detection model, performing target detection on the image to be detected, and obtaining the detection result of the preset test index of the security inspection device.
[0058] For each target detection area, the display enhancement is performed on the detection object in the target detection area using the corresponding display enhancement method determined above, so as to obtain the image to be detected in the target detection area.
[0059] The trained target detection model is used to perform target detection on the image to be detected, and the detection results of each preset test index are determined according to the target detection results. Exemplarily, the target detection model can select a trained high-precision model so that all types of detection objects can be accurately detected.
[0060] The test results may include whether the preset test indicators are qualified, the capability level of the preset test indicators, etc. Specifically, the qualification standards and level standards of the preset test indicators can be pre-set according to actual needs, for example Figure 1-2 and Figure 1-3 In the figure, the multiple numbers in each area represent different levels of the corresponding test indicators in that area.
[0061] As can be seen from the above, the detection method of the security inspection equipment provided in the embodiment of the present application obtains the first image of the test body collected by the security inspection equipment; performs region recognition on the first image to obtain the target detection area for detecting the preset test index; determines the display enhancement method of each target detection area according to each preset test index, and for each target detection area, uses the display enhancement method to perform display enhancement on the target detection area to obtain the image to be detected of the target detection area. The display prominence enhancement with different effects is performed for different types of detection objects, so that the target detection of the image to be detected can achieve a more detailed detection of the detection object, thereby obtaining a more accurate detection result; uses the target detection model to perform target detection on the image to be detected, and obtains the detection result of the preset test index of the security inspection equipment. There is no need for manual detection and judgment, and only the trained target detection model is needed to obtain the detection results of multiple preset test indicators at one time, which not only solves the problem of inconsistent evaluation standards caused by manual detection, but also improves the calibration detection efficiency of the national standard test body of the security inspection equipment.
[0062] In one embodiment of the present application, Figure 2 As shown, the above step S103 determines the display enhancement mode of each target detection area according to each preset test index, including:
[0063] Step S201, when the preset test index is the line resolution or the penetration resolution, determining that the display enhancement mode of the target detection area is display contrast enhancement;
[0064] Wherein, the display contrast enhancement is used to enhance the contrast of the copper wire in the target detection area;
[0065] Step S202, when the preset test indicator is the spatial resolution, determining that the display enhancement mode of the target detection area is edge enhancement;
[0066] Wherein, the edge enhancement is used to enhance the line edges of the horizontal lines and vertical lines in the target detection area;
[0067] Step S203, when the preset test index is the penetration, determining that the display enhancement mode of the target detection area is low-light image enhancement;
[0068] Among them, the low-light image enhancement is used to enhance the display prominence of the lead cake in the target detection area.
[0069] When the preset test index is line resolution or penetration resolution, the detection object is usually a copper wire. The display contrast of the target detection area is enhanced. Specifically, it can be achieved by using limited contrast adaptive histogram equalization to enhance the display contrast of the detection object area in the target detection area, while avoiding the noise problem that may be caused by excessive contrast enhancement, thereby improving the contrast of the copper wire in the target detection area, so that the image to be detected is more conducive to detecting the ability of the security inspection equipment to distinguish a single solid copper wire (line resolution) or the ability to distinguish a single solid copper wire under a specified thickness of alloy aluminum ladder (penetration resolution). Figure 1-2 The AWG (American Wire Gauge) marked in the TEST1 area refers to the wire gauge standard, which is used as a reference for the test index level. The "9.5, 15.9, 22.2" marked in the TEST2 area indicates the thickness of the alloy aluminum.
[0070] When the preset test index is spatial resolution, the detection objects are usually horizontal lines and vertical lines. Edge enhancement is performed on the target detection area to enhance the line edge texture of horizontal lines and vertical lines, so that the image to be detected is more conducive to detecting the ability of the security inspection equipment to distinguish line pairs. Specifically, edge enhancement can be achieved by spatial domain enhancement, frequency domain image enhancement, etc.
[0071] When the preset test indicator is penetration, the detection object is usually a lead cake. Perform low-light image enhancement on the target detection area, and enhance the image quality of the target detection area with darker light conditions to make it clear or close to the effect of the naked eye. Specifically, it can be achieved through methods such as spatial domain method and frequency domain method, or through traditional image methods such as logarithmic transformation, homomorphic filtering, and gamma transformation. This makes the image to be detected more conducive to detecting the ability of security inspection equipment to penetrate materials of different thicknesses. The lead cake charts of different grayscales in TEST4 in the figure represent lead cakes covered by materials of different thicknesses.
[0072] The four indicators of organic matter resolution, mixture resolution, inorganic matter resolution, and effective material resolution involve material resolution, and the corresponding target detection areas do not require image enhancement.
[0073] From the above, it can be seen that the detection method of security inspection equipment provided in the embodiment of the present application selects different display enhancement methods to enhance the display prominence of the detection objects in the target detection area according to the different detection objects corresponding to the preset test indicators, so that the image display quality of the image to be detected is more conducive to detecting the preset test indicators of the security inspection equipment, reducing the detection errors that may be caused by the image display quality, and improving the accuracy of the detection of the test indicators of the security inspection equipment.
[0074] In one embodiment of the present application, Figure 3 As shown, the above step S101 acquires the first image of the test object collected by the security inspection device, including:
[0075] Step S301, obtaining a second image including the test object collected by the security inspection equipment;
[0076] Step S302, according to the data format of the second image, selecting a boundary recognition method corresponding to the data format, recognizing the boundary of the test object in the second image, and determining the position of the test object in the second image;
[0077] Step S303: cropping the second image according to the position of the test object in the second image to obtain a first image of the test object.
[0078] When the test object passes through the detection area of the security inspection device (for example, the conveyor belt of the security inspection device), the security inspection device collects a second image in the detection area, which includes the test object. The test object (main body) in the second image is identified by boundary, so as to determine the position of the test object in the second image, and based on this, the test object is cut out from the second image to obtain a first image including only the test object.
[0079] Since different security inspection equipment has different data management methods, the formats of the collected image data may be different. For example, the obtained second image may be original raw (raw data format of the image sensor) data, video stream data, JPEG (Joint Photographic Experts Group, an image format) image data, etc. For different data formats, the boundary recognition method corresponding to the data format is selected to realize the recognition of the test body. Specifically, when the security inspection equipment collects video stream data, the boundary of the test body can be recognized and cropped frame by frame of the video stream data, and at least one first image for testing is provided for each preset test indicator.
[0080] As can be seen from the above, the detection method for security inspection equipment provided in the embodiment of the present application, after the security inspection equipment collects the second image for the detection area, selects the boundary recognition method corresponding to the data format according to the data format of the second image, performs boundary recognition on the test body in the second image, and obtains a first image including only the test body. Subsequent processing is performed based on the first image, thereby avoiding the interference of index detection caused by other contents in the detection area included in the second image, and improving the accuracy of index testing of security inspection equipment. In addition, different boundary recognition methods are used for processing second images with different data formats, which can adapt to various types of security inspection equipment, has high scalability and a wide range of adaptation, and can be better applied to actual scenarios.
[0081] In one embodiment of the present application, Figure 4 As shown, the above step S302 selects a boundary recognition method corresponding to the data format of the second image according to the data format of the second image, recognizes the boundary of the test object in the second image, and determines the position of the test object in the second image, including:
[0082] Step S401, when the data format of the second image is a video format or a picture format, obtaining a grayscale value of each pixel in the second image;
[0083] Step S402, for each row of the second image, if the row mean grayscale value of each pixel in the row is less than a preset row mean threshold, determining it as a row boundary of the test object in the second image;
[0084] Step S403, for each column of the second image, if the pixel gray column mean value of each pixel in the column is less than a preset column mean value threshold, determining it as a column boundary of the test object in the second image;
[0085] Step S404: determining the position of the test object in the second image based on the row boundaries and the column boundaries.
[0086] In the case where the second image is image data cut out frame by frame from video stream data, or image data directly collected by security inspection equipment, the grayscale value of each pixel in the second image is obtained, and the row mean threshold and column mean threshold of the pixel grayscale are pre-set according to actual needs. The first row and the last row of the second image are traversed row by row, and when the row mean is less than the preset row mean threshold, the row is determined as the row boundary of the test body; the first column and the last column of the second image are traversed column by column, and when the column mean is less than the preset column mean threshold, the column is determined as the column boundary of the test body. In this way, the row boundary and the column boundary of the second image are determined, and the position of the test body in the second image is determined.
[0087] From the above, it can be seen that the detection method of the security inspection equipment provided in the embodiment of the present application performs pixel grayscale mean sequence judgment on the second image row by row and column by column until the row boundary and column boundary of the test object in the second image are determined, and the position of the test object in the second image is determined based on this, thereby accurately realizing the boundary recognition of the second image, so that each area of the test object can be fully inspected in the next step, further improving the accuracy and completeness of subsequent inspections.
[0088] In one embodiment of the present application, Figure 5 As shown, the above S302 selects a boundary recognition method corresponding to the data format of the second image according to the data format of the second image, recognizes the boundary of the test object in the second image, and determines the position of the test object in the second image, including:
[0089] Step S501, when the second image is original raw data, fusing high-energy data and low-energy data in the original raw data to obtain fused raw data;
[0090] Step S502, generating a color image including the test object according to the color table built into the raw data;
[0091] Step S503: performing boundary recognition based on the color of the test object in the color image to determine the position of the test object.
[0092] In the case where the second image output by the security inspection device is original raw data, it is impossible to perform boundary recognition according to the above-mentioned image data format. At this time, the high-energy and low-energy data in the original raw data are fused to obtain the fused raw data, and an uncolored grayscale image is obtained. Look up the built-in color table and color the original raw data to generate a color image of the second image. By identifying the color of the pre-set test body, the position of the test body in the second image is determined in the color image. Specifically, the built-in color table is pre-set, and the color of the test body is set according to actual needs, for example, the inorganic resolution detection area is set to blue.
[0093] As can be seen from the above, the detection method for security inspection equipment provided in the embodiment of the present application, when the second image output by the security inspection equipment is original raw data, fuses the high and low energy data of the original raw data, colors the original raw data through the built-in color table, and generates a color image of the second image. By identifying the color of the pre-set test body and determining the position of the test body in the color image (second image), the main boundary of the second image is accurately identified, so that each area of the test body can be completely detected in the next step, further improving the accuracy and completeness of subsequent detection. The security inspection equipment that outputs the original raw data format can also implement index testing through the target detection model, so that the method can be adapted to various types of security inspection equipment, has high scalability and a wide range of adaptation, and can be better applied to actual scenarios.
[0094] In one embodiment of the present application, Figure 6 As shown, the above step S104 uses the target detection model to perform target detection on the image to be detected, and obtains the detection result of the preset test index of the security inspection device, including:
[0095] Step S601, using the target detection model, performing target recognition on each of the images to be detected, obtaining a preset indicator category corresponding to the preset test indicator in each of the images to be detected, and a detection frame corresponding to the preset indicator category and a confidence level of each of the detection frames;
[0096] Step S602, filtering the detection frames whose confidence is lower than a preset confidence threshold to obtain the target detection frames corresponding to the preset indicator category;
[0097] Step S603, based on the number of target detection frames and the corresponding relationship between the preset number of detection frames and the indicator level, determine the indicator level of the preset test indicator, and obtain the detection result of the preset test indicator of the security inspection device.
[0098] The preset indicator category provides a benchmark for the level evaluation of the preset test indicators. The qualification and level division of the preset test indicators are determined according to the accuracy of the detection of the preset indicator category by the security inspection equipment. For example, the degree of copper wire breakage, the clarity of the line pair, the opening degree of the lead cake, etc. Each preset test indicator corresponds to its own preset indicator category. Specifically, as shown in Table 1, for example, the line resolution (TEST1) includes the T1_1 category: all copper wires are visible without breakage, and the penetration resolution (TEST2) includes three preset indicator categories: T2_1, T2_2, and T2_3: 1 / 3 of the copper wire is visible without breakage, 2 / 3 of the copper wire is visible without breakage, and all copper wires are visible without breakage.
[0099] Table 1
[0100]
[0101] Using the target detection model, according to the preset indicator categories, each image to be detected is subjected to target recognition, and the detection frame corresponding to each preset indicator category and the confidence of each detection frame are obtained. The detection frame with a confidence lower than the preset confidence threshold is considered to be useless, and it is filtered to obtain the target detection frame corresponding to each preset indicator category.
[0102] In an example, the confidence level is usually 0.0-1.0. The higher the confidence threshold, the stricter the evaluation of the security equipment inspection. It can be set according to actual needs. When the confidence threshold exceeds 0.8, it means that the indicator evaluation is extremely strict. In order to avoid the misjudgment of the detection frame and cause the effective detection frame to be filtered, and to achieve strict indicator evaluation, the coordinates of the detection frame are further incrementally screened to obtain the target detection frame.
[0103] Based on the number of target detection frames and the corresponding relationship between the preset number of detection frames and the indicator level, the indicator level corresponding to the number of target detection frames corresponding to each preset indicator category is determined, thereby determining the indicator level of the preset test indicator and obtaining the detection result of the security inspection equipment.
[0104] In one embodiment of the present application, the target detection model is a model obtained by training the target detection model to be trained based on a sample image, wherein the sample image includes each target detection area for detecting each of the preset test indicators, each of the target detection areas includes each preset indicator category corresponding to each of the preset test indicators, and multiple detection boxes corresponding to each of the preset indicator categories, each of the detection boxes having its own confidence level.
[0105] The sample image is input into the target detection model to be trained, and the target detection model is trained until the preset indicator categories and their corresponding detection frames output by the target detection model, as well as the confidence of each detection frame, meet the preset training conditions, and the target detection model training is completed.
[0106] The annotation basis of the sample images is shown in Table 1.
[0107] As can be seen from the above, the detection method of the security inspection equipment provided in the embodiment of the present application uses the target detection model to perform target recognition on each image to be detected, and obtains the preset indicator category corresponding to the preset test indicator in each image to be detected, as well as the detection frame corresponding to the preset indicator category and the confidence of each detection frame. After the obtained detection frame is confidence filtered and screened, the indicator level of the preset test indicator is determined based on the number of target detection frames and the correspondence between the preset number of detection frames and the indicator level. The target detection model can be trained according to actual needs, and the evaluation standard can be flexibly changed according to the actual application scenario. It has high applicability and does not require manual judgment based on experience, which reduces the training cost of professional evaluators and further improves the efficiency of security inspection equipment detection.
[0108] In one embodiment of the present application, Figure 7 As shown, the above step S603 determines the index level of the preset test index based on the number of the target detection frames and the corresponding relationship between the preset number of detection frames and the index level, and obtains the detection result of the preset test index of the security inspection device, including:
[0109] Step S701, when the preset test index is line resolution and the preset index category is that all copper wires are visible without breakage, the number of target detection frames is 1, 2, 3, 4, 5, 6, 7, respectively determining the index level of the line resolution as 28, 30, 32, 34, 36, 38, 40;
[0110] Step S702, when the preset test index is penetration resolution, and the preset index category is 1 / 3 of the copper wire is visible without breakage, 2 / 3 of the copper wire is visible without breakage, or all of the copper wire is visible without breakage, the number of target detection frames is 1, 2, 3, 4, 5, 6, 7, and the penetration resolution index levels are determined to be 24, 26, 28, 30, 32, 34, 36 respectively;
[0111] Step S703, when the preset test index is spatial resolution, and the preset index category is horizontal line pair clear without adhesion or vertical line pair clear without adhesion, the number of the target detection frames is 1, 2, 3, 4, respectively determining the index level of the spatial resolution to be 1.6, 1.3, 1.0, 0.8;
[0112] Step S704, when the preset test indicator is penetration and the preset indicator category is visible lead cake opening, the number of target detection frames is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, which respectively determine the indicator levels of the spatial resolution to be 27, 30, 32, 34, 36, 38, 40, 42, 44, 46.
[0113] The numbers of the indicator levels are as follows Figure 1-2 and Figure 1-3shown.
[0114] In an example, for a test indicator including a plurality of preset indicator categories, one or more preset indicator categories may be selected to divide the indicator levels, which may be determined specifically according to actual needs. For example, for the penetration resolution (TEST2), only the number of target detection frames corresponding to 1 / 3 of the copper wire is visible without break can be selected to perform index level division of the penetration resolution. When the number of target detection frames corresponding to 1 / 3 of the copper wire is visible without break is 1, 2, 3, 4, 5, 6, and 7, the corresponding index levels of the penetration resolution are 24, 26, 28, 30, 32, 34, and 36 respectively; the number of target detection frames corresponding to 2 / 3 of the copper wire is visible without break and all the copper wires are visible without break can also be selected to perform index level division. When the target detection frame data corresponding to 2 / 3 of the copper wire is visible without break and all the copper wires are visible without break are 1, 2, 3, 4, 5, 6, and 7 respectively, the corresponding index levels of the penetration resolution are 24, 26, 28, 30, 32, 34, and 36 respectively. Specifically, when the number of target detection frames corresponding to two index categories are inconsistent, it can be determined according to actual needs which index category's number of target detection frames shall prevail.
[0115] In one embodiment of the present application, Figure 8 As shown, the above step S603 determines the index level of the preset test index based on the number of the target detection frames and the corresponding relationship between the preset number of detection frames and the index level, and obtains the detection result of the preset test index of the security inspection device, including:
[0116] Step S801, when the preset test indicator is organic matter discrimination (TEST5), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 3, it is determined that the organic matter discrimination (TEST5) is unqualified, and when the obtained rectangular frame quantity is not less than 3, it is determined that the organic matter discrimination (TEST5) is qualified;
[0117] Step S802, when the preset test indicator is organic matter discrimination (TEST6), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 2, it is determined that the organic matter discrimination (TEST6) is unqualified, and when the obtained rectangular frame quantity is not less than 2, it is determined that the organic matter discrimination (TEST6) is qualified;
[0118] Step S803, when the preset test index is mixture resolution (TEST7) or inorganic resolution (TEST8), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 1, the mixture resolution or the inorganic resolution is determined to be unqualified, and when the obtained rectangular frame quantity is not less than 1, the mixture resolution or the inorganic resolution is determined to be qualified;
[0119] Step S804, when the preset test indicator is effective material discrimination (TEST9 and TEST10), the color components of the corresponding area of the target detection frame are clustered to obtain the number of pixels in each color block cluster set; based on whether the number of pixels in each color block cluster set meets the preset pixel number threshold, the indicator level of the effective material discrimination (TEST9 and TEST10) is determined.
[0120] The above rectangular box quantity detection can be implemented based on the Hough transform rectangle detection algorithm to determine the number of rectangular boxes in the target detection area, and determine the index level based on the rectangular box data, for example Figure 1-3 shown.
[0121] The index level of effective material identification (TEST9 and TEST10) is determined based on the preset cluster types. Specifically, there are 12 preset cluster types, such as Figure 1-3 As shown, the area corresponding to the effective material resolution index is divided into 12 clearly distinguishable color block cluster sets, and the number of pixels in each color block cluster set is counted. When the number of pixels does not meet the preset pixel number threshold, it is considered to be an invalid category. When the preset pixel number threshold is met, it is considered to be a valid category. The valid category represents the effective material category that has been distinguished. The index level of effective material resolution is determined according to the number of effective categories (1.5, 2.0, 2.5).
[0122] As can be seen from the above, the detection method of security inspection equipment provided in the embodiment of the present application determines the index level of the preset test index based on the number of target detection frames and the corresponding relationship between the preset number of detection frames and the index level. The target detection model can be trained according to actual needs, and the index level can also be divided according to actual needs, so that the detection method provided in the embodiment of the present application can flexibly change the evaluation standard according to the actual application scenario, has high applicability, and does not require manual judgment based on experience, which reduces the training cost of professional evaluators and further improves the efficiency of security inspection equipment detection.
[0123] In one embodiment of the present application, the detection process example of the security inspection equipment is as follows Fig. 9 shown.
[0124] In one embodiment of the present application, Fig.10As shown, a structural schematic diagram of a detection device of a security inspection device is also provided, including:
[0125] An image acquisition module 1001 is used to acquire a first image of the test object collected by the security inspection device;
[0126] A region recognition module 1002 is used to perform region recognition on the first image to obtain a target detection region for detecting a preset test indicator;
[0127] A display enhancement mode determination module 1003, configured to determine a display enhancement mode for each target detection area according to each of the preset test indicators, wherein the display enhancement mode is used to enhance the display prominence of the detection object in the target detection area;
[0128] The display enhancement module 1004 is used to enhance the display of each target detection area by using the display enhancement method to obtain the image to be detected of the target detection area.
[0129] The target detection module 1005 is used to perform target detection on the image to be detected by using a target detection model to obtain a detection result of the preset test index of the security inspection device.
[0130] As can be seen from the above, the detection device of the security inspection equipment provided in the embodiment of the present application obtains the first image of the test body collected by the security inspection equipment; performs area recognition on the first image to obtain the target detection area for detecting the preset test index; determines the display enhancement method of each target detection area according to each preset test index, and for each target detection area, uses the display enhancement method to perform display enhancement on the target detection area to obtain the image to be detected of the target detection area. The display prominence enhancement with different effects is performed for different types of detection objects, so that the target detection of the image to be detected can achieve a more detailed detection of the detection object, thereby obtaining a more accurate detection result; uses the target detection model to perform target detection on the image to be detected, and obtains the detection result of the preset test index of the security inspection equipment. There is no need for manual detection and judgment, and only the trained target detection model is needed to obtain the detection results of multiple preset test indicators at one time, which not only solves the problem of inconsistent evaluation standards caused by manual detection, but also improves the calibration detection efficiency of the national standard test body of the security inspection equipment.
[0131] In one embodiment of the present application, the preset test indicators include line resolution, penetration resolution, spatial resolution, penetration, organic matter resolution, mixture resolution, inorganic matter resolution, and effective material resolution.
[0132] In one embodiment of the present application, the display enhancement mode determination module 1003 is specifically used to:
[0133] In the case where the preset test index is the line resolution or the penetration resolution, determining that the display enhancement mode of the target detection area is display contrast enhancement, wherein the display contrast enhancement is used to enhance the contrast of the copper wire in the target detection area;
[0134] In the case where the preset test index is the spatial resolution, determining that the display enhancement mode of the target detection area is edge enhancement, wherein the edge enhancement is used to enhance the line edges of the horizontal lines and the vertical lines in the target detection area;
[0135] When the preset test indicator is the penetration, the display enhancement method of the target detection area is determined to be low-light image enhancement, wherein the low-light image enhancement is used to enhance the display prominence of the lead cake in the target detection area.
[0136] From the above, it can be seen that the detection device of the security inspection equipment provided in the embodiment of the present application selects different display enhancement methods to enhance the display prominence of the detection objects in the target detection area according to the different detection objects corresponding to the preset test indicators, so that the image display quality of the image to be detected is more conducive to detecting the preset test indicators of the security inspection equipment, reducing the detection errors that may be caused by the image display quality, and improving the accuracy of the detection of the test indicators of the security inspection equipment.
[0137] In one embodiment of the present application, the image acquisition module 1001 includes:
[0138] An image acquisition submodule, used to acquire a second image including the test object collected by the security inspection device;
[0139] a boundary recognition submodule, configured to select a boundary recognition method corresponding to the data format of the second image according to the data format of the second image, recognize the boundary of the test object in the second image, and determine the position of the test object in the second image;
[0140] The image cropping submodule is used to crop the second image according to the position of the test object in the second image to obtain a first image of the test object.
[0141] As can be seen from the above, the detection device of the security inspection equipment provided in the embodiment of the present application, after the security inspection equipment collects the second image for the detection area, selects the boundary recognition method corresponding to the data format according to the data format of the second image, performs boundary recognition on the test body in the second image, and obtains a first image including only the test body. Subsequent processing is performed based on the first image, thereby avoiding the interference of index detection caused by other contents in the detection area included in the second image, and improving the accuracy of the index test of the security inspection equipment. In addition, different boundary recognition methods are used for processing second images with different data formats, which can adapt to various types of security inspection equipment, has high scalability and a wide range of adaptation, and can be better applied to actual scenarios.
[0142] In one embodiment of the present application, the boundary identification submodule is specifically used to:
[0143] When the data format of the second image is a video format or a picture format, obtaining a grayscale value of each pixel in the second image;
[0144] For each row of the second image, if the row mean of the pixel grayscale of each pixel in the row is less than a preset row mean threshold, it is determined as a row boundary of the test object in the second image;
[0145] For each column of the second image, if a column mean value of the pixel grayscale of each pixel in the column is less than a preset column mean value threshold, it is determined as a column boundary of the test object in the second image;
[0146] Based on the row boundaries and the column boundaries, a position of the test object in the second image is determined.
[0147] From the above, it can be seen that the detection device of the security inspection equipment provided in the embodiment of the present application performs pixel grayscale mean sequence judgment on the second image row by row and column by column until the row boundary and column boundary of the test object in the second image are determined, and the position of the test object in the second image is determined based on this, thereby accurately realizing the boundary recognition of the second image, so that each area of the test object can be fully inspected in the next step, further improving the accuracy and completeness of subsequent inspections.
[0148] In one embodiment of the present application, the boundary identification submodule is specifically used to:
[0149] When the second image is original raw data, high-energy data and low-energy data in the original raw data are fused to obtain fused raw data;
[0150] generating a color image including the test object according to a color table built into the raw data;
[0151] Boundary recognition is performed based on the color of the test object in the color image to determine the position of the test object.
[0152] As can be seen from the above, the detection device of the security inspection equipment provided in the embodiment of the present application, when the second image output by the security inspection equipment is the original raw data, fuses the high and low energy data of the original raw data, colors the original raw data through the built-in color table, and generates a color image of the second image. By identifying the color of the pre-set test body and determining the position of the test body in the color image (second image), the main boundary of the second image is accurately recognized, so that each area of the test body can be completely detected in the next step, further improving the accuracy and completeness of subsequent detection. The security inspection equipment that outputs the original raw data format can also implement index testing through the target detection model, so that the method can be adapted to various types of security inspection equipment, has high scalability and a wide range of adaptation, and can be better applied to actual scenarios.
[0153] In one embodiment of the present application, the target detection module 1005 includes:
[0154] A target recognition submodule, used to use the target detection model to perform target recognition on each of the images to be detected, and obtain a preset indicator category corresponding to the preset test indicator in each of the images to be detected, as well as a detection frame corresponding to the preset indicator category and a confidence level of each of the detection frames;
[0155] A detection frame filtering submodule, used to filter the detection frames whose confidence is lower than a preset confidence threshold, to obtain the target detection frames corresponding to the preset indicator category;
[0156] The indicator level determination submodule is used to determine the indicator level of the preset test indicator based on the number of target detection frames and the corresponding relationship between the preset number of detection frames and the indicator level, and obtain the detection result of the preset test indicator of the security inspection equipment.
[0157] As can be seen from the above, the detection device of the security inspection equipment provided in the embodiment of the present application uses the target detection model to perform target recognition on each image to be detected, and obtains the preset indicator category corresponding to the preset test indicator in each image to be detected, as well as the detection frame corresponding to the preset indicator category and the confidence of each detection frame. After the obtained detection frame is confidence filtered and screened, the indicator level of the preset test indicator is determined based on the number of target detection frames and the correspondence between the preset number of detection frames and the indicator level. The target detection model can be trained according to actual needs, and the evaluation standard can be flexibly changed according to the actual application scenario. It has high applicability and does not require manual judgment based on experience, which reduces the training cost of professional evaluators and further improves the efficiency of security inspection equipment detection.
[0158] In one embodiment of the present application, the indicator level determination submodule is specifically used to:
[0159] When the preset test index is line resolution and the preset index category is that all copper wires are visible without breakage, the number of target detection frames is 1, 2, 3, 4, 5, 6, and 7, respectively determining the index levels of the line resolution to be 28, 30, 32, 34, 36, 38, and 40;
[0160] When the preset test index is penetration resolution, and the preset index category is that 1 / 3 of the copper wire is visible without breakage, 2 / 3 of the copper wire is visible without breakage, or all of the copper wire is visible without breakage, the number of the target detection frames is 1, 2, 3, 4, 5, 6, and 7, and the index levels of the penetration resolution are determined to be 24, 26, 28, 30, 32, 34, and 36 respectively;
[0161] When the preset test index is spatial resolution and the preset index category is horizontal line pairs are clear and non-adhesive or vertical line pairs are clear and non-adhesive, the number of target detection frames is 1, 2, 3, and 4, respectively determining the index levels of the spatial resolution to be 1.6, 1.3, 1.0, and 0.8;
[0162] When the preset test indicator is penetration and the preset indicator category is visible lead cake opening, the number of target detection frames is 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10, which respectively determine the indicator levels of the spatial resolution to be 27, 30, 32, 34, 36, 38, 40, 42, 44, and 46.
[0163] In one embodiment of the present application, the indicator level determination submodule is specifically used to:
[0164] When the preset test index is organic matter discrimination (TEST5), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 3, it is determined that the organic matter discrimination (TEST5) is unqualified, and when the obtained rectangular frame quantity is not less than 3, it is determined that the organic matter discrimination (TEST5) is qualified;
[0165] When the preset test index is organic matter discrimination (TEST6), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 2, it is determined that the organic matter discrimination (TEST6) is unqualified, and when the obtained rectangular frame quantity is not less than 2, it is determined that the organic matter discrimination (TEST6) is qualified;
[0166] When the preset test index is mixture resolution or inorganic substance resolution, the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 1, the mixture resolution or inorganic substance resolution is determined to be unqualified, and when the obtained rectangular frame quantity is not less than 1, the mixture resolution or inorganic substance resolution is determined to be qualified;
[0167] When the preset test indicator is effective material resolution, the color components of the area corresponding to the target detection frame are clustered into color blocks to obtain the number of pixels in each color block cluster set; based on whether the number of pixels in each color block cluster set meets a preset pixel number threshold, the indicator level of the effective material resolution is determined.
[0168] As can be seen from the above, the detection device of the security inspection equipment provided in the embodiment of the present application determines the index level of the preset test index based on the number of target detection frames and the corresponding relationship between the preset number of detection frames and the index level. The target detection model can be trained according to actual needs, and the index level can also be divided according to actual needs, so that the detection method provided in the embodiment of the present application can flexibly change the evaluation standard according to the actual application scenario, has high applicability, and does not require manual judgment based on experience, which reduces the training cost of professional evaluators and further improves the efficiency of security inspection equipment detection.
[0169] In one embodiment of the present application, the target detection model is a model obtained by training the target detection model to be trained based on a sample image, wherein the sample image includes each target detection area for detecting each preset test indicator, each target detection area includes each preset indicator category corresponding to each preset test indicator, and multiple detection boxes corresponding to each preset indicator category, each detection box has its own confidence level.
[0170] The present application also provides an electronic device, such as Fig.11 As shown, including:
[0171] Memory 1101, used for storing computer programs;
[0172] The processor 1102 is used to implement any of the above-mentioned detection methods for security inspection equipment when executing the program stored in the memory 1101.
[0173] In addition, the electronic device may further include a communication bus and / or a communication interface, and the processor 1102, the communication interface, and the memory 1101 communicate with each other via the communication bus.
[0174] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0175] The communication interface is used for communication between the above electronic device and other devices.
[0176] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0177] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be 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.
[0178] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the detection method of any of the above-mentioned security inspection devices are implemented.
[0179] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the detection method for security inspection equipment of any one of the above embodiments.
[0180] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0181] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0182] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0183] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A detection method for security inspection equipment, characterized in that: include: Acquire a first image of the test object captured by the security inspection device; Performing region recognition on the first image to obtain target detection regions for detecting preset test indicators; Determining a display enhancement mode for each of the target detection areas according to each of the preset test indicators, wherein the display enhancement mode is used to enhance the display prominence of the detection object in the target detection area; For each of the target detection areas, the display of the target detection area is enhanced by using the display enhancement method to obtain an image to be detected of the target detection area; The target detection model is used to perform target detection on the image to be detected, and the detection result of the preset test index of the security inspection equipment is obtained.
2. The method according to claim 1, characterized in that: The preset test indicators include line resolution, penetration resolution, space resolution, penetration, organic matter resolution, mixture resolution, inorganic matter resolution, and effective material resolution.
3. The method according to claim 2, characterized in that Determining the display enhancement mode of each target detection area according to each of the preset test indicators includes: In the case where the preset test index is the line resolution or the penetration resolution, determining that the display enhancement mode of the target detection area is display contrast enhancement, wherein the display contrast enhancement is used to enhance the contrast of the copper wire in the target detection area; In the case where the preset test index is the spatial resolution, determining that the display enhancement mode of the target detection area is edge enhancement, wherein the edge enhancement is used to enhance the line edges of the horizontal lines and the vertical lines in the target detection area; When the preset test indicator is the penetration, the display enhancement method of the target detection area is determined to be low-light image enhancement, wherein the low-light image enhancement is used to enhance the display prominence of the lead cake in the target detection area.
4. The method according to claim 1, characterized in that: The step of obtaining a first image of the test object captured by the security inspection device includes: Acquire a second image including the test object captured by the security inspection device; According to the data format of the second image, selecting a boundary recognition method corresponding to the data format, recognizing the boundary of the test object in the second image, and determining the position of the test object in the second image; The second image is cropped according to the position of the test object in the second image to obtain a first image of the test object.
5. The method according to claim 4, characterized in that The step of selecting a boundary recognition algorithm corresponding to the data format according to the data format of the second image, recognizing the boundary of the test object in the second image, and determining the position of the test object in the second image includes: When the data format of the second image is a video format or a picture format, obtaining a grayscale value of each pixel in the second image; For each row of the second image, if the row mean of the pixel grayscale of each pixel in the row is less than a preset row mean threshold, it is determined as a row boundary of the test object in the second image; For each column of the second image, if a column mean value of the pixel grayscale of each pixel in the column is less than a preset column mean value threshold, it is determined as a column boundary of the test object in the second image; Based on the row boundaries and the column boundaries, a position of the test object in the second image is determined.
6. The method according to claim 4, characterized in that The selecting, according to the data format of the second image, a boundary recognition method corresponding to the data format, recognizing the boundary of the test object in the second image, and determining the position of the test object in the second image includes: When the data format of the second image is original raw data, fusing the high-energy data and the low-energy data in the original raw data to obtain fused raw data; generating a color image including the test object according to a color table built into the raw data; Boundary recognition is performed based on the color of the test object in the color image to determine the position of the test object.
7. The method according to claim 1, characterized in that The method of using the target detection model to perform target detection on the image to be detected to obtain the detection result of the preset test index of the security inspection device includes: Using the target detection model, target recognition is performed on each of the images to be detected, and a preset indicator category corresponding to the preset test indicator in each of the images to be detected is obtained, as well as a detection frame corresponding to the preset indicator category and a confidence level of each of the detection frames; Filtering the detection frames whose confidence is lower than a preset confidence threshold to obtain the target detection frames corresponding to the preset indicator category; Based on the number of the target detection frames and the corresponding relationship between the preset number of detection frames and the indicator level, the indicator level of the preset test indicator is determined, and the detection result of the preset test indicator of the security inspection device is obtained.
8. The method according to claim 7, characterized in that The step of determining the index level of the preset test index based on the number of the target detection frames and the corresponding relationship between the preset number of detection frames and the index level, and obtaining the detection result of the preset test index of the security inspection device includes: When the preset test index is line resolution and the preset index category is that all copper wires are visible without breakage, the number of target detection frames is 1, 2, 3, 4, 5, 6, and 7, corresponding to the index levels of line resolution of 28, 30, 32, 34, 36, 38, and 40 respectively; When the preset test index is penetration resolution and the preset index category is that 1 / 3 of the copper wire is visible without breakage, 2 / 3 of the copper wire is visible without breakage, or all of the copper wire is visible without breakage, the number of the target detection frames is 1, 2, 3, 4, 5, 6, and 7, corresponding to the index levels of penetration resolution of 24, 26, 28, 30, 32, 34, and 36, respectively; When the preset test index is spatial resolution and the preset index category is horizontal line pairs are clear and non-adhesive or vertical line pairs are clear and non-adhesive, the number of target detection frames is 1, 2, 3, and 4, corresponding to the index levels of the spatial resolution of 1.6, 1.3, 1.0, and 0.8 respectively; When the preset test indicator is penetration and the preset indicator category is visible lead cake opening, the number of target detection frames is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, corresponding to the penetration indicator levels of 27, 30, 32, 34, 36, 38, 40, 42, 44, 46 respectively.
9. The method according to claim 7, characterized in that: The step of determining the index level of the preset test index based on the number of the target detection frames and the corresponding relationship between the preset number of detection frames and the index level, and obtaining the detection result of the preset test index of the security inspection device includes: When the preset test index is organic matter discrimination (TEST5), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 3, it is determined that the organic matter discrimination (TEST5) is unqualified, and when the obtained rectangular frame quantity is not less than 3, it is determined that the organic matter discrimination (TEST5) is qualified; When the preset test index is organic matter discrimination (TEST6), the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 2, it is determined that the organic matter discrimination (TEST6) is unqualified, and when the obtained rectangular frame quantity is not less than 2, it is determined that the organic matter discrimination (TEST6) is qualified; When the preset test index is mixture resolution or inorganic substance resolution, the target detection frame is subjected to a rectangular frame quantity detection, and when the obtained rectangular frame quantity is less than 1, the mixture resolution or inorganic substance resolution is determined to be unqualified, and when the obtained rectangular frame quantity is not less than 1, the mixture resolution or inorganic substance resolution is determined to be qualified; When the preset test indicator is effective material resolution, the color components of the area corresponding to the target detection frame are clustered into color blocks to obtain the number of pixels in each color block cluster set; based on whether the number of pixels in each color block cluster set meets a preset pixel number threshold, the indicator level of the effective material resolution is determined.
10. The method according to claim 1, characterized in that The target detection model is a model obtained by training the target detection model to be trained based on the sample image, wherein the sample image includes each target detection area for detecting each preset test indicator, each target detection area includes each preset indicator category corresponding to each preset test indicator, and multiple detection boxes corresponding to each preset indicator category, and each detection box has its own confidence level.
11. A detection device for security inspection equipment, characterized in that: include: An image acquisition module, used to acquire a first image of the test object collected by the security inspection device; A region recognition module, used to perform region recognition on the first image to obtain a target detection region for detecting a preset test indicator; A display enhancement mode determination module, used to determine a display enhancement mode for each of the target detection areas according to each of the preset test indicators, wherein the display enhancement mode is used to enhance the display prominence of the detection object in the target detection area; A display enhancement module, for performing display enhancement on each target detection area by using the display enhancement method to obtain an image to be detected of the target detection area; The target detection module is used to perform target detection on the image to be detected by using a target detection model to obtain the detection result of the preset test index of the security inspection equipment.
12. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-10 when executing a program stored in a memory.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
