X-ray inspection apparatus
The X-ray inspection apparatus enhances accuracy by integrating image processing with learning models to generate and process images, correcting errors in object identification and refining the count of items, addressing the inaccuracies in conventional methods.
Patent Information
- Application Number
- JP2024044075
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-10-02
AI Technical Summary
Conventional X-ray inspection methods using machine learning for counting overlapping items face accuracy issues due to inappropriate inference results, leading to inaccurate inspection of the number of items.
An X-ray inspection apparatus that combines a learning model with image processing to generate area output information and processed information, allowing for correction of errors in identifying object regions, using brightness-processed images and complementary images to refine the count of items.
Improves the accuracy of counting items by correcting errors in object identification, even when machine learning inference is inappropriate, ensuring precise inspection results.
Smart Images

Figure 2025144339000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an X-ray inspection apparatus. [Background technology]
[0002] A conventional technique for inspecting overlapping items involves creating a transmission image of the items based on electromagnetic waves and extracting overlapping portions using a grayscale threshold corresponding to the number of overlapping items (see, for example, Patent Document 1). With such a method based on a transmission image and a grayscale threshold, there is a risk that the inspection accuracy of the items will decrease as the degree of overlap of the items increases, so attempts have been made to count the number of overlapping items using machine learning (see, for example, Patent Document 2). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent No. 6454503 [Patent Document 2] Patent No. 6537008 Summary of the Invention [Problem to be solved by the invention]
[0004] By using machine learning with an image as input to count the number of items in an image, the accuracy of inspection of items has improved when the machine learning inference results are appropriate. However, due to the nature of machine learning inference, the machine learning inference results may not be appropriate. In this case, counting using machine learning (learning model) alone may result in inaccurate inspection results of the number of items in an image, leaving room for improvement in the accuracy of inspection of the number of items.
[0005] An object of the present invention is to provide an X-ray inspection apparatus that can improve the inspection accuracy of the number of articles compared to when only counting is performed using a learning model. [Means for solving the problem]
[0006] (1) An X-ray inspection device according to one embodiment of the present invention includes an irradiation unit that irradiates X-rays onto a plurality of items, a detection unit that detects X-rays that have passed through the items or X-rays that have been reflected by the items, a generation unit that generates an image for inspecting the items based on the X-rays detected by the detection unit, and an inspection unit that inspects the number of items based on the image, wherein the generation unit generates area output information obtained using a learning model that uses the image as input to identify the area of the items in the image, and processing information obtained by image processing the image, and the inspection unit calculates the number of items based on the area output information and the processing information.
[0007] In an X-ray inspection apparatus according to one aspect of the present invention, region output information is generated using a learning model that inputs an image and identifies regions of objects in the image, and processed information is generated by image processing the image. The number of objects is calculated based on not only the region output information obtained using the learning model but also the processed information obtained by image processing the image. As a result, even if the inference result using the learning model is inappropriate, for example, an error occurs in identifying the region of an object, the number of objects can be corrected using the processed information obtained by image processing the image. Therefore, the inspection accuracy of the number of objects can be improved compared to when only counting using the learning model is performed.
[0008] (2) In the above (1), the generation unit may generate a brightness-processed image based on the brightness of the X-rays detected by the detection unit and a predetermined brightness threshold, and the inspection unit may calculate the number of items based on the difference between the area output information and the brightness-processed image. In this case, even if an error occurs in identifying an area of an item in the area output information, the number of items can be corrected using the difference between the area output information and the brightness-processed image.
[0009] (3) In the above (2), the detection unit detects X-rays transmitted through the object, and when the inspection unit recognizes an overlapping area in which multiple objects belong to the same pixel in the image, the number of objects may be corrected based on the number of objects belonging to the overlapping area in the area output information and the number of objects belonging to the overlapping area in the luminance-processed image. In this case, even if there is a omission in the number of objects belonging to the overlapping area in the area output information, the number of objects can be corrected using the number of objects belonging to the overlapping area in the luminance-processed image.
[0010] (4) In the above (2) or (3), the generation unit may generate a first missing image including a first missing region where it is inferred that no article is present in the region output information and where an article is present in the luminance-processed image based on the difference between the region output information and the luminance-processed image, and generate a first complementary image obtained by performing image processing, including expansion, contraction, or filtering, on the difference between the region output information and the luminance-processed image and the first missing region of the first missing image, and the inspection unit may correct the number of articles based on the first complementary image. In this case, for example, even if an article region is not identified in the region output information, the number of articles can be corrected using the number of articles included in the first complementary image.
[0011] (5) In the above (1), the generation unit may take an image representing the intensity of X-rays detected by the detection unit as input and generate overlap output information obtained using a learning model that identifies the number of overlapping items in an overlapping area in which multiple items belong to the same pixel in the image, generate a second missing image including a second missing area in which it is inferred that an item is present in the overlap output information and that it is inferred that an item is not present in the area output information based on a difference between the overlap output information and the area output information, generate a second complementary image obtained by performing image processing including expansion, contraction, or filtering on the second missing area of the second missing image, and generate a complementary output image using the second complementary image as input and the learning model that identifies the area of the item in the second complementary image, and the inspection unit may correct the number of items based on the complementary output image. In this case, the number of items is corrected using a learning model that also uses an image representing the intensity of X-rays detected by the detection unit as input as the learning model and identifies the number of overlapping items in the overlapping area. Therefore, for example, in cases where the density level of the overlapping area is unclear and it is difficult to clearly distinguish the number of overlapping items in the overlapping area, it is possible to further improve inspection accuracy compared to using only a learning model that identifies the area of the above-mentioned items as the learning model. [Effects of the Invention]
[0012] According to the present invention, it is possible to improve the accuracy of inspecting the number of items compared to when only counting is performed using a learning model. [Brief explanation of the drawings]
[0013] [Figure 1] FIG. 1 is a configuration diagram of an X-ray inspection apparatus according to an embodiment. [Figure 2] FIG. 2 is a schematic plan view of an example of a product. [Figure 3] FIG. 3 is a diagram showing the internal configuration of the shielding box shown in FIG. [Figure 4] FIG. 4 is a schematic diagram showing an example of a transparent image of a product. [Figure 5] FIG. 5 is a block diagram showing the functional configuration of the X-ray inspection apparatus of FIG. [Figure 6] FIG. 6 is a diagram for explaining a first calculation example of the number of items. [Figure 7] FIG. 7 is a diagram for explaining a second calculation example of the number of items. [Figure 8] FIG. 8 is a diagram for explaining a second calculation example of the number of items. DETAILED DESCRIPTION OF THE INVENTION
[0014] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In the description of the drawings, the same or corresponding elements are designated by the same reference numerals, and redundant description will be omitted.
[0015] Fig. 1 is a configuration diagram of an X-ray inspection device according to one embodiment. As shown in Fig. 1, the X-ray inspection device 1 includes an apparatus main body 2, support legs 3, a shielding box 4, a transport conveyor 5, an X-ray irradiation unit (irradiation unit) 6, an X-ray detection unit (detection unit) 7, a display 8, and a controller 10. The X-ray inspection device 1 acquires a transmission image of the product G while transporting the product G, and inspects the product G based on the transmission image.
[0016] FIG. 2 is a schematic diagram showing an example of a product in a plan view. As shown in FIG. 2, product G has a plurality of items A and a bag B that contains the plurality of items A. Here, the items A are food products (e.g., sausages) having a predetermined shape. In product G, a predetermined number of items A are packaged in bag B. In many of the products G inspected by the X-ray inspection device 1, the items A overlap each other in bag B in a plan view.
[0017] 1, products G before inspection are carried into the X-ray inspection device 1 by an input conveyor 9A, and products G after inspection are carried out from the X-ray inspection device 1 by an output conveyor 9B. The X-ray inspection device 1 determines whether a product G is good or defective, for example, depending on whether the number of objects A in one product G is a predetermined number. Products G determined to be defective by the X-ray inspection device 1 are sorted out of the production line (out of the system) by a sorting device 50 arranged downstream of the output conveyor 9B, and products G determined to be good by the X-ray inspection device 1 pass through the sorting device 50 as is.
[0018] The device main body 2 houses a controller 10 and other components. The support legs 3 support the device main body 2. The shielding box 4 is provided on the device main body 2 and prevents leakage of X-rays. The shielding box 4 has an inlet 4a and an outlet 4b. Products G before inspection are carried into the shielding box 4 from the carry-in conveyor 9A via the inlet 4a, and inspected products G are carried out from the shielding box 4 to the outlet 4b and onto the outlet conveyor 9B. X-ray shielding curtains (not shown) are provided at each of the inlet 4a and the outlet 4b to prevent leakage of X-rays. The detection sensor 6a detects products G transported by the carry-in conveyor 9A. The detection results by the detection sensor 6a are acquired by the controller 10.
[0019] 3 is a diagram showing the internal configuration of the shielding box shown in FIG. 1. As shown in FIGS. 1 and 3, the transport conveyor 5 is disposed within the shielding box 4 and transports the products G in a transport direction D from the inlet 4a to the outlet 4b. The transport conveyor 5 is, for example, a belt conveyor stretched between the inlet 4a and the outlet 4b. The X-ray irradiator 6 is disposed within the shielding box 4 and irradiates the products G transported by the transport conveyor 5 with X-rays, thereby irradiating the multiple objects A within the products G with X-rays. The irradiation of X-rays by the X-ray irradiator 6 is controlled by a controller 10.
[0020] The X-ray detection unit 7 is disposed inside the shield box 4 and detects X-rays that are irradiated from the X-ray irradiation unit 6 and that have passed through the transport conveyor 5 and the plurality of objects A in the products G. The X-ray detection unit 7 is configured as, for example, a line sensor. The detection signal detected by the X-ray detection unit 7 is acquired by the controller 10.
[0021] FIG. 4 is a schematic diagram showing an example of a transmission image of a product. The transmission image 31 shown in FIG. 4 is composed of a plurality of pixels. Each pixel of the transmission image 31 has a density level corresponding to the amount of X-rays detected. In the example of FIG. 4, the density level of the transmission image 31 is expressed as the density of hatched lines. For a given pixel, the greater the amount of X-rays detected, the higher the density level of the pixel (the sparser the hatching), and the smaller the amount of X-rays detected, the lower the density level of the pixel (the denser the hatching).
[0022] In each product G, the amount of detected X-rays is smaller in the area where the items A in the bag B overlap each other in a planar view than in the area where they do not overlap. In the example of Fig. 4, the area where the items A in the bag B overlap each other in a planar view is shown as an overlapping area 21A. The overlapping area 21A is an area where multiple items A belong to the same pixel in the transmission image 31 (image).
[0023] The display 8 is provided on the device main body 2. The display 8 has a display screen as a touch panel and a speaker. The display 8 functions as an operation input unit that accepts input of various conditions via the display screen. The display 8 functions as a display unit that displays the inspection results of the X-ray inspection device 1 via the display screen.
[0024] The controller 10 is disposed in the apparatus main body 2 and controls the operation of each part of the X-ray inspection apparatus 1. The controller 10 includes a processor such as a CPU (Central Processing Unit), memories such as ROM (Read Only Memory) and RAM (Random Access Memory), and storage such as an SSD (Solid State Drive). A program for controlling the X-ray inspection apparatus 1 is recorded in the ROM. The functions of the controller 10 can be realized by software in which a program stored in the ROM is loaded onto the RAM and executed by the CPU, for example. The functions of the controller 10 may also be realized by hardware such as an electronic circuit.
[0025] Fig. 5 is a block diagram showing the functional configuration of the X-ray inspection apparatus of Fig. 1. As shown in Fig. 4 and Fig. 5, the controller 10 has a storage unit 11, an image generation unit (generation unit) 12, and an inspection unit 13.
[0026] The storage unit 11 is configured with one or more of an HDD (Hard Disk Drive), a flash memory, etc. The storage unit 11 may be provided in the controller 10, may be provided in the device main body 2, or may be provided so as to be able to communicate with the controller 10 via a network.
[0027] The memory unit 11 stores a trained first learning model (a learning model that identifies an area of an item). The first learning model is a machine learning model that has been trained by deep learning to identify an item area 22A, which is an area of item A in an image. The item area 22A corresponds to an area surrounded by the outer edge of item A in an image in which item A is shown.
[0028] The first learning model receives, for example, a transmission image of X-rays that have passed through multiple objects A and are detected by the X-ray detection unit 7. The first learning model may identify object regions 22A of the object A in the transmission image, and may output the number of identified object regions 22A of the object A as the number of objects A in the transmission image.
[0029] The first learning model is trained by acquiring feature quantities related to the item region 22A through machine learning using image data in which the item region 22A is set in advance as training data. The feature quantities related to the item region 22A correspond to features related to the outer edge of the item A in the transmission image of the item G extracted from this training data. In the first learning model, for example, data related to the position and dimensions of the outer edge of one item A is used as data related to the area in which the item A exists in the transmission image of the item G. The data related to the position and dimensions of the outer edge of one item A may include, for the outer edge of one item A, the coordinates of the upper left pixel and the coordinates of the lower right pixel of the smallest rectangular area that includes the outer edge of the item A.
[0030] The training data of the first learning model may be a combination of data on a transparent image of product G and data on the outer edge of item A in the transparent image. The neural network constituting the first learning model is a convolutional neural network (CNN) including multiple layers, for example, multiple convolution layers and pooling layers. The neural network may further be configured as a recurrent neural network (RNN).
[0031] The image input to the first learning model may be a transmission image 31 generated by the image generation unit 12. The input to the first learning model is not limited to the transmission image 31 of X-rays transmitted through multiple objects A, but may be an image obtained as a result of image processing, in which multiple objects A are shown in a manner similar to a transmission image.
[0032] The image generating unit 12 generates an image (information) for inspecting the number of articles A based on the X-rays detected by the X-ray detecting unit 7.
[0033] In this embodiment, the image generation unit 12 generates a brightness-processed image based on the amount (brightness) of X-rays detected by the X-ray detection unit 7 and a predetermined brightness threshold. The brightness-processed image here is an image obtained by image processing a transmission image of X-rays transmitted through multiple articles A using multiple brightness thresholds so that the transmission image has a density level corresponding to the degree of overlap of the multiple articles A. The image generation unit 12 generates the brightness-processed image based on, for example, the result of comparing the amount of X-rays detected by the X-ray detection unit 7 that have transmitted through multiple articles A with multiple brightness thresholds corresponding to the degree of overlap of the multiple articles A. The brightness-processed image here corresponds to processing information obtained by the image generation unit 12 performing image processing on the image. Note that the processing information may be information such as a numerical value for each pixel obtained by the image generation unit 12 performing image processing on the image.
[0034] Fig. 6 is a diagram for explaining a first calculation example of the number of items. Fig. 6(a) is a diagram showing a schematic example of an X-ray transmission image of multiple items A detected by the X-ray detection unit 7. Fig. 6(a) shows a schematic diagram of an X-ray transmission image 31 of a bag B containing multiple items A as merchandise G. In Fig. 6(a), the overlapping of multiple items A in bag B is displayed as density levels according to the degree of overlapping of the multiple items A.
[0035] FIG. 6(b) is an example of a brightness-processed image 32 based on the X-ray transmission image 31 of FIG. 6(a). In the brightness-processed image 32 of FIG. 6(b), depending on the brightness of the transmission image 31 of FIG. 6(a), areas where one article A may exist are shown in gray, areas where two articles A may exist overlapping each other are shown in white, and surrounding areas where no article A exists are shown in black. The brightness-processed image 32 of FIG. 6(b) is obtained by performing image processing on the transmission image 31 of FIG. 6(a) using multiple brightness thresholds according to density levels. In FIG. 6(b), the outer edge of the gray area where one article A may exist corresponds to the article area 22A, and the white area where two articles A may exist overlapping each other corresponds to the overlap area 21A.
[0036] The image generation unit 12 receives the transmission image 31 (image) of FIG. 6(a) as input and generates region output information using the first learning model that identifies the region of the article A in the transmission image 31. The region output information is information obtained as the output of the first learning model, and may be, for example, information such as a numerical value for each pixel, or a grayscale image formed by combining the grayscale of each pixel for a plurality of pixels. The image generation unit 12 generates a region output image 33, for example, using the first learning model. The region output image 33 is an image obtained as the output of the first learning model.
[0037] Fig. 6(c) is an example of a region output image 33 based on the transparent image 31 of Fig. 6(a). In the region output image 33 of Fig. 6(c), the outer edge of each article A is identified by the first learning model according to the brightness of the transparent image 31 of Fig. 6(a), and for the article region 22A surrounded by the outer edge of each article A, the portion of one article A is shown in gray, the portion where two articles A overlap each other is shown in white, and the portion outside the outer edge of each article A is shown in black.
[0038] Here, in the region output image 33, all of the object regions 22A of the object A included in the input transmission image 31 of Fig. 6(a) may not be identified by the first learning model. In Fig. 6(c), the object region of the object A1 present in Fig. 6(b) is not properly identified. In this case, counting the objects A using the first learning model alone may result in an inaccurate inspection result for the number of objects A in the transmission image 31.
[0039] Therefore, the image generation unit 12 generates an image of the difference between the region output image 33 and the brightness-processed image 32. Based on the difference between the region output image 33 and the brightness-processed image 32, the image generation unit 12 generates a first missing image 41 including a first missing region 42 where it is inferred that the article A1 is not present in the region output image 33 and the article A1 is present in the brightness-processed image 32. The image generation unit 12 generates the first missing image 41, which is an image of the difference, by calculating, for example, the difference between the pixel values of the region output image 33 in FIG. 6(c) and the pixel values of the brightness-processed image 32 in FIG. 6(b). FIG. 6(d) is an example of the first missing image 41. As shown in FIG. 6(d), in the first missing image 41, a difference occurs in the pixel value difference between the region where the inference results match and the region where the inference results do not match, causing the first missing region 42 to emerge along the outer edge of the article A1 in FIG. 6(b) and be emphasized with a density level different from that of its surroundings. The first missing region 42 is a region of the item A1 that was not properly identified (overlooked) by the first learning model.
[0040] The image generation unit 12 may generate a first complementary image 43 obtained by performing image processing, including expansion or reduction, on the difference between the region output image 33 and the brightness-processed image 32 and on the first missing region 42 of the first missing image 41. The image generation unit 12 may perform image processing, including expansion, reduction, or filter processing (e.g., median filter) on the first missing region 42 of the first missing image 41, to smooth discontinuous portions at the outer edge and inside of the first missing region 42, thereby generating the first complementary image 43. FIG. 6( e) is an example of the first complementary image 43 obtained by image processing the first missing image 41.
[0041] The inspection unit 13 corrects the number of items A based on the first complementary image 43, and calculates the number of items A based on the area output image 33 and the first complementary image 43 (processing information). In this embodiment, the inspection unit 13 calculates the number of items A based on the difference between the area output image 33 and the brightness processed image 32. For example, the inspection unit 13 calculates the number of items A (6) in the product G by adding the number of item areas 22A of item A identified in the area output image 33 of FIG. 6(c) (5) and the number of item areas 22A of item A1 identified in the first complementary image 43 of FIG. 6(e) (1).
[0042] The number of item regions 22A of item A1 identified in the first complementary image 43 of Figure 6(e) may be counted by using the first complementary image 43 of Figure 6(e) as input and identifying the item regions 22A of item A1 using a first learning model, or by displaying the first complementary image 43 on the display 8 and counting them visually by an operator.
[0043] In the X-ray inspection device 1 described above, a region output image 33 is generated using a first learning model that receives a transmission image 31 as input and identifies the object region 22A of the object A in the transmission image 31, and images (such as the brightness-processed image 32, the first missing image 41, and the first complemented image 43) are generated by image processing the transmission image 31. The number of objects A is calculated based on not only the region output image 33 obtained using the first learning model, but also the image obtained by image processing the transmission image 31. As a result, even if the inference result using the first learning model is inappropriate and, for example, an error occurs in identifying the region of the object A1, the number of objects A can be corrected using the image obtained by image processing the transmission image 31. Therefore, the inspection accuracy of the number of objects A can be improved compared to when only counting is performed using the first learning model.
[0044] The image generation unit 12 generates a brightness-processed image 32 based on the brightness of the X-rays detected by the X-ray detection unit 7 and a predetermined brightness threshold. The inspection unit 13 calculates the number of items A based on the difference (first missing image 41, first complement image 43, etc.) between the area output image 33 and the brightness-processed image 32. As a result, even if, for example, an error occurs in identifying the item area 22A of the item A in the area output image 33, the number of items A can be corrected using the difference between the area output image 33 and the brightness-processed image 32.
[0045] Based on the difference between the region output image 33 and the brightness-processed image 32, the image generation unit 12 generates a first missing image 41 including a first missing region 42 where it is inferred that the object A1 is not present in the region output image 33 and the object A1 is present in the brightness-processed image 32. A first complementary image 43 is generated by performing image processing, including expansion, contraction, or filtering, on the difference between the region output image 33 and the brightness-processed image 32 and the first missing region 42 of the first missing image 41. The inspection unit 13 corrects the number of objects A based on the first complementary image 43. As a result, even if, for example, an error occurs in identifying the region of object A1 in the region output image 33, the number of objects A can be corrected using the number of objects A1 included in the first complementary image 43.
[0046] Although the embodiments of the present invention have been described above, the present invention is not necessarily limited to the above-described embodiments, and various modifications are possible without departing from the spirit of the present invention.
[0047] In the above embodiment, a transmission image 31 of X-rays transmitted through multiple objects A detected by the X-ray detection unit 7 is input to the first learning model, and the number of objects A is corrected by taking the difference between the brightness of the X-rays detected by the X-ray detection unit 7 and a brightness-processed image 32 generated based on a predetermined brightness threshold, but this is not limited to this. For example, instead of or in addition to the first learning model, the number of objects may be corrected using a second learning model (a learning model that identifies the number of overlapping objects) that identifies the number of overlapping objects in an overlapping area.
[0048] The second learning model is a machine learning model that has been trained using deep learning to identify the number of overlapping objects in overlapping areas in an image. For example, a transmission image of X-rays that have passed through multiple objects detected by the X-ray detection unit 7 is input to the second learning model. The second learning model may identify the number of overlapping objects in each overlapping area in the transmission image, and may output the object areas of the objects that make up each overlapping area according to the position and shape of each overlapping area and the number of overlapping objects.
[0049] The second learning model is trained by acquiring features related to the overlapping area through machine learning using image data in which an overlapping area has been previously defined as training data. The features related to the overlapping area correspond to features related to the overlapping area in a transparent image of the objects extracted from the training data. The features related to the overlapping area may include features related to the outer edges of the multiple objects that make up the overlapping area (the outer edges around the overlapping area).
[0050] In the second learning model, data on the overlapping areas of the objects in the transparent image of the objects is, for example, data on the position and dimensions of one overlapping area. The data on the position and dimensions of one overlapping area may include, for one overlapping area, the coordinates of the top left pixel of the smallest rectangular area that includes the overlapping area and the coordinates of the bottom right pixel of the rectangular area.
[0051] The training data for the second learning model may be associated with data on a transmission image of the object, data on the number of overlapping objects in the overlapping area, and data on the object areas of the objects that make up each overlapping area. The neural network that constitutes the second learning model may be configured in the same way as the first learning model, for example.
[0052] 7 and 8 are diagrams for explaining a second calculation example of the number of items. FIG. 7(a) is a diagram illustrating a transmission image of X-rays transmitted through multiple items K detected by the X-ray detection unit 7. The items K are, for example, cooked fried chicken with a predetermined thickness of batter. FIG. 7(a) shows a schematic diagram of an X-ray transmission image 34 of multiple items K. In FIG. 7(a), the overlapping of multiple items K is displayed as density levels according to the degree of overlapping of the multiple items K.
[0053] 7(b) is an example of a region output image 35 identified by the first learning model using the transparent image 34 of FIG. 7(a) as input. In the transparent image 34 of FIG. 7(a), the density level of the overlapping region 21K is less clear than that of the overlapping region 21A in the transparent image 31 of the object A in FIG. 6(a) due to the influence of the clothing of the object K, making it difficult to clearly distinguish the number of overlapping objects K in the same overlapping region 21K. In the example of the region output image 35 of FIG. 7(b), the object region 22K of the object K in the transparent image 34 of FIG. 7(a) is not properly identified (missed), and thus it may not be easy to identify the object region 22K of the object K using only the first learning model.
[0054] Therefore, the image generation unit 12 generates overlap output information using a second learning model that receives the transmitted image 34 (image) of FIG. 7(a) as input and identifies the number of overlaps of item K in the overlap region 21K. The overlap output information is information obtained as the output of the second learning model, and may be, for example, numerical information such as the number of overlaps of items per pixel, or an image of multiple items overlapping at that pixel corresponding to the number of overlaps per pixel. The image generation unit 12 generates an overlap output image 36 using, for example, the second learning model. The overlap output image 36 is an image obtained as the output of the second learning model.
[0055] Fig. 7(c) is an example of an overlap output image 36 based on the X-ray transmission image 34 of Fig. 7(a). According to the characteristics of the overlap region 21K in the transmission image 34 of Fig. 7(a), the second learning model identifies the number of overlapping objects K in each overlap region 21K and the object regions 22K of the objects K that make up each overlap region 21K. In the overlap output image 36 of Fig. 7(c), for the object region 22K surrounded by the outer edge of each object K, the portion corresponding to one object K is shown in dark gray, the portion where two objects K overlap each other is shown in light gray, the portion where three objects K overlap each other is shown in white, and the portion outside the outer edge of each object K is shown in black.
[0056] Based on the difference between the overlapped output image 36 and the region output image 35, the image generation unit 12 generates a second missing image 44 including a second missing region 45 where it is inferred that item K is present in the overlapped output image 36 and that item K is not present in the region output image 35. The image generation unit 12 generates the second missing image 44 shown in FIG. 8(a), which is an image of the difference, by calculating the difference between the pixel values of the region output image 35 shown in FIG. 7(b) and the pixel values of the overlapped output image 36 shown in FIG. 7(c). FIG. 8(a) is an example of the second missing image 44. As shown in FIG. 8(a), in the second missing image 44, the difference in pixel values between the regions where the inference results match and the regions where the inference results do not match causes the second missing region 45 to stand out and be emphasized with a different density level from its surroundings. The second missing region 45 is a region of item K that was not properly identified (overlooked) by the first learning model.
[0057] The image generation unit 12 generates a second complementary image 46 obtained by performing image processing, including expansion, reduction, or filtering, on the second missing region 45 of the second missing image 44 in FIG. 8(a). The second missing image 44 in FIG. 8(a) may contain noise, for example, due to the edges of an item K that was properly identified remaining or the second missing region 45 containing a hole. By performing image processing, including expansion, reduction, or filtering, on the second missing region 45, such noise sources are removed. FIG. 8(b) shows an example of the second complementary image 46. The second complementary image 46 is an image in which items K that were not properly identified (overlooked) by the first learning model are extracted to compensate for the lack of items K.
[0058] The image generation unit 12 may generate a complement output image 47 using a first learning model that receives the second complement image 46 of Fig. 8(b) as input and identifies the region of the item K in the second complement image 46. Fig. 8(c) is an example of the complement output image 47, which is region output information identified by the first learning model that receives the second complement image 46 of Fig. 8(b) as input.
[0059] The inspection unit 13 corrects the number of items K based on the complemented output image 47 of Fig. 8(c). The inspection unit 13 calculates the number of items K (23) in the transmitted image 34 of Fig. 7(a) by adding, for example, the number of items K (12) identified in the area output image 35 of Fig. 7(b) and the number of items K (11) identified in the complemented output image 47 of Fig. 8(c).
[0060] As a result, the number of items K is corrected by further using a second learning model as a learning model that identifies the number of overlapping items K in the overlapping area 21K using as input a transmission image 34 (image) that represents the brightness of X-rays detected by the X-ray detection unit 7. Therefore, even if the density level of the overlapping area 21K becomes unclear and it becomes difficult to clearly distinguish the number of overlapping items K in the overlapping area 21K, it is possible to further improve the inspection accuracy compared to using only the first learning model that identifies the item area 22K of the above-mentioned item K as the learning model.
[0061] In the above embodiment, since the input image is an X-ray transmission image, unlike a normal camera image in which one of the overlapping objects appears in the image and the other is hidden, both overlapping objects appear as overlapping areas with different density levels in the overlapping portions. This situation may result in erroneous removal, for example, by Non-Maximum Suppression (NMS) processing when inferring the object region 22A of the object using the first learning model, resulting in the object not being properly identified (missed). Therefore, parameters such as NMS of the first learning model may be set taking this influence into account.
[0062] In the above embodiment and modified examples, the X-ray detection unit 7 detects X-rays that have passed through the object, but it may also detect X-rays that have been reflected by the object. In this case, by using an image generated according to the brightness (X-ray dose) of the X-rays reflected by the object instead of the X-ray transmission images 31, 34, the number of objects can be corrected in the same way as in the above embodiment and modified examples.
[0063] In the above embodiment, as a first calculation example of the number of items, a first missing image 41 including a first missing region 42 is generated based on the difference between the region output image 33 and the brightness-processed image 32. However, this is not limited to an example of manipulating a region in an image. For example, when the inspection unit 13 recognizes an overlapping region 21A in which multiple items belong to the same pixel in an image, the inspection unit 13 may correct the number of items based on the number of items belonging to the overlapping region 21A in the region output image 33 and the number of items belonging to the overlapping region 21A in the brightness-processed image 32. The number of items belonging to the overlapping region 21A in the region output image 33 may be specified using the region output image 33 as an input to a second learning model. The number of items belonging to the overlapping region 21A in the brightness-processed image 32 may be specified using the brightness-processed image 32 as an input to a second learning model. In this case, even if there is a omission in the number of items belonging to the overlapping region 21A in the region output image 33, the number of items can be corrected using the number of items belonging to the overlapping region 21A in the brightness-processed image 32.
[0064] In the above embodiment, a bag B containing multiple items A was used as an example of product G, but bag B is not required, and the present invention can be applied even if multiple items are scattered on the transport conveyor 5, for example. [Explanation of symbols]
[0065] 1...X-ray inspection device, 6...X-ray irradiation unit (irradiation unit), 7...X-ray detection unit (detection unit), 12...image generation unit (generation unit), 13...inspection unit, 21A, 21K...overlapping area, 31, 34...transmitted image (image), 32...brightness processed image, 33, 35...area output image (area output information), 36...overlapping output image (overlapping output information), 41...first missing image, 42...first missing area, 43...first complementary image (processing information), 44...second missing image, 45...second missing area, 46...second complementary image, 47...complementary output image, A, A1, K...item.
Claims
1. an irradiation unit that irradiates X-rays onto a plurality of articles; a detection unit that detects X-rays that have passed through the article or X-rays that have been reflected by the article; a generation unit that generates an image for inspecting the number of items based on the X-rays detected by the detection unit; an inspection unit that inspects the number of the articles based on the image, The generation unit generates region output information obtained by using a learning model that identifies a region of the article in the image using the image as an input, and processing information obtained by performing image processing on the image; The inspection unit calculates the number of the articles based on the area output information and the processing information.
2. the generating unit generates a brightness-processed image based on the brightness of the X-rays detected by the detecting unit and a predetermined brightness threshold; The X-ray inspection apparatus according to claim 1 , wherein the inspection unit calculates the number of the articles based on a difference between the region output information and the brightness processed image.
3. The detection unit detects X-rays that have passed through the article, 3. The X-ray inspection device according to claim 2, wherein when the inspection unit recognizes an overlapping area in which multiple items belong to the same pixel in the image, it corrects the number of items based on the number of items belonging to the overlapping area in the area output information and the number of items belonging to the overlapping area in the brightness-processed image.
4. The generation unit generating a first missing image including a first missing area in which it is inferred that the object is not present in the area output information and the object is present in the luminance processed image based on a difference between the area output information and the luminance processed image; generating a first complementary image obtained by performing image processing including expansion, contraction, or filtering on the difference between the region output information and the luminance processed image and on the first missing region of the first missing image; The X-ray inspection apparatus according to claim 2 , wherein the inspection unit corrects the number of the articles based on the first complementary image.
5. The generation unit an image representing the brightness of the X-rays detected by the detection unit is input, and overlap output information is generated using a learning model that identifies the number of overlapping items in an overlapping area in which multiple items belong to the same pixel in the image; generating a second missing image including a second missing area where it is inferred that the item is present in the overlapping output information and that the item is not present in the area output information based on a difference between the overlapping output information and the area output information; generating a second complementary image obtained by performing image processing including expansion, contraction, or filtering on the second missing region of the second missing image; generating a complemented output image obtained by using the learning model that identifies the region of the item in the second complemented image using the second complemented image as an input; The X-ray inspection apparatus according to claim 1 , wherein the inspection unit corrects the number of the articles based on the complementary output image.
Citation Information
Patent Citations
Combustion controller
JP1989054503A
Inspection Equipment
JP6537008B1