WO2022237135A1 - 目标对象识别的方法及装置 - Google Patents

目标对象识别的方法及装置 Download PDF

Info

Publication number
WO2022237135A1
WO2022237135A1 PCT/CN2021/134341 CN2021134341W WO2022237135A1 WO 2022237135 A1 WO2022237135 A1 WO 2022237135A1 CN 2021134341 W CN2021134341 W CN 2021134341W WO 2022237135 A1 WO2022237135 A1 WO 2022237135A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target
target object
slices
recognition
Prior art date
Application number
PCT/CN2021/134341
Other languages
English (en)
French (fr)
Inventor
田之进
黄振杰
李碧丹
张俊明
Original Assignee
佳都科技集团股份有限公司
广州新科佳都科技有限公司
广州佳都科技软件开发有限公司
广州华佳软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 佳都科技集团股份有限公司, 广州新科佳都科技有限公司, 广州佳都科技软件开发有限公司, 广州华佳软件有限公司 filed Critical 佳都科技集团股份有限公司
Publication of WO2022237135A1 publication Critical patent/WO2022237135A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10116X-ray image

Definitions

  • the embodiments of the present application relate to data processing technologies, for example, to a method and device for identifying a target object.
  • X-ray security inspection machines have been widely used in transportation, logistics and other fields. The rapid development of society requires higher and higher security inspection speed and accuracy.
  • the general X-ray machine scans a package, and after a package image appears on the site image judgment terminal, if equipped with an intelligent image recognition device, the intelligent image recognition
  • the video acquisition card of the instrument will capture the image of the video interface of the on-site image judgment terminal and transmit it to the artificial intelligence (AI) module of the image recognition instrument. After the AI module completes the intelligent image recognition, it will push the entire image to the remote image judgment end.
  • AI artificial intelligence
  • the present application provides a method and device for target object recognition, so as to avoid the situation in the related art that visually frustrates the judges when the package image appears and aggravates the sense of time urgency for manual judgment.
  • the embodiment of the present application provides a method for identifying a target object, the method comprising:
  • the embodiment of the present application also provides a target object recognition device, the device comprising:
  • the image slice receiving module is configured to receive the image slice sent by the X-ray equipment, and the number of image scan lines of the image slice is less than a first preset threshold;
  • the image slice sending module is configured to store the image slices in a preset buffer, and send the image slices to the target image judgment device, and the target image judgment device displays the image slices;
  • An image stitching module configured to stitch the stored image slices into a target image in response to determining that the number of image slices stored in the preset buffer reaches a second preset threshold
  • the image recognition module is configured to perform target object recognition on the target image.
  • the embodiment of the present application also provides a security inspection device, the security inspection device includes:
  • storage means configured to store at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor is made to implement the method in the first aspect above.
  • the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method in the above-mentioned first aspect is implemented.
  • FIG. 1 is a flow chart of an embodiment of a method for identifying a target object provided by an embodiment of the present application
  • Fig. 2 is a flow chart of an embodiment of a method for identifying a target object provided by another embodiment of the present application;
  • Fig. 3 is a structural block diagram of an embodiment of a target object recognition device provided by an embodiment of the present application.
  • Fig. 4 is a schematic structural diagram of a security inspection device provided by an embodiment of the present application.
  • FIG. 1 is a flow chart of an embodiment of a method for identifying a target object provided by an embodiment of the present application. This embodiment can be applied to a server.
  • the server can include a security inspection device in a security inspection scenario. May include the following steps:
  • Step 110 receiving image slices sent by the X-ray device, where the number of image scan lines in the image slices is less than a first preset threshold.
  • this embodiment may be applied in a security inspection scene, and the X-ray equipment may include X-ray inspection equipment in a security inspection machine.
  • the X-ray device can directly send the X-ray image scan lines in the graphics card buffer to the network interface for transmission at the bottom layer of its internal computer algorithm.
  • the above-mentioned image scanning lines are not sent line by line, but are composed of image small pieces (ie, image fragments) and then packaged and sent in the jumbo frame mode of the network card.
  • the image slice can be used as the transmission and processing unit of this embodiment.
  • the number of image scan lines of the image slice can be set to be less than a first preset threshold.
  • the first preset threshold can be set according to actual business requirements, which is not limited in this embodiment.
  • the setting of the first preset threshold should not be too large or too small. If it is too large, it will affect the subsequent synchronization effect. Too small is not conducive to optimizing processing efficiency.
  • the first preset threshold can be set to 50 (assuming that the conveyor belt speed of the security inspection machine is calculated at 0.6m/s, and the scanning frequency of the X-ray detector is 750Hz, then 50 image scanning lines correspond to 4cm in 1/15 second packaged radiographic image).
  • the server may issue a scanline configuration file to the X-ray device, which may include the configuration of the number of image scanlines for each image slice, for example, the configuration file may include The rule of 50 scan lines is used to combine the records of the image slices.
  • the X-ray device can transmit the X-ray image scanning lines less than 50 lines as an image slice.
  • Step 120 storing the image slices in a preset buffer, and sending the image slices to a target image judging device, and the target image judging device displays the image slices.
  • the server may pre-generate a preset buffer for storing image segments, and each time the server receives an image segment, it first stores the image segment into the preset buffer. Then, the server can read the image fragments from the preset buffer, and send the read image fragments to the target image judgment device, and the target image judgment device will display the received image fragments in the form of scrolls in real time, In order to make it easier for the map judge of the target map judging device to perform pre-judgment based on the image slices, the time for manual map judgment is increased. Moreover, for the judges, the image slices are unfolded in a smooth scroll, which will not cause obvious visual frustration.
  • the step of sending the image slices to the target image judgment device in step 120 may include the following steps:
  • this embodiment does not limit the specific load balancing rules.
  • factors such as the load of each candidate map judgment device, the experience value of the map judges, and historical execution tasks can be considered comprehensively.
  • the working status of each candidate map-judging device can be obtained, which can include idle state and busy state;
  • the experience value of the map judge corresponding to the candidate map judgment device in the state, and the candidate map judgment device corresponding to the map judge with a high experience value is selected as the target map judgment device. If there is only one candidate image judgment device in an idle state, the candidate image judgment device is directly used as a target image judgment device.
  • the experience value of the map judge corresponding to each candidate map judgment device can be obtained, and the candidate map judgment device corresponding to the map judge with a high experience value can be selected as the target map judgment device. If the experience value of the judges of each candidate map judgment device is similar, the device with fewer processing tasks can be selected as the target map judgment device.
  • the image slices identified in the preset buffer that belong to the same target object are all allocated to the same target image judgment device.
  • This embodiment selects a target image judgment device from multiple candidate image judgment devices according to load balancing rules, and distributes image slices to the target image judgment device, which can avoid multiple image judgment tasks from being piled up in the same image judgment device. processing to improve the efficiency of map judgment. For example, through this embodiment, different parcel images are automatically assigned to multiple different map judges for simultaneous judgment. Compared with the same map judge who judges multiple parcel images, the efficiency and accuracy of map judgment can be improved. sex.
  • Step 130 when the number of image slices stored in the preset buffer reaches a second preset threshold, stitch the stored image slices into a target image.
  • the number of image slices in the buffer in this embodiment can reach the second preset When the threshold is reached, the stored image slices are spliced into the target image, and then image recognition is performed based on the target image.
  • a counter may be set in the preset buffer, and when the counter shows that the number of image slices stored in the preset buffer reaches a second preset threshold, an image splicing operation is triggered.
  • the X-ray device When the X-ray device generates image slices, it can add a slice number to the image slices, and on the server side, images can be spliced according to the slice numbers of multiple image slices.
  • This embodiment does not limit the specific image stitching algorithm.
  • the second preset threshold may be determined according to actual service requirements, which is not limited in this embodiment.
  • the second preset threshold may be set to 20.
  • Step 140 performing target object recognition on the target image.
  • the target object may include packages (such as bags, etc.) in the security inspection conveyor belt, and by identifying the packages in the target image, it can be determined whether the target image contains a complete package image.
  • packages such as bags, etc.
  • target object recognition can be performed by combining traditional vision algorithms with deep learning algorithms. Then step 140 may include the following steps:
  • Step 140-1 judging whether the target image is a blank image.
  • the server can determine whether the target image is a blank image in the following manner:
  • the target image is determined to be a blank image.
  • the target image can be grayscaled to generate a grayscale image, and a grayscale histogram of the grayscale image can be obtained. If the grayscale histogram meets the specified grayscale condition, it can be determined that the target image is a blank image.
  • an image that does not have a target object but has noise can also be used as a blank image, and the server can determine whether the target image is a blank image in the following manner:
  • the connected domain is also called the connected area (Connected Component), which refers to the image area (Region, Blob) composed of foreground pixels with the same pixel value and adjacent positions in the image.
  • the target image is a blank image
  • the blank image can be directly discarded, so as to avoid resource waste caused by subsequent recognition of the blank image. If the target image is not a blank image, proceed to step 140-2.
  • Step 140-2 if the target image is not a blank image, perform connected domain detection on the target image to obtain one or more target connected domains.
  • the server determines that the target image is not a blank image
  • further detection is performed, and the detection may include connected domain detection, so as to identify the target image as one or more target connected domains.
  • step 140-2 may include the following steps:
  • Step 140-2-1 performing grayscale and binarization processing on the target image to obtain a binary image.
  • Step 140-2-2 performing denoising processing on the binary image.
  • the denoising processed binary image can represent For I denoise .
  • the denoising processing may include median filtering processing, morphological erosion processing, and the like.
  • Step 140-2-3 performing connected domain analysis on the denoised binary image to obtain one or more candidate connected domains.
  • the server can find and label each connected region in the denoised binary image I denoise through a Connected Component Analysis (Connected Component Labeling) algorithm, and finally obtain one or more candidate connected domain.
  • Connected Component Analysis Connected Component Labeling
  • this embodiment does not limit the specific connected region analysis algorithm, for example, it can be Two-Pass (two-pass scanning method) or Seed-Filling seed filling method, as long as one or more candidate connected regions can be obtained in the end domain.
  • Step 140-2-4 filter out candidate connected domains whose area is smaller than the set area threshold, and use the remaining connected domains as target connected domains.
  • the area of each candidate connected domain can be calculated.
  • fabs(cvContourArea(c, CV_WHOLE_SEQ)) can be used to calculate the area of each candidate connected domain area.
  • Step 140-3 segment the target image into a set of image patches according to the one or more target connected domains.
  • the target image can be segmented according to the one or more target connected domains to obtain corresponding image patches, and multiple image patches can form a set of image patches.
  • step 140-4 de-interference processing is performed on each image patch in the set of image patches.
  • each image patch corresponds to no more than one connected domain, thereby improving the accuracy of subsequent target object detection.
  • step 140-4 may include the following steps:
  • Connected domain detection can be performed on each image patch by referring to the method of connected domain detection in step 140-2, so as to obtain the connected domain position of each image patch. Then analyze the number of connected domains of each image patch. If the number of connected domains contained in a certain image patch is 1, the image patch is not subjected to de-interference processing. At this time, the image patch is directly used as de-interference processing
  • I di is the connected domain with the largest area reserved in I i
  • the pixel value in the remaining connected domain is set as the background pixel value.
  • the background pixel value may be set according to the background of the image patch, for example, if the background of the image patch is white, its background pixel value may be (255, 255, 255).
  • Step 140-5 respectively input each image patch after de-interference into the pre-generated target detection model, and obtain the detection result of the target object output by the target detection model for each image patch.
  • each I di can be input into the pre-generated target detection model respectively, and the target detection model can detect Each I di performs object detection and outputs a corresponding detection result.
  • the target detection model may be a machine model based on deep learning, for example, the target detection model may be a YOLOv3 model.
  • the YOLOv3 model can be trained in the following manner:
  • step 140-5 may also include the following steps:
  • Step 140-6 according to the detection result, it is judged whether each target connected domain has missing detection.
  • the missed detection is reduced by analyzing the missed detection of each target connected domain.
  • the detection result may include the position of the target object;
  • step 140-6 may include the following steps:
  • each target object it is judged whether the target object is detected in the current target connected domain; if no target object is detected in the current target connected domain, it is determined that there is a missing detection in the current target connected domain, and the current target connected domain is used as the target object; if the target object is detected in the current target connected domain, then locate the image slice corresponding to the current target connected domain; the pixel value corresponding to the detected target object in the image slice corresponding to the current target connected domain is set to Background pixel values, and then perform connected domain detection on the image slice; if a connected domain is detected, it is determined that the current target connected domain has missed detection, and the detected connected domain is used as the target object.
  • the target connected domain Since the target connected domain must have a target object. If the position information of the current target connected domain contains 0 target objects, that is, the position information of no target object overlaps with the position information of the current target connected domain, then the target connected domain can be determined as a missed detection connected domain, and the missed detection The connected domain is added to the target object set as the target object, that is, L i is added to L result (the target object set).
  • the position information of the current target connected domain contains more than 0 target objects, that is, the position information of more than 0 target objects overlaps with the position information of the current target connected domain
  • multiple targets contained in the position information of the current target connected domain can be first
  • the location information B i of the object is added to L result , and then the pixel values in all areas corresponding to B i in the corresponding image slice I i are set as background pixel values (such as (255, 255, 255)), and then the obtained image is roughly detection, if the number of connected domains obtained by the rough detection is not 0, then the connected domains are missed detection connected domains, and the detected connected domains are also added as target objects to L result .
  • Step 140-7 judging whether the detected target object is a complete target object or an incomplete target object.
  • the detection results corresponding to multiple target connected domains add up to the detection results of the entire target image.
  • the integrity analysis is performed on the detection results of the entire target image, mainly to determine whether each detected target object in the target image is a complete target object or an incomplete target object. For example, in the X-ray security inspection scene, the track is always moving, and the target image may be cut out before the bag is completely scanned, so the integrity analysis of the bag is required.
  • step 140-7 may include the steps of:
  • the abscissa and width of the upper left corner of the target object are x i and w i respectively, and the width of the target image is W
  • x i +w i +a>W where a is a normal number
  • it can be determined according to actual needs Determine, for example, if a is determined to be 5 according to empirical values, it means that the target object is located at the right edge of the target image, and the target object is an incomplete target object (because incomplete target objects are generally at the edge position).
  • x i +w i +a ⁇ W it means that the target object is not located at the right edge of the target image, and the target object is a complete target object.
  • Step 140-8 when it is determined that the target image contains an incomplete target object, determine the left boundary of the incomplete target object; trace back to the left according to the left boundary of the incomplete target object to the third preset
  • the image scan line of the threshold value is used to obtain the left boundary information of the incomplete target object; the left boundary information of the incomplete target object is the scan line of the right part of the initial boundary as the image slice of the target object; Distributing the image slices of the incomplete target object to the next determined target image judgment device.
  • the position information of the incomplete target object may be obtained, and the left boundary of the incomplete target object may be extracted from the position information of the incomplete target object.
  • the left boundary After obtaining the left boundary of the incomplete target object, in order to avoid errors, the left boundary can be used as the starting boundary, and the image scan line of the third preset threshold can be traced back to the left as the left boundary information of the incomplete target object.
  • the image scan line of the third preset threshold can be traced back to the left as the left boundary information of the incomplete target object.
  • 20 image scan lines may be continuously taken from the left boundary to the left, and the position of the 20th scan line may be used as the left boundary information of the incomplete target object.
  • the left boundary information can be used as the starting position, and the image scan lines of the right part can be used to form the image slice of the incomplete target object. Then, the incomplete image fragment of the target object is assigned to the next determined target image judgment device, and at the same time, the next determined target image judgment device will continue to receive the image fragment sent by the server from the X-ray device fragments to ensure the integrity of the target object.
  • the image slices transmitted by the X-ray equipment are image slices whose number of image scan lines is less than the first preset threshold, and after receiving the image slices, the server stores the images in a preset buffer At the same time as fragmentation, the image fragmentation can also be sent to the target map judgment device for display, so that the map judge can judge the map according to the image fragmentation without waiting for the entire image to appear before making the judgment map, which increases the labor cost.
  • the time for judging pictures improves the efficiency and accuracy of judging pictures.
  • the server can also stitch the stored image fragments into a target image, and perform target object recognition on the target image, so that After the server completes the recognition of the image, the image on the side of the image judgment device has also been displayed completely, and the map judge has completed the image judgment, thus realizing the synchronization of image recognition and map judgment.
  • FIG. 2 is a flow chart of a method embodiment of target object identification provided by another embodiment of the present application. This embodiment can be applied to a server and may include the following steps:
  • Step 210 receiving image slices sent by the X-ray device, where the number of image scan lines in the image slices is less than a first preset threshold.
  • Step 220 storing the image slices in a preset buffer, and sending the image slices to a target image judging device, and the target image judging device displays the image slices.
  • Step 230 when the number of image slices stored in the preset buffer reaches a second preset threshold, stitch the stored image slices into a target image.
  • Step 240 perform target object recognition on the target image, and obtain a recognition result of the target object recognition.
  • Step 250 sending the recognition result to the target image judgment device, and the target map judgment device displays the recognition result in the displayed image.
  • the recognition result of performing target object recognition on the target image may include position information of the target object.
  • the server After the server obtains the recognition result, it can simultaneously send the recognition result to the target map judgment device, and the target map judgment device will display the recognition result in the currently displayed image.
  • the target image judgment device obtains the location information of the package, it can display the location information in the current package image.
  • the target map judgment device can frame the location boundary of the package according to the location information of the package and display it.
  • Step 260 when it is determined according to the recognition result that the target object is a designated alarm object, an alarm flag is generated.
  • the recognition result may further include the object type of the target object.
  • An alarm object list may be preset in the server, and the alarm object list may record various types of alarm objects and corresponding feature information.
  • the server determines that the object type of the target object belongs to the type of the alarm object recorded in the alarm object list, it may determine that the target object is the specified alarm object. Otherwise, when the server determines that the object type of the target object does not belong to the type of the alarm object recorded in the alarm object list, it may determine that the target object is not the designated alarm object.
  • the server may generate a corresponding alarm flag according to the object type of the target object.
  • an alarm flag corresponding to each type of alarm object may also be recorded in the alarm object list, and the server may directly obtain the alarm flag corresponding to the object type of the target object from the alarm object list.
  • Step 270 sending the warning mark to the target image judgment device, and the target map judgment device displays the warning mark in the displayed image and sends out a warning signal.
  • the warning mark can be sent to the target image judgment device.
  • the target image judgment device receives the warning mark, it can display the warning mark in the displayed image.
  • the target map judgment device may also send out an alarm signal according to the alarm mark, and the alarm signal may be a highlighted alarm mark, an alarm sound, etc., which is not limited in this embodiment.
  • the server can synchronize the recognition results of the image recognition, the alarm recognition results, etc. to the target image judgment device, so as to realize the synchronization of image judgment and image recognition.
  • Fig. 3 is a structural block diagram of an embodiment of a target object recognition device provided by an embodiment of the present application, the device may be located in a server, and may include the following modules:
  • the image slice receiving module 310 is configured to receive the image slice sent by the X-ray equipment, and the number of image scan lines of the image slice is less than a first preset threshold;
  • the image fragmentation sending module 320 is configured to store the image fragmentation in a preset buffer, and send the image fragmentation to the target image judgment device, and the target image judgment device displays the image fragmentation;
  • the image splicing module 330 is configured to splice the stored image slices into a target image when the number of image slices stored in the preset buffer reaches a second preset threshold;
  • the image recognition module 340 is configured to perform target object recognition on the target image.
  • the device may also include the following modules:
  • the recognition result acquisition module is configured to obtain the recognition result of the target object recognition
  • the recognition result sending module is configured to send the recognition result to the target image judgment device, and the target map judgment device displays the recognition result in the displayed image.
  • the device may also include the following modules:
  • a warning mark generation module configured to generate a warning mark when it is determined that the target object is a specified warning object according to the recognition result
  • the warning sign sending module is configured to send the warning sign to the target map judgment device, and the target map judgment device displays the warning mark in the displayed image and sends out a warning signal.
  • the image slice sending module 320 is set to:
  • the image fragments are sent to the target image judging device, wherein the image fragments identified in the preset buffer and belonging to the same target object are allocated to the same target image judging device.
  • the image recognition module 340 may include the following submodules:
  • a blank judging submodule configured to judge whether the target image is a blank image
  • the connected domain detection submodule is configured to perform connected domain detection on the target image to obtain one or more target connected domains if the target image is not a blank image;
  • the image segmentation submodule is configured to segment the target image into a set of image patches according to the one or more target connected domains;
  • the de-interference processing sub-module is configured to perform de-interference processing on each image small piece in the image small piece set;
  • the object detection sub-module is configured to respectively input each image patch after de-interference into a pre-generated target detection model, and obtain the detection result of the target object output by the target detection model for each image patch.
  • the image recognition module 340 may also include the following submodules:
  • the missed detection analysis submodule is configured to determine whether there is a missed detection in each target connected domain according to the detection result.
  • the device may also include the following modules:
  • Integrity judging module configured to judge whether the detected target object is a complete target object or an incomplete target object
  • the incomplete information interception module is configured to determine the left boundary of the incomplete target object when it is determined that the target image contains an incomplete target object; trace back to the left according to the left boundary of the incomplete target object Three preset threshold image scan lines to obtain the left boundary information of the incomplete target object; use the left boundary information of the incomplete target object as the scan line of the right part of the initial boundary as the image of the target object Fragmentation: distributing the image fragmentation of the incomplete target object to the next determined target image judgment device.
  • the target object recognition device provided in the embodiment of the present application can execute the target target recognition method provided in the foregoing embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the method.
  • Fig. 4 is a schematic structural diagram of a security inspection device provided by an embodiment of the present application.
  • the security inspection device may include a server, and the server may be located inside the security inspection device or outside the security inspection device, and may be installed locally or remotely. On the terminal, the server communicates with the security inspection equipment.
  • the security inspection device includes a processor 410, a memory 420, an input device 430 and an output device 440; the number of processors 410 in the security inspection device can be one or more, and one processor 410 is taken as an example in Figure 4 ;
  • the processor 410, the memory 420, the input device 430 and the output device 440 in the security inspection device can be connected through a bus or in other ways. In FIG. 4, the connection through a bus is taken as an example.
  • the memory 420 can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the above-mentioned embodiments in the embodiments of the present application.
  • the processor 410 executes various functional applications and data processing of the security inspection device by running the software programs, instructions and modules stored in the memory 420 , that is, to realize the target object identification method mentioned in any of the above method embodiments.
  • the memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like.
  • the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
  • the memory 420 may include a memory that is remotely located relative to the processor 410, and these remote memories may be connected to the device/terminal/security inspection device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 430 can be configured to receive input numbers or character information, and generate key signal input related to user settings and function control of the security inspection device.
  • the output device 440 may include a display device such as a display screen.
  • An embodiment of the present application also provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the methods in the above method embodiments when executed by a computer processor.
  • a storage medium containing computer-executable instructions provided in the embodiments of the present application
  • the computer-executable instructions are not limited to the method operations described above, and can also execute the target object identification method provided in any embodiment of the present application. related operations.
  • the present application can be realized by software and necessary general-purpose hardware, and of course it can also be realized by hardware.
  • the essence of the technical solution of this application or the part that contributes to related technologies can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as computer floppy disks, Read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disc, etc., including a number of instructions to make an electronic device (which can be a personal computer, A server, or a network device, etc.) executes the methods described in multiple embodiments of the present application.
  • the computer readable storage medium may be a non-transitory computer readable storage medium.

