Information processing apparatus, control program, and control method
Provided is an information processing apparatus capable of preventing erroneous detection of an abnormality even in a case where a region other than an inspection target region appears in an image of an object or even in a case where the appearance of the object may partially vary because of the nature of the object. An information processing apparatus includes: a generating section that acquires an image and generates a reconstructed image based on the image; an identification section that identifies an inspection target region in the image based on the image; and a calculation section that calculates a difference in the inspection target region between the image and the reconstructed image.
1 . An information processing apparatus comprising:
a hardware processor that:
acquires an image and generates a reconstructed image with reproduced features of a normal product based on the image;
identifies an inspection target region for detecting abnormalities in the image based on a region of a part of the image; and
calculates a difference in the inspection target region between the image and the reconstructed image,
wherein the hardware processor generates the reconstructed image based on an image of a region that includes the inspection target region, the region being larger than the inspection target region and smaller than an entire region of the image.
2 . The information processing apparatus according to claim 1 , wherein the hardware processor identifies, for each image, the inspection target region based on the image.
3 . The information processing apparatus according to claim 1 , wherein the hardware processor calculates the difference in the inspection target region by comparing a portion of the inspection target region extracted from the image with a portion corresponding to the inspection target region extracted from the reconstructed image.
4 . The information processing apparatus according to claim 1 , wherein the hardware processor calculates the difference in the inspection target region by extracting the difference corresponding to the inspection target region from the differences calculated by comparing entirety of the image with entirety of the reconstructed image.
5 . The information processing apparatus according to claim 1 , wherein the hardware processor identifies the inspection target region in the image by pattern matching between a predetermined reference image and the image.
6 . The information processing apparatus according to claim 1 , wherein the hardware processor identifies the inspection target region by estimating the inspection target region from the image using a learned model trained through machine learning so as to estimate the inspection target region from the image.
7 . The information processing apparatus according to claim 6 , wherein
the hardware processor receives designation of the inspection target region in a non-defective product image that is the image of a non-defective product, and
the learned model is trained through machine learning so as to estimate the inspection target region from the image using as training data the inspection target region designated.
8 . The information processing apparatus according to claim 1 , wherein
the hardware processor
receives designation of the inspection target region in a non-defective product image that is the image of a non-defective product, and
identifies the inspection target region in the image based on the inspection target region designated.
9 . The information processing apparatus according to claim 1 , wherein the hardware processor calculates an abnormality degree of the image based on the difference.
10 . A non-transitory recording medium storing a computer readable program for causing a computer to execute:
(a) acquiring an image and generating a reconstructed image with reproduced features of a normal product based on the image;
(b) identifying an inspection target region for detecting abnormalities in the image based on a region of a part of the image; and
(c) calculating a difference in the inspection target region between the image and the reconstructed image,
wherein the reconstructed image is generated based on an image of a region that includes the interception target region, the region being larger than the inspection target region and smaller than an entire region of the image.
11 . A control method comprising:
(a) acquiring an image and generating a reconstructed image with reproduced features of a normal product based on the image;
(b) identifying an inspection target region for detecting abnormalities in the image based on the image; and
(c) calculating a difference in the inspection target region between the image and the reconstructed image,
wherein the reconstructed image is generated based on an image of a region that includes the interception target region, the region being larger than the inspection target region and smaller than an entire region of the image.