Contraband identification method based on X-ray images

By splicing and identifying the sequence data of the image unit in real time, the identification error and delay problems caused by the overlapping of the parts to be detected in security inspection are solved, the reliability and accuracy of security inspection are improved, and the safety during peak periods is ensured.

CN117635965BActive Publication Date: 2024-12-20BEIJING TELESOUND ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311497180.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2024-12-20
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

During peak periods, existing security inspection methods have identification errors and delays due to the overlapping of parts to be tested, so the security inspection is relatively reliable and easy to miss inspection.

Method used

By receiving the image unit sequence data sent by the security check machine in real time, splicing it when the accumulated pixel width reaches the preset width, forming an X-ray image to be tested, and real-time identification is made of whether the to-be-detected item, reducing waiting for the complete contour, and improving identification Speed ​​and accuracy.

Benefits of technology

It improves the reliability and accuracy of security inspections, reduces the risk of missed inspections, and ensures safety during peak hours.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117635965B_ABST
    Figure CN117635965B_ABST
Patent Text Reader

Abstract

The present invention provides a method for identifying contraband based on X-ray images, which is applied to the technical field of security inspection, and the method comprises: receiving image unit sequence data sent by a security inspection machine, the image unit sequence data being obtained by the security inspection machine performing real-time scanning on a moving object to be inspected; when the sum of the accumulated pixel widths of the image unit sequence data is greater than or equal to a first preset identification width, splicing the accumulated image unit sequence data to obtain a first X-ray image to be inspected; based on the first X-ray image to be inspected, identifying whether the object to be inspected contains contraband to obtain a first identification result; and sending the first identification result to the security inspection machine for display. The present invention can not only improve the speed of security inspection, but also improve the reliability of security inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of security inspection, and in particular to a method for identifying contraband based on X-ray images. Background Art

[0002] In recent years, with the rapid development of artificial intelligence technology, contraband identification technology based on deep learning has also been introduced into the security inspection industry.

[0003] At present, the security inspection industry generally uses security inspection machines to scan the items to be inspected. After each scan of an item to be inspected, an X-ray image corresponding to the item to be inspected is generated, and then the X-ray image is sent to a prohibited item recognition machine; the corresponding prohibited item recognition algorithm is used to identify whether the X-ray image contains prohibited items, and the name and coordinate information of the prohibited items in the X-ray image are output, and finally the above information is fed back to the security inspection machine; the security inspection machine draws the name and coordinate information of the received prohibited items to lock the item to be inspected where the prohibited items exist.

[0004] In some specific security inspection application scenarios, such as during the morning and evening rush hours of the subway, due to the large number of passengers, the burden of the security inspection machine on the inspection items to be inspected also increases. In the baggage inspection, large and small packages are mixed, and the inspection items are seriously overlapped. In this case, it is difficult for the security inspection machine to determine the scanning boundary of each inspection item. Under normal circumstances, the existing security inspection machine needs to wait for a complete outline to be scanned as the scanning information of a piece to be inspected, and then generate the corresponding X-ray image. There is a high possibility that there are multiple inspection items to be inspected that are overlapped together in the X-ray image, but they are mistakenly regarded as the X-ray image corresponding to a piece to be inspected, resulting in errors in the security inspection results. In addition, in this case, the time to generate the X-ray image is also relatively delayed, and it is easy to have a delay in the feedback of the prohibited items identification results, resulting in missed detection. In summary, the existing security inspection methods have low security inspection reliability. Summary of the invention

[0005] The present invention provides a contraband identification method based on X-ray images, which is used to solve the defect of low security inspection reliability in the prior art and achieve the purpose of improving the security inspection reliability.

[0006] The present invention provides a method for identifying contraband based on X-ray images, comprising:

[0007] Receiving image unit sequence data sent by the security inspection machine, wherein the image unit sequence data is obtained by the security inspection machine performing real-time scanning on a moving object to be inspected;

[0008] When the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to the first preset recognition width, the accumulated image unit sequence data are spliced ​​to obtain a first X-ray image to be tested;

[0009] Based on the first X-ray image to be detected, identifying whether the object to be detected contains contraband, and obtaining a first identification result;

[0010] The first recognition result is sent to the security inspection machine for display.

[0011] According to a method for identifying contraband based on X-ray images provided by the present invention, the method further comprises:

[0012] Continue to receive the image unit sequence data for the object to be inspected sent by the security inspection machine;

[0013] Whenever the sum of the pixel widths of the accumulated image unit sequence data continuously received is greater than or equal to the second preset recognition width, the X-ray image to be tested obtained by the last splicing and the image unit sequence data continuously received are spliced ​​to obtain a second X-ray image to be tested; the X-ray image to be tested obtained by the last splicing is obtained by splicing all the image unit sequence data received previously;

[0014] Based on the second X-ray image to be detected, identifying whether the object to be detected contains contraband, and obtaining a second identification result;

[0015] The second recognition result is sent to the security inspection machine for display.

[0016] According to a method for identifying contraband based on X-ray images provided by the present invention, the method further comprises:

[0017] Continue to receive the image unit sequence data for the object to be inspected sent by the security inspection machine;

[0018] Under the condition that a preset condition is met, the second X-ray image to be tested obtained by the last stitching and the accumulated image unit sequence data continuously received this time are stitched together to obtain a third X-ray image to be tested; the preset condition includes that the sum of the pixel widths of the second X-ray image to be tested obtained by the last stitching and the accumulated image unit sequence data continuously received this time is greater than or equal to a third preset recognition width, or that an end scanning instruction sent by the security inspection machine is received, and the third preset recognition width is the maximum pixel width of the display screen in the security inspection machine;

[0019] Based on the third X-ray image to be tested, identifying whether the object to be tested includes contraband, and obtaining a third identification result;

[0020] The third recognition result is sent to the security inspection machine for display.

[0021] According to a method for identifying contraband based on X-ray images provided by the present invention, the method further comprises:

[0022] Detecting contour information of the object to be detected in the third X-ray image to be detected;

[0023] In the case where the contour information is incomplete and the image unit sequence data for the object to be detected that is continuously sent by the security inspection machine is received, all image unit sequence data starting from the first frame of image unit sequence data containing the object to be detected to the image unit sequence data that is continuously received, wherein all the image unit sequence data are used to represent the complete contour information of the object to be detected;

[0024] Contraband is identified based on all the image unit sequence data to obtain a fourth identification result.

[0025] According to a method for identifying contraband based on X-ray images provided by the present invention, when the object to be detected includes contraband, the target identification result includes the name information of the contraband, the position information of the contraband in the corresponding target X-ray image to be tested and the confidence of the contraband, the target identification result includes the first identification result, the second identification result or the third identification result, and the target X-ray image to be tested includes the first X-ray image to be tested, the second X-ray image to be tested or the third X-ray image to be tested.

[0026] According to a method for identifying contraband based on X-ray images provided by the present invention, the target identification result also includes an X-ray result image number, which is the number of the first frame image unit sequence data containing the object to be detected; the X-ray result image number is used to instruct the security inspection machine to draw the target X-ray image to be tested based on the X-ray result image number to obtain the X-ray result image, and the X-ray result image includes the name information of the contraband, the position information of the contraband in the target X-ray image to be tested and the confidence level of the contraband.

[0027] According to a method for identifying contraband based on X-ray images provided by the present invention, the sending of the second identification result to the security inspection machine for display includes:

[0028] An update instruction is sent to the security inspection machine, wherein the update instruction includes the second recognition result, and the update instruction is used to instruct the security inspection machine to update the first recognition result based on the second recognition result so as to display the second recognition result.

[0029] According to a method for identifying contraband based on X-ray images provided by the present invention, the method further comprises:

[0030] When the first recognition result indicates that the to-be-detected object does not contain any contraband, the second preset recognition width is updated, and the updated second preset recognition width is the sum of the second preset recognition width and the first preset width.

[0031] According to a method for identifying contraband based on X-ray images provided by the present invention, the method further comprises:

[0032] When the first recognition result indicates that the detected item contains contraband and the confidence of the contraband in the first recognition result is greater than a preset confidence, the second preset recognition width is updated, and the updated second preset recognition width is the difference between the second preset recognition width and the second preset width.

[0033] According to a contraband identification method based on X-ray images provided by the present invention, the first preset identification width ranges from 240px to 320px, and the second preset identification width ranges from 100px to 300px.

[0034] The present invention also provides a method for identifying contraband based on X-ray images, comprising:

[0035] A receiving module, used for receiving image unit sequence data sent by the security inspection machine, wherein the image unit sequence data is obtained by the security inspection machine performing real-time scanning on a moving object to be inspected;

[0036] A splicing module, configured to splice the accumulated image unit sequence data to obtain a first X-ray image to be tested when the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to a first preset recognition width;

[0037] an identification module, configured to identify whether the object to be detected contains contraband based on the first X-ray image to be detected, and obtain a first identification result;

[0038] A sending module is used to send the first recognition result to the security inspection machine for display.

[0039] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a contraband identification method based on X-ray images as described above is implemented.

[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for identifying contraband based on X-ray images as described in any one of the above is implemented.

[0041] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for identifying contraband based on X-ray images.

[0042] The contraband identification method based on X-ray images provided by the present invention receives image unit sequence data sent by a security inspection machine, and the image unit sequence data is obtained by the security inspection machine performing real-time scanning on a moving object to be inspected. When the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to a first preset identification width, the accumulated image unit sequence data is spliced ​​to obtain a first X-ray image to be inspected, and based on the first X-ray image to be inspected, it is identified whether the object to be inspected contains contraband, and a first identification result is obtained, so that the first identification result is sent to the security inspection machine for display. Since the contraband identification machine splices the accumulated image unit sequence data when it determines that the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to the first preset identification width, and thus performs contraband identification based on the obtained first X-ray image to be inspected, the contraband identification machine does not need to wait until the object to be inspected is completely scanned before performing identification, and can perform contraband identification based on the local features of the object to be inspected, thereby improving the speed of security inspection. In addition, it can also avoid the phenomenon that after the complete piece to be detected is scanned, the piece to be detected has been delivered to the security inspection exit and taken away by the user, thereby avoiding missed inspections, reducing safety hazards and improving the reliability of security inspections. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 It is a schematic diagram of security inspection of the inspected object in the prior art;

[0045] Figure 2 A schematic diagram of a process flow of a method for identifying contraband based on X-ray images provided by an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of obtaining a first X-ray image to be measured by splicing based on image unit sequence data provided by an embodiment of the present invention;

[0047] Figure 4 A schematic diagram of a first X-ray image to be measured after being drawn according to an embodiment of the present invention;

[0048] Figure 5 A schematic diagram of displaying a first recognition result provided by an embodiment of the present invention;

[0049] Figure 6 A schematic diagram of obtaining a second X-ray image to be measured by splicing based on image unit sequence data provided by an embodiment of the present invention;

[0050] Figure 7 A schematic diagram of a second X-ray image to be measured after being drawn according to an embodiment of the present invention;

[0051] Figure 8 A schematic diagram of displaying a second recognition result provided by an embodiment of the present invention;

[0052] Fig. 9 A schematic diagram of a third X-ray image to be measured after being drawn according to an embodiment of the present invention;

[0053] Fig.10 A schematic diagram of displaying a third recognition result provided by an embodiment of the present invention;

[0054] Fig.11 One of the schematic diagrams of the X-ray result image of the object to be inspected provided by the embodiment of the present invention;

[0055] Fig.12 A second schematic diagram of an X-ray result image of a test piece provided in an embodiment of the present invention;

[0056] Fig.13 A schematic diagram of the structure of a contraband identification device based on X-ray images provided by an embodiment of the present invention;

[0057] Fig.14 An example physical structure diagram of an electronic device is provided. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] In the prior art, when conducting security inspection on a piece to be inspected, a security inspection machine is usually used to scan the piece to be inspected. After scanning a piece to be inspected, an X-ray image corresponding to the piece to be inspected is generated, so as to detect whether the piece to be inspected contains contraband based on the X-ray image. During the morning and evening rush hours of the subway, due to the large number of pieces to be inspected, overlapping may occur. In this case, the security inspection machine needs to wait for a complete outline to be scanned as scanning information of a piece to be inspected, and then generate a corresponding X-ray image, so as to identify contraband based on the X-ray image. Since there may be multiple pieces to be inspected that are stacked together in the X-ray image, but they are mistakenly regarded as an X-ray image corresponding to a piece to be inspected, missed detection may occur. In addition, since the security inspection machine needs to wait until a complete outline is scanned, the time to generate the X-ray image will be delayed, and the feedback of the contraband identification result is prone to delay, resulting in missed detection.

[0060] Figure 1 Schematic diagram of security inspection of the inspected object in the prior art, such as Figure 1 As shown, when the prohibited article recognition machine receives the above X-ray image, the item to be detected in the X-ray image may have been in the security inspection channel near the security inspection exit or has been transmitted out of the security inspection channel. Furthermore, when the prohibited article recognition machine feeds back the prohibited article recognition result to the security inspection machine, the item to be detected in the X-ray image may have been taken away by the passenger in advance, thereby losing the opportunity to open the bag for inspection in time when prohibited articles are found in the item to be detected, resulting in the omission of prohibited articles and the risk of safety hazards due to security inspection accidents.

[0061] In response to the above problems, an embodiment of the present invention proposes a method for identifying prohibited items based on X-ray images. In the method, while the item to be inspected is moving, the security inspection machine will scan the item to be inspected in real time to obtain image unit sequence data, and send the image unit sequence data to a prohibited item identification machine. When the prohibited item identification machine determines that the sum of the pixel widths of the received accumulated image unit sequence data is greater than or equal to a first preset identification width, the accumulated image unit sequence data can be spliced ​​to form a first X-ray image to be detected, and based on the first X-ray image to be detected, whether the item to be inspected contains prohibited items. Since the accumulated image unit sequence data can be merged to perform contraband identification, at this time, even if the complete outline of the object to be detected is not completely displayed in the first X-ray image to be detected, the contraband can be identified based on the local features of the object to be detected contained in the first X-ray image to be detected. This can not only improve the recognition speed of contraband in security inspections, but also avoid the phenomenon in the prior art that an X-ray image needs to be generated and a security inspection performed only when the complete outline information of the object to be detected is scanned, thereby reducing missed inspections of contraband, improving the accuracy of security inspections, and ensuring the reliability of security inspections.

[0062] It should be noted that the items to be inspected mentioned in the embodiments of the present invention may include express deliveries, mail items, and parcels, and prohibited items may be understood as prohibited or restricted items in security inspection scenarios.