Abstract

本申请公开了一种目标对象识别的方法及装置,所述方法包括:接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值;在预设缓冲区存储所述图像分片,并将图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片;响应于确定预设缓冲区中存储的图像分片的数量达到第二预设阈值,将存储的所述图像分片拼接成目标图像;对所述目标图像进行目标对象识别。

Description

目标对象识别的方法及装置
本申请要求在2021年5月8日提交中国专利局、申请号为202110501793.5的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及数据处理技术,例如涉及一种目标对象识别的方法及装置。
背景技术
X光安检机已被广泛应用于交通、物流等领域,社会的高速发展对安检速度和精确度的需求越来越高。
相关技术中在轨道交通领域使用的X射线检查设备,在远程集中判图时,一般X光机扫描完一个包裹,现场判图端出现一个包裹图像后,如果配备智能识图仪,智能识图仪的视频采集卡将抓取现场判图端的视频接口的图像、并传送到识图仪的人工智能(Artificial Intelligence,AI)模块,AI模块完成智能识图后再将整个图片推送到远程判图端。而由于X光机扫描、智能识图仪AI识图(如果配备)、现场判图端(如果配备现场判图)、远程判图端是串行工作的,会给远程判图端的判图员在视觉上造成明显的顿挫感。且在包裹图像到达判图端之前,判图员要么是对着空白的屏幕,要么是上一张图的屏幕,不能对正在扫描的包裹进行判图,而当当前包裹图像到达判图端进行显示时,留给判图员的时间又太短,加剧了人工判图的时间紧迫感。
发明内容
本申请提供一种目标对象识别的方法及装置,以避免相关技术中包裹图像出现时给判图员视觉上产生顿挫感以及加剧了人工判图的时间紧迫感的情况。
第一方面,本申请实施例提供了一种目标对象识别的方法,所述方法包括:
接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值;
在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片;
响应于确定所述预设缓冲区中存储的图像分片的数量达到第二预设阈值,将存储的所述图像分片拼接成目标图像;
对所述目标图像进行目标对象识别。
第二方面,本申请实施例还提供了一种目标对象识别的装置,所述装置包括:
图像分片接收模块,设置为接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值;
图像分片发送模块,设置为在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片;
图像拼接模块,设置为响应于确定所述预设缓冲区中存储的图像分片的数量达到第二预设阈值,将存储的所述图像分片拼接成目标图像;
图像识别模块,设置为对所述目标图像进行目标对象识别。
第三方面,本申请实施例还提供了一种安检设备,所述安检设备包括:
至少一个处理器;
存储装置,设置为存储至少一个程序,
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现上述第一方面的方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一方面的方法。
附图说明
图1是本申请一实施例提供的一种目标对象识别的方法实施例的流程图;
图2是本申请另一实施例提供的一种目标对象识别的方法实施例的流程图;
图3是本申请一实施例提供的一种目标对象识别的装置实施例的结构框图;
图4是本申请一实施例提供的一种安检设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的 是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
图1为本申请一实施例提供的一种目标对象识别的方法实施例的流程图,本实施例可以应用于服务器中,在一种应用场景中,该服务器可以包括安检场景中的安检设备,可以包括如下步骤:
步骤110,接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值。
在一种实施例中,本实施例可以应用于安检场景中,则X射线设备可以包括安检机中的X射线检查设备。在实现时,X射线设备在其内部计算机算法底层、可以将在显卡缓冲区的X射线图像扫描线直接送到网络接口进行发送。为了节省中央处理器(Central Processing Unit/Processor,CPU)资源,提高处理效率,上述图像扫描线不是一行一行发送,而是组成图像小片(即图像分片)后采用网卡的巨帧模式打包发送。
图像分片可以作为本实施例的传输和处理单元,作为一种示例,可以设定图像分片的图像扫描线的数量少于第一预设阈值。其中,第一预设阈值可以根据实际业务需求设定,本实施例对此不作限定,当然,第一预设阈值的设定不宜过大或者过小,过大了会影响后面的同步效果,太小了又不利于优化处理效率。例如,第一预设阈值可以设定为50(假设安检机的传送带速度为0.6m/s计算,X射线探测器的扫描频率为750Hz,则50条图像扫描线为1/15秒的对应4cm包裹的射线图像)。
在一种实现中,服务器可以向X射线设备下发扫描线的配置文件,该配置文件中可以包含每个图像分片的图像扫描线的数量的配置,例如,配置文件中可以包括按照少于50扫描线的规则来组合图像分片的记录。则X射线设备按照该配置文件,可以将少于50线的X射线图像扫描线作为一个图像分片来进进行传输。
步骤120,在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片。
在该步骤中,服务器中可以预先生成用于存储图像分片的预设缓冲区,服务器每接收到一个图像分片以后,则首先将该图像分片存入该预设缓冲区。然后,服务器可以从该预设缓冲区中读取该图像分片,并将读取的图像分片发送至目标判图设备中,由目标判图设备以卷轴形式实时展示接收的图像分片,以便于该目标判图设备的判图员能够根据该图像分片进行预先判图,增加了人工 判图的时间。并且,对于判图员而言,图像分片是以平滑卷轴式展开的,在视觉上不会产生明显的顿挫感。
在一种实施方式中,步骤120中将所述图像分片发送至目标判图设备的步骤,可以包括如下步骤:
按照负载均衡规则从多台候选判图设备中确定目标判图设备;将所述图像分片发送至所述目标判图设备。
其中,本实施例对具体的负载均衡规则不作限定,在根据负载均衡规则选择目标判图设备时,可以综合考虑每台候选判图设备的负荷、判图员的经验值、历史执行任务等因素。例如,在安检场景中,可以获取每台候选判图设备的工作状态,该工作状态可以包括空闲状态与忙碌状态;如果存在超过一个处于空闲状态的候选判图设备,则可以获取每台处于空闲状态的候选判图设备对应的判图员的经验值,选取经验值高的判图员对应的候选判图设备作为目标判图设备。如果仅存在一个处于空闲状态的候选判图设备,则直接将该候选判图设备作为目标判图设备。如果不存在处于空闲状态的候选判图设备,则可以获取每台候选判图设备对应的判图员的经验值,选取经验值高的判图员对应的候选判图设备作为目标判图设备。如果每台候选判图设备的判图员的经验值都差不多,可以选取处理任务比较少的设备作为目标判图设备。
为了确保对象(如安检机中的包裹)的完整展示,预设缓冲区中识别出的属于同一目标对象的图像分片均分配至同一目标判图设备中。
本实施例按照负载均衡规则从多个候选判图设备中选取目标判图设备,并将图像分片分发到该目标判图设备中,可以避免多个判图任务堆积到同一判图设备中进行处理,提高判图效率。例如,通过本实施例将不同的包裹图像自动分派给多个不同的判图员进行同时判别,相比于同一个判图员对多个包裹图像进行判图,可以提高判图的效率和准确性。
步骤130,当所述预设缓冲区中存储的图像分片的数量达到第二预设阈值时,将存储的所述图像分片拼接成目标图像。
在实际中,由于在后续步骤140中进行一次图像识别所需的时间基本是固定的,为了降低图像识别的工作量,本实施例可以在缓冲区中的图像分片的数量达到第二预设阈值时,将存储的图像分片拼接成目标图像,然后再基于目标图像进行图像识别。
在一种实现中,可以在预设缓冲区中设置一计数器,当计数器显示预设缓 冲区中存储的图像分片的数量达到第二预设阈值时,则触发图像拼接操作。
X射线设备在生成图像分片时,可以为图像分片添加分片序号,在服务器侧,可以根据多个图像分片的分片序号进行图像的拼接。本实施例对具体的图像拼接算法不作限定。
需要说明的是,第二预设阈值可以根据实际业务需求确定,本实施例对此不作限定,例如,可以将第二预设阈值设置为20。
步骤140,对所述目标图像进行目标对象识别。
例如,在安检场景中,目标对象可以包括处于安检传送带中的包裹(如箱包等),通过对目标图像中的包裹进行识别,可以判断该目标图像是否包含完整的包裹图像。
在一种实现中,可以通过传统视觉算法与深度学习算法相结合的方式来进行目标对象识别。则步骤140可以包括如下步骤:
步骤140-1,判断所述目标图像是否为空白图像。
在一种实施方式中,服务器可以采用如下方式判断目标图像是否为空白图像:
获取目标图像的灰度信息;若该灰度信息符合指定的灰度条件,则判定该目标图像为空白图像。
可以将目标图像进行灰度化处理,生成灰度图像,并获得该灰度图像的灰度直方图。如果该灰度直方图符合指定的灰度条件,则可以判定目标图像为空白图像。
在一种例子中,指定的灰度条件可以包括:灰度直方图包络线的拐点数量为一个,即,如果目标图像的灰度直方图的包络线的拐点数量为一个时,则判定该目标图像为空白图像。
在其他例子中,指定的灰度条件可以包括:满刻度灰度直方图,即,如果当前目标图像的灰度直方图接近满刻度灰度直方图,则判定该目标图像为空白图像。其中,满刻度的意思是,图像采集设备所处的采集环境中没有目标对象时的响应,例如,在安检场景中,满刻度是指没有物体时X射线直接打到探测器时的响应,当目标图像的灰度直方图接近满刻度响应产生的图像的灰度直方图时,则可以判定目标图像为空白图像。
在另一种实施方式中,还可以将不存在目标对象但存在噪声(如多种干扰物)的图像作为空白图像,则服务器可以采用如下方式判断目标图像是否为空 白图像:
对目标图像进行连通域检测,若检测出一个或多个连通域,则获得该一个或多个连通域的面积,并过滤掉面积小于一定阈值的连通域;如果最终没有剩下连通域,则判定目标图像为空白图像。其中,连通域又称为连通区域(Connected Component),是指图像中具有相同像素值且位置相邻的前景像素点组成的图像区域(Region,Blob)。
当然,除了上述两种方式以外,本领域技术人员还可以根据实际的场景采用其他合适的方式识别空白图像,本实施例对此不作限定。
如果目标图像为空白图像,则可以直接丢弃该空白图像,避免后续对空白图像的识别造成的资源浪费。如果目标图像不为空白图像,则可以继续执行步骤140-2。
步骤140-2,若所述目标图像不为空白图像,则对所述目标图像进行连通域检测,以获得一个或多个目标连通域。
在该步骤中,当服务器判定目标图像不是空白图像时,则作进一步的检测,该检测可以包括连通域检测,从而将目标图像识别成一个或多个目标连通域。
在一种实施方式中,步骤140-2可以包括如下步骤:
步骤140-2-1,对所述目标图像进行灰度化以及二值化处理,得到二值图像。
该步骤通过对目标图像进行灰度化以及二值化处理来去除目标图像的背景干扰,得到二值图像I bin
步骤140-2-2,对所述二值图像进行去噪处理。
该步骤通过对二值图像进行去噪处理,可以把图像中粘连不紧密的对象(在安检场景下,该对象例如可以是传送带中的箱包)进行分离,去噪处理后的二值图像可以表示为I denoise
在一种例子中,去噪处理可以包括中值滤波处理、形态学腐蚀处理等。
步骤140-2-3,对去噪处理后的二值图像进行连通域分析,获得一个或多个候选连通域。
该步骤中,服务器可以通过连通区域分析(Connected Component Analysis,Connected Component Labeling)算法来将去噪处理后的二值图像I denoise中的每个连通区域找出并标记,最后得到一个或多个候选连通域。
需要说明的是,本实施例对具体的连通区域分析算法并不作限定,例如,可以是Two-Pass(两遍扫描法)或者Seed-Filling种子填充法,只要最后能得 到一个或多个候选连通域即可。
步骤140-2-4,过滤掉面积小于设定面积阈值的候选连通域,并将剩下的连通域作为目标连通域。
该步骤中,在得到一个或多个候选连通域以后,可以计算每个候选连通域的面积,在一种实现中,可以采用fabs(cvContourArea(c,CV_WHOLE_SEQ))来计算每个候选连通域的面积。当然,还可以采用其他方式来计算每个候选连通域的面积,例如,统计每个候选连通域的像素点的数量作为面积,或者,采用matlab中的其他函数(如total=bwarea(BW)等)来计算连通区域的面积。
得到每个候选连通域的面积以后,则可以将每个候选连通域的面积与设定面积阈值T进行比较,然后将面积小于T的候选连通域过滤掉,最后把剩下的连通域作为目标连通域。
目标连通域可以包括一个或多个,例如,多个目标连通域可以描述为:L coarse={(x 1,y 1,w 1,h 1),…,(x i,y i,w i,h i)},其中,i表示第i个目标连通域,(x i,y i)是第i个目标连通域的左上角坐标,w i和h i分别是第i个连通域的宽度和高度。
步骤140-3,根据所述一个或多个目标连通域将所述目标图像分割成图像小片集合。
在该步骤中,在标记出一个或多个目标连通域以后,可以按照该一个或多个目标连通域将目标图像进行分割,得到对应的图像小片,多个图像小片可以组成图像小片集合。图像小片集合可以表示为I split={I 1,…,I i},其中,I i为图像小片。
步骤140-4,对所述图像小片集合中每个图像小片分别进行去干扰处理。
在该实施例中,通过对每个图像小片进行去干扰处理,可以确保每个图像小片对应的连通域不超过1个,从而提高后续的目标对象的检测的准确率。
对于图像小片集合I split={I 1,…,I i},对每个图像小片去干扰处理后,可以得到去干扰后的图像小片集合I d={I d1,…,I di}。
在一种实施方式中,步骤140-4可以包括如下步骤:
分别对每个图像小片进行连通域检测;如果当前图像小片中包含的连通域的个数为1,则不对当前图像小片进行处理,将当前图像小片直接作为去干扰处理后的图像小片;如果当前图像小片中包含的连通域的个数大于1,则保留当前图像小片中面积最大的连通域,并将其他连通域的像素设置为背景像素, 得到去干扰处理后的图像小片。
可以参考步骤140-2的连通域检测的方法来对每个图像小片进行连通域检测,以得到每个图像小片的连通域位置。然后分析每个图像小片的连通域的数量,如果某个图像小片中包含的连通域的个数为1,则不对该图像小片进行去干扰处理,此时,将该图像小片直接作为去干扰处理后的图像小片,即I di=I i,其中,I di为去干扰处理后的图像小片。如果某个图像小片中包含的连通域的个数大于1,则计算每个连通域的面积,并保留当前图像小片中面积最大的连通域,然后将其他连通域的像素设置为背景像素,得到去干扰处理后的图像小片,即,I di为I i中保留最大面积的连通域、且其余连通域内的像素值设置为背景像素值得到的图片。
其中,背景像素值可以根据图像小片的背景来进行设置,例如,如果图像小片的背景为白色,则其背景像素值可以为(255,255,255)。
步骤140-5,分别将去干扰后的每个图像小片输入至预先生成的目标检测模型中,并获得所述目标检测模型针对每个图像小片输出的目标对象的检测结果。
在该步骤中,在对每个图像小片进行去干扰处理得到去干扰后的图像小片I di以后,则可以分别将每个I di输入至预先生成的目标检测模型中,由该目标检测模型对每个I di进行对象检测,输出对应的检测结果。
在一种实施例中,目标检测模型可以为基于深度学习的机器模型,例如,目标检测模型可以为YOLOv3模型。
在一种实现中,假设YOLOv3模型用于安检场景的箱包检测场景下,可以采用如下方式训练YOLOv3模型:
使用垂直投影的方法对X射线长图进行分割,获得数据集D,对D进行相应的标注并划分为训练集、测试集和验证集;在D上采用k-means聚类算法重新聚类出9个anchor(锚)的坐标,替换YOLOv3模型的默认anchor;采用随机梯度下降算法优化模型参数,直到损失函数收敛。
示例性地,在安检场景中,目标对象可以为安检传送带中的箱包,目标检测模型输出的目标对象的检测结果可以包括每个图像小片中箱包的位置信息,可以表示为:L fine={B 1,…,B i}={{(x 11,y 11,w 11,h 11),…},…,{…,(x ij,y ij,w ij,h ij)}},其中,B i表示第i个图像小片中箱包的位置信息,ij表示第i个图像小片细检测出来的第j个 箱包。
在一种实施例中,当通过步骤140-5对目标对象进行细检测以后,步骤140还可以包括如下步骤:
步骤140-6,根据所述检测结果,判断每个目标连通域是否存在漏检。
在实际处理过程中,对于每个目标连通域而言,还可能会存在漏检的情况。因此,本实施例通过对每个目标连通域的漏检分析来降低漏检情况。
在一种实施方式中,检测结果可以包括目标对象的位置;步骤140-6可以包括如下步骤:
根据每个目标对象的位置,判断当前目标连通域中是否检测出目标对象;若当前目标连通域中没有检测出目标对象,则判定当前目标连通域存在漏检,并将当前目标连通域作为目标对象;若当前目标连通域中检测出目标对象,则定位当前目标连通域对应的图像分片;将当前目标连通域对应的图像分片中的检测出的所述目标对象对应的像素值设置为背景像素值,然后对该图像分片进行连通域检测;若检测出连通域,则判定所述当前目标连通域存在漏检,并将检测出的连通域作为目标对象。
如果目标连通域的位置信息为L i={(x i,y i,w i,h i)},多个目标对象的位置信息为B i={{(x i1,y i1,w i1,h i1),…,(x ij,y ij,w ij,h ij)}},可以分别将多个目标对象的位置信息(x ij,y ij,w ij,h ij)与L i={(x i,y i,w i,h i)}进行位置匹配,判断当前目标连通域的位置信息包含多少个目标对象。
由于目标连通域必然会存在目标对象。如果当前目标连通域的位置信息包含0个目标对象,即没有目标对象的位置信息与当前目标连通域的位置信息重叠,则可以将该目标连通域确定为漏检连通域,并将该漏检连通域作为目标对象加入到目标对象集合,即,将L i加入L result(目标对象集合)中。
如果当前目标连通域的位置信息包含超过0个目标对象,即超过0个目标对象的位置信息与当前目标连通域的位置信息重叠,则可以先将当前目标连通域的位置信息包含的多个目标对象的位置信息B i加入L result,然后将对应图像分片I i中B i中所对应的所有区域内的像素值设置为背景像素值(如(255,255,255)),然后将得到的图像进行粗检测,如果粗检测得到的连通域的个数不为0,则该连通域为漏检连通域,也将检测出的连通域作为目标对象加入L result
步骤140-7,判断检测出的目标对象为完整的目标对象或不完整的目标对 象。
在该实施例中,多个目标连通域对应的检测结果加起来为整张目标图像的检测结果。步骤140-7中对整张目标图像的检测结果进行完整性分析,主要是判断每个检测出的目标对象在目标图像中是完整的目标对象还是不完整的目标对象。例如,在X光安检场景中,履带是一直动的,可能箱包还没有扫描完整就切出生成目标图像,所以需要进行箱包的完整性分析。
在一种实施方式中,步骤140-7可以包括步骤:
获取所述目标对象的左上角横坐标以及宽度;根据所述左上角坐标以及所述宽度,判断该目标对象是否位于所述目标图像的右边缘位置;若是,则判定所述目标对象为不完整的目标对象;若否,则判定所述目标对象为完整的目标对象。
例如,假设目标对象的左上角横坐标以及宽度分别为x i和w i,目标图像的宽度为W,如果x i+w i+a>W,其中,a为正常数,其可以根据实际需求确定,例如,根据经验值将a确定为5,则表示该目标对象位于目标图像的右边缘位置,则该目标对象为不完整目标对象(由于不完整的目标对象一般处于边缘位置)。反之,如果x i+w i+a<W,则表示该目标对象没有位于目标图像的右边缘位置,则该目标对象为完整目标对象。
步骤140-8,当判定所述目标图像包含不完整的目标对象时,确定所述不完整的目标对象的左边界;根据所述不完整的目标对象的左边界,往左回溯第三预设阈值的图像扫描线,得到所述不完整的目标对象的左边界信息;将所述不完整的目标对象的左边界信息为起始边界的右部分的扫描线作为该目标对象的图像分片;将所述不完整的目标对象的图像分片分配至下一个确定的目标判图设备中。
如果目标图像包含不完整的目标对象,则可以获得该不完整的目标对象的位置信息,并从该不完整的目标对象的位置信息中提取该不完整的目标对象的左边界。
得到该不完整的目标对象的左边界以后,为了避免误差,可以以该左边界为起始边界,往左回溯第三预设阈值的图像扫描线作为该不完整的目标对象的左边界信息。例如,可以从左边界开始往左继续取20条图像扫描线,到第20条扫描线的位置作为该不完整的目标对象的左边界信息。
得到该不完整的目标对象的左边界信息以后,可以以该左边界信息为起始 位置,将其右部份的图像扫描线组成该不完整的目标对象的图像分片。然后将该不完整的目标对象的图像分片分配至下一个确定的目标判图设备中,同时,该下一个确定的目标判图设备还会继续接收服务器发送的来自X射线设备发送的图像分片,以此确保目标对象的完整性。
在本实施例中,X射线设备传送的图像分片为图像扫描线的数量少于第一预设阈值的图像分片,服务器在接收到该图像分片以后,在预设缓冲区存储该图像分片的同时,还可以将该图像分片发送至目标判图设备中进行显示,这样判图员可以根据图像分片进行判图,而无需等待整个图像出现后再进行判图,增加了人工判图的时间,提高了判图的效率和准确率。
另外,当服务器中的预设缓冲区中存储的图像分片的数量达到第二预设阈值时,服务器还可以将存储的图像分片拼接成目标图像,并对目标图像进行目标对象识别,这样,当服务器对图像完成识别以后,判图设备那一侧的图像也已经显示完整,判图员已经完成了判图,从而实现了图像识别与判图的同步进行。
图2为本申请另一实施例提供的一种目标对象识别的方法实施例的流程图,本实施例可以应用于服务器中,可以包括如下步骤:
步骤210,接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值。
步骤220,在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片。
步骤230,当所述预设缓冲区中存储的图像分片的数量达到第二预设阈值时,将存储的所述图像分片拼接成目标图像。
步骤240,对所述目标图像进行目标对象识别,并获取所述目标对象识别的识别结果。
步骤250,将所述识别结果发送至所述目标判图设备中,由所述目标判图设备在显示的图像中显示所述识别结果。
示例性地,对目标图像进行目标对象识别的识别结果可以包括目标对象的位置信息。服务器在获得该识别结果以后,可以同时将该识别结果发送至目标判图设备中,由目标判图设备在当前的显示的图像中显示该识别结果。例如,目标判图设备获得包裹的位置信息以后,可以在当前的包裹图像中显示该位置信息。其中,在显示该位置信息的过程中,目标判图设备可以根据包裹的位置 信息框出包裹的位置边界并进行显示。
步骤260,当根据所述识别结果判定所述目标对象为指定告警对象时,生成告警标记。
在一种实现中,上述识别结果还可以包括目标对象的对象类型。服务器中可以预先设置告警对象列表,该告警对象列表可以记录多种告警对象的类型以及对应的特征信息。当服务器判定上述目标对象的对象类型属于告警对象列表中记录的告警对象的类型时,则可以判定该目标对象为指定告警对象。否则,当服务器判定上述目标对象的对象类型不属于告警对象列表中记录的告警对象的类型时,则可以判定该目标对象不为指定告警对象。
如果服务器判定目标对象为指定告警对象时,则可以根据该目标对象的对象类型生成对应的告警标记。在一种实现中,在告警对象列表中还可以记录每个告警对象的类型对应的告警标记,服务器可以直接从告警对象列表中获得目标对象的对象类型对应的告警标记。
步骤270,将所述告警标记发送至所述目标判图设备中,由所述目标判图设备在显示的图像中显示所述告警标记,并发出告警信号。
当服务器获得目标对象的告警标记以后,可以将该告警标记发送至目标判图设备中。目标判图设备接收到该告警标记以后,可以在显示的图像中显示告警标记。在其他实施例中,目标判图设备还可以根据该告警标记发出告警信号,该告警信号可以是高亮告警标记、发出报警声音等,本实施例对此不作限定。
在本实施例中,服务器可以将图像识别的识别结果、告警识别结果等同步至目标判图设备中,从而实现判图与识图的同步。
图3为本申请一实施例提供的一种目标对象识别的装置实施例的结构框图,所述装置可以位于服务器中,可以包括如下模块:
图像分片接收模块310,设置为接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值;
图像分片发送模块320,设置为在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片;
图像拼接模块330,设置为当所述预设缓冲区中存储的图像分片的数量达到第二预设阈值时,将存储的所述图像分片拼接成目标图像;
图像识别模块340,设置为对所述目标图像进行目标对象识别。
在一种实施例中,所述装置还可以包括如下模块:
识别结果获取模块,设置为获取所述目标对象识别的识别结果;
识别结果发送模块,设置为将所述识别结果发送至所述目标判图设备中,由所述目标判图设备在显示的图像中显示所述识别结果。
在一种实施例中,所述装置还可以包括如下模块:
告警标记生成模块,设置为当根据所述识别结果判定所述目标对象为指定告警对象时,生成告警标记;
告警标记发送模块,设置为将所述告警标记发送至所述目标判图设备中,由所述目标判图设备在显示的图像中显示所述告警标记,并发出告警信号。
在一种实施例中,所述图像分片发送模块320设置为:
按照负载均衡规则从多台候选判图设备中确定目标判图设备;
将所述图像分片发送至所述目标判图设备,其中,所述预设缓冲区中识别出的属于同一目标对象的图像分片均分配至同一目标判图设备中。
在一种实施例中,所述图像识别模块340可以包括如下子模块:
空白判断子模块,设置为判断所述目标图像是否为空白图像;
连通域检测子模块,设置为若所述目标图像不为空白图像,则对所述目标图像进行连通域检测,以获得一个或多个目标连通域;
图像分割子模块,设置为根据所述一个或多个目标连通域将所述目标图像分割成图像小片集合;
去干扰处理子模块,设置为对所述图像小片集合中每个图像小片分别进行去干扰处理;
对象检测子模块,设置为分别将去干扰后的每个图像小片输入至预先生成的目标检测模型中,并获得所述目标检测模型针对每个图像小片输出的目标对象的检测结果。
在一种实施例中,所述图像识别模块340还可以包括如下子模块:
漏检分析子模块,设置为根据所述检测结果,判断每个目标连通域是否存在漏检。
在一种实施例中,所述装置还可以包括如下模块:
完整性判断模块,设置为判断检测出的目标对象为完整的目标对象或不完整的目标对象;
不完整信息截取模块,设置为当判定所述目标图像包含不完整的目标对象时,确定所述不完整的目标对象的左边界;根据所述不完整的目标对象的左边 界,往左回溯第三预设阈值的图像扫描线,得到所述不完整的目标对象的左边界信息;将所述不完整的目标对象的左边界信息为起始边界的右部分的扫描线作为该目标对象的图像分片;将所述不完整的目标对象的图像分片分配至下一个确定的目标判图设备中。
本申请实施例所提供的一种目标对象识别的装置可执行本申请前述实施例所提供的一种目标对象识别的方法,具备执行方法相应的功能模块和有益效果。
图4为本申请一实施例提供的一种安检设备的结构示意图,该安检设备可以包括服务器,所述服务器可以位于安检设备内部,也可以位于安检设备外部,可以设置在本地也可以设置在远端,服务器与安检设备通信连接。如图4所示,该安检设备包括处理器410、存储器420、输入装置430和输出装置440;安检设备中处理器410的数量可以是一个或多个,图4中以一个处理器410为例;安检设备中的处理器410、存储器420、输入装置430和输出装置440可以通过总线或其他方式连接,图4中以通过总线连接为例。
存储器420作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的上述实施例对应的程序指令/模块。处理器410通过运行存储在存储器420中的软件程序、指令以及模块,从而执行安检设备的多种功能应用以及数据处理,即实现上述任一方法实施例中提到的目标对象识别的方法。
存储器420可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器420可包括相对于处理器410远程设置的存储器,这些远程存储器可以通过网络连接至设备/终端/安检设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置430可设置为接收输入的数字或字符信息,以及产生与安检设备的用户设置以及功能控制有关的键信号输入。输出装置440可包括显示屏等显示设备。
本申请一实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行上述方法实施例中的方法。
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其 计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的目标对象识别方法中的相关操作。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台电子设备(可以是个人计算机,服务器,或者网络设备等)执行本申请多个实施例所述的方法。计算机可读存储介质可以是非暂态计算机可读存储介质。
值得注意的是,上述装置的实施例中,所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。

