X-ray inspection device
By combining the X-ray inspection device with a learning model and image processing technology, regional output information and brightness-processed images are generated, which solves the problem of reduced inspection accuracy when objects overlap and achieves accurate correction of the number of objects.
Patent Information
- Application Number
- CN202510285076.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-19
- Filing Date
- 2025-03-11
- Publication Date
- 2025-09-19
AI Technical Summary
When inspecting overlapping items, the existing technology can easily reduce the inspection accuracy of the items. In particular, when using machine learning, inappropriate inference results may be generated, resulting in inaccurate inspection of the number of items.
An X-ray inspection device is used, combined with a learning model and image processing technology, to generate regional output information and brightness-processed images. The number of items is corrected through difference calculation and image processing, including the generation of supplementary images to correct the number of items in missed or repeated areas.
Improved the accuracy of item count checking to ensure accurate counts even when the learning model makes inappropriate inferences, especially in cases of overlapping items.
Smart Images

Figure CN120672641A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an X-ray inspection device. Background Art
[0002] Conventional technology for inspecting overlapping objects involves creating a transmission image of the objects using electromagnetic waves and extracting the overlapping areas using a density threshold corresponding to the number of overlapping objects (see, for example, Japanese Patent No. 6454503). However, this method, which relies on transmission images and density thresholds, can reduce inspection accuracy as the degree of object overlap increases. Therefore, attempts have been made to use machine learning to count the number of overlapping objects (see, for example, Japanese Patent No. 6537008).
[0003] By using machine learning with images as input to count the number of items in an image, inspection accuracy can be improved when the machine learning inference results are appropriate. However, due to the nature of machine learning inferences, inappropriate inference results may occur. In such cases, simply counting items using machine learning (learning models) may result in inaccurate inspection results for the number of items in an image, leaving room for improvement in inspection accuracy. Summary of the Invention
[0004] An object of the present disclosure is to provide an X-ray inspection apparatus capable of improving the inspection accuracy of the number of articles compared to a case where only counting is performed using a learning model.
[0005] (1) An X-ray inspection device according to one embodiment of the present disclosure comprises: an irradiation unit for irradiating a plurality of articles with X-rays; a detection unit for detecting X-rays that have passed through the articles or X-rays that have been reflected by the articles; a generation unit for generating an image for inspecting the number of articles based on the X-rays detected by the detection unit; and an inspection unit for inspecting the number of articles based on the image, wherein the generation unit generates region output information obtained using a learning model and processing information obtained by performing image processing on the image, wherein the learning model takes an image as input and specifies a region of an article in the image, and the inspection unit calculates the number of articles based on the region output information and the processing information.
[0006] In an X-ray inspection device according to one embodiment of the present disclosure, region output information obtained using a learning model and processed information obtained by processing an image are generated. The learning model uses the image as input to specify regions of objects within the image. The number of objects is calculated based not only on the region output information obtained using the learning model but also on the processed information obtained by processing the image. Thus, even if the inference results from the learning model are inappropriate, such as when omissions occur in the region designation of objects, the processed information obtained by processing the image can be used to correct the number of objects. Consequently, compared to counting objects using the learning model alone, the accuracy of object count inspection can be improved.
[0007] (2) In the above (1), the generating unit may generate a brightness-processed image based on the brightness of the X-rays detected by the detecting unit and a predetermined brightness threshold, and the inspecting unit may calculate the number of items based on the difference between the region output information and the brightness-processed image. In this case, even if, for example, the region output information contains an omission in the designation of the region of an item, the number of items can be corrected using the difference between the region output information and the brightness-processed image.
[0008] (3) In the above (2), when the detection unit detects X-rays transmitted through an object and the inspection unit identifies multiple objects belonging to an overlapping region of the same pixel in the image, the number of objects may be corrected based on the number of objects belonging to the overlapping region in the region output information and the number of objects belonging to the overlapping region in the brightness-processed image. In this case, for example, even if the number of objects belonging to the overlapping region in the region output information is omitted, the number of objects can be corrected using the number of objects belonging to the overlapping region in the brightness-processed image.
[0009] (4) In the above (2) or (3), the generating unit may generate a first missing image including a first missing region based on the difference between the region output information and the brightness processed image, the first missing region being inferred as not containing an object in the region output information but containing an object in the brightness processed image, generate the first supplementary image obtained by performing image processing including expansion, reduction, or filtering on the first missing region of the first missing image, and the inspecting unit may correct the number of objects based on the first supplementary image. In this case, even if, for example, the region output information contains an omission in the designation of an object region, the number of objects can be corrected using the number of objects included in the first supplementary image.
[0010] (5) In the above (1), the generation unit may generate repeated output information obtained using a learning model, the learning model taking as input an image representing the brightness of X-rays detected by the detection unit and specifying the number of repeated items in a repeated region where multiple items belong to the same pixel in the image; the generation unit generates a second missing image including a second missing region based on a difference between the repeated output information and the region output information, the second missing region being inferred to contain an item in the repeated output information and inferred to contain no item in the region output information; generates a second supplementary image obtained by performing image processing including expansion, reduction, or filtering on the second missing region of the second missing image; generates a supplementary output image obtained using a learning model taking as input the second supplementary image and specifying the region of the item in the second supplementary image; and the inspection unit corrects the number of items based on the supplementary output image. In this case, the number of items is corrected using a learning model that takes as input an image representing the brightness of X-rays detected by the detection unit and specifies the number of repeated items in the repeated region. Therefore, for example, even when the concentration level of the repeated area becomes unclear and the number of repeated items in the repeated area is difficult to strictly distinguish, further improvement in inspection accuracy can be achieved compared to the case where a learning model that only specifies the area of the above-mentioned items is used as a learning model.
[0011] According to the present disclosure, it is possible to improve the accuracy of inspecting the number of articles, compared to the case where only counting is performed using a learning model. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a diagram showing the configuration of an X-ray inspection apparatus according to one embodiment.
[0013] Figure 2 This is a schematic diagram showing an example of a product viewed from above.
[0014] Figure 3 yes Figure 1 The internal structure of the isolation box is shown.
[0015] Figure 4 Schematic diagram showing an example of a transmission image of a product.
[0016] Figure 5 It shows Figure 1 A block diagram of the functional structure of an X-ray inspection device.
[0017] Figure 6 (a) is a diagram schematically illustrating an example of a transmission image of X-rays transmitted through a plurality of articles detected by an X-ray detection unit.
[0018] Figure 6(b) is based on Figure 6 (a) An example of a brightness-processed image of an X-ray transmission image.
[0019] Figure 6 (c) is based on Figure 6 (a) An example of an output image of the region of an X-ray transmission image.
[0020] Figure 6 (d) is an example of the first missing image.
[0021] Figure 6 (e) is an example of a first complemented image obtained by performing image processing on the first missing image.
[0022] Figure 7 (a) is a diagram schematically illustrating an example of an X-ray transmission image transmitted through a plurality of articles and detected by an X-ray detection unit.
[0023] Figure 7 (b) is made by Figure 7 (a) An example of an output image of a region specified by the first learning model using an X-ray transmission image as input.
[0024] Figure 7 (c) is based on Figure 7 (a) An example of a repeated output image of an X-ray transmission image.
[0025] Figure 8 (a) is an example of the second missing image.
[0026] Figure 8 (b) is an example of the second complementary image.
[0027] Figure 8 (c) is made by Figure 8 The second complementary image of (b) is an example of the region output information specified by the first learning model as input, that is, the complementary output image. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. In the description of the drawings, the same or corresponding elements are denoted by the same reference numerals, and repeated descriptions are omitted.
[0029] Figure 1 FIG is a structural diagram of an X-ray inspection device according to an embodiment. Figure 1As shown, the X-ray inspection apparatus 1 includes an apparatus body 2, support legs 3, an isolation box 4, a 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 apparatus 1 acquires a radiographic image of the product G while conveying the product G and inspects the product G based on the radiographic image.
[0030] Figure 2 Schematic diagram showing an example of a product viewed from above. Figure 2 As shown, product G includes multiple articles A and a bag B containing the multiple articles A. Article A is a food product having a predetermined shape (e.g., sausage). Within product G, a predetermined number of articles A are packaged within bag B. When a large number of products G are inspected by the X-ray inspection apparatus 1, the articles A within each product G and within the bag B may overlap when viewed from above.
[0031] exist Figure 1 In the process, pre-inspected products G are fed into the X-ray inspection apparatus 1 via an infeed conveyor 9A, and inspected products G are discharged from the X-ray inspection apparatus 1 via an outfeed conveyor 9B. The X-ray inspection apparatus 1 determines whether a product G is acceptable or unacceptable based on, for example, whether the number of items A in a product G meets a predetermined number. Products G determined as unacceptable by the X-ray inspection apparatus 1 are distributed off-line (outside the system) via a sorting device 50 located downstream of the outfeed conveyor 9B. Products G determined as acceptable by the X-ray inspection apparatus 1 pass directly through the sorting device 50.
[0032] The device body 2 houses a controller 10 and other items. The support legs 3 support the device body 2. An isolation box 4 is provided on the device body 2 to prevent X-ray leakage. An inlet 4a and an outlet 4b are formed on the isolation box 4. Uninspected goods G are fed from the inlet conveyor 9A into the isolation box 4 via the inlet 4a, and inspected goods G are fed from the isolation box 4 to the outlet conveyor 9B via the outlet 4b. X-ray shielding curtains (not shown) are provided at the inlet 4a and outlet 4b to prevent X-ray leakage. The sensing sensor 6a senses the goods G conveyed by the inlet conveyor 9A. The sensing results of the sensing sensor 6a are acquired by the controller 10.
[0033] Figure 3 yes Figure 1 The internal structure of the isolation box is shown in FIG. Figure 1 and Figure 3As shown, a conveyor 5 is disposed within the isolation box 4 and transports goods G from an inlet 4a to an outlet 4b along a conveying direction D. The conveyor 5 is, for example, a belt conveyor interposed between the inlet 4a and the outlet 4b. An X-ray irradiation unit 6 is disposed within the isolation box 4 and irradiates the goods G transported by the conveyor 5 with X-rays, thereby irradiating multiple items A within the goods G with X-rays. The X-ray irradiation by the X-ray irradiation unit 6 is controlled by a controller 10.
[0034] The X-ray detector 7 is disposed within the isolation box 4 and detects X-rays irradiated by the X-ray irradiator 6 and transmitted through the conveyor 5 and the plurality of articles A among the commodities G. The X-ray detector 7 is configured as, for example, a line sensor. Detection signals from the X-ray detector 7 are acquired by the controller 10.
[0035] Figure 4 Schematic diagram showing an example of a transmission image of a product. Figure 4 The transmission image 31 shown is composed of a plurality of pixels. Each pixel of the transmission image 31 has a density level corresponding to the amount of X-ray detection. Figure 4 In the example, the density level of the transmission image 31 is represented by the density of the shadow lines. As the amount of X-ray detection increases in a certain pixel, the density level of the pixel becomes higher (the shadow becomes sparser), while as the amount of X-ray detection decreases, the density level of the pixel becomes lower (the shadow becomes denser).
[0036] In each product G, in the bag B, in the area where the articles A overlap each other when viewed from above, the amount of X-ray detection is smaller than in the area where the articles A do not overlap each other. Figure 4 In the example shown in FIG. 2 , an area where articles A overlap with each other in a plan view in bag B is shown as an overlapping area 21A. The overlapping area 21A is an area where a plurality of articles A belong to the same pixel in the transmission image 31 (image).
[0037] The display 8 is provided on the apparatus body 2. The display 8 includes a touchscreen display screen and a speaker. The display 8 functions as an operation input unit for inputting various conditions and receiving them via the display screen. The display 8 also functions as a display unit for displaying, for example, the inspection results of the X-ray inspection apparatus 1 via the display screen.
[0038] The controller 10 is located within the device body 2 and controls the operation of each component of the X-ray inspection device 1. The controller 10 includes a processor such as a CPU (Central Processing Unit), memory such as ROM (Read Only Memory), RAM (Random Access Memory), and storage such as an SSD (Solid State Drive). The ROM stores programs for controlling the X-ray inspection device 1. The functions of the controller 10 can be implemented using software, for example, by loading programs stored in the ROM into the RAM and executing them on the CPU. Alternatively, the functions of the controller 10 can be implemented using hardware such as electronic circuits.
[0039] Figure 5 It shows Figure 1 The functional block diagram of the X-ray inspection device. Figure 4 and Figure 5 As shown, the controller 10 includes a storage unit 11 , an image generating unit (generating unit) 12 , and an inspecting unit 13 .
[0040] The storage unit 11 is composed of one or more of an HDD (Hard Disk Drive) and a flash memory, etc. The storage unit 11 may be provided in the controller 10 or in the device body 2 , or may be provided to communicate with the controller 10 via a network.
[0041] The storage unit 11 stores a learned first learning model (a learning model that specifies an article region). The first learning model is a machine learning model that has been trained using deep learning to specify the region of article A in an image, namely, article region 22A. Article region 22A corresponds to the region surrounded by the outer edge of article A in the image that depicts article A.
[0042] The first learning model receives input, for example, a transmission image of X-rays transmitted through a plurality of articles A, detected by the X-ray detection unit 7. The first learning model specifies article regions 22A for the articles A in the transmission image. The first learning model may output the number of specified article regions 22A for the articles A as the number of articles A in the transmission image.
[0043] Machine learning uses image data pre-defined as the object region 22A as teaching data to acquire feature quantities related to the object region 22A, thereby learning a first learning model. The feature quantities related to the object region 22A correspond to features related to the outer edge of the object A in the transmissive image of the product G extracted from the teaching data. In the first learning model, the data related to the region containing the object A in the transmissive image of the product G can be, for example, data related to the position and size of the outer edge of a single object A. The data related to the position and size of the outer edge of the object A can also include the coordinates of the upper left pixel of the smallest rectangular region containing the outer edge of the single object A, and the coordinates of the lower right pixel of the rectangular region.
[0044] The teaching data for the first learning model may include data on a radiographic image of product G and data related to the outer edge of article A in the radiographic image. The neural network that constitutes the first learning model is a convolutional neural network (CNN) comprising multiple layers, such as convolutional layers and pooling layers. The neural network may also be a recurrent neural network (RNN).
[0045] The image input to the first learning model can be, for example, the transmission image 31 generated by the image generation unit 12. It should be noted that the input to the first learning model is not limited to the transmission image 31 through which X-rays have passed through the plurality of objects A. The input to the first learning model may also be an image obtained as a result of image processing, in which the plurality of objects A are represented in the form of a transmission image.
[0046] 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 .
[0047] In this embodiment, the image generator 12 generates a brightness-processed image based on the amount (brightness) of X-rays detected by the X-ray detector 7 and a predetermined brightness threshold. This brightness-processed image is an image processed using multiple brightness thresholds so that, relative to a transmission image of X-rays transmitted through multiple objects A, the image has a density level corresponding to the degree of overlap between the multiple objects A. For example, the image generator 12 generates the brightness-processed image based on the comparison results of the amount of X-rays detected by the X-ray detector 7 that have transmitted through the multiple objects A and the multiple brightness thresholds corresponding to the degree of overlap between the multiple objects A. This brightness-processed image corresponds to the processing information obtained by the image generator 12 through image processing. It should be noted that the processing information may also be information such as the numerical value of each pixel obtained by the image generator 12 through image processing.
[0048] Figure 6 (a) to Figure 6 (e) is a diagram for explaining a first calculation example of the number of articles. Figure 6 (a) is a diagram schematically illustrating an example of a transmission image of X-rays that have passed through a plurality of articles A and are detected by the X-ray detection unit 7. Figure 6 In (a), a schematic diagram of an X-ray transmission image 31 of a bag B containing a plurality of articles A as commodities G is shown. Figure 6 In (a), the overlapping of multiple articles A in bag B is reflected at a concentration level corresponding to the degree of overlapping of multiple articles A.
[0049] Figure 6 (b) is based on Figure 6 (a) An example of a brightness-processed image 32 of an X-ray transmission image 31. Figure 6 (b) The brightness processed image 32 is based on Figure 6 The brightness of the transmission image 31 in (a) is shown in gray, where one object A may be present, two objects A may overlap each other, and black, where no object A exists. Figure 6 The transmission image 31 of (a) is processed to obtain Figure 6 (b) Brightness processed image 32. Figure 6 In (b), the outer edge of the gray portion where one article A may be present corresponds to the article region 22A, and the white portion where two articles A may overlap each other corresponds to the overlapping region 21A.
[0050] The image generation unit 12 generates region output information using the first learning model. Figure 6 The image generation unit 12 uses the transmission image 31 (image) of (a) as input and specifies the region of the object A in the transmission image 31. The region output information may be information obtained as the output of the first learning model, such as information such as the numerical value of each pixel, or a shading image obtained by combining the shading of each pixel for a plurality of pixels. For example, the image generation unit 12 uses the first learning model to generate a region output image 33. Region output image 33 is an image obtained as the output of the first learning model.
[0051] Figure 6 (c) is based on Figure 6 (a) An example of an output image 33 of a region of a transmission image 31. Figure 6 The region (c) of the output image 33 is, according to Figure 6The brightness of the transmission image 31 of (a) is determined by the first learning model, and the outer edge of each object A is specified for each object A. Regarding the object area 22A surrounded by the outer edge of each object A, the part of one object A is shown in gray, the part where two objects A overlap with each other is shown in white, and the part outside the outer edge of each object A is shown in black.
[0052] Here, in the region output image 33, there are regions that are not specified by the first learning model. Figure 6 The transmission image 31 of (a) includes the entire article region 22A of the article A. Figure 6 (c) of the Figure 6 In this case, simply counting the articles A using the first learning model may result in an incorrect inspection result of the number of articles A in the radiographic image 31 .
[0053] Then, 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 inferred to be a region where the object A1 does not exist in the region output image 33 and is present in the brightness processed image 32. For example, the image generation unit 12 generates a first missing image 41 by performing a comparison on the image. Figure 6 The pixel values of the output image 33 in region (c) are related to Figure 6 The difference in pixel values of the luminance-processed image 32 (b) is calculated to generate a first missing image 41 as an image of the difference. Figure 6 (d) is an example of the first missing image 41. Figure 6 As shown in (d), in the first missing image 41, the difference in pixel values between the region where the inference result is consistent and the region where the inference result is inconsistent is different, so that the first missing region 42 is along Figure 6 The outer edge of the article A1 in (b) rises and is emphasized at a different density level from its surroundings. The first missing region 42 is a region of the article A1 that is not properly specified (omitted) by the first learning model.
[0054] The image generating unit 12 may generate a first complemented image 43 by performing image processing including expansion or reduction on the first missing region 42 of the first missing image 41, as well as the difference between the region output image 33 and the brightness processed image 32. The image generating unit 12 may also generate the first complemented image 43 by performing image processing including expansion, reduction, or filtering (e.g., a median filter) on the first missing region 42 of the first missing image 41 to smooth the outer edges and internal discontinuous portions of the first missing region 42. Figure 6(e) is an example of a first complemented image 43 obtained by performing image processing on the first missing image 41 .
[0055] The inspection unit 13 corrects the number of articles A based on the first supplementary image 43. The inspection unit 13 calculates the number of articles A based on the area output image 33 and the first supplementary image 43 (processing information). In this embodiment, the inspection unit 13 calculates the number of articles 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 articles A by Figure 6 The number of article regions 22A of article A specified by the region output image 33 (five) is the same as Figure 6 The number of items A in the product G (six) is calculated by adding the number of items A1 specified by the first complementary image 43 in (e) to the number of items A1 in the item area 22A (one).
[0056] It should be noted that Figure 6 The number of the article areas 22A of the article A1 specified by the first complementary image 43 of (e) can be obtained by Figure 6 The first complementary image 43 of (e) is used as an input and the first learning model specifies the article area 22A of the article A1 for counting. Alternatively, the first complementary image 43 may be displayed on the display 8 and the operator may visually count the article A1.
[0057] In the X-ray inspection apparatus 1 described above, a region output image 33 obtained using a first learning model and images obtained by image processing the transmission image 31 (such as a brightness-processed image 32, a first missing image 41, and a first supplementary image 43) are generated. The first learning model uses the transmission image 31 as input and specifies the article region 22A of article A in the transmission image 31. The number of articles A is calculated based not only on the region output image 33 obtained using the first learning model but also on images obtained by image processing the transmission image 31. Therefore, even if the inference results from the first learning model are inappropriate, such as when the region for article A1 is omitted, the number of articles A can be corrected using the image obtained by image processing the transmission image 31. Consequently, compared to counting alone using the first learning model, the inspection accuracy of the number of articles A can be improved.
[0058] The image generator 12 generates a brightness-processed image 32 based on the brightness of the X-rays detected by the X-ray detector 7 and a predetermined brightness threshold. The inspector 13 calculates the number of articles A based on the difference (first missing image 41, first supplementary image 43, etc.) between the region output image 33 and the brightness-processed image 32. This allows, for example, correcting the number of articles A using the difference between the region output image 33 and the brightness-processed image 32, even if the region output image 33 fails to specify the article region 22A of an article A.
[0059] 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 that includes a first missing region 42, which is a region where the object A1 is inferred to be absent in the region output image 33 but present in the brightness-processed image 32. A first complementary image 43 is generated by performing image processing, including expansion, reduction, or filtering, on the first missing region 42 in the first missing image 41 based on the difference between the region output image 33 and the brightness-processed image 32. The inspection unit 13 corrects the number of objects A based on the first complementary image 43. Thus, even if, for example, the region of the object A1 is omitted from 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.
[0060] As mentioned above, although embodiment of this disclosure was described, this disclosure is not necessarily limited to the above-mentioned embodiment, and various changes can be made without departing from the scope of the gist of this disclosure.
[0061] In the above embodiment, the transmission image 31 of X-rays transmitted through multiple articles A, detected by the X-ray detection unit 7, is input into the first learning model. The difference between the brightness of the X-rays detected by the X-ray detection unit 7 and a predetermined brightness threshold is obtained from the brightness-processed image 32, thereby correcting the number of articles A. However, this is not limiting. For example, instead of or in addition to the first learning model, a second learning model (a learning model that specifies the number of repeated articles) that specifies the number of repeated articles in the repeated region may be used to correct the number of articles.
[0062] The second learning model is a machine learning model that uses deep learning to determine the number of repetitive objects within overlapping regions in an image. For example, the second learning model receives as input a transmission image of X-rays transmitted through multiple objects, detected by the X-ray detection unit 7. The second learning model determines the number of repetitive objects within each overlapping region in the transmission image. The second learning model can also output the object regions that constitute each overlapping region based on the position and shape of each overlapping region and the number of repetitive objects.
[0063] The second learning model is trained by machine learning using image data pre-defined with overlapping regions as teaching data to obtain feature quantities related to the overlapping regions. The feature quantities related to the overlapping regions correspond to features related to the overlapping regions in the radiographic images of the objects extracted from the teaching data. The features related to the overlapping regions may also include features related to the outer edges of the multiple objects that constitute the overlapping regions (the outer edges surrounding the overlapping regions).
[0064] In the second learning model, data related to the position and size of a single overlapping region in a transmission image of the object is used as data related to the overlapping region. The data related to the position and size of the overlapping region may also include the coordinates of the upper left pixel of the smallest rectangular region containing the overlapping region, and the coordinates of the lower right pixel of the rectangular region.
[0065] The teaching data for the second learning model may also be associated with data on the radiographic image of the article, data on the number of repeated articles in the overlapping region, and data on the article regions that comprise each overlapping region. The neural network that constitutes the second learning model may also be constructed similarly to that of the first learning model.
[0066] Figure 7 (a) to Figure 7 (c) and Figure 8 (a) to Figure 8 (c) is a diagram for explaining a second calculation example of the number of articles. Figure 7 (a) is a diagram schematically illustrating an example of a transmission image of X-rays transmitted through a plurality of articles K detected by the X-ray detection unit 7. The articles K are, for example, fried chicken nuggets having a batter of a predetermined thickness. Figure 7 In (a), a schematic diagram of an X-ray transmission image 34 of a plurality of articles K is shown. Figure 7 In (a), the overlapping of multiple articles K is reflected in a concentration level corresponding to the degree of overlapping of the multiple articles K.
[0067] Figure 7 (b) is to Figure 7 (a) is an example of a transmission image 34 as an input of the first learning model and an output image 35 of the region specified. Figure 7 In the transmission image 34 of (a), due to the influence of the surface coating of the object K, Figure 6 Compared to the overlapping region 21A in the transmission image 31 of the article A in (a), the density level of the overlapping region 21K becomes unclear, and the number of repeated articles K in the same overlapping region 21K becomes difficult to distinguish strictly. Figure 7 In the example of (b) output image 35, the region is not properly specified (omitted) Figure 7 The article region 22K of the article K in the transmission image 34 of (a) may not be easily specified using only the first learning model.
[0068] Then, the image generation unit 12 generates repeated output information obtained using the second learning model. The second learning model Figure 7 The image generation unit 12 uses the transmission image 34 (image) of (a) as input and specifies the number of repetitions of the article K in the repetition region 21K. The repetition output information may be information obtained as an output of the second learning model, such as numerical information such as the number of repetitions of an article per pixel, or may be an image of multiple articles overlapping in a pixel corresponding to the number of repetitions per pixel. For example, the image generation unit 12 uses the aforementioned second learning model to generate a repetition output image 36. This repetition output image 36 is an image obtained as an output of the second learning model.
[0069] Figure 7 (c) is based on Figure 7 (a) An example of a repeated output image 36 of an X-ray transmission image 34. Figure 7 The features of the overlapping regions 21K in the transmission image 34 of (a) are determined by the second learning model, and the number of repeated articles K in each overlapping region 21K and the article regions 22K of the articles K constituting each overlapping region 21K are specified. Figure 7 In the repeated output image 36 of (c), the item area 22K surrounded by the outer edge of each item K is shown in gray, the portion corresponding to one item K is shown in light gray, the portion where two items K overlap with each other is shown in white, and the portion outside the outer edge of each item K is shown in black.
[0070] The image generation unit 12 generates a second missing image 44 including a second missing region 45 based on the difference between the repeated output image 36 and the regional output image 35. The second missing region 45 is inferred to be where the article K is present in the repeated output image 36 and is inferred to be absent in the regional output image 35. The image generation unit 12 calculates the difference between the repeated output image 36 and the regional output image 35, for example. Figure 7 The pixel values of the output image 35 in region (b) are related to Figure 7 (c) repeatedly outputs the difference in pixel values of the image 36 to generate an image as the difference. Figure 8 The second missing image 44 of (a). Figure 8 (a) is an example of the second missing image 44. Figure 8As shown in (a), in the second missing image 44, the difference in pixel values between the areas where the inference results indicate a match and the areas where the inference results indicate a match causes the second missing region 45 to stand out and be emphasized at a different density level than its surroundings. The second missing region 45 is the region of the object K that was not properly identified (omitted) by the first learning model.
[0071] The image generation unit 12 generates Figure 8 A second complement image 46 is obtained by performing image processing including expansion, reduction, or filtering on the second missing area 45 of the second missing image 44 (a). Figure 8 In the second missing image 44 of (a), noise may be caused by, for example, the remaining edge of the properly designated object K or the inclusion of a hole in the second missing region 45. Such noise is removed by performing image processing including expansion, reduction, or filtering of the second missing region 45. Figure 8 (b) is an example of the second complementary image 46. The second complementary image 46 is an image in which the articles K that are not properly specified (omitted) by the first learning model are extracted in order to make up for the shortage of the number of articles K.
[0072] The image generation unit 12 may also generate a complementary output image 47 obtained by using a first learning model. Figure 8 The second complementary image 46 of (b) is taken as input and the region of the article K in the second complementary image 46 is specified. Figure 8 (c) is an example of a complementary output image 47, which is a complementary output image 47. Figure 8 The second complementary image 46 of (b) is used as input and outputs information on the region specified by the above-mentioned first learning model.
[0073] The inspection unit 13 is based on Figure 8 The inspection unit 13 corrects the number of articles K by using the supplementary output image 47 of (c). Figure 7 The number of items K (twelve) specified in the area output image 35 of (b) is the same as Figure 8 The number of items K specified by the complementary output image 47 of (c) (eleven) is added to calculate Figure 7 The number of articles K in the transmission image 34 of (a) (twenty-three).
[0074] Thus, the number of articles K is corrected by also using a second learning model as a learning model. This second learning model takes as input the transmission image 34 (image) representing the brightness of X-rays detected by the X-ray detection unit 7 and specifies the number of repeated articles K in the overlapping region 21K. Therefore, even in situations where the density level of the overlapping region 21K is unclear and it is difficult to strictly distinguish the number of repeated articles K in the overlapping region 21K, inspection accuracy can be further improved compared to using only the first learning model that specifies the article region 22K of the articles K as the learning model.
[0075] In the above embodiment, the input image is an X-ray transmission image. Therefore, unlike conventional camera images, where one overlapping item appears in the image while the other is hidden, the overlapping portion creates an overlapping region with different concentration levels, allowing both overlapping items to appear. This situation could lead to erroneous removal of the item region 22A using the first learning model, for example, through non-maximum suppression (NMS), potentially resulting in inappropriate item identification (omission). Therefore, parameters such as NMS in the first learning model can be set to account for this effect.
[0076] In the above-described embodiments and variations, the X-ray detector 7 detects X-rays transmitted through an object. However, it is also possible to detect X-rays reflected from an object. In this case, instead of the X-ray transmission images 31 and 34, an image generated based on the brightness (X-ray dose) of the X-rays reflected from the object can be used to correct the number of objects, similar to the above-described embodiments and variations.
[0077] In the above embodiment, as a first example of calculating 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, the present invention is not limited to operating on regions within such an image. For example, if multiple items are identified as belonging to an overlapping region 21A of 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 used as input to the second learning model. The number of items belonging to the overlapping region 21A in the brightness-processed image 32 may also be used as input to the second learning model. In this case, even if the number of items belonging to the overlapping region 21A in the region output image 33 is omitted, the number of items belonging to the overlapping region 21A in the brightness-processed image 32 can still be used to correct the number of items.
[0078] In the above embodiment, the bag B containing the plurality of articles A is exemplified as the commodity G. However, the bag B is not essential, and the present disclosure can be applied even if, for example, a plurality of articles are scattered on the conveyor 5 .
Claims
1. An X-ray inspection device, characterized in that: have: An irradiation unit irradiates multiple objects with X-rays; a detection unit for detecting X-rays transmitted through the object or X-rays reflected by the object; a generating unit that generates an image for checking the number of the articles based on the X-rays detected by the detecting unit; as well as an inspection unit that inspects the number of the articles based on the image, The generating unit generates region output information obtained by using a learning model that takes the image as input and specifies the region of the article in the image, and processed 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 X-ray inspection device according to claim 1, wherein The generating unit generates a brightness processed image based on the brightness of the X-ray detected by the detecting unit and a predetermined brightness threshold value. The inspection unit calculates the number of the articles based on a difference between the area output information and the brightness-processed image.
3. The X-ray inspection device according to claim 2, wherein: The detection unit detects X-rays that have passed through the object. When the inspection unit identifies that multiple items belong to the same overlapping area of pixels in the image, the number of items is corrected 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 X-ray inspection device according to claim 2 or 3, characterized in that The generating unit generates a first missing image including a first missing region based on a difference between the region output information and the brightness processed image, wherein the first missing region is inferred to be a region where the object does not exist in the region output information but exists in the brightness processed image. The generating unit generates a first complement image obtained by performing image processing including expansion, reduction, or filtering on the first missing region of the first missing image, and a difference between the region output information and the brightness processed image. The inspection unit corrects the number of the articles based on the first supplementary image.
5. The X-ray inspection device according to claim 1, wherein The generating unit generates repetition output information obtained using a learning model, the learning model taking as input an image representing the brightness of the X-rays detected by the detecting unit, and specifying the number of repetitions of the article in a repetition region where a plurality of the articles belong to the same pixel in the image, The generating unit generates a second missing image including a second missing region based on a difference between the repeated output information and the regional output information, wherein the second missing region is inferred to indicate that the item exists in the repeated output information and is inferred to indicate that the item does not exist in the regional output information. The generating unit generates a second complement image obtained by performing image processing including expansion, reduction, or filtering on the second missing region of the second missing image. The generating unit generates a complementary output image obtained using the learning model, the learning model taking the second complementary image as input and specifying a region of the article in the second complementary image, The inspection unit corrects the number of articles based on the supplementary output image.
Citation Information
Patent Citations
Combustion controller
JP1989054503A