[0063] Combine the following Figures 2 to 12 The method for identifying contraband based on X-ray images provided by an embodiment of the present invention is described. The execution subject of the method can be an electronic device such as a prohibited item identification machine, a computer or a server, or a specially designed intelligent device, or a contraband identification device based on X-ray images set in the electronic device or the intelligent device, and the contraband identification device based on X-ray images can be implemented by software, hardware or a combination of the two. Figure 2 A flow chart of a method for identifying contraband based on X-ray images provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes steps 201 to 204.

[0064] Step 201: receiving image unit sequence data sent by a security inspection machine, where the image unit sequence data is obtained by the security inspection machine performing real-time scanning on a moving object to be inspected.

[0065] In this step, the prohibited article recognition machine and the security inspection machine are connected in communication. The items to be inspected are parcels or express items that need to be inspected. In the security inspection scenario, the items to be inspected are placed on the conveyor belt of the security inspection machine, and the conveyor belt moves with the movement of the items to be inspected. Therefore, the security inspection machine scans the items to be inspected in a moving state, and continuously and in real time sends the image unit sequence data generated during the scanning process to the prohibited article recognition machine.

[0066] The prohibited items identification machine stores the received image unit sequence data so as to identify prohibited items based on the received image unit sequence data. The image unit sequence data is a cut-out area picture containing the information of the item to be detected, or a cut-out area picture of the gap between the items to be detected. Specifically, the image unit sequence data can be obtained by cutting based on a preset pixel width. For example, the pixel width of the image unit sequence data can be 60px-120px. In addition, each image unit sequence data has been numbered, that is, each image unit sequence data is provided with identification information to distinguish it from other image unit sequence data.

[0067] Step 202: When the sum of pixel widths of the accumulated image unit sequence data is greater than or equal to a first preset recognition width, the accumulated image unit sequence data are spliced ​​to obtain a first X-ray image to be tested.

[0068] In this step, the accumulated image unit sequence data can be understood as the image unit sequence data received and stored in total by the prohibited article recognition machine from the start of receiving the image unit sequence data to the current moment.

[0069] The prohibited article recognition machine stores the received image unit sequence data and calculates the sum of the pixel widths of the stored image unit sequence data. When the determined sum of the pixel widths is greater than or equal to the first preset recognition width, the prohibited article recognition machine will merge all the currently accumulated image unit sequence data to form a first X-ray image to be tested. Merging all the currently accumulated image unit sequence data can also be understood as splicing all the currently stored image unit sequence data.

[0070] It should be noted that the first X-ray image to be tested synthesized by the prohibited article recognition machine based on the image unit sequence data is usually not directly displayed in a visually visible form, and the first X-ray image to be tested is usually used for prohibited article recognition. Of course, the prohibited article recognition machine can also send the synthesized first X-ray image to be tested to the security inspection machine, and the security inspection machine outputs the first X-ray image to be tested through a display, so that the security inspector can make auxiliary judgments for manual security inspection based on the first X-ray image to be tested.

[0071] For example, if the first preset recognition width is set too small, it may not be possible to output effective contraband recognition results, and frequent recognition will cause a waste of system resources of the prohibited item recognition machine. If the first preset recognition width is set too large, it will lose immediacy, and the feedback of the contraband recognition result information may be delayed. Therefore, considering the above, the range of the first preset recognition width can usually be set at 240px-320px.

[0072] Step 203: Based on the first X-ray image to be detected, identify whether the object to be detected contains contraband and obtain a first identification result.

[0073] In this step, after the prohibited item recognition machine combines all currently stored image unit sequence data to form the first X-ray image to be tested, it will perform the first prohibited item recognition based on the prohibited item recognition algorithm to identify whether the item to be tested contains prohibited items, thereby obtaining a first recognition result.

[0074] It should be noted that the first synthesized X-ray image to be detected may not contain a complete part to be detected, so contraband identification will be performed based on local or partial feature information of the part to be detected to obtain a first identification result. It can be seen that in the embodiment of the present invention, it is not necessary to wait until the synthesis contains a complete part to be detected before performing contraband identification, and contraband detection can be started based on partial features of the part to be detected, thereby avoiding the situation of delayed contraband detection and improving the recognition speed of contraband detection.

[0075] Step 204: Send the first recognition result to the security inspection machine for display.

[0076] In this step, after determining the first recognition result, the prohibited article recognition machine will feed back the first recognition result to the security inspection machine, which will redraw the first X-ray image to be tested after processing the first recognition result to form the first X-ray result image and display it on the display terminal. In this way, the security inspector can promptly open the package for inspection of the suspected items to be tested to avoid missed inspections.

[0077] The embodiment of the present invention provides a method for identifying contraband based on X-ray images, which receives image unit sequence data sent by a security inspection machine, the image unit sequence data being obtained by the security inspection machine performing real-time scanning on a moving object to be inspected, and when the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to a first preset recognition width, splices the accumulated image unit sequence data to obtain a first X-ray image to be inspected, and identifies whether the object to be inspected contains contraband based on the first X-ray image to be inspected, and obtains a first recognition result, and sends the first recognition result to the security inspection machine for display. Since the prohibited item identification machine splices the accumulated image unit sequence data when it determines that the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to the first preset recognition width, and thus identifies contraband based on the obtained first X-ray image to be inspected, the prohibited item identification machine does not need to wait until the object to be inspected is completely scanned before identification, and can identify contraband based on the local features of the object to be inspected, thereby improving the speed of security inspection. In addition, it can also avoid the phenomenon that after the complete piece to be detected is scanned, the piece to be detected has been delivered to the security inspection exit and taken away by the user, thereby avoiding missed inspections, reducing safety hazards and improving the reliability of security inspections.

[0078] Exemplarily, when the object to be detected includes contraband, the first recognition result includes the name information of the contraband, the location information of the contraband in the first X-ray image to be detected, and the confidence level of the contraband.

[0079] The position information of the prohibited item in the first X-ray image to be tested can be understood as the position coordinates of the identification frame of the prohibited item in the first X-ray image to be tested. The confidence of the prohibited item indicates the possibility that the item to be tested is a prohibited item. The greater the confidence, the greater the possibility that the item to be tested is a prohibited item.

[0080] In this embodiment, when prohibited items are included in the items to be detected, the first recognition result includes the name information of the prohibited items, the position information of the prohibited items in the first X-ray image to be detected and the confidence level of the prohibited items. Therefore, the probability that the items to be detected are real contraband can be quickly determined based on the confidence level, and the items to be detected can be quickly located based on the name information and the position information, thereby improving the accuracy and efficiency of security inspection.

[0081] Furthermore, the first recognition result also includes an X-ray result image number, which is the number of the first frame image unit sequence data containing the object to be detected; the X-ray result image number is used to instruct the security inspection machine to draw the first X-ray image to be tested based on the X-ray result image number to obtain the X-ray result image, wherein the X-ray result image includes the name information of the contraband, the location information of the contraband in the target X-ray image to be tested, and the confidence level of the contraband.

[0082] Specifically, the X-ray result image number is the number of the first image unit sequence data among the multiple image unit sequence data synthesizing the first X-ray image to be tested. The X-ray result image number is used to accurately match the name information of the contraband, the location information of the contraband in the first X-ray image to be tested, and the confidence level of the contraband to the object to be tested in the first X-ray image to be tested when the security inspection machine redraws the first X-ray image to be tested and obtains the first X-ray result image.

[0083] The following is a specific example to illustrate the process of identifying contraband based on the first X-ray image to be detected in the embodiment of the present invention.

[0084] Figure 3 A schematic diagram of obtaining a first X-ray image to be measured by splicing image unit sequence data provided by an embodiment of the present invention, such as Figure 3 As shown in the figure, in this embodiment, it is assumed that the pixel width of the image unit sequence data is 60px and the first preset recognition width is 300px. Therefore, when the prohibited article recognition machine receives 5 columns of image unit sequence data, the pixel width of the stored image unit sequence data is calculated to just reach the first preset recognition width of 300px, and the prohibited article recognition machine will merge the currently stored 5 columns of image unit sequence data to form the following: Figure 3 The first X-ray image to be tested is shown, and the first X-ray image to be tested includes a partial image of the object to be tested 1.

[0085] Figure 4 A schematic diagram of a first X-ray image to be measured after being drawn according to an embodiment of the present invention is shown in FIG. Figure 4 As shown, after the prohibited item recognition machine synthesizes the first X-ray image to be tested, the first prohibited item recognition will be started, and the first recognition result obtained after the recognition will be fed back to the security inspection machine, and the security inspection machine will re-draw the first X-ray image to be tested, so as to obtain the following Figure 4As shown in the image. It can be seen that at this time, although the first X-ray image to be tested does not fully display the object 1 to be tested, the prohibited item recognition result can output the name of the prohibited item through the local features of the object in the object 1 to be tested, for example, a dagger, a prohibited item confidence of 0.31, and a prohibited item recognition result selected by the prohibited item recognition box; at this time, the prohibited item recognition opportunity uses the number of the initial image unit sequence data as the X-ray result image number. In this embodiment, Figure 4 The number 001 of the leftmost image unit sequence data is used as the X-ray result image number (imageId).

[0086] Figure 5 A schematic diagram of displaying the first recognition result provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, after the first X-ray image to be tested is subjected to contraband identification, the security inspection machine draws based on the first X-ray image to be tested, and the obtained X-ray result image is displayed on the display screen.

[0087] Based on the above embodiment, since the item to be inspected has not yet been delivered to the security check exit, the security check machine will continue to scan the item to be inspected and send the subsequently scanned image unit sequence data to the prohibited item recognition machine, and the prohibited item recognition machine will identify prohibited items based on the continuously received image unit sequence data.

[0088] Exemplarily, the image unit sequence data for the object to be inspected sent by the security inspection machine continues to be received, and whenever the sum of the pixel widths of the accumulated image unit sequence data that continues to be received is greater than or equal to the second preset recognition width, the X-ray image to be tested obtained by the last splicing and the image unit sequence data that continues to be received are spliced ​​to obtain a second X-ray image to be tested, wherein the X-ray image to be tested obtained by the last splicing is obtained by splicing together all the image unit sequence data received previously, and based on the second X-ray image to be tested, it is identified whether the object to be tested includes contraband, to obtain a second recognition result, and then the second recognition result is sent to the security inspection machine for display.

[0089] Specifically, as the inspection piece moves along the conveyor belt of the security inspection machine in the security inspection channel, the scanned area of ​​the inspection piece will gradually increase, so that the image unit sequence data generated by the security inspection machine will increase. Therefore, the total width of the second X-ray image to be tested and the corresponding X-ray result image will gradually increase.

[0090] When the sum of the pixel widths of the image unit sequence data that the prohibited item recognition machine continues to receive is greater than or equal to the second preset recognition width, the merging of the image unit sequence data will be triggered again, and the prohibited item recognition machine will merge all the currently stored image unit sequence data to obtain a second X-ray image to be tested. Among them, merging all the currently stored image unit sequence data can be understood as merging the subsequently received image unit sequence data on the basis of the first X-ray image to be tested. After obtaining the second X-ray image to be tested, prohibited items can be identified based on the second X-ray image to be tested to detect whether the object to be tested contains prohibited items, and the obtained second identification result is sent to the security inspection machine for display.

[0091] While the object to be inspected continues to move, the security inspection machine will continue to scan and send the scanned image unit sequence data to the prohibited goods identification machine, which will continue to identify whether the sum of the pixel widths of the image unit sequence data received after the last synthesis of the second X-ray image to be tested is greater than or equal to the second preset identification width. If it is greater than or equal to the second preset identification width, the third identification will be started, that is, the second X-ray image to be tested obtained last time and the accumulated image unit sequence data will be spliced ​​to obtain a new second X-ray image to be tested, and contraband identification will be performed based on the new second X-ray image to be tested. In addition, the new second X-ray image to be tested can be used to replace the previously obtained second X-ray image to be tested, and the new second X-ray image to be tested can be used as the basis for the next splicing of image unit sequence data.

[0092] Optionally, in the above stitching process, all current image unit sequence data may be stitched, or the second X-ray image to be measured obtained by the last stitching and the image unit sequence data received continuously after the last stitching may be stitched.

[0093] It should be noted that the above process can be repeatedly performed, so that a second X-ray image to be measured with a continuously increasing width can be obtained.

[0094] For example, if the second preset recognition width is set too small, it may not be possible to output effective contraband recognition results, and frequent recognition will cause a waste of system resources of the prohibited item recognition machine. If the second preset recognition width is set too large, it will lose immediacy, and the feedback of the contraband recognition result information may be delayed. Therefore, considering the above, the second preset recognition width can be, for example, 100px-300px.

[0095] In addition, in the above-mentioned process of repeatedly identifying contraband, the second preset identification width for each image unit sequence data merge can be the same or different. For example, the second preset identification width can be set to a fixed value of 100px, that is, each time the image unit sequence data merge is performed, 100px is used as a reference value to determine whether to merge the image unit sequence data. Alternatively, the second preset identification width can be set to 100px for the second merge, and the second preset identification width can be set to 105px for the third merge, etc.

[0096] In this embodiment, when the sum of the pixel widths of the accumulated image unit sequence data that continue to be received is greater than or equal to the second preset recognition width, the X-ray image to be tested obtained by the last splicing and the image unit sequence data that continue to be received are spliced ​​to obtain a second X-ray image to be tested, and based on the latest second X-ray image to be tested, it is identified whether the object to be tested contains contraband, and a second recognition result is obtained, and the second recognition result is sent to the security inspection machine for display. In the process of the object to be tested constantly moving, by continuing to receive the image unit sequence data for the object to be tested, and splicing the second X-ray image to be tested based on the previously received and continuously received image unit sequence data, contraband recognition is performed. Since the image width of the second X-ray image to be tested is wider than that of the first X-ray image to be tested, it contains more information about the object to be tested, thereby ensuring the speed of security inspection and the timeliness of security inspection, and further reducing the occurrence of missed inspections, improving the accuracy of contraband identification, and ensuring the reliability of security inspection.

[0097] Exemplarily, when the object to be detected includes contraband, the second recognition result includes the name information of the contraband, the position information of the contraband in the second X-ray image to be detected, and the confidence level of the contraband.

[0098] The position information of the contraband in the second X-ray image to be tested can be understood as the position coordinates of the identification frame of the contraband in the second X-ray image to be tested. The confidence of the contraband indicates the possibility that the detected item is a contraband. The greater the confidence, the greater the possibility that the detected item is a contraband.

[0099] In this embodiment, when prohibited items are included in the items to be detected, the second recognition result includes the name information of the prohibited items, the position information of the prohibited items in the second X-ray image to be detected and the confidence level of the prohibited items. Therefore, the probability that the items to be detected are real contraband can be quickly determined based on the confidence level, and the items to be detected can be quickly located based on the name information and the position information, thereby improving the accuracy and efficiency of security inspection.

[0100] Furthermore, the second recognition result also includes an X-ray result image number, which is the number of the first frame image unit sequence data containing the object to be detected; the X-ray result image number is used to instruct the security inspection machine to draw a second X-ray image to be tested based on the X-ray result image number to obtain an X-ray result image, wherein the X-ray result image includes the name information of the contraband, the location information of the contraband in the target X-ray image to be tested, and the confidence level of the contraband.

[0101] Specifically, the X-ray result image number is the number of the first image unit sequence data among the multiple image unit sequence data for synthesizing the second X-ray image to be tested. The X-ray result image number is used to accurately match the name information of the contraband, the location information of the contraband in the second X-ray image to be tested, and the confidence level of the contraband to the object to be tested in the second X-ray image to be tested when the security inspection machine redraws the second X-ray image to be tested and obtains the first X-ray result image.

[0102] Exemplarily, when the prohibited item identification machine sends the second identification result to the security inspection machine for display, it may send an update instruction to the security inspection machine, the update instruction including the second identification result, and the update instruction is used to instruct the security inspection machine to update the first identification result based on the second identification result to display the second identification result.

[0103] Specifically, as the area to be scanned of the item to be inspected gradually increases, the number of prohibited item identification results will also increase accordingly, and the area of ​​the prohibited item identification box will also increase. Therefore, the idea of ​​overwriting can be adopted to first clear the previous prohibited item identification result, and then the security inspection machine processes the new prohibited item identification result and re-draws the second X-ray image to be tested and displays it on the display end. For example, the security inspection machine can first clear the first identification result, process the second identification result, and then draw the second X-ray image to be tested based on the second identification result. Similarly, when there is a new second identification result next time, the new second identification result will be used to cover the previous second identification result, and a new second X-ray image to be tested will be drawn based on the new second identification result, and so on.

[0104] In this embodiment, the prohibited item identification machine can send an update instruction to the security inspection machine, and the security inspection machine can update the first identification result to the second identification result based on the update instruction. In this way, security personnel can perform security inspections based on the latest prohibited item identification results, which is convenient for security personnel to check and improves the intelligence level of security inspections.

[0105] Exemplarily, when the first recognition result indicates that the detected object does not contain any contraband, the second preset recognition width is updated, wherein the updated second preset recognition width is the sum of the second preset recognition width and the first preset width.

[0106] Specifically, when the first recognition result indicates that the detected part does not contain any contraband, it means that no contraband was detected during the first contraband recognition. Therefore, in order to reduce the number of invalid recognitions during subsequent recognition, the trigger duration of the recognition can be appropriately extended. Therefore, the second preset recognition width can be dynamically adjusted. For example, the first preset width can be added to the original second preset recognition width to serve as the updated second preset recognition width. For example, assuming that the originally set second preset recognition width is 100px, if the first recognition result indicates that the detected part does not contain any contraband, the second preset recognition width can be updated to 150px, etc. Among them, the first preset width can be set according to actual conditions or experience, for example, it can be set to 50px or 60px, etc. The specific value of the first preset width is not limited in the embodiment of the present invention.

[0107] In this embodiment, when the first recognition result indicates that the detected item does not contain any contraband, the first preset width can be added to the second preset recognition width to serve as an updated second preset recognition width. In this way, when the image unit sequence data is subsequently spliced, the updated second preset recognition width will be used as a basis for determining whether to splice. This can reduce the number of splicing times of the image unit sequence data and the number of contraband recognition times, thereby saving system resources of the prohibited item recognition machine.

[0108] Exemplarily, when the first recognition result indicates that the detected item contains contraband and the confidence of the contraband in the first recognition result is greater than a preset confidence, the second preset recognition width is updated, and the updated second preset recognition width is the difference between the second preset recognition width and the second preset width.

[0109] Specifically, when the confidence level of the prohibited items included in the first recognition result is greater than the preset confidence level, it indicates that the possibility of the prohibited items included in the detected item is relatively high. Sometimes the volume of the prohibited items may be relatively small. In order to prevent the detected item from being transmitted to the security exit during the next recognition, the second preset width can be subtracted from the original second preset recognition width to serve as the updated second preset recognition width. For example, assuming that the originally set second preset recognition width is 100px, if the first recognition result indicates that the detected item contains prohibited items and the confidence level of the prohibited items included in the first recognition result is greater than the preset confidence level, the second preset recognition width can be updated to 60px, etc. Among them, the second preset width can be set according to actual conditions or experience, for example, it can be set to 50px or 60px, etc. The second preset width and the first preset width can be the same or different. The specific value of the second preset width is not limited in the embodiments of the present invention.

[0110] In this embodiment, when the first recognition result indicates that the detected object contains contraband, and the confidence level of the contraband contained in the first recognition result is greater than the preset confidence level, the second preset width can be subtracted from the second preset recognition width to serve as the updated second preset recognition width. In this way, when splicing the image unit sequence data later, the updated second preset recognition width will be used as the basis for judging whether to splice, thereby preventing missed detection and improving the reliability of security inspection.

[0111] The following is a specific example to illustrate the process of identifying contraband based on the second X-ray image to be tested in an embodiment of the present invention.

[0112] Figure 6 A schematic diagram of obtaining a second X-ray image to be measured by splicing image unit sequence data provided by an embodiment of the present invention, such as Figure 6 As shown in the figure, in this embodiment, it is assumed that the pixel width of the image unit sequence data is 60px and the second preset recognition width is 240px. Therefore, when the prohibited article recognition machine continues to receive 4 columns of image unit sequence data, the pixel width of the image unit sequence data that continues to be received just reaches the second preset recognition width of 240px. The prohibited article recognition machine will combine the first X-ray image to be tested obtained by splicing and the 4 columns of image unit sequence data that continue to be received to form the following image unit sequence data: Figure 6 The second X-ray image to be tested is shown.

[0113] Figure 7 A schematic diagram of a second X-ray image to be measured after being drawn according to an embodiment of the present invention is shown in FIG. Figure 7 As shown, after the prohibited item recognition machine synthesizes the second X-ray image to be tested, the second prohibited item recognition will be started, and the second recognition result obtained after the recognition will be fed back to the security inspection machine, and the security inspection machine will re-draw the second X-ray image to be tested, so as to obtain the following Figure 7 The image shown. The prohibited items are identified by the features of the items in the detected item 1, and the second identification result is sent to the security inspection machine. For example, if the output prohibited item name is still dagger, the prohibited item confidence is 0.92, and the second identification result selected by the prohibited item identification box covers the previous first identification result. It should be noted that at this time, the prohibited item identification machine always uses the number of the initial image unit sequence data as the X-ray result image number. In this embodiment, it is still based on Figure 4 The number 001 of the leftmost image unit sequence data is used as the X-ray result image number (imageId).

[0114] Figure 8 A schematic diagram of displaying the second recognition result provided by an embodiment of the present invention is shown in FIG. Figure 8As shown, after the second X-ray image to be tested is subjected to contraband identification, the security inspection machine draws based on the second X-ray image to be tested, and the obtained second X-ray result image is displayed on the display screen.

[0115] Furthermore, if the item to be inspected is still moving on the conveyor belt and has not moved to the security check exit, the security check machine will continue to scan the item to be inspected and send the scanned image unit sequence data for the item to be inspected to the prohibited item identification machine, thereby continuing to splice the images and starting the identification of prohibited items.

[0116] Exemplarily, the prohibited item identification machine continues to receive image unit sequence data for the item to be detected sent by the security inspection machine; when the preset conditions are met, the second X-ray image to be detected obtained by the last splicing and the accumulated image unit sequence data continued to be received this time are spliced ​​to obtain a third X-ray image to be detected; the preset conditions include that the sum of the pixel widths of the second X-ray image to be detected obtained by the last splicing and the accumulated image unit sequence data continued to be received this time is greater than or equal to the third preset identification width, or, an end scanning instruction sent by the security inspection machine is received, the third preset identification width is the maximum pixel width of the display screen in the security inspection machine, and based on the third X-ray image to be detected, it is identified whether the item to be detected includes prohibited items, and a third identification result is obtained, and the third identification result is sent to the security inspection machine for display.

[0117] Specifically, the second X-ray image to be tested obtained by the last stitching is the second X-ray image to be tested obtained after multiple repeated stitching, and the accumulated image unit sequence data continued to be received this time is the image unit sequence data received after the last stitching of the second X-ray image to be tested is completed.

[0118] The third preset identification width is the maximum pixel width of the display screen in the security inspection machine. Optionally, the third preset identification width is set to 1280-1920px, and corresponds to being able to display the entire security inspection channel length. Setting the third preset identification width can force the scanning of the to-be-detected object to be terminated, mainly considering that the width of the third X-ray image to be detected formed by splicing cannot be too wide, because the load of subsequent processing of the third X-ray image to be detected that is too wide will be very large. Moreover, when the width of the third X-ray image to be detected formed by splicing has exceeded the maximum pixel width of the display screen, there is no need to repeat the contraband identification of the first X-ray image to be detected or the second X-ray image to be detected formed in the early stage, because the identification result of the contraband cannot be displayed in the display area of ​​the display screen.

[0119] In addition, after scanning the complete outline of the object to be inspected, the security inspection machine can send an end-scan instruction to the prohibited article identification machine to forcibly end the scanning of the object to be inspected.

[0120] When the sum of the pixel widths of the second X-ray image to be tested obtained by the last splicing and the accumulated image unit sequence data continuously received this time is greater than or equal to the third preset recognition width, or when the end scanning instruction sent by the security inspection machine is received, the prohibited article recognition machine will splice the second X-ray image to be tested obtained by the last splicing and the accumulated image unit sequence data continuously received this time to obtain the third X-ray image to be tested. The third X-ray image to be tested can also be understood as an image obtained by splicing all the received image unit sequence data starting from the first frame of image unit sequence data for the object to be detected.

[0121] After the third X-ray image to be tested is obtained, contraband identification can be performed based on the third X-ray image to detect whether the object to be tested contains contraband, and the obtained third identification result is sent to the security inspection machine for display.

[0122] In this embodiment, when the preset conditions are met, all the image unit sequence data received previously can be spliced ​​together to obtain a third X-ray image, and contraband identification can be performed based on the third X-ray image. In the process of the object to be detected constantly moving, by continuing to receive the image unit sequence data for the object to be detected, and splicing the third X-ray image to be detected based on the previously received and continuously received image unit sequence data, contraband identification can be performed. Since the image width of the third X-ray image to be detected is wider than that of the second X-ray image to be detected, it contains more information about the object to be detected, thereby ensuring the speed of security inspection and the timeliness of security inspection, further reducing the occurrence of missed inspections, improving the accuracy of contraband identification, and ensuring the reliability of security inspection. In addition, when the width of the currently spliced ​​third X-ray image to be detected is greater than the maximum pixel width of the display screen or the end scanning instruction sent by the security inspection machine is received, the splicing of the image unit sequence data and the identification of contraband will be forced to end, which can avoid meaningless identification operations and save system resources of the prohibited item identification machine.

[0123] Exemplarily, in the case where the object to be detected includes contraband, the third recognition result includes the name information of the contraband, the location information of the contraband in the third X-ray image to be detected, and the confidence level of the contraband.

[0124] The position information of the contraband in the third X-ray image to be tested can be understood as the position coordinates of the identification frame of the contraband in the third X-ray image to be tested. The confidence of the contraband indicates the possibility that the detected item is a contraband. The greater the confidence, the greater the possibility that the detected item is a contraband.

[0125] In this embodiment, when prohibited items are included in the items to be detected, the third recognition result includes the name information of the prohibited items, the position information of the prohibited items in the third X-ray image to be detected and the confidence level of the prohibited items. Therefore, the probability that the items to be detected are real contraband can be quickly determined based on the confidence level, and the items to be detected can be quickly located based on the name information and the position information, thereby improving the accuracy and efficiency of security inspection.

[0126] Furthermore, the third recognition result also includes an X-ray result image number, which is the number of the first frame image unit sequence data containing the object to be detected; the X-ray result image number is used to instruct the security inspection machine to draw a third X-ray image to be tested based on the X-ray result image number to obtain an X-ray result image, wherein the X-ray result image includes the name information of the contraband, the location information of the contraband in the target X-ray image to be tested, and the confidence level of the contraband.

[0127] Specifically, the X-ray result image number is the number of the first image unit sequence data among the multiple image unit sequence data for synthesizing the third X-ray image to be tested. The X-ray result image number is used to accurately match the name information of the contraband, the location information of the contraband in the third X-ray image to be tested, and the confidence level of the contraband to the object to be tested in the third X-ray image to be tested when the security inspection machine redraws the third X-ray image to be tested and obtains the first X-ray result image.

[0128] It should be noted that the third X-ray image to be tested can be used as the final X-ray image to be tested for the object to be tested, and the third recognition result obtained can be used as the final detection result of the object to be tested. After the prohibited item recognition machine sends the third recognition result to the security inspection machine, the security inspection machine will clear the X-ray result image drawn last time.

[0129] The following is a specific example to illustrate the process of identifying contraband based on the third X-ray image to be tested in the embodiment of the present invention.

[0130] Fig. 9 A schematic diagram of a third X-ray image to be measured after being drawn according to an embodiment of the present invention is shown in FIG. Fig. 9 As shown, in this embodiment, it is assumed that the pixel width of the image unit sequence data is 60px and the third preset recognition width is 1280px. Therefore, when all the image unit sequence data received by the prohibited article recognition machine is 22 columns, the pixel width of the stored image unit sequence data is calculated to be greater than the third preset recognition width of 1280px, and the prohibited article recognition machine will merge all the 22 columns of the currently stored image unit sequence data to form the third X-ray image to be tested.

[0131] After the prohibited item recognition machine synthesizes the third X-ray image to be tested, it will start the prohibited item recognition again, and feed back the third recognition result obtained after recognition to the security inspection machine, and the security inspection machine will re-draw the third X-ray image to be tested, so as to obtain the following Fig. 9 The image shown. At this time, the prohibited items recognition machine uses the number of the initial image unit sequence data as the X-ray result image number. In this embodiment, Figure 4 The number 001 of the leftmost image unit sequence data is used as the X-ray result image number (imageId).

[0132] Fig.10 A schematic diagram of displaying the third recognition result provided by an embodiment of the present invention is shown in FIG. Fig.10 As shown, after the third X-ray image to be tested is subjected to contraband identification, the security inspection machine draws based on the third X-ray image to be tested, and the obtained X-ray result image is displayed on the display screen.

[0133] Fig.11 One of the schematic diagrams of the X-ray result image of the object to be detected provided by the embodiment of the present invention, such as Fig.11 As shown, after the scanning of the part to be detected is completed, the following can be obtained: Fig.11 The final X-ray result image shown in the figure will display the name and confidence level of the prohibited items in the test piece 1. If the scan of the test piece 2 is also completed when the test piece 1 is scanned, the final X-ray result image will also include the name and confidence level of the prohibited items in the test piece 2. After the final X-ray result image is obtained, the next scan will be further initiated.

[0134] Exemplarily, based on the above-mentioned embodiment, the prohibited item identification machine can detect the contour information of the item to be detected in the third X-ray image to be detected. When the contour information is incomplete and the image unit sequence data for the item to be detected continues to be sent by the security inspection machine, all image unit sequence data from the first frame of image unit sequence data containing the item to be detected to the image unit sequence data currently being received are obtained, and all image unit sequence data are used to characterize the complete contour information of the item to be detected; prohibited items are identified based on all image unit sequence data to obtain a fourth identification result.

[0135] Specifically, when the security inspection machine sends the end scanning instruction, it is issued when it determines that the scanning of a complete piece to be inspected is completed, that is, it can obtain the following information: Fig.11 The final X-ray result image with complete contour boundaries.

[0136] However, when the pixel width of the image unit sequence data stored in the prohibited article recognition machine is greater than or equal to the third preset recognition width as the instruction to end a scan, the final X-ray result image may not fully display the outer contour boundary of the object to be detected. Fig.12 The second schematic diagram of the X-ray result image of the object to be detected provided by the embodiment of the present invention is as follows: Fig.12 As shown, when the final X-ray result image does not fully display the outer contour boundary of the object to be inspected, it may appear that contraband is not fully displayed.

[0137] like Fig.12 It can be seen that the right contour boundary of the part to be detected 2 is not displayed, and there happens to be a prohibited item identified as a gun in the part to be detected 2 that is not fully displayed. If a scan is ended at this time, the initial image unit sequence data sent by the security inspection machine to the prohibited item identification machine at the beginning of the next scan will include the other part of the contraband identified as a gun. After the image unit sequence data is merged, the contraband identification is still an incomplete item. Therefore, in this case, it is necessary to set the compensation width. That is to say, in order to start the next scan, the initial image unit sequence data sent by the security inspection machine must include all the contraband identified as guns. The specific method is to obtain all the image unit sequence data from the first frame of image unit sequence data containing the part to be detected to the image unit sequence data currently being received. All image unit sequence data are used to characterize the complete contour information of the part to be detected. In other words, Fig.12 The earliest image unit sequence data that can contain the gun is used as the initial image unit sequence data sent by the security inspection machine at the beginning of the next scan. The number of the image unit sequence data is used as the X-ray result image number (imageId) of the next scan.

[0138] Furthermore, prohibited items may be identified based on all image unit sequence data to obtain a fourth identification result, and the fourth identification result may be sent to the security inspection machine and displayed.

[0139] In this embodiment, when it is detected that the contour information of the object to be detected in the third X-ray image to be detected is incomplete, and the image unit sequence data for the object to be detected that is continuously sent by the security inspection machine is received, all image unit sequence data starting from the first frame of image unit sequence data containing the object to be detected to the image unit sequence data that is currently being received can be obtained, and all image unit sequence data are used to characterize the complete contour information of the object to be detected, so that the contraband is identified based on all image unit sequence data to obtain a fourth identification result. Since the fourth identification result can be determined based on the complete contour information, the accuracy of the security inspection can be further improved.

[0140] The contraband identification device based on X-ray images provided by the present invention is described below. The contraband identification device based on X-ray images described below and the contraband identification method based on X-ray images described above can be referenced to each other.

[0141] Fig.13 The schematic diagram of the structure of the contraband identification device based on X-ray images provided by an embodiment of the present invention, the contraband identification device based on X-ray images 1300 includes:

[0142] The receiving module 1301 is used to receive the image unit sequence data sent by the security inspection machine, where the image unit sequence data is obtained by the security inspection machine performing real-time scanning on the moving object to be inspected;

[0143] A splicing module 1302 is used to splice the accumulated image unit sequence data to obtain a first X-ray image to be tested when the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to a first preset recognition width;

[0144] An identification module 1303 is used to identify whether the object to be detected contains contraband based on the first X-ray image to be detected, and obtain a first identification result;

[0145] The sending module 1304 is used to send the first recognition result to the security inspection machine for display.

[0146] In an exemplary embodiment, the receiving module 1301 is used to continue receiving the image unit sequence data for the object to be inspected sent by the security inspection machine;

[0147] The splicing module 1302 is configured to splice the X-ray image to be tested obtained by the last splicing with the image unit sequence data to be continuously received, to obtain a second X-ray image to be tested, whenever the sum of the pixel widths of the accumulated image unit sequence data to be continuously received is greater than or equal to the second preset recognition width; the X-ray image to be tested obtained by the last splicing is obtained by splicing all the image unit sequence data received previously;

[0148] An identification module 1303 is used to identify whether the object to be detected contains contraband based on the second X-ray image to be detected, and obtain a second identification result;

[0149] The sending module 1304 is used to send the second recognition result to the security inspection machine for display.

[0150] In an exemplary embodiment, the receiving module 1301 is used to continue receiving the image unit sequence data for the object to be inspected sent by the security inspection machine;

[0151] The stitching module 1302 is used to stitch the second X-ray image to be tested obtained by the last stitching and the accumulated image unit sequence data continuously received this time to obtain a third X-ray image to be tested, if a preset condition is met; the preset condition includes that the sum of the pixel widths of the second X-ray image to be tested obtained by the last stitching and the accumulated image unit sequence data continuously received this time is greater than or equal to a third preset recognition width, or that an end scanning instruction sent by the security inspection machine is received, and the third preset recognition width is the maximum pixel width of the display screen in the security inspection machine;

[0152] The identification module 1303 is used to identify whether the object to be detected includes contraband based on the third X-ray image to be detected, and obtain a third identification result;

[0153] The sending module 1304 is used to send the third recognition result to the security inspection machine for display.

[0154] In an exemplary embodiment, the apparatus further comprises:

[0155] A detection module, used for detecting contour information of the object to be detected in the third X-ray image to be detected;

[0156] an acquisition module, configured to acquire all image unit sequence data starting from the first frame of image unit sequence data containing the object to be detected to the image unit sequence data currently being received, when the contour information is incomplete and the image unit sequence data for the object to be detected that is continuously sent by the security inspection machine is received, wherein all the image unit sequence data are used to represent the complete contour information of the object to be detected;

[0157] The identification module 1303 is used to identify the contraband based on all the image unit sequence data to obtain a fourth identification result.

[0158] In an exemplary embodiment, when the part to be detected includes contraband, the target recognition result includes the name information of the contraband, the location information of the contraband in the corresponding target X-ray image to be tested and the confidence of the contraband, the target recognition result includes the first recognition result, the second recognition result or the third recognition result, and the target X-ray image to be tested includes the first X-ray image to be tested, the second X-ray image to be tested or the third X-ray image to be tested.

[0159] In an example embodiment, the target recognition result also includes an X-ray result image number, which is a number containing the first frame image unit sequence data of the object to be detected; the X-ray result image number is used to instruct the security inspection machine to draw the X-ray image of the target to be tested based on the X-ray result image number to obtain an X-ray result image, and the X-ray result image includes the name information of the contraband, the location information of the contraband in the target to be tested X-ray image and the confidence level of the contraband.

[0160] In an exemplary embodiment, the sending module 1304 is specifically configured to:

[0161] An update instruction is sent to the security inspection machine, wherein the update instruction includes the second recognition result, and the update instruction is used to instruct the security inspection machine to update the first recognition result based on the second recognition result so as to display the second recognition result.

[0162] In an example embodiment, the apparatus further comprises an update module;

[0163] The updating module is used to update the second preset recognition width when the first recognition result indicates that the detected object does not contain any contraband, wherein the updated second preset recognition width is the sum of the second preset recognition width and the first preset width.

[0164] In an exemplary embodiment, the update module is also used to update the second preset recognition width when the first recognition result indicates that the item to be detected contains contraband and the confidence level of the contraband in the first recognition result is greater than a preset confidence level, and the updated second preset recognition width is the difference between the second preset recognition width and the second preset width.

[0165] In an exemplary embodiment, the first preset recognition width ranges from 240px to 320px, and the second preset recognition width ranges from 100px to 300px.

[0166] The device of this embodiment can be used to execute the method of any embodiment in the embodiment of the contraband identification method based on X-ray images. Its specific implementation process and technical effects are similar to those in the embodiment of the contraband identification method based on X-ray images. For details, please refer to the detailed introduction in the embodiment of the contraband identification method based on X-ray images, which will not be repeated here.

[0167] Fig.14 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.14As shown, the electronic device may include: a processor 1410, a communication interface 1420, a memory 1430 and a communication bus 1440, wherein the processor 1410, the communication interface 1420 and the memory 1430 communicate with each other through the communication bus 1440. The processor 1410 may call the logic instructions in the memory 1430 to execute a method for identifying contraband based on X-ray images, the method comprising: receiving image unit sequence data sent by a security inspection machine, the image unit sequence data being obtained by the security inspection machine performing real-time scanning on a moving object to be inspected; when the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to a first preset identification width, splicing the accumulated image unit sequence data to obtain a first X-ray image to be inspected; based on the first X-ray image to be inspected, identifying whether the object to be inspected contains contraband to obtain a first identification result; and sending the first identification result to the security inspection machine for display.

[0168] In addition, the logic instructions in the above-mentioned memory 1430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0169] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the contraband identification method based on X-ray images provided by the above-mentioned methods, and the method includes: receiving image unit sequence data sent by a security inspection machine, and the image unit sequence data is obtained by the security inspection machine performing real-time scanning on a moving object to be inspected; when the sum of the accumulated pixel widths of the image unit sequence data is greater than or equal to a first preset identification width, splicing the accumulated image unit sequence data to obtain a first X-ray image to be inspected; based on the first X-ray image to be inspected, identifying whether the object to be inspected contains contraband to obtain a first identification result; and sending the first identification result to the security inspection machine for display.

[0170] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the contraband identification method based on X-ray images provided by the above-mentioned methods, the method comprising: receiving image unit sequence data sent by a security inspection machine, the image unit sequence data being obtained by the security inspection machine performing real-time scanning of a moving object to be inspected; when the accumulated sum of the pixel widths of the image unit sequence data is greater than or equal to a first preset identification width, splicing the accumulated image unit sequence data to obtain a first X-ray image to be inspected; based on the first X-ray image to be inspected, identifying whether the object to be inspected contains contraband to obtain a first identification result; and sending the first identification result to the security inspection machine for display.

[0171] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying contraband based on X-ray images, characterized in that: include: Receiving image unit sequence data sent by the security inspection machine, wherein the image unit sequence data is obtained by the security inspection machine performing real-time scanning on a moving object to be inspected; When the sum of the pixel widths of the accumulated image unit sequence data is greater than or equal to the first preset recognition width, the accumulated image unit sequence data are spliced ​​to obtain a first X-ray image to be tested; Based on the first X-ray image to be detected, identifying whether the object to be detected contains contraband, and obtaining a first identification result; Sending the first recognition result to the security inspection machine for display; The method further comprises: Continue to receive the image unit sequence data for the object to be inspected sent by the security inspection machine; Whenever the sum of the pixel widths of the accumulated image unit sequence data continuously received is greater than or equal to the second preset recognition width, the X-ray image to be tested obtained by the last splicing and the image unit sequence data continuously received are spliced ​​to obtain a second X-ray image to be tested; the X-ray image to be tested obtained by the last splicing is obtained by splicing all the image unit sequence data received previously; Based on the second X-ray image to be detected, identifying whether the object to be detected contains contraband, and obtaining a second identification result; Sending the second recognition result to the security inspection machine for display; The method further comprises: When the first recognition result indicates that the to-be-detected object does not contain any contraband, updating the second preset recognition width, wherein the updated second preset recognition width is the sum of the second preset recognition width and the first preset width; The method further comprises: When the first recognition result indicates that the detected item contains contraband and the confidence of the contraband in the first recognition result is greater than a preset confidence, the second preset recognition width is updated, and the updated second preset recognition width is the difference between the second preset recognition width and the second preset width.

2. The method for identifying contraband based on X-ray images according to claim 1, characterized in that: The method further comprises: Continue to receive the image unit sequence data for the object to be inspected sent by the security inspection machine; Under the condition that a preset condition is met, the second X-ray image to be tested obtained by the last stitching and the accumulated image unit sequence data continuously received this time are stitched together to obtain a third X-ray image to be tested; the preset condition includes that the sum of the pixel widths of the second X-ray image to be tested obtained by the last stitching and the accumulated image unit sequence data continuously received this time is greater than or equal to a third preset recognition width, or that an end scanning instruction sent by the security inspection machine is received, and the third preset recognition width is the maximum pixel width of the display screen in the security inspection machine; Based on the third X-ray image to be tested, identifying whether the object to be tested includes contraband, and obtaining a third identification result; The third recognition result is sent to the security inspection machine for display.

3. The method for identifying contraband based on X-ray images according to claim 2, characterized in that: The method further comprises: Detecting contour information of the object to be detected in the third X-ray image to be detected; In the case where the contour information is incomplete and the image unit sequence data for the object to be detected that is continuously sent by the security inspection machine is received, all image unit sequence data starting from the first frame of image unit sequence data containing the object to be detected to the image unit sequence data that is continuously received, wherein all the image unit sequence data are used to represent the complete contour information of the object to be detected; Contraband is identified based on all the image unit sequence data to obtain a fourth identification result.

4. The method for identifying contraband based on X-ray images according to claim 2, characterized in that: In the case where the part to be inspected includes contraband, the target recognition result includes the name information of the contraband, the position information of the contraband in the corresponding target X-ray image to be tested and the confidence of the contraband, the target recognition result includes the first recognition result, the second recognition result or the third recognition result, and the target X-ray image to be tested includes the first X-ray image to be tested, the second X-ray image to be tested or the third X-ray image to be tested.

5. The method for identifying contraband based on X-ray images according to claim 4, characterized in that: The target recognition result also includes an X-ray result image number, which is the number of the first frame image unit sequence data containing the object to be detected; the X-ray result image number is used to instruct the security inspection machine to draw the X-ray image of the target to be tested based on the X-ray result image number to obtain the X-ray result image, and the X-ray result image includes the name information of the contraband, the location information of the contraband in the target to be tested X-ray image and the confidence level of the contraband.

6. The method for identifying contraband based on X-ray images according to claim 1, characterized in that: The sending the second recognition result to the security inspection machine for display includes: An update instruction is sent to the security inspection machine, wherein the update instruction includes the second recognition result, and the update instruction is used to instruct the security inspection machine to update the first recognition result based on the second recognition result so as to display the second recognition result.

7. The method for identifying contraband based on X-ray images according to any one of claims 1 to 3, characterized in that: The first preset recognition width ranges from 240px to 320px, and the second preset recognition width ranges from 100px to 300px.