Claims (10)

  1. 一种目标对象识别的方法,包括:
    接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值;
    在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片;
    响应于确定所述预设缓冲区中存储的图像分片的数量达到第二预设阈值,将存储的所述图像分片拼接成目标图像;
    对所述目标图像进行目标对象识别。
  2. 根据权利要求1所述的方法,还包括:
    获取所述目标对象识别的识别结果;
    将所述识别结果发送至所述目标判图设备中,由所述目标判图设备在显示的图像中显示所述识别结果。
  3. 根据权利要求2所述的方法,还包括:
    响应于确定根据所述识别结果判定所述目标对象为指定告警对象,生成告警标记;
    将所述告警标记发送至所述目标判图设备中,由所述目标判图设备在显示的图像中显示所述告警标记,并发出告警信号。
  4. 根据权利要求1-3任一项所述的方法,其中,所述将所述图像分片发送至目标判图设备,包括:
    按照负载均衡规则从多台候选判图设备中确定目标判图设备;
    将所述图像分片发送至所述目标判图设备,其中,所述预设缓冲区中识别出的属于同一目标对象的图像分片均分配至同一目标判图设备中。
  5. 根据权利要求1所述的方法,其中,所述对所述目标图像进行目标对象识别,包括:
    判断所述目标图像是否为空白图像;
    基于所述目标图像不为空白图像的判断结果,对所述目标图像进行连通域检测,以获得至少一个目标连通域;
    根据所述至少一个目标连通域将所述目标图像分割成图像小片集合;其中,所述图像小片集合包括多个图像小片;
    对所述图像小片集合中每个图像小片进行去干扰处理;
    将去干扰后的所述每个图像小片输入至预先生成的目标检测模型中,并获得所述目标检测模型针对所述每个图像小片输出的目标对象的检测结果。
  6. 根据权利要求5所述的方法,其中,所述对所述目标图像进行目标对象识别,还包括:
    根据所述检测结果,判断每个目标连通域是否存在漏检。
  7. 根据权利要求1、5、6中任一项所述的方法,在所述对所述目标图像进行目标对象识别之后,还包括:
    判断检测出的目标对象为完整的目标对象或不完整的目标对象;
    基于所述目标图像包含不完整的目标对象的判断结果,确定所述不完整的目标对象的左边界;
    根据所述不完整的目标对象的左边界,往左回溯第三预设阈值的图像扫描线,得到所述不完整的目标对象的左边界信息;
    将所述不完整的目标对象的左边界信息为起始边界的右部分的扫描线作为所述不完整的目标对象的图像分片;
    将所述不完整的目标对象的图像分片分配至下一个确定的目标判图设备中。
  8. 一种目标对象识别的装置,包括:
    图像分片接收模块,设置为接收X射线设备发送的图像分片,所述图像分片的图像扫描线的数量少于第一预设阈值;
    图像分片发送模块,设置为在预设缓冲区存储所述图像分片,并将所述图像分片发送至目标判图设备,由所述目标判图设备显示所述图像分片;
    图像拼接模块,设置为响应于确定所述预设缓冲区中存储的图像分片的数量达到第二预设阈值,将存储的所述图像分片拼接成目标图像;
    图像识别模块,设置为对所述目标图像进行目标对象识别。
  9. 一种安检设备,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序,
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-7任一项所述的方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-7任一项所述的方法。
PCT/CN2021/134341 2021-05-08 2021-11-30 目标对象识别的方法及装置 WO2022237135A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110501793.5A CN113139950B (zh) 2021-05-08 2021-05-08 一种目标对象识别的方法及装置
CN202110501793.5 2021-05-08

Publications (1)

Publication Number Publication Date
WO2022237135A1 true WO2022237135A1 (zh) 2022-11-17

Family

ID=76816692

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134341 WO2022237135A1 (zh) 2021-05-08 2021-11-30 目标对象识别的方法及装置

Country Status (2)

Country Link
CN (1) CN113139950B (zh)
WO (1) WO2022237135A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113139950B (zh) * 2021-05-08 2024-04-16 佳都科技集团股份有限公司 一种目标对象识别的方法及装置
CN114693529B (zh) * 2022-04-20 2023-03-14 北京理工大学重庆创新中心 一种图像拼接方法、装置、设备及存储介质
CN115457398B (zh) * 2022-11-14 2023-04-07 成都智元汇信息技术股份有限公司 一种基于双重视角的集中判图客户端及展示方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060039629A1 (en) * 2004-08-21 2006-02-23 Xerox Corporation Document registration and skew detection system
CN109030524A (zh) * 2018-09-04 2018-12-18 广州地铁设计研究院有限公司 一种城市轨道交通安检集中判图系统
CN109242762A (zh) * 2018-08-27 2019-01-18 北京铂石空间科技有限公司 图像识别方法、装置、存储介质及电子设备
CN113139950A (zh) * 2021-05-08 2021-07-20 佳都科技集团股份有限公司 一种目标对象识别的方法及装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4230731B2 (ja) * 2002-07-29 2009-02-25 株式会社東芝 ディジタル画像処理装置及びx線診断装置
JP4631258B2 (ja) * 2003-09-05 2011-02-16 日本電気株式会社 携帯機器
JP2007521862A (ja) * 2004-01-15 2007-08-09 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ 心臓機能の確率的解析
US8300938B2 (en) * 2010-04-09 2012-10-30 General Electric Company Methods for segmenting objects in images
CN104135934B (zh) * 2012-04-02 2016-12-28 株式会社日立制作所 X射线图像诊断装置以及x射线产生装置的控制方法
CN104345350A (zh) * 2013-07-23 2015-02-11 清华大学 人体安全检查方法和人体安全检查系统
CN104483335B (zh) * 2014-12-29 2017-08-29 同方威视技术股份有限公司 用于x光图像安检设备的判图预警系统、方法和安检设备
CN107346539A (zh) * 2016-05-06 2017-11-14 同方威视技术股份有限公司 用于判图任务分配的方法、系统和设备
CN107871122A (zh) * 2017-11-14 2018-04-03 深圳码隆科技有限公司 安检检测方法、装置、系统及电子设备
CN108195855B (zh) * 2017-12-27 2023-11-03 同方威视技术股份有限公司 安全检查系统及其方法
CN108229449B (zh) * 2018-02-23 2019-11-15 华讯方舟科技有限公司 一种并行式人体安检系统
CN110400626B (zh) * 2019-07-08 2023-03-24 上海联影智能医疗科技有限公司 图像检测方法、装置、计算机设备和存储介质
CN110597126A (zh) * 2019-09-19 2019-12-20 广州新科佳都科技有限公司 智能安检方法、装置、设备和存储介质
CN111667464B (zh) * 2020-05-21 2024-02-02 平安科技(深圳)有限公司 危险品三维图像检测方法、装置、计算机设备及存储介质
CN111612089A (zh) * 2020-05-29 2020-09-01 浙江大华技术股份有限公司 一种在安检机中危险品的标注方法及设备
CN111709422A (zh) * 2020-06-22 2020-09-25 平安养老保险股份有限公司 基于神经网络的图像识别方法、装置和计算机设备
CN112070743A (zh) * 2020-09-08 2020-12-11 北京声迅电子股份有限公司 一种图像序列化的远程智能判图系统
CN112444889A (zh) * 2020-11-13 2021-03-05 北京航星机器制造有限公司 一种快速安检行包远程集中判读系统及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060039629A1 (en) * 2004-08-21 2006-02-23 Xerox Corporation Document registration and skew detection system
CN109242762A (zh) * 2018-08-27 2019-01-18 北京铂石空间科技有限公司 图像识别方法、装置、存储介质及电子设备
CN109030524A (zh) * 2018-09-04 2018-12-18 广州地铁设计研究院有限公司 一种城市轨道交通安检集中判图系统
CN113139950A (zh) * 2021-05-08 2021-07-20 佳都科技集团股份有限公司 一种目标对象识别的方法及装置

Also Published As

Publication number Publication date
CN113139950B (zh) 2024-04-16
CN113139950A (zh) 2021-07-20

Similar Documents

Publication Publication Date Title
WO2022237135A1 (zh) 目标对象识别的方法及装置
WO2019096181A1 (zh) 安检检测方法、装置、系统及电子设备
CN110678901B (zh) 信息处理设备、信息处理方法和计算机可读存储介质
WO2021073370A1 (zh) 物品检测方法、装置、系统和计算机可读存储介质
Arbelaez Boundary extraction in natural images using ultrametric contour maps
US8660373B2 (en) PDF de-chunking and object classification
US8837830B2 (en) Finding text in natural scenes
CN110781839A (zh) 一种基于滑窗的大尺寸图像中小目标识别方法
WO2019114036A1 (zh) 人脸检测方法及装置、计算机装置和计算机可读存储介质
EP1091320A2 (en) Processing multiple digital images
CN109410215A (zh) 图像处理方法、装置、电子设备及计算机可读介质
EP1081648B1 (en) Method for processing a digital image
EP3617938B1 (en) Lane line processing method and device
CN107622501B (zh) 一种医学图像的边界检测的方法
CN109544527A (zh) 一种基于硬卡编程的玻璃表面缺陷的检测方法及装置
CN112651953B (zh) 图片相似度计算方法、装置、计算机设备及存储介质
CN110599453A (zh) 一种基于图像融合的面板缺陷检测方法、装置及设备终端
CN111461133B (zh) 快递面单品名识别方法、装置、设备及存储介质
CN113870196A (zh) 一种基于锚点切图的图像处理方法、装置、设备和介质
CN114419006A (zh) 一种随背景变化的灰度视频文字类水印去除方法及系统
CN114519689A (zh) 图像篡改检测方法、装置、设备及计算机可读存储介质
CN115546824B (zh) 禁忌图片识别方法、设备及存储介质
US20170286815A1 (en) Generating an object map from a plurality of binary images
CN111163332A (zh) 视频色情度检测方法、终端及介质
CN112861861B (zh) 识别数码管文本的方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21941699

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE