WO2023013546A1 - コンピュータプログラム、生成装置、および、生成方法 - Google Patents

コンピュータプログラム、生成装置、および、生成方法 Download PDF

Info

Publication number
WO2023013546A1
WO2023013546A1 PCT/JP2022/029289 JP2022029289W WO2023013546A1 WO 2023013546 A1 WO2023013546 A1 WO 2023013546A1 JP 2022029289 W JP2022029289 W JP 2022029289W WO 2023013546 A1 WO2023013546 A1 WO 2023013546A1
Authority
WO
WIPO (PCT)
Prior art keywords
type
data
inspection
image
computer program
Prior art date
Application number
PCT/JP2022/029289
Other languages
English (en)
French (fr)
Inventor
雅史 宮澤
Original Assignee
ブラザー工業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ブラザー工業株式会社 filed Critical ブラザー工業株式会社
Publication of WO2023013546A1 publication Critical patent/WO2023013546A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting

Definitions

  • This specification relates to data for inspection of the appearance of objects.
  • Patent Literature 1 proposes a technique of recognizing an object for automatic driving using a photographed image in front of the vehicle.
  • a captured image may include multiple image regions with different resolutions.
  • Object recognition processing is performed based on different determination criteria for image areas with low resolution and for other image areas.
  • the captured image can be used to inspect the appearance of various objects such as label sheets provided in the printer.
  • An object may include one or more objects (eg, strings, marks, etc.). Abnormalities in the appearance of each object can be checked.
  • the object can be located at various positions within the captured image.
  • suitable conditions for inspection may vary depending on the object.
  • data indicating the correspondence relationship between information (for example, coordinates) defining the area of the object in the captured image and the inspection conditions can be referred to.
  • Such data are generated, for example, by an operator. Generation of such data was a heavy burden for workers.
  • This specification discloses a technique for appropriately generating inspection data.
  • a computer program for a computer that generates data for inspecting the appearance of an object, and includes K objects (K is an integer equal to or greater than 1) and has no abnormality in appearance.
  • K is an integer equal to or greater than 1
  • a first region detection function for detecting K object regions corresponding to the K objects from first captured image data representing a first captured image of an object using a trained object detection model
  • a first data generation function for generating first correspondence data indicating K correspondences respectively corresponding to the K object regions, wherein each of the K correspondences is the first type object object area information that defines an object area in a photographed image, and condition information that indicates inspection conditions.
  • a first data storage function for storing the first correspondence data in a storage device.
  • the first correspondence data that can be used for determining the inspection condition of the object area during inspection of the type 1 object is appropriately generated.
  • the technology disclosed in this specification can be implemented in various aspects, for example, an inspection data generation method and generation apparatus, an inspection method and inspection apparatus using inspection data, and the like. It can be realized in the form of a computer program for realizing the method or function of the apparatus, a recording medium (for example, a non-temporary recording medium) recording the computer program, or the like.
  • FIG. 1 is an explanatory diagram showing a data processing system as an example
  • FIG. 2 is a perspective view of a digital camera 110, a multifunction device 900, and a support base 190
  • FIG. (A) is a schematic diagram showing an example of a label sheet.
  • (B) is a schematic diagram showing an example of a captured image.
  • (C) is a schematic diagram showing an example of an object area.
  • 8 is a flowchart illustrating an example of generation processing; 4 is a schematic diagram showing an example of correspondence data D1;
  • FIG. 10 is a flowchart showing an example of object type determination processing; 6 is a flowchart showing an example of inspection processing;
  • FIG. 11 is a flow chart showing another embodiment of object type determination processing;
  • FIG. 11 is a flow chart showing another embodiment of inspection processing;
  • FIG. FIG. 11 is a flow chart showing another embodiment of object type determination processing;
  • FIG. 1 is a schematic diagram illustrating an example of a classification model;
  • FIG. 10 is a flowchart showing another example of a process of generating correspondence data D1;
  • FIG. 1 is an explanatory diagram showing a data processing system as one embodiment.
  • the data processing system 1000 comprises a first data processing device 200 and a second data processing device 300 .
  • Data processing apparatuses 200 and 300 are each, for example, a personal computer.
  • the first data processing device 200 is an example of a generation device that generates data used in inspection of the appearance of an object (for example, a label sheet provided on a product such as a multifunction machine).
  • the second data processing device 300 is an example of an inspection device that inspects the appearance of an object. Assume that the appearance of the label sheet 800 provided in the MFP 900 is inspected below.
  • the first data processing device 200 includes a processor 210 , a storage device 215 , a display section 240 , an operation section 250 and a communication interface 270 . These elements are connected to each other via buses.
  • Storage 215 includes volatile storage 220 and nonvolatile storage 230 .
  • the processor 210 is a device configured to perform data processing, such as a CPU.
  • the volatile memory device 220 is, for example, a DRAM
  • the non-volatile memory device 230 is, for example, a flash memory.
  • the nonvolatile storage device 230 stores a generation program 231, an object detection model M1, a character recognition module M2, and correspondence data D1.
  • the object detection model M1 and the character recognition module M2 are each program modules.
  • the object detection model M1 is a so-called machine learning model.
  • Processor 210 generates correspondence data D ⁇ b>1 according to generation program 231 . Details of the generation program 231, the object detection model M1, the character recognition module M2, and the correspondence data D1 will be described later.
  • the display unit 240 is a device configured to display an image, such as a liquid crystal display or an organic EL display.
  • the operation unit 250 is a device such as a button, a lever, a touch panel overlaid on the display unit 240, and configured to receive an operation by a user. A user can input various requests and instructions to the first data processing device 200 by operating the operation unit 250 .
  • the communication interface 270 is an interface for communicating with other devices (eg, USB interface, wired LAN interface, IEEE802.11 wireless interface).
  • Digital camera 110 is connected to communication interface 270 .
  • the digital camera 110 is used for photographing the label sheet 800 of the multifunction machine 900 .
  • the hardware configuration of the second data processing device 300 is the same as the hardware configuration of the first data processing device 200.
  • the second data processing device 300 comprises elements 310, 315, 320, 330, 340, 350, 370 corresponding to the elements 210, 215, 220, 230, 240, 250, 270 of the first data processing device 200, respectively.
  • a digital camera 110 is connected to the communication interface 370 .
  • the nonvolatile storage device 330 of the second data processing device 300 stores an inspection program 331, correspondence data D1, and reference image data D2.
  • the correspondence data D ⁇ b>1 is generated by the first data processing device 200 and copied from the first data processing device 200 to the second data processing device 300 .
  • the reference image data D2 is used in inspection processing, which will be described later. Details of the inspection program 331, the correspondence data D1, and the reference image data D2 will be described later.
  • FIG. 2 is a perspective view of the digital camera 110, the multifunction device 900, and the support base 190.
  • FIG. A support table 190 supports the multi-function device 900 .
  • support 190 forms a flat top surface 191 .
  • a bottom surface 909 of the MFP 900 is placed on the top surface 191 .
  • a label sheet 800 is attached to the first side surface 901 of the MFP 900 .
  • a digital camera 110 is arranged to photograph the label sheet 800 .
  • FIG. 3A is a schematic diagram showing an example of a label sheet.
  • FIG. 3A shows a label sheet 800 without defects.
  • the label sheet 800 represents a logotype 810, a certification mark 820, a description 830, a trademark 840, a first character string 850, a photograph 860, and a second character string 870.
  • K the total number of objects included in the label sheet 800.
  • illustration of details of the authentication mark 820, the description 830, the trademark 840, and the photograph 860 is omitted.
  • the certification mark 820 is, for example, a mark such as a CE mark, a GS mark, or an FCC mark provided based on standards or laws. Such marks indicate compliance with standards or laws. Here, conformance to a particular standard may be mandated by law. Such conformity marks are also a kind of marks provided based on standards or laws.
  • the descriptive text 830 describes, for example, notes based on standards or laws.
  • a trademark 840 represents, for example, a mark indicating a manufacturer of the multi-function peripheral 900 .
  • a first string 850 represents the model number.
  • a photograph 860 represents, for example, a user operating the MFP 900 .
  • a second character string 870 represents the country of manufacture and includes the character string "MADE IN".
  • the label sheet 800 contains various types of objects.
  • FIG. 3B is a schematic diagram showing an example of a captured image.
  • the captured image 700 is a rectangular image having two sides parallel to the first direction Dx and two sides parallel to the second direction Dy perpendicular to the first direction Dx.
  • a captured image 700 is represented by color values of a plurality of pixels arranged in a matrix along the first direction Dx and the second direction Dy.
  • the color value is represented by three component values of R (red), G (green), and B (blue). is represented.
  • a photographed image 700 in the figure represents a label sheet 800 with no defects.
  • inspection of the label sheet 800 determines whether the appearance of each of the objects 810-870 is normal.
  • Objects can have various imperfections, such as chips, deformations, stains, and the like. If the imperfections are minor, the object is judged to have a normal appearance. As will be explained below, the criteria for judging that the appearance of an object is normal may differ depending on the type of object.
  • the user may be able to read correct information from the entire character image if the defect is small. can. For example, even if some characters are difficult to read, the user can read correct information from the entire character image. Such minor imperfections may be tolerated.
  • a character image representing a relatively large number of characters may represent important information.
  • the character image clearly represents the correct information. Therefore, it is preferable that the defects tolerable are small compared to the defects tolerable for character images composed of a relatively small number of characters. For example, defects that make some characters difficult to read are preferably not allowed.
  • the label sheet 800 preferably represents the correct mark. Defects that cause the shape of the mark to deviate from the correct shape are preferably not allowed.
  • Defects are less noticeable with images that represent complex shapes and multiple colors, such as photographs 860 and complex illustrations. Therefore, the tolerance for defects may be greater than for other types of objects.
  • the preferred criteria for inspection may differ depending on the type of object area.
  • the correspondence between object areas and object area types can be determined by the operator. However, when a plurality of objects 810-870 are included in the label sheet 800, the burden of determining the correspondence is heavy.
  • the first data processing device 200 uses captured image data to generate correspondence data D1 indicating correspondence.
  • FIG. 4 is a flowchart illustrating an example of generation processing.
  • the data processing device 200 (FIG. 1) generates the correspondence data D1 by executing the generation process.
  • FIG. 5 is a schematic diagram showing an example of the correspondence data D1.
  • the correspondence data D1 indicates the correspondence between the object number D1a, the object area information D1b, and the object type D1c.
  • the object number D1a is the identification number of each of the plurality of objects 810-870 included in the label sheet 800 (FIG. 3A).
  • the object area information D1b is information that defines an object area, which is an area representing an object in a captured image (for example, the captured image 700 (FIG. 3B).
  • the object area is defined in the first direction Dx and two sides parallel to the second direction Dy
  • the object region information D1b includes the coordinates D1b1 of the upper left corner of the rectangle and the coordinates D1b1 of the lower right corner of the rectangle.
  • Each coordinate D1b1 and D1b2 indicates the position of a pixel
  • Object type D1c indicates the identification number of the type of object area
  • object type D1c indicates an inspection condition (object type D1c is also called condition information D1c).
  • the operator arranges the multifunction device 900 and the digital camera 110 as shown in FIG. A label sheet 800 with no defects is pasted on the MFP 900 .
  • the operator connects the digital camera 110 to the communication interface 270 of the first data processing device 200 (FIG. 1). Then, the operator inputs an instruction to start the generation process by operating the operation unit 250 .
  • processor 210 executes the generation process of FIG. 4 according to generation program 231 .
  • the processor 210 supplies a photographing instruction to the digital camera 110.
  • the digital camera 110 photographs the label sheet 800 and generates image data representing the photographed image in accordance with the instruction.
  • the processor 210 acquires image data from the digital camera 110 .
  • Image data representing a captured image is hereinafter referred to as captured image data.
  • the image size (specifically, the number of pixels in the first direction Dx (FIG. 3B)) and the number of pixels in the second direction Dy of the captured image data used in the generation process and the inspection process described later are number of pixels) is determined in advance (referred to as processing image size).
  • the processor 210 performs various image processing such as trimming processing for cutting out a portion representing the label sheet 800 and resolution conversion processing for the image data acquired from the digital camera 110 to obtain a processed image representing the label sheet 800 . Acquire the captured image data of the size. It is preferable that the arrangement of the multi-function device 900 and the digital camera 110 is adjusted so that the region of the label sheet 800 is extracted by trimming the predetermined region. Alternatively, the processor 210 may detect regions of the label sheet 800 (eg, pattern matching) and perform a trimming process to extract the detected regions of the label sheet 800 .
  • the photographed image data represents the photographed image 700 in FIG. 3B.
  • Various object detection models can be adopted as the object detection model M1.
  • the object detection model M1 is an object detection model called YOLO (You only look once).
  • YOLO has, for example, published the paper "Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi, "You Only Look Once: Unified, Real-Time Object Detection", Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016 , pp. 779-788.
  • the YOLO model uses a convolutional neural network to generate a rectangular box containing an object called a bounding box, the confidence that the box contains an object, and the probability for each type of object if the box contains an object ( (also called class probabilities) to predict .
  • a high confidence is calculated if the boxed area represents the object to be detected. If the boxed area does not represent the object to be detected, a small confidence is calculated. Boxes with a confidence greater than or equal to the threshold are used as boxes to represent detected objects. Boxes with a confidence below the threshold are treated as boxes that do not represent the detected object.
  • the certainty threshold is predetermined. Alternatively, the confidence threshold may be adjusted based on the results of training the object detection model M1.
  • the largest class probability indicates the type of object enclosed by the box.
  • the output data from the object detection model M1 indicates multiple combinations of bounding boxes, confidence factors, and class probabilities based on the image data input to the object detection model M1.
  • FIG. 3(C) is a schematic diagram showing an example of an object area detected by the object detection model M1.
  • the drawing shows an example in which the image data of the captured image 700 (FIG. 3B) is input to the object detection model M1.
  • object detection model M1 detects bounding boxes BB1-BB7 surrounding objects 810-870, respectively.
  • the object detection model M1 is pre-trained to detect areas of each of the seven types of objects 810-870 included in the label sheet 800.
  • Each bounding box BB1-BB7 is associated with a class identifier CL1-CL7, respectively.
  • the first class identifier CL1 indicates the type associated with the largest class probability of the first bounding box BB1.
  • the first class identifier CL1 indicates logotype 810 .
  • the class identifiers CL2-CL7 of the other bounding boxes BB2-BB7 similarly indicate the type associated with the largest class probability.
  • class identifiers CL2-CL7 indicate objects 820-870, respectively.
  • the object detection model M1 detects seven types of objects 810-870.
  • Image data of a plurality of images including images of objects 810-870 are used to train the object detection model M1.
  • a training processor eg, processor 210) uses the image data to generate output data by performing operations on the object detection model M1. Then, the training processor adjusts a plurality of calculation parameters of the object detection model M1 so that the output data approaches correct data.
  • image data of an image including an image of object 810 is input to object detection model M1.
  • the output data shows a bounding box surrounding object 810, a large confidence associated with that bounding box, and a large class probability associated with that bounding box that indicates object 810, a plurality of calculation parameters of the object detection model M1 are adjusted.
  • multiple calculation parameters of the object detection model M1 are similarly adjusted.
  • a plurality of calculation parameters of the object detection model M1 are adjusted so that the loss calculated using the loss function is small.
  • the loss function may be various functions for calculating the evaluation value of the difference between the output data and the correct data associated with the image data input to the object detection model M1.
  • the loss function disclosed in the YOLO article mentioned above is used.
  • an algorithm for adjusting a plurality of calculation parameters for example, an algorithm using backpropagation and gradient descent may be adopted. Here, a so-called Adam's optimization may be performed.
  • the correct answer data is generated in advance by the operator.
  • the processor 210 uses the image data of the captured image 700 to generate output data by performing the operation of the trained object detection model M1 (FIG. 1).
  • the generated output data indicates the bounding boxes BB1-BB7 described with reference to FIG. 3(C).
  • Processor 210 stores the acquired data in storage device 215 (eg, non-volatile storage device 230).
  • the processor 210 initializes the correspondence data D1 (FIG. 5). In this embodiment, processor 210 generates empty correspondence data D1.
  • the processor 210 selects an unprocessed object area from the K object areas detected at S130 as an object area of interest.
  • the processor 210 executes an object type determination process.
  • This process is a process of determining the type of the target object area.
  • FIG. 6 is a flowchart illustrating an example of object type determination processing.
  • the processor 210 uses the object area image data of the object area of interest to generate a histogram for each color component.
  • a histogram for each color component In this embodiment, three histograms of the RGB color components are generated.
  • the processor 210 uses the histogram to calculate the peak value of each color component.
  • the peak value is the component value that exhibits the highest frequency.
  • the background color range may be excluded from the calculation of the peak value.
  • the background color range may be, for example, the color range corresponding to black (color range including zero) or the color range corresponding to white (color range including 255).
  • the background color range may be predetermined.
  • processor 210 may determine the background color value by analyzing the captured image and determine a background color range that includes the determined background color value.
  • the processor 210 determines whether the peak value is less than the peak threshold.
  • the peak value can be different depending on the type of object region. For example, when the region-of-interest image represents a large number of colors, such as a photograph or a complex illustration, each component value is distributed over a wide range from small values to large values. As a result, peak values can be smaller.
  • a region-of-interest image represents a small number of colors, such as a simple illustration such as a trademark, an authentication mark, or a character string
  • the peak value of each color component usually indicates the color of the object.
  • the color of an object can be a color represented using large component values, such as red, green, blue, yellow. In this case, the peak value of one or more color components can be large.
  • the peak value can be used to classify the type of object region.
  • the processor 210 determines whether the first condition that all peak values of all color components are less than the peak threshold is satisfied. If the first condition is satisfied (S230: Yes), in S260 processor 210 determines that the type of the target object region is the second image type, and ends the processing of FIG.
  • a second image type is a type that includes photographs and complex illustrations.
  • the peak threshold is empirically determined in advance so as to classify the second image type, which includes photographs, complex illustrations, and other types.
  • the processor 210 performs character recognition of the attention area image according to the character recognition module M2. Execute the process.
  • the character recognition processing may be various known processing. For example, an optical character recognition engine called "Tesseract OCR” from Google may be used. Alternatively, pattern matching using pre-prepared character images may be used.
  • the processor 210 determines whether characters were recognized from the attention area image at S240. If a character is recognized (S250: Yes), in S280 processor 210 determines that the type of the object area of interest is the character type, and ends the processing of FIG.
  • the character type is the type of object area representing characters, and includes logotypes, sentences, and characters.
  • the processor 210 determines that the type of the target object area is the first image type, and ends the processing of FIG.
  • the first image type includes marks provided based on laws or standards (certification marks, legal marks, standard marks, etc.) and simple illustrations such as icon images and trademarks.
  • the processor 210 determines the type of the target object region by analyzing the target region image based on the predetermined rule.
  • the processor 210 determines the type of the target object region to be one of three types: a first image type, a second image type, and a character type.
  • the processor 210 adds data indicating the correspondence of the target object area to the correspondence data D1 (FIG. 5).
  • the object numbers D1a are assigned in ascending order from number 1.
  • the object area information D1b indicates the coordinates of the corners of the bounding box indicating the object area of interest.
  • the object type D1c indicates the type of the object area determined in S160 (for example, number 1 indicates the first image type, number 2 indicates the second image type, and number 3 indicates the character type). shown).
  • the processor 210 determines whether all object regions have been processed. If unprocessed object areas remain (S180: No), the processor 210 proceeds to S150 to process the unprocessed object areas. If the processing of all object regions is completed (S180: Yes), in S190 processor 210 stores correspondence data D1 in storage device 215 (eg, non-volatile storage device 230), and ends the processing of FIG. do.
  • the correspondence data D1 generated by the above generation process indicates the correspondence of all the objects 810 to 870 on the label sheet 800 (FIG. 3A).
  • FIG. 7 is a flowchart illustrating an example of inspection processing.
  • the second data processing device 300 (FIG. 1) inspects the label sheet 800 of the MFP 900 (FIG. 2) by executing inspection processing.
  • processor 310 (FIG. 1) uses correspondence data D1 and reference image data D2.
  • the operator copies the correspondence data D1 generated in the process of FIG.
  • the reference image data D2 is composed of image data of reference images, which are respective images of the objects 810 to 870 without defects.
  • the configuration of the reference image is the same as the configuration of the object area image defined by the object area information D1b (FIG. 5) of the corresponding object area.
  • the number of pixels in the first direction Dx, the number of pixels in the second direction Dy, and the color components of the color values of each pixel are the same between the reference image and the object area image.
  • the operator generates the reference image data D2 in advance using the photographed image data of the label sheet 800 without defects.
  • the processor 210 of the first data processing device 200 may generate the reference image data D2 using the object area image data of each object area acquired in S135 of FIG.
  • the operator arranges the MFP 900 to be inspected and the digital camera 110 as shown in FIG.
  • the label sheet 800 of the MFP 900 may have defects.
  • the operator connects the digital camera 110 to the communication interface 370 of the second data processing device 300 (FIG. 1). Then, the operator operates the operation unit 350 to input an instruction to start the inspection process. In response to the instruction, processor 310 executes inspection processing according to inspection program 331 .
  • S310 and S320 are the same as S110 and S120 in FIG. 4, respectively.
  • the processor 310 uses the image data from the digital camera 110 to acquire captured image data of the label sheet 800 .
  • the processor 310 refers to the object area information D1b of the correspondence data D1 (FIG. 5).
  • the processor 310 obtains object area image data representing an image of the object area from the photographed image data for each of the K object areas defined by the correspondence data D1.
  • the processor 310 selects an unprocessed object area from the K object areas as an object area of interest.
  • the processor 310 calculates the difference Vd between the image of the object region of interest (referred to as the object image of interest) and the reference image corresponding to the object region of interest.
  • the reference image is an image represented by the reference image data D2, and is an image of an object without defects.
  • the difference Vd may be various values indicating the difference between the image of the object of interest and the reference image.
  • processor 310 calculates the difference Vd as follows. The processor 310 calculates, for each pixel, three absolute values of the three differences of the three RGB component values between the object image of interest and the reference image. The processor 310 calculates, for each pixel, a total difference value, which is the total value of the three absolute values of the three RGB differences.
  • the processor 310 calculates the average value of the total difference values of all pixels in the target object region as the difference Vd.
  • a difference Vd increases as the difference between the target object image and the reference image increases.
  • the difference Vd may be various values indicating the difference between the target object image and the reference image, such as the L2 norm using the respective RGB differences, instead of the above values.
  • the processor 310 refers to the correspondence data D1 and obtains the object type D1c of the object area of interest. Then, the processor 310 sets the reference value Vx indicating the condition for inspection to the value associated in advance with the object type D1c (S371, S372, S373).
  • Vx1, Vx2, Vx3 are experimentally determined in advance so that the difference Vd is equal to or greater than the reference value Vx when the image of the object in the target object region has unacceptable defects.
  • a first reference value Vx1 for a first image type containing authentication marks allows a relatively small difference Vd
  • a second reference value Vx2 for a second image type containing photographs allows a relatively large difference Vd.
  • the character type third value Vx3 is a value between them.
  • the processor 310 determines whether the difference Vd is less than the reference value Vx. If the difference Vd is greater than or equal to the reference value Vx (S380: No), the inspection result is unacceptable. In this case, at S410, the processor 310 displays on the display unit 340 information indicating the inspection result of failure. Processor 310 then terminates the processing of FIG.
  • the inspection result is acceptable.
  • the processor 310 determines whether all object regions have been processed. If unprocessed object areas remain (S390: No), the processor 310 proceeds to S350 to process the unprocessed object areas. If the inspection results of all object regions are acceptable (S390: Yes), processor 310 displays information indicating acceptable inspection results on display unit 340 in S400. Processor 310 then terminates the processing of FIG.
  • processor 310 may store test result data indicative of test results in storage device 315 (eg, non-volatile storage device 330). As such, processor 310 may perform an output process to output test result data to a storage device or display device.
  • storage device 315 eg, non-volatile storage device 330
  • the processor 210 of the first data processing device 200 performs the generation process of FIG. Generate D1.
  • processor 210 generates correspondence data D1 (FIG. 5) indicating K correspondences respectively corresponding to K object areas. As shown in FIG.
  • each of the K correspondences indicates the correspondence between the object area information D1b and the object type D1c (that is, the condition information D1c).
  • the object area information D1b (coordinates D1b1 and D1b2 in this embodiment) is an example of information that defines the object area in the captured image of the label sheet 800 .
  • the processor 210 stores the correspondence data D1 in the storage device 215.
  • FIG. 1 the correspondence data D1 in the storage device 215.
  • the correspondence data D1 used for determining the object area inspection condition (here, the reference value Vx) when inspecting the label sheet 800 (FIG. 7) is appropriately generated. . If the operator decides information indicating the coordinates and type of each object area and inputs the decided information into the first data processing device 200, the burden on the operator is heavy. In particular, when the label sheet 800 includes a plurality of objects as in the embodiment of FIG. 3A, it is not easy for the operator to determine the correct correspondence between the plurality of objects. In this embodiment, the processor 210 can generate appropriate correspondence data D1 even if the operator does not determine the coordinates and type of the object area. Therefore, the burden on the operator is greatly reduced.
  • the processor 210 analyzes the image of the object region based on a predetermined rule to determine the type of object region (here, Determine the object type D1c).
  • the processor 210 can generate appropriate correspondence data D1 based on predetermined rules.
  • the reference value Vx indicating the inspection condition is set to one of three values Vx1, Vx2, and Vx3 according to the type of object area. That is, the total number L of inspection conditions is 3, which is a value of 2 or more.
  • the processor 310 calculates the difference Vd.
  • the difference Vd is the reference object image, which is the image of the area indicated by the object area information D1b (FIG. 5) in the photographed image for inspection, and the image of the object with no abnormality pre-associated with the object area information D1b. It shows the difference between the object image and the . Then, as described in S380 of FIG.
  • the L inspection conditions (that is, the L reference values Vx1, Vx2, and Vx3) are set so that the difference Vd is the appearance of the object represented by the target object image. This is a condition for judging that it is normal.
  • a relatively large first reference value Vx1 allows a relatively large difference Vd
  • a relatively small second reference value Vx2 allows a relatively small difference Vd.
  • the third reference value Vx3 is a value between them.
  • the L inspection conditions include a plurality of different criteria (in this embodiment, different reference values Vx1, Vx2, and Vx3) for determining that the difference Vd indicates that the appearance is normal.
  • each object area is inspected according to appropriate inspection conditions associated with the type of object area, so the label sheet 800 can be inspected appropriately. Then, in the generation process of FIG. 4, the processor 210 can appropriately generate the correspondence data D1 referred to in such inspection.
  • the type of object area is one of L types including the first image type including marks provided based on standards or laws.
  • the first reference value Vx1 associated with the first image type is the smallest among the L reference values Vx1, Vx2, and Vx3 associated with the L types. . That is, the reference indicated by the inspection conditions associated with the first image type (here, the first reference value Vx1) is L references indicated by the L inspection conditions associated with the L types (here, Then, among the reference values Vx1, Vx2, and Vx3), this is the criterion that is most difficult to satisfy. Therefore, the possibility of erroneously determining that the difference Vd of the mark does not indicate an abnormality in appearance is reduced when the mark provided based on the standard or law has a defect.
  • the type of object area is one of L types including a second image type including a photograph.
  • the second reference value Vx2 associated with the second image type is the largest among the L reference values Vx1, Vx2, and Vx3 associated with the L types. . That is, the reference indicated by the inspection conditions associated with the second image type (here, the second reference value Vx2) is L references indicated by the L inspection conditions associated with the L types (here, Then, among the reference values Vx1, Vx2, and Vx3), this is the criterion that is most likely to be satisfied. Therefore, if the defect in the photograph is a small defect that should be allowed, the possibility that the difference Vd in the photograph is determined to indicate an abnormality in appearance is reduced.
  • the type of object area is one of L types including a text type including text and a second image type including a photograph.
  • the third reference value Vx3 associated with the character type is smaller than the second reference value Vx2 associated with the second image type. That is, the reference indicated by the inspection condition associated with the character type (here, the third reference value Vx3) is the reference indicated by the inspection condition associated with the second image type (here, the second reference value Vx2). difficult to satisfy compared to Therefore, the possibility of erroneously determining that the difference Vd of characters having defects does not indicate an abnormality in appearance is reduced. Then, when the defect in the photograph is a small defect that should be allowed, the possibility that the difference Vd in the photograph is judged to indicate an abnormality in appearance is reduced.
  • FIG. 8 is a flow chart showing another embodiment of the object type determination process.
  • the processor 210 of the first data processing device 200 (FIG. 1) executes the process of FIG. 8 instead of the process of FIG. 6 at S160 of FIG.
  • the processor 210 uses the object region type determined by the object detection model M1 in S130 of FIG. )) to determine.
  • processor 210 determines object type D1c to be one of the following five types.
  • 1st image type A type that includes marks established based on laws or standards
  • 2nd image type A type that includes photographs and complex illustrations 3rd image type: A type that includes simple illustrations 1st character type: Logotypes, etc.
  • Second character type A type that includes a character image that consists of a relatively large number of characters, such as explanatory text
  • a correspondence relationship between the type determined by the object detection model M1 and the object type D1c is determined in advance.
  • This embodiment is as follows.
  • Logotype 810 1st character type Certification mark 820 : 1st image type Description 830 : 2nd character type Trademark 840 : 3rd image type 1st character string 850 : 1st character type Photograph 860 : 2nd image type 2nd Character string 870: First character type
  • the processor 210 determines the object type D1c according to the above correspondence. Processor 210 then terminates the processing of FIG.
  • FIG. 9 is a flowchart showing another embodiment of inspection processing. The only difference from the embodiment of FIG. 7 is that S370 of FIG. 7 is replaced with S370a of FIG.
  • the processing of other portions of the inspection processing is the same as the processing of the corresponding portions in FIG. 7 (illustration and description of the same portions are omitted).
  • the processor 310 of the second data processing device 300 refers to the correspondence data D1 and acquires the object type D1c of the target object area. Then, the processor 310 sets the reference value Vx indicating the condition for inspection to the value associated in advance with the object type D1c (S371a-S375a).
  • Va1-Va5 are determined experimentally in advance so that the difference Vd is greater than or equal to the reference value Vx when the image of the object in the object-of-interest region has unacceptable defects.
  • the first reference value Va1 for the first image type including the authentication mark and the fifth reference value Va5 for the second character type including the description are the minimum values among the five reference values, and the difference is relatively small. Allow Vd.
  • the second reference value Va2 for the second image type including photographs is the maximum value among the five reference values and allows a relatively large difference Vd.
  • the third reference value Va3 for the third image type including the trademark and the fourth reference value Va4 for the first character type including the logotype are values between them.
  • the generation processing of this embodiment is the same as the generation processing of the first embodiment (FIG. 4) except for the following two points.
  • the type determined by the object detection model M1 is used to determine the object type D1c.
  • the number of types of the object type D1c is five. Therefore, this embodiment has the same various advantages as the first embodiment. For example, even if the operator does not determine the coordinates and type of the object area, the processor 210 can generate appropriate correspondence data D1.
  • the processor 210 uses the trained object detection model M1 (FIG. 4: S130) to determine the type of object region (here, , object type D1c). The processor 210 can use the detection results from the object detection model M1 to generate appropriate correspondence data D1.
  • the reference value Vx indicating the inspection condition is set to one of five values Va1-Va5 according to the type of object area. That is, the total number L of inspection conditions is 5, which is a value of 2 or more.
  • the L inspection conditions include a plurality of inspection conditions that indicate mutually different criteria for determining that the difference Vd indicates that the appearance is normal.
  • the criteria are different among the following three criteria value groups. (First group) Va2 (Second group) Va3, Va4 (Third group) Va1, Va5
  • each object area is inspected according to appropriate inspection conditions associated with the type of object area, so the label sheet 800 can be inspected appropriately. 4 and 8, the processor 210 can appropriately generate the correspondence data D1 referred to in such inspection.
  • the type of object area is one of L types including the first image type including marks provided based on standards or laws.
  • the first reference value Va1 associated with the first image type is the smallest among the L reference values Va1-Va5. That is, the first reference value Va1 associated with the first image type is the reference value that is most difficult to satisfy among the L reference values Va1-Va5 associated with the L types. Therefore, the possibility of erroneously determining that the difference Vd of the mark does not indicate an abnormality in appearance is reduced when the mark provided based on the standard or law has a defect.
  • the fifth reference value Va5 for the second character type including the description is the same as the first reference value Va1.
  • the plurality of reference values Va1 and Va5 corresponding to the plurality of types may be the smallest reference value (that is, the reference value that is most difficult to satisfy).
  • the type of object area is one of L types including a second image type including a photograph.
  • the second reference value Va2 associated with the second image type is the largest among the L reference values Va1-Va5. That is, the second reference value Va2 associated with the second image type is the reference value that is most likely to be satisfied among the L reference values Va1-Va5. Therefore, if the defect in the photograph is a small defect that should be allowed, the possibility that the difference Vd in the photograph is determined to indicate an abnormality in appearance is reduced.
  • the types of the object area include a first character type and a second character type including characters, a second image type and a third image type including one or both of illustrations and photographs, is any of L kinds, including
  • the reference values Va4 and Va5 associated with the first and second character types are the reference values Va2 and Va3 associated with the second and third image types. less than either That is, the reference values Va4 and Va5 associated with the first and second character types are more difficult to satisfy than the reference values Va2 and Va3 associated with the second and third image types. Therefore, the possibility of erroneously determining that the difference Vd of characters having defects does not indicate an abnormality in appearance is reduced. This reduces the possibility that the difference Vd between illustrations with small tolerable defects or the difference Vd between photographs with small tolerable defects will be judged to indicate an abnormality in appearance.
  • FIG. 10 is a flow chart showing another embodiment of the object type determination process.
  • the processor 210 of the first data processing device 200 (FIG. 1) executes the process of FIG. 10 instead of the process of FIG. 6 at S160 of FIG.
  • the processor 210 determines the type of object region (i.e., object type D1c (FIG. 5)) associated with the inspection condition by inputting the image data of the object region of interest to the trained classification model. do.
  • the object type D1c is determined to be one of five types, as in the embodiment of FIG.
  • the correspondence between the objects 810 to 870 and the object type D1c is assumed to be the same as in the embodiment of FIG.
  • FIG. 11 is a schematic diagram showing an example of a classification model.
  • the classification model M3 is a program module forming a convolutional neural network. Although illustration is omitted, the data of the trained classification model M3 is stored in advance in the non-volatile storage device 230 of the first data processing device 200 .
  • the classification model M3 includes p (p is an integer of 1 or more) convolutional layers V31-V3p, and q (q is an integer of 1 or more) fully connected layers N31-N3q following the convolutional layers V31-V3p. , (p is, for example, 2; q is, for example, 3).
  • a pooling layer is provided immediately after one or more of the p convolutional layers V31-V3p.
  • the classification model M3 generates output data M3o based on the input image data M3i input to the classification model M3.
  • the output data M3o indicates the degrees of certainty for each of a plurality of types of object regions.
  • the type associated with the highest degree of certainty indicates the type of object region represented by the input image data M3i.
  • the convolution layers V31-V3p perform processing including convolution processing using filters and bias addition processing on input data.
  • Convolutional layers V31-V3p each have a set of computational parameters including weights and biases of filters.
  • the pooling layer performs processing for reducing the number of dimensions of the data input from the immediately preceding convolutional layer. In this embodiment, the pooling layer performs max pooling.
  • the fully connected layers N31-N3q reduce the dimensionality of the data input from the immediately preceding layer.
  • the fully connected layers N31-N3q each have a set of computational parameters including multiple weights and multiple biases.
  • the data generated by each of the convolutional layers V31-V3p and the fully connected layers N31-N3q are input to the activation function and transformed.
  • Softmax is used for the last layer (here, the fully connected layer N3q) and ReLU is used for the other layers.
  • Image data of a plurality of images representing any of the objects 810-870 are used to train the classification model M3.
  • a training processor eg, processor 210) uses the image data to generate output data M3o by performing operations on each layer V31-V3p, N31-N3q of the classification model M3. Then, the training processor adjusts a plurality of calculation parameters of the classification model M3 so that the output data M3o approaches correct data. For example, image data for an image of logotype 810 is input to classification model M3. A first character type is associated with the logotype 810 . Therefore, the plurality of calculation parameters of the classification model M3 are adjusted so that the confidence factor of the first character type indicated by the output data M3o is maximized. For the other objects 820 to 870, the multiple calculation parameters of the classification model M3 are similarly adjusted so that the object type D1c associated with the object has the highest certainty.
  • the multiple calculation parameters of the classification model M3 are adjusted so that the loss calculated using the loss function is small.
  • the loss function may be various functions for calculating the evaluation value of the difference between the output data M3o and the correct data associated with the input image data M3i input to the classification model M3 (for example, cross entropy, sum-squared error, etc.).
  • an algorithm for adjusting a plurality of calculation parameters for example, an algorithm using backpropagation and gradient descent may be employed. Here, a so-called Adam's optimization may be performed.
  • the correct answer data is generated in advance by the operator.
  • the processor 210 uses the object region image data of the object region of interest to perform the operations of each layer V31-V3p, N31-N3q of the trained classification model M3 (FIG. 11). , to generate output data M3o.
  • the output data M3o indicates an appropriate object type D1c for the target object area.
  • the processor 210 determines the object type D1c to be the type indicated by the output data M3o. Processor 210 then terminates the processing of FIG.
  • the processor 210 uses the classification model M3 trained to classify the types of object regions ( Here, the object type D1c) is determined.
  • the processor 210 can use the classification results from the classification model M3 to generate appropriate correspondence data D1.
  • the generation processing of this embodiment is the same as the generation processing of the second embodiment (FIG. 4), except that the classification model M3 is used to determine the object type D1c. Therefore, this embodiment has the same various advantages as the second embodiment.
  • FIG. 12 is a flow chart showing another example of the process of generating the correspondence data D1.
  • S510-S560 are inserted between S180 and S190 in FIG. If the determination result of S180 is Yes, the process proceeds to S510. If the determination result of S180 is No, the process proceeds to S150.
  • This embodiment can be applied to each of the first to third embodiments described above.
  • a "CE mark” may be shown with a "character string representing the country of manufacture.” In this case, it is preferable that inspection conditions equivalent to those for the "CE mark” are applied to the "character string representing the country of manufacture.”
  • the certification mark 820 (FIG. 3(A)) is the "CE mark”.
  • Specific condition information (also referred to as a specific type) associated with a specific inspection condition is added to a plurality of types selectable as the object type D1c (FIG. 5). The specific inspection conditions indicate the same standards as the inspection conditions for the "CE mark", and are applied to the "character string representing the country of manufacture” shown together with the "CE mark”.
  • the second character string 870 is "a character string representing the country of manufacture".
  • the object type D1c of the "character string representing the country of manufacture” is the same as the object type D1c in each of the above embodiments (for example, the character string in FIG. 6). type, or the first letter type in FIG. 8).
  • the processor 210 searches for an object area representing the "CE mark" from the plurality of object areas detected at S130 (FIG. 4).
  • a search method may be any method. For example, pattern matching using pre-prepared "CE mark” image data may be employed.
  • the object retrieved in S510 will also be referred to as the first object.
  • "CE mark” is an example of a first object.
  • the processor 210 determines whether a first object region representing the first object is found. If the first object area is not found (S520: No), the processor 210 moves to S190 (FIG. 4).
  • the processor 210 extracts the object area representing the "character string representing the country of manufacture (second character string 870 in this embodiment)" from the plurality of object areas.
  • Search for A search method may be any method. For example, pattern matching using pre-prepared image data of the "MADE IN" character string may be adopted.
  • the object retrieved in S530 will also be referred to as a second object. "Character string representing country of manufacture” is an example of the second object.
  • the processor 210 determines whether a second object region representing a second object is found. If the second object area is not found (S540: No), the processor 210 moves to S190 (FIG. 4).
  • the processor 210 determines that the type of the second object area is the specific type. Then, in S560, the processor 210 changes the data indicating the object type D1c of the second object area in the correspondence data D1 (FIG. 5) to data indicating the specific type. The processor 210 then proceeds to S190 (FIG. 4). Thus, when the label sheet includes the "CE mark", the object type D1c of "character string representing country of manufacture" is set to a specific type.
  • the processor 310 of the second data processing device 300 converts the inspection condition criterion of the “character string representing the country of manufacture” into a criterion associated with a specific type (in this embodiment, “ (same as the standard of inspection conditions for CE mark).
  • the processor 210 executes the following processing.
  • the processor 210 searches the K object areas contained in the label sheet for a first object area representing a predetermined first object (authentication mark 820 in this example). If the first object region is found (S520: Yes), the processor 210 selects, at S530, a second object representing a predetermined second object (second character string 870 in this example) from the K object regions. Search the object area. Then, if the second object area is found (S540: Yes), in S550-S560, processor 210 converts condition information D1c associated with object area information D1b (FIG. 5) that defines the second object area to the predetermined condition information D1c.
  • the processor 210 can generate the correspondence data D1 that associates the second object area with the specific inspection condition.
  • the processor 210 can flexibly determine the correspondence relationship between the object areas and the condition information D1c according to the plurality of objects included in the label sheet.
  • FIG. 13 is a schematic diagram showing another example of the label sheet. Unlike the label sheet 800 of FIG. 3A, on the label sheet 800e, the objects 820, 830, 850 and 870 of FIG. 3A are replaced with objects 820e, 830e, 850e and 870e.
  • the certification mark 820e is a mark different from the certification mark 820 in FIG. 3(A).
  • the descriptive text 830e describes information different from the information of the descriptive text 830 in FIG. 3(A).
  • the first character string 850e represents a model number different from the model number of the first character string 850 in FIG. 3(A).
  • the second character string 870e represents a country of manufacture different from the country of manufacture of the second character string 870 in FIG. 3(A).
  • first correspondence data D1 corresponds to first correspondence data D1.
  • a plurality of label sheets 800, 800e different from each other can be inspected.
  • the first data processing device 200 (FIG. 1) generates second correspondence data for the second type label sheet 800e in addition to the first correspondence data D1 for the first type label sheet 800. do.
  • the second correspondence data indicates the correspondence between the object number D1a, the object region information D1b, and the condition information D1c.
  • FIG. 14 is a flowchart showing an example of generation processing.
  • the processor 210 generates first correspondence data D ⁇ b>1 for the first type label sheet 800 .
  • the generation process of S610 may be the same as the generation process of an example arbitrarily selected from the above multiple examples.
  • the processor 210 generates second correspondence data for the second type label sheet 800e.
  • the algorithm of the generation process of S620 may be the same as the algorithm of the generation process of S610.
  • the object detection model M1 (FIG. 1) detects objects 810, 820e, 830e, 840, 850e, and 870 included in the second type label sheet 800e in addition to the objects 810 to 870 included in the first type label sheet 800. pre-trained to do so.
  • the processor 210 uses the photographed image data of the second type label sheet 800e to generate second correspondence data.
  • the processor 210 executes the process of generating the second correspondence data for the second type label sheet 800e in addition to the process of generating the first correspondence data D1.
  • the process of generating the second correspondence data includes the process of FIG.
  • Each of the T correspondence relationships indicates the correspondence relationship between the object area information D1b and the object type D1c, like the correspondence relationships in FIG.
  • the object area information D1b (specifically, the coordinates D1b1 and D1b2) is an example of information that defines the object area in the captured image of the type 2 label sheet 800e.
  • the object type D1c is an example of condition information indicating inspection conditions.
  • the processor 210 stores the second correspondence data in the storage device 215.
  • the second correspondence data referred to for determining the inspection condition (here, the reference value Vx) of the object area when inspecting the type 2 label sheet 800e is appropriately generated. If the operator decides information indicating the coordinates and type of each object area and inputs the decided information into the first data processing device 200, the burden on the operator is heavy. In particular, when a plurality of label sheets 800 and 800e each contain a plurality of objects as in the embodiments of FIGS. It's not easy. In this embodiment, the processor 210 can generate appropriate correspondence data for the label sheets 800, 800e without the operator determining the coordinates and types of the object areas. Therefore, the burden on the operator is greatly reduced.
  • processor 210 may compute the variance of the component values for each color component. Processor 210 may then determine whether a second condition is satisfied that all variances of all color components are greater than or equal to a variance threshold. Processor 210 may transition to S260 if the second condition is met, and to S250 if the second condition is not met. Processor 210 may also determine the type of object region from a larger number of types, such as the example of FIG. 8, by analyzing the image in more detail.
  • the configuration of the classification model for classifying the types of object regions may be various other configurations that can indicate the correspondence between image data and types instead of the configuration of FIG.
  • a classification model may consist of multiple fully connected layers.
  • the first object area searched in S510 and the second object area searched in S530 are replaced with "CE mark" and "character string representing country of manufacture".
  • the first object area may be the 'GS mark' and the second object area may be the 'explanatory note explaining precautions based on laws and regulations'.
  • the inspection condition associated with the second object area may be any condition.
  • defects allowed by inspection conditions associated with the second object region may be smaller than defects allowed by inspection conditions associated with the first object region.
  • the object area information D1b of the correspondence data D1 may be any information defining the object area in the captured image instead of the coordinates D1b1 and D1b2.
  • the object area information D1b may indicate the coordinates of the center of the object area, the length of the object area in the first direction Dx, and the length of the object area in the second direction Dy.
  • the object area information D1b it is possible to employ various types of information that define the part included in the object area and the part not included in the object area in the captured image.
  • condition information D1c may be any information indicating inspection conditions instead of the identification number of the type of object area.
  • condition information D1c may indicate the reference value Vx. It can be said that the identification number of the type of object area indicates the identification number of the inspection condition.
  • the inspection process may be various processes for inspecting an object including a plurality of objects (for example, label sheets 800 and 800e) instead of the processes in FIGS.
  • the calculation formula for the difference Vd may be various calculation formulas for calculating the evaluation value of the difference between the target object image and the reference image corresponding to the target object region.
  • the difference Vd may be the total number of different color pixels, which are pixels exhibiting a color value difference equal to or greater than a predetermined reference value when comparing the color values of each pixel between the two images.
  • the difference in color values can be different values, the greater the difference in visual color.
  • the color value difference may be the sum of the three absolute values of the three RGB differences.
  • the difference Vd may be the ratio of different-color pixels to all pixels of the image.
  • the difference Vd may be various values indicating the magnitude of the visual difference between the image of the object of interest and the reference image.
  • the total number L of inspection conditions applied to the type 1 label sheet 800 may be any integer between 1 and K (K is the total number of objects included in the type 1 label sheet 800). . When L is 2 or more, a plurality of inspection conditions are used for inspection, so appropriate inspection of the first type label sheet 800 is possible.
  • the total number of objects K may be any integer greater than or equal to one.
  • the first type label sheet 800 can express various information using a plurality of objects.
  • the total number U of inspection conditions applied to the type 2 label sheet 800e may be any integer between 1 and T (T is the total number of objects included in the type 2 label sheet 800e). . When U is 2 or more, a plurality of inspection conditions are used for inspection, so appropriate inspection is possible.
  • the total number T of objects may be any integer greater than or equal to one.
  • the second type label sheet 800e can represent various information using a plurality of objects.
  • U may be different from L.
  • T can be different from K.
  • the numbers K, L, T, U are predetermined.
  • the L reference values corresponding to the L inspection conditions may be various values.
  • the two reference values Va1 and Va5 corresponding to the two inspection conditions are the smallest reference values (that is, the reference values that are most difficult to satisfy).
  • a plurality of reference values (eg, Va2, Va4) corresponding to a plurality of inspection conditions may be the largest reference value (that is, the reference value that is most likely to be satisfied).
  • multiple reference values for multiple inspection conditions may be the same.
  • the L reference values for the L inspection conditions may differ from each other.
  • the U reference values corresponding to the U inspection conditions may also be various values.
  • Various types of object regions may be associated with inspection conditions.
  • the types of object areas are one or more of the following: "first type including marks provided based on standards or laws", "second type including photographs”, and “third type including characters”. may contain. Also, the object area type may include a "fourth type including one or both of a photograph”.
  • Normalized difference Vd is preferably used.
  • the difference Vd is the average value of the sum of the differences of all pixels, and the effect of size on the difference Vd is mitigated. Therefore, if the difference Vd is the same, the inspection result based on the first inspection condition is a pass, and if the inspection result based on the second inspection condition is a failure, the second inspection condition is the same as the first is more difficult to satisfy than the inspection condition of
  • the object detection model may be any other model instead of the YOLO model.
  • the object detection model may be, for example, an improved YOLO model such as "YOLO v3".
  • Other models may also be used, such as SSD, R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN.
  • Objects to be inspected are not limited to label sheets affixed to products (for example, multifunction devices, sewing machines, cutting machines, mobile terminals, etc.), but may be any object including one or more objects.
  • the object may be a label image printed directly on the product.
  • the object may be any part of the product, such as a tag attached to the product, an accessory, or the like.
  • objects included in the target object are not limited to objects represented by two-dimensional images such as marks and character strings, and may include three-dimensional objects having three-dimensional shapes. Such objects can also be inspected using captured image data.
  • the color components of the image data used for generating the correspondence data are not limited to the three RGB color components, and may be any color. can be a component.
  • monochrome image data representing only luminance values may be used.
  • image data of four color components of CMYK may be used.
  • a generating device that executes the generating process may be a device of a different type from a personal computer (eg, the data processing device 200 (FIG. 1)) (eg, a digital camera , scanners, smartphones, servers).
  • a plurality of devices for example, computers
  • computers that can communicate with each other via a network may share the functions of the generation processing and provide the functions of the generation processing as a whole (these devices may be The system with which it is provided corresponds to the generator).
  • the same applies to an inspection device that executes inspection processing for example, the inspection processing in FIG. 7). Also, the same device may perform both the generation process and the inspection process.
  • part of the configuration implemented by hardware may be replaced with software, or conversely, part or all of the configuration implemented by software may be replaced with hardware. good too.
  • the decision processing of FIG. 6 may be implemented by a dedicated hardware circuit.
  • the program when part or all of the functions of the present invention are realized by a computer program, the program is provided in a form stored in a computer-readable recording medium (for example, a non-temporary recording medium). be able to.
  • the program can be used while being stored in the same or different recording medium (computer-readable recording medium) as when it was provided.
  • “Computer-readable recording medium” is not limited to portable recording media such as memory cards and CD-ROMs, but also internal storage devices such as various ROMs in computers, and hard disk drives that are connected to computers. An external storage device may also be included.
  • DESCRIPTION OF SYMBOLS 110 Digital camera, 190... Support base, 191... Upper surface, 200... First data processing device, 210... Processor, 215... Storage device, 220... Volatile storage device, 230... Non-volatile storage device, 231... Generation program, 240... Display unit, 250... Operation unit, 270... Communication interface, 300... Second data processing device, 310... Processor, 315... Storage device, 320... Volatile storage device, 330... Non-volatile storage device, 331... Inspection program , 340 Display unit 350 Operation unit 370 Communication interface 900 MFP 901 First side surface 909 Bottom surface 1000 Data processing system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

検査用のデータを適切に生成する。K個(Kは、1以上の整数)のオブジェクトを含み外観の異常の無い第1種対象物の第1撮影画像を表す第1撮影画像データから、訓練済の物体検出モデルを使用して、K個のオブジェクトに対応するK個のオブジェクト領域を検出する。K個のオブジェクト領域にそれぞれ対応するK個の対応関係を示す第1対応関係データを生成する。K個の対応関係のそれぞれは、第1種対象物の撮影画像内のオブジェクト領域を定める情報であるオブジェクト領域情報と、検査条件を示す条件情報と、の対応関係を示す。条件情報は、L個(Lは、1以上、K以下の整数)の検査条件のうちオブジェクト領域の種類に対応付けられる検査条件を示す。第1対応関係データを記憶装置に格納する。

Description

コンピュータプログラム、生成装置、および、生成方法
 本明細書は、対象物の外観の検査用のデータに関する。
 従来から、撮影画像が種々の処理に利用されている。例えば、特許文献1は、車両前方の撮影画像を使用して自動運転のための物体認識を行う技術を提案している。撮影画像は、解像度が異なる複数の画像領域を含み得る。解像度が低い画像領域と他の画像領域とで異なる判定基準に基づいて物体の認識処理が行われる。
国際公開第2017/163606号
 撮影画像は、プリンタに設けられたラベルシートなどの種々の対象物の外観の検査に、使用され得る。対象物は、1以上のオブジェクト(例えば、文字列、マークなど)を含み得る。各オブジェクトの外観の異常が、検査され得る。ここで、オブジェクトは、撮影画像内の種々の位置に位置し得る。また、検査の適切な条件は、オブジェクトに応じて異なり得る。検査では、撮影画像内のオブジェクトの領域を定める情報(例えば、座標)と、検査の条件と、の対応関係を示すデータが、参照され得る。そのようなデータは、例えば、作業者によって生成される。作業者にとって、そのようなデータの生成は、大きな負担であった。
 本明細書は、検査用のデータを適切に生成する技術を開示する。
 本明細書に開示された技術は、以下の適用例として実現することが可能である。
[適用例1]対象物の外観の検査用のデータを生成するコンピュータのためのコンピュータプログラムであって、K個(Kは、1以上の整数)のオブジェクトを含み外観の異常の無い第1種対象物の第1撮影画像を表す第1撮影画像データから、訓練済の物体検出モデルを使用して、前記K個のオブジェクトに対応するK個のオブジェクト領域を検出する第1領域検出機能と、前記K個のオブジェクト領域にそれぞれ対応するK個の対応関係を示す第1対応関係データを生成する第1データ生成機能であって、前記K個の対応関係のそれぞれは、前記第1種対象物の撮影画像内のオブジェクト領域を定める情報であるオブジェクト領域情報と、検査条件を示す条件情報と、の対応関係を示し、前記条件情報は、L個(Lは、1以上、K以下の整数)の検査条件のうち前記オブジェクト領域の種類に対応付けられる検査条件を示す、前記第1データ生成機能と、前記第1対応関係データを記憶装置に格納する第1データ格納機能と、をコンピュータに実現させる、コンピュータプログラム。
 この構成によれば、第1種対象物の検査時にオブジェクト領域の検査条件の決定のために使用可能な第1対応関係データは、適切に、生成される。
 なお、本明細書に開示の技術は、種々の態様で実現することが可能であり、例えば、検査用のデータの生成方法および生成装置、検査用のデータを使用する検査方法および検査装置、それらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体(例えば、一時的ではない記録媒体)、等の形態で実現することができる。
一実施例としてのデータ処理システムを示す説明図である。 デジタルカメラ110と複合機900と支持台190との斜視図である。 (A)は、ラベルシートの例を示す概略図である。(B)は、撮影画像の例を示す概略図である。(C)は、オブジェクト領域の例を示す概略図である。 生成処理の例を示すフローチャートである。 対応関係データD1の例を示す概略図である。 オブジェクト種類決定処理の例を示すフローチャートである。 検査処理の例を示すフローチャートである。 オブジェクト種類決定処理の別の実施例を示すフローチャートである。 検査処理の別の実施例を示すフローチャートである。 オブジェクト種類決定処理の別の実施例を示すフローチャートである。 分類モデルの例を示す概略図である。 対応関係データD1の生成処理の別の実施例を示すフローチャートである。 ラベルシートの別の例を示す概略図である。 生成処理の例を示すフローチャートである。
A.第1実施例:
A1.装置構成:
 図1は、一実施例としてのデータ処理システムを示す説明図である。本実施例では、データ処理システム1000は、第1データ処理装置200と、第2データ処理装置300と、を備えている。データ処理装置200、300は、それぞれ、例えば、パーソナルコンピュータである。第1データ処理装置200は、対象物(例えば、複合機などの製品に設けられたラベルシート)の外観の検査で使用されるデータを生成する生成装置の例である。第2データ処理装置300は、対象物の外観を検査する検査装置の例である。以下、複合機900に設けられたラベルシート800の外観が検査されることとする。
 第1データ処理装置200は、プロセッサ210と、記憶装置215と、表示部240と、操作部250と、通信インタフェース270と、を備えている。これらの要素は、バスを介して互いに接続されている。記憶装置215は、揮発性記憶装置220と、不揮発性記憶装置230と、を含んでいる。
 プロセッサ210は、データ処理を行うように構成された装置であり、例えば、CPUである。揮発性記憶装置220は、例えば、DRAMであり、不揮発性記憶装置230は、例えば、フラッシュメモリである。不揮発性記憶装置230は、生成プログラム231と、物体検出モデルM1と、文字認識モジュールM2と、対応関係データD1と、を格納している。本実施例では、物体検出モデルM1と文字認識モジュールM2とは、それぞれ、プログラムモジュールである。物体検出モデルM1は、いわゆる機械学習モデルである。プロセッサ210は、生成プログラム231に従って、対応関係データD1を生成する。生成プログラム231と物体検出モデルM1と文字認識モジュールM2と対応関係データD1との詳細については、後述する。
 表示部240は、液晶ディスプレイ、有機ELディスプレイなどの、画像を表示するように構成された装置である。操作部250は、ボタン、レバー、表示部240上に重ねて配置されたタッチパネルなどの、ユーザによる操作を受け取るように構成された装置である。ユーザは、操作部250を操作することによって、種々の要求と指示を第1データ処理装置200に入力可能である。通信インタフェース270は、他の装置と通信するためのインタフェースである(例えば、USBインタフェース、有線LANインタフェース、IEEE802.11の無線インタフェース)。通信インタフェース270には、デジタルカメラ110が接続される。デジタルカメラ110は、複合機900のラベルシート800の撮影に使用される。
 第2データ処理装置300のハードウェア構成は、第1データ処理装置200のハードウェア構成と同じである。第2データ処理装置300は、第1データ処理装置200の要素210、215、220、230、240、250、270にそれぞれ対応する要素310、315、320、330、340、350、370を備えている。通信インタフェース370にはデジタルカメラ110が接続される。第2データ処理装置300の不揮発性記憶装置330は、検査プログラム331と、対応関係データD1と、基準画像データD2と、を格納している。対応関係データD1は、第1データ処理装置200によって生成され、第1データ処理装置200から第2データ処理装置300にコピーされる。基準画像データD2は、後述する検査処理で使用される。検査プログラム331と対応関係データD1と基準画像データD2との詳細については、後述する。
 図2は、デジタルカメラ110と複合機900と支持台190との斜視図である。支持台190は、複合機900を支持する。本実施例では、支持台190は、平らな上面191を形成している。上面191上には、複合機900の底面909が載せられる。複合機900の第1側面901には、ラベルシート800が貼られている。デジタルカメラ110は、ラベルシート800を撮影するように、配置される。
A2.ラベルシート:
 図3(A)は、ラベルシートの例を示す概略図である。図3(A)は、不具合の無いラベルシート800を示している。本実施例では、ラベルシート800は、ロゴタイプ810と、認証マーク820と、説明文830と、商標840と、第1文字列850と、写真860と、第2文字列870と、を表している。以下、ラベルシート800に含まれるオブジェクトの総数をKとする(本実施例では、K=7)。図中では、認証マーク820と説明文830と商標840と写真860との詳細の図示は、省略されている。認証マーク820は、例えば、CEマーク、GSマーク、FCCマークなど、規格または法律に基づいて設けられるマークである。このようなマークは、規格または法律に対する適合を示している。ここで、特定の規格に対する適合が、法律によって義務付けられよい。このような適合を示すマークも、規格または法律に基づいて設けられるマークの一種である。説明文830は、例えば、規格または法律に基づく注意事項を説明している。商標840は、例えば、複合機900の製造会社を示すマークを表している。第1文字列850は、モデル番号を表している。写真860は、例えば、複合機900を操作するユーザを表している。第2文字列870は、製造国を表しており、「MADE IN」の文字列を含んでいる。このように、ラベルシート800は、種々の種類のオブジェクトを含んでいる。
 本実施例では、デジタルカメラ110(図1)によって撮影されるラベルシート800の撮影画像を使用して、ラベルシート800が検査される。図3(B)は、撮影画像の例を示す概略図である。撮影画像700は、第1方向Dxに平行な2辺と、第1方向Dxに垂直な第2方向Dyに平行な2辺と、を有する矩形状の画像である。撮影画像700は、第1方向Dxと第2方向Dyとに沿ってマトリクス状に並ぶ複数の画素のそれぞれの色値によって、表されている。本実施例では、色値は、R(赤)、G(緑)、B(青)の3個の成分値で表されており、各成分値は、例えば、0から255までの256段階で表されている。図中の撮影画像700は、不具合の無いラベルシート800を表している。
 本実施例では、ラベルシート800の検査において、オブジェクト810-870の外観のそれぞれが正常であるか否かが判断される。オブジェクトは、欠け、変形、汚れなどの種々の不具合を、有し得る。不具合が小さい場合に、オブジェクトの外観が正常であると判断される。以下に説明するように、オブジェクトの外観が正常であると判断するための基準は、オブジェクトの種類に応じて異なり得る。
 ロゴタイプ810、第1文字列850、第2文字列870などの比較的少数の文字を表す文字画像に関しては、不具合が小さい場合には、ユーザは、文字画像の全体から正しい情報を読み取ることができる。例えば、一部の文字が読みにくい場合であっても、ユーザは、文字画像の全体から、正しい情報を読み取ることができる。このような小さい不具合は、許容されてよい。
 説明文830などの比較的多数の文字を表す文字画像は、重要な情報を表す場合がある。この場合、文字画像が正しい情報を明確に表すことが好ましい。従って、比較的少数の文字で構成される文字画像に許容される不具合と比べて、許容される不具合が小さいことが好ましい。例えば、一部の文字を読みにくくする不具合は、許容されないことが好ましい。
 商標840などの単純なイラストレーションに関しては、不具合が小さい場合には、ユーザは、画像の全体から正しい情報を読み取ることができる。例えば、イラストレーションの一部が不具合を有する場合であっても、ユーザは、イラストレーションの全体から、正しい情報を読み取ることができる。このような小さい不具合は、許容されてよい。
 認証マーク820に関しては、ラベルシート800が正しいマークを表すことが好ましい。マークの形状を正しい形状と異ならせるような不具合は、許容されないことが好ましい。
 写真860や複雑なイラストレーションのように複雑な形状と多数の色とを表す画像に関しては、不具合は、目立ちにくい。従って、他の種類のオブジェクトと比べて、許容される不具合が大きくてよい。
 このように、検査の好ましい基準は、オブジェクト領域の種類に応じて異なり得る。オブジェクト領域とオブジェクト領域の種類(より一般的には、検査の基準)との対応関係は、作業者によって決定され得る。ところが、複数のオブジェクト810-870がラベルシート800に含まれる場合、対応関係を決定するための負担は大きい。本実施例では、第1データ処理装置200(図1)は、撮影画像データを使用して、対応関係を示す対応関係データD1を生成する。
A3.生成処理:
 図4は、生成処理の例を示すフローチャートである。データ処理装置200(図1)は、生成処理を実行することによって、対応関係データD1を生成する。図5は、対応関係データD1の例を示す概略図である。対応関係データD1は、オブジェクト番号D1aと、オブジェクト領域情報D1bと、オブジェクト種類D1cと、の対応関係を示している。オブジェクト番号D1aは、ラベルシート800(図3(A))に含まれる複数のオブジェクト810-870のそれぞれの識別番号である。オブジェクト領域情報D1bは、撮影画像(例えば、撮影画像700(図3(B))内のオブジェクトを表す領域であるオブジェクト領域を定める情報である。本実施例では、オブジェクト領域は、第1方向Dxに平行な2辺と第2方向Dyに平行な2辺とで囲まれる矩形領域である。そして、オブジェクト領域情報D1bは、矩形の左上の角の座標D1b1と、矩形の右下の角の座標D1b2と、の組み合わせを示している。各座標D1b1、D1b2は、画素の位置を示している。オブジェクト種類D1cは、オブジェクト領域の種類の識別番号を示している。後述するように、オブジェクト種類D1cは、検査条件を示している(オブジェクト種類D1cを、条件情報D1cとも呼ぶ)。
 作業者は、図2に示すように、複合機900とデジタルカメラ110とを配置する。複合機900には、不具合の無いラベルシート800が、貼られている。作業者は、デジタルカメラ110を第1データ処理装置200(図1)の通信インタフェース270に接続する。そして、作業者は、操作部250を操作することによって、生成処理の開始の指示を入力する。指示に応じて、プロセッサ210は、生成プログラム231に従って、図4の生成処理を実行する。
 S110では、プロセッサ210は、撮影指示を、デジタルカメラ110に供給する。デジタルカメラ110は、指示に応じて、ラベルシート800を撮影し、撮影画像を表す画像データを生成する。S120では、プロセッサ210は、デジタルカメラ110から画像データを取得する。以下、撮影画像を表す画像データを、撮影画像データと呼ぶ。本実施例では、生成処理と後述する検査処理とで使用される撮影画像データの画像サイズ(具体的には、第1方向Dx(図3(B))の画素数と、第2方向Dyの画素数)は、予め決められている(処理画像サイズと呼ぶ)。プロセッサ210は、デジタルカメラ110から取得される画像データに対して、ラベルシート800を表す部分を切り出すトリミング処理、解像度変換処理などの種々の画像処理を実行することによって、ラベルシート800を表す処理画像サイズの撮影画像データを取得する。予め決められた領域のトリミング処理によってラベルシート800の領域が抽出されるように、複合機900とデジタルカメラ110との配置が調整されることが好ましい。これに代えて、プロセッサ210は、ラベルシート800の領域を検出し(例えば、パターンマッチング)、検出したラベルシート800の領域を抽出するように、トリミング処理を実行してよい。以下、撮影画像データが、図3(B)の撮影画像700を表していることとする。
 S130では、プロセッサ210は、訓練済の物体検出モデルM1を使用して、撮影画像からK個(本実施例では、K=7)のオブジェクト810-870のそれぞれのオブジェクト領域を検出する。物体検出モデルM1としては、種々のオブジェクト検出モデルを採用可能である。本実施例では、物体検出モデルM1は、YOLO(You only look once)と呼ばれるオブジェクト検出モデルである。YOLOは、例えば、論文「Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi, "You Only Look Once: Unified, Real-Time Object Detection", Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 779-788」に開示されている。
 YOLOモデルは、畳込ニューラルネットワークを使用して、バウンディングボックスと呼ばれるオブジェクトを含む矩形の枠と、ボックスがオブジェクトを含むことの確信度と、ボックスがオブジェクトを含む場合のオブジェクトの種類毎の確率(クラス確率とも呼ぶ)と、を予測する。ボックスに囲まれる領域が検出すべきオブジェクトを表す場合、大きい確信度が算出される。ボックスに囲まれる領域が検出すべきオブジェクトを表していない場合、小さい確信度が算出される。閾値以上の確信度を有するボックスは、検出されたオブジェクトを表すボックスとして使用される。閾値未満の確信度を有するボックスは、検出されたオブジェクトを表していないボックスとして、扱われる。確信度の閾値は、予め決められている。これに代えて、確信度の閾値は、物体検出モデルM1の訓練の結果に基づいて調整されてよい。ボックスに対応付けられる複数種類のクラス確率のうち、最も大きいクラス確率が、ボックスに囲まれるオブジェクトの種類を示している。物体検出モデルM1からの出力データは、物体検出モデルM1に入力される画像データに基づくバウンディングボックスと確信度とクラス確率との複数の組み合わせを示している。
 図3(C)は、物体検出モデルM1によって検出されるオブジェクト領域の例を示す概略図である。図中には、撮影画像700(図3(B))の画像データが物体検出モデルM1に入力される場合の例が示されている。図示するように、物体検出モデルM1は、オブジェクト810-870をそれぞれ囲むバウンディングボックスBB1-BB7を検出する。本実施例では、物体検出モデルM1は、ラベルシート800に含まれる7種類のオブジェクト810-870のそれぞれの領域を検出するように、予め訓練されている。
 各バウンディングボックスBB1-BB7には、クラス識別子CL1-CL7が、それぞれ対応付けられている。第1クラス識別子CL1は、第1バウンディングボックスBB1の最も大きいクラス確率に対応付けられる種類を示している。本実施例では、第1クラス識別子CL1は、ロゴタイプ810を示している。他のバウンディングボックスBB2-BB7のクラス識別子CL2-CL7も、同様に、最も大きいクラス確率に対応付けられる種類を示している。本実施例では、クラス識別子CL2-CL7は、オブジェクト820-870を、それぞれ示している。このように、物体検出モデルM1は、7種類のオブジェクト810-870を検出する。
 物体検出モデルM1の訓練には、オブジェクト810-870の画像を含む複数の画像の画像データが使用される。訓練用のプロセッサ(例えば、プロセッサ210)は、画像データを使用して、物体検出モデルM1の演算を実行することによって、出力データを生成する。そして、訓練用のプロセッサは、出力データが、正解のデータに近づくように、物体検出モデルM1の複数の演算パラメータを調整する。例えば、オブジェクト810の画像を含む画像の画像データが、物体検出モデルM1に入力される。この場合、オブジェクト810を囲むバウンディングボックスと、そのバウンディングボックスに関連する大きい確信度と、そのバウンディングボックスに対応付けられたクラス確率であってオブジェクト810を示す大きいクラス確率とを、出力データが示すように、物体検出モデルM1の複数の演算パラメータが調整される。他のオブジェクト820-870についても、同様に、物体検出モデルM1の複数の演算パラメータが調整される。
 演算パラメータの調整方法は、種々の方法であってよい。本実施例では、損失関数を使用して算出される損失が小さくなるように、物体検出モデルM1の複数の演算パラメータが調整される。損失関数は、出力データと、物体検出モデルM1に入力される画像データに対応付けられる正解のデータと、の間の差の評価値を算出する種々の関数であってよい。本実施例では、YOLOの上記の論文に開示されている損失関数が使用される。また、複数の演算パラメータを調整するためのアルゴリズムとしては、例えば、誤差逆伝播法と勾配降下法とを使用したアルゴリズムが採用されてよい。ここで、いわゆるAdamの最適化が行われてよい。なお、正解のデータは、作業者によって、予め生成される。
 S130(図4)では、プロセッサ210は、撮影画像700の画像データを使用して、訓練済の物体検出モデルM1(図1)の演算を実行することによって、出力データを生成する。生成される出力データは、図3(C)で説明したバウンディングボックスBB1-BB7を示している。
 S135では、プロセッサ210は、K個(本実施例では、K=7)のオブジェクト領域のそれぞれに関して、撮影画像データから、オブジェクト領域の画像を表すオブジェクト領域画像データを取得する。プロセッサ210は、取得したデータを、記憶装置215(例えば、不揮発性記憶装置230)に格納する。
 S140では、プロセッサ210は、対応関係データD1(図5)を初期化する。本実施例では、プロセッサ210は、空の対応関係データD1を生成する。
 S150では、プロセッサ210は、S130で検出されるK個のオブジェクト領域から、未処理のオブジェクト領域を、注目オブジェクト領域として選択する。
 S160では、プロセッサ210は、オブジェクト種類決定処理を実行する。この処理は、注目オブジェクト領域の種類を決定する処理である。図6は、オブジェクト種類決定処理の例を示すフローチャートである。
 S210では、プロセッサ210は、注目オブジェクト領域のオブジェクト領域画像データを使用して、各色成分毎のヒストグラムを生成する。本実施例では、RGBの3色成分の3個のヒストグラムが生成される。
 S220では、プロセッサ210は、ヒストグラムを使用して、各色成分のピーク値を算出する。ピーク値は、最も大きい頻度を示す成分値である。なお、ピーク値の算出からは、背景色範囲が除かれてもよい。背景色範囲は、例えば、黒色に対応する色範囲(ゼロを含む色範囲)、または、白色に対応する色範囲(255を含む色範囲)であってよい。背景色範囲は、予め決められてよい。これに代えて、プロセッサ210は、撮影画像を分析することによって背景色値を決定し、決定された背景色値を含む背景色範囲を決定してよい。
 S230では、プロセッサ210は、ピーク値がピーク閾値未満であるか否かを判断する。ピーク値は、オブジェクト領域の種類に応じて、異なり得る。例えば、注目領域画像が、写真や複雑なイラストレーションなどのように、多数の色を表す場合、各成分値は、小さい値から大きい値までの広い範囲に分布する。この結果、ピーク値は、小さくなり得る。注目領域画像が、商標などの単純なイラストレーションや認証マークや文字列などのように、少数の色を表す場合、各色成分のピーク値は、通常は、オブジェクトの色を示している。オブジェクトの色は、赤、緑、青、黄などの大きな成分値を使用して表される色であり得る。この場合、1以上の色成分のピーク値は、大きくなり得る。このように、ピーク値を使用して、オブジェクト領域の種類を分類可能である。
 本実施例では、プロセッサ210は、全ての色成分の全てのピーク値がピーク閾値未満である、という第1条件が満たされるか否かを判断する。第1条件が満たされる場合(S230:Yes)、S260で、プロセッサ210は、注目オブジェクト領域の種類は第2画像種類であると判断し、図6の処理を終了する。第2画像種類は、写真と複雑なイラストレーションとを含む種類である。ピーク閾値は、写真と複雑なイラストレーションとを含む第2画像種類と、他の種類と、を分類できるように、予め実験的に決定される。
 第1条件が満たされない場合、すなわち、1以上の色成分のピーク値がピーク閾値以上である場合(S230:No)、S240で、プロセッサ210は、文字認識モジュールM2に従って、注目領域画像の文字認識処理を実行する。文字認識処理は、公知の種々の処理であってよい。例えば、Google社の「Tesseract OCR」と呼ばれる光学文字認識エンジンが、使用されてよい。これに代えて、予め準備された文字画像を使用するパターンマッチングが、使用されてよい。
 S250では、プロセッサ210は、S240で注目領域画像から文字が認識されたか否かを判断する。文字が認識される場合(S250:Yes)、S280で、プロセッサ210は、注目オブジェクト領域の種類は、文字種類であると判断し、図6の処理を終了する。文字種類は、文字を表すオブジェクト領域の種類であり、ロゴタイプ、文章、文字を含む種類である。
 S240で文字が認識されない場合(S250:No)、S270で、プロセッサ210は、注目オブジェクト領域の種類は、第1画像種類であると判断し、図6の処理を終了する。第1画像種類は、法律または規格に基づいて設けられるマーク(認証マーク、法令マーク、規格マークなど)と、アイコン画像や商標などの単純なイラストレーションと、を含む種類である。
 以上のように、図6のオブジェクト種類決定処理では、プロセッサ210は、注目領域画像を予め決められたルールに基づいて分析することによって、注目オブジェクト領域の種類を決定する。プロセッサ210は、注目オブジェクト領域の種類を、第1画像種類と第2画像種類と文字種類との3個の種類のいずれかに決定する。
 オブジェクト種類決定処理、すなわち、図4のS160の後、S170で、プロセッサ210は、注目オブジェクト領域の対応関係を示すデータを、対応関係データD1(図5)に追加する。オブジェクト番号D1aは、1番から昇順に割り当てられる。オブジェクト領域情報D1bは、注目オブジェクト領域を示すバウンディングボックスの角の座標を示している。オブジェクト種類D1cは、S160で決定されたオブジェクト領域の種類を示している(例えば、1番は、第1画像種類を示し、2番は、第2画像種類を示し、3番は、文字種類を示している)。
 S180では、プロセッサ210は、全てのオブジェクト領域が処理されたか否かを判断する。未処理のオブジェクト領域が残っている場合(S180:No)、プロセッサ210は、S150へ移行して、未処理のオブジェクト領域を処理する。全てのオブジェクト領域の処理が終了した場合(S180:Yes)、S190で、プロセッサ210は、対応関係データD1を記憶装置215(例えば、不揮発性記憶装置230)に格納し、図4の処理を終了する。以上の生成処理により生成される対応関係データD1は、ラベルシート800(図3(A))の全てのオブジェクト810-870の対応関係を示している。
A4.検査処理:
 図7は、検査処理の例を示すフローチャートである。第2データ処理装置300(図1)は、検査処理を実行することによって、複合機900(図2)のラベルシート800を検査する。検査処理では、プロセッサ310(図1)は、対応関係データD1と基準画像データD2とを使用する。作業者は、図4の処理で生成された対応関係データD1を、第1データ処理装置200の不揮発性記憶装置230から第2データ処理装置300の不揮発性記憶装置330に、コピーする。基準画像データD2は、不具合の無いオブジェクト810-870のそれぞれの画像である基準画像の画像データで構成されている。基準画像の構成は、対応するオブジェクト領域のオブジェクト領域情報D1b(図5)によって定められるオブジェクト領域画像の構成と、同じである。例えば、第1方向Dxの画素数と、第2方向Dyの画素数と、各画素の色値の色成分とは、基準画像とオブジェクト領域画像との間で同じである。作業者は、予め、不具合の無いラベルシート800の撮影画像データを使用して、基準画像データD2を生成する。これに代えて、第1データ処理装置200のプロセッサ210は、図4のS135で取得した各オブジェクト領域のオブジェクト領域画像データを使用して、基準画像データD2を生成してよい。
 また、作業者は、図2に示すように、検査対象の複合機900とデジタルカメラ110とを配置する。複合機900のラベルシート800は、不具合を有し得る。作業者は、デジタルカメラ110を第2データ処理装置300(図1)の通信インタフェース370に接続する。そして、作業者は、操作部350を操作することによって、検査処理の開始の指示を入力する。指示に応じて、プロセッサ310は、検査プログラム331に従って、検査処理を実行する。
 S310、S320は、図4のS110、S120と、それぞれ同じである。プロセッサ310は、デジタルカメラ110からの画像データを使用して、ラベルシート800の撮影画像データを取得する。
 S330では、プロセッサ310は、対応関係データD1(図5)のオブジェクト領域情報D1bを参照する。プロセッサ310は、対応関係データD1によって定められるK個のオブジェクト領域のそれぞれに関して、撮影画像データから、オブジェクト領域の画像を表すオブジェクト領域画像データを取得する。
 S350では、プロセッサ310は、K個のオブジェクト領域から、未処理のオブジェクト領域を、注目オブジェクト領域として選択する。
 S360では、プロセッサ310は、注目オブジェクト領域の画像(注目オブジェクト画像と呼ぶ)と、注目オブジェクト領域に対応する基準画像と、の間の差Vdを算出する。基準画像は、基準画像データD2によって表される画像であり、不具合の無いオブジェクトの画像である。差Vdは、注目オブジェクト画像と基準画像との間の差を示す種々の値であってよい。本実施例では、プロセッサ310は、以下のように、差Vdを算出する。プロセッサ310は、注目オブジェクト画像と基準画像との間のRGBの3個の成分値の3個の差分の3個の絶対値を、画素毎に算出する。プロセッサ310は、RGBの3個の差分の3個の絶対値の合計値である差分合計値を、画素毎に算出する。プロセッサ310は、注目オブジェクト領域の全ての画素の差分合計値の平均値を、差Vdとして算出する。このような差Vdは、注目オブジェクト画像と基準画像との間で異なる部分が大きいほど、大きい。なお、差Vdは、上記の値に代えて、RGBのそれぞれの差分を使用するL2ノルムなど、注目オブジェクト画像と基準画像との間の差を示す種々の値であってよい。
 S370では、プロセッサ310は、対応関係データD1を参照し、注目オブジェクト領域のオブジェクト種類D1cを取得する。そして、プロセッサ310は、検査のための条件を示す基準値Vxを、オブジェクト種類D1cに予め対応付けられた値に設定する(S371、S372、S373)。オブジェクト種類D1cと基準値Vxとの対応関係は、以下の通りである。
 第1画像種類:Vx=Vx1
 第2画像種類:Vx=Vx2
 文字種類  :Vx=Vx3
 これらの値Vx1、Vx2、Vx3は、注目オブジェクト領域のオブジェクトの画像が許容すべきでない不具合を有する場合に、差Vdが基準値Vx以上であるように、予め実験的に決定される。本実施例では、Vx2>Vx3>Vx1である。認証マークを含む第1画像種類の第1基準値Vx1は、比較的小さい差Vdを許容し、写真を含む第2画像種類の第2基準値Vx2は、比較的大きい差Vdを許容する。文字種類の第3値Vx3は、それらの間の値である。
 S380では、プロセッサ310は、差Vdが基準値Vx未満であるか否かを判断する。差Vdが基準値Vx以上である場合(S380:No)、検査結果は不合格である。この場合、S410で、プロセッサ310は、不合格の検査結果を示す情報を、表示部340に表示する。そして、プロセッサ310は、図7の処理を終了する。
 差Vdが基準値Vx未満である場合(S380:Yes)、検査結果は合格である。この場合、S390で、プロセッサ310は、全てのオブジェクト領域が処理されたか否かを判断する。未処理のオブジェクト領域が残っている場合(S390:No)、プロセッサ310は、S350へ移行して、未処理のオブジェクト領域を処理する。全てのオブジェクト領域の検査結果が合格である場合(S390:Yes)、S400で、プロセッサ310は、合格の検査結果を示す情報を、表示部340に表示する。そして、プロセッサ310は、図7の処理を終了する。
 なお、S400、S410の処理は、検査結果に対応付けられる任意の処理であってよい。例えば、プロセッサ310は、検査結果を示す検査結果データを記憶装置315(例えば、不揮発性記憶装置330)に格納してよい。このように、プロセッサ310は、検査結果データを記憶装置または表示装置に出力する出力処理を実行してよい。
 以上のように、本実施例では、第1データ処理装置200(図1)のプロセッサ210は、図4の生成処理で、対象物の例であるラベルシート800の外観の検査用の対応関係データD1を生成する。S130では、プロセッサ210は、K個(本実施例では、K=7)のオブジェクトを含み外観の異常の無いラベルシート800の撮影画像を表す撮影画像データから、訓練済の物体検出モデルM1を使用して、K個のオブジェクト810-870に対応するK個のオブジェクト領域(本実施例では、バウンディングボックスBB1-BB7に囲まれる領域)を検出する。S135-S180では、プロセッサ210は、K個のオブジェクト領域にそれぞれ対応するK個の対応関係を示す対応関係データD1(図5)を生成する。図5に示すように、K個の対応関係のそれぞれは、オブジェクト領域情報D1bとオブジェクト種類D1c(すなわち、条件情報D1c)との対応関係を示している。オブジェクト領域情報D1b(本実施例では、座標D1b1、D1b2)は、ラベルシート800の撮影画像内のオブジェクト領域を定める情報の例である。また、図7のS370で説明したように、条件情報D1cは、L個(本実施例では、L=3)の検査条件(具体的には、基準値Vx1、Vx2、Vx3)のうちオブジェクト領域の種類に対応付けられる検査条件を示している。このように、オブジェクト種類D1cは、検査条件を示す条件情報の例である。そして、図4のS190では、プロセッサ210は、対応関係データD1を記憶装置215に格納する。
 この構成によれば、ラベルシート800の検査時(図7)にオブジェクト領域の検査条件(ここでは、基準値Vx)の決定のために使用される対応関係データD1は、適切に、生成される。仮に、作業者が、各オブジェクト領域の座標と種類とを示す情報を決定し、決定した情報を第1データ処理装置200に入力する場合、作業者の負担は大きい。特に、図3(A)の実施例のようにラベルシート800が複数のオブジェクトを含む場合、複数のオブジェクトのそれぞれの正しい対応関係を決定することは、作業者によって容易ではない。本実施例では、作業者がオブジェクト領域の座標と種類とを決定しなくても、プロセッサ210は、適切な対応関係データD1を生成できる。従って、作業者の負担は、大幅に軽減される。
 また、図6で説明したように、対応関係データD1を生成する処理において、プロセッサ210は、オブジェクト領域の画像を予め決められたルールに基づいて分析することによって、オブジェクト領域の種類(ここでは、オブジェクト種類D1c)を決定する。プロセッサ210は、予め決められたルールに基づいて、適切な対応関係データD1を生成できる。
 また、本実施例では、図7で説明したように、検査条件を示す基準値Vxは、オブジェクト領域の種類に応じて、3個の値Vx1、Vx2、Vx3のいずれかに設定される。すなわち、検査条件の総数Lは、2以上の値である3である。図7のS360では、プロセッサ310は、差Vdを算出する。差Vdは、検査用の撮影画像中のオブジェクト領域情報D1b(図5)によって示される領域の画像である注目オブジェクト画像と、オブジェクト領域情報D1bに予め対応付けられる異常の無いオブジェクトの画像である基準オブジェクト画像と、の間の差を示している。そして、図7のS380で説明したように、L個の検査条件(すなわち、L個の基準値Vx1、Vx2、Vx3)は、それぞれ、差Vdが、注目オブジェクト画像によって表されるオブジェクトの外観が正常であることを示すと判断するための条件である。ここで、比較的大きい第1基準値Vx1は、比較的大きな差Vdを許容し、比較的小さい第2基準値Vx2は、比較的小さい差Vdを許容する。第3基準値Vx3は、それらの間の値である。このように、L個の検査条件は、外観が正常であることを差Vdが示すと判断されるための互いに異なる基準(本実施例では、互いに異なる基準値Vx1、Vx2、Vx3)を示す複数の検査条件を含んでいる。このように、本実施例では、オブジェクト領域の種類に対応付けられた適切な検査条件に従って各オブジェクトの領域が検査されるので、ラベルシート800の適切な検査が可能である。そして、図4の生成処理では、プロセッサ210は、このような検査で参照される対応関係データD1を、適切に生成できる。
 図6に示すように、オブジェクト領域の種類は、規格または法律に基づいて設けられるマークを含む第1画像種類を含むL個の種類のうちのいずれかである。そして、図7のS370で説明したように、第1画像種類に対応付けられる第1基準値Vx1は、L個の種類に対応付けられるL個の基準値Vx1、Vx2、Vx3のうち、最も小さい。すなわち、第1画像種類に対応付けられる検査条件によって示される基準(ここでは、第1基準値Vx1)は、L個の種類に対応付けられるL個の検査条件によって示されるL個の基準(ここでは、基準値Vx1、Vx2、Vx3)のうち、最も満たされ難い基準である。従って、規格または法律に基づいて設けられるマークが不具合を有する場合に、そのマークの差Vdが外観の異常を示さないと誤って判断される可能性は、低減される。
 また、図6に示すように、オブジェクト領域の種類は、写真を含む第2画像種類を含むL個の種類のうちのいずれかである。そして、図7のS370で説明したように、第2画像種類に対応付けられる第2基準値Vx2は、L個の種類に対応付けられるL個の基準値Vx1、Vx2、Vx3のうち、最も大きい。すなわち、第2画像種類に対応付けられる検査条件によって示される基準(ここでは、第2基準値Vx2)は、L個の種類に対応付けられるL個の検査条件によって示されるL個の基準(ここでは、基準値Vx1、Vx2、Vx3)のうち、最も満たされ易い基準である。従って、写真の不具合が許容すべき小さい不具合である場合に、その写真の差Vdが外観の異常を示していると判断される可能性は、低減される。
 また、オブジェクト領域の種類は、文字を含む文字種類と、写真を含む第2画像種類と、を含むL個の種類のうちのいずれかである。そして、図7のS370で説明したように、文字種類に対応付けられる第3基準値Vx3は、第2画像種類に対応付けられる第2基準値Vx2よりも、小さい。すなわち、文字種類に対応付けられる検査条件によって示される基準(ここでは、第3基準値Vx3)は、第2画像種類に対応付けられる検査条件によって示される基準(ここでは、第2基準値Vx2)と比べて、満たされ難い。従って、不具合を有する文字の差Vdが外観の異常を示さないと誤って判断される可能性が低減される。そして、写真の不具合が許容すべき小さい不具合である場合に、写真の差Vdが外観の異常を示すと判断される可能性が低減される。
B.第2実施例:
 図8は、オブジェクト種類決定処理の別の実施例を示すフローチャートである。第1データ処理装置200(図1)のプロセッサ210は、図4のS160で、図6の処理の代わりに図8の処理を実行する。本実施例では、プロセッサ210は、図4のS130で物体検出モデルM1によって決定されるオブジェクト領域の種類を使用して、検査条件に対応付けられるオブジェクト領域の種類(すなわち、オブジェクト種類D1c(図5))を決定する。図8の例では、プロセッサ210は、オブジェクト種類D1cを、以下の5個の種類のいずれかに決定する。
 第1画像種類:法律または規格に基づいて設けられるマークを含む種類
 第2画像種類:写真と複雑なイラストレーションを含む種類
 第3画像種類:単純なイラストレーションを含む種類
 第1文字種類:ロゴタイプなどの比較的少数の文字で構成される文字画像を含む種類
 第2文字種類:説明文などの比較的多数の文字で構成される文字画像を含む種類
 物体検出モデルM1によって決定される種類と、オブジェクト種類D1cと、の対応関係は、予め決められる。本実施例では、以下の通りである。
 ロゴタイプ810 :第1文字種類
 認証マーク820 :第1画像種類
 説明文830   :第2文字種類
 商標840    :第3画像種類
 第1文字列850 :第1文字種類
 写真860    :第2画像種類
 第2文字列870 :第1文字種類
 S210aでは、プロセッサ210は、上記の対応関係に従って、オブジェクト種類D1cを決定する。そして、プロセッサ210は、図8の処理を終了する。
 図9は、検査処理の別の実施例を示すフローチャートである。図7の実施例との差異は、図7のS370が、図9のS370aに置換されている点だけである。検査処理の他の部分の処理は、図7の対応する部分の処理と同じである(同じ部分については、図示と説明とを省略する)。
 S370aでは、第2データ処理装置300(図1)のプロセッサ310は、対応関係データD1を参照し、注目オブジェクト領域のオブジェクト種類D1cを取得する。そして、プロセッサ310は、検査のための条件を示す基準値Vxを、オブジェクト種類D1cに予め対応付けられた値に設定する(S371a-S375a)。オブジェクト種類D1cと基準値Vxとの対応関係は、以下の通りである。
 第1画像種類:Vx=Va1
 第2画像種類:Vx=Va2
 第3画像種類:Vx=Va3
 第1文字種類:Vx=Va4
 第2文字種類:Vx=Va5
 これらの値Va1-Va5は、注目オブジェクト領域のオブジェクトの画像が許容すべきでない不具合を有する場合に、差Vdが基準値Vx以上であるように、予め実験的に決定される。本実施例では、Va2>Va3=Va4>Va1=Va5である。認証マークを含む第1画像種類の第1基準値Va1と、説明文を含む第2文字種類の第5基準値Va5とは、5個の基準値のうちの最小値であり、比較的小さい差Vdを許容する。写真を含む第2画像種類の第2基準値Va2は、5個の基準値のうちの最大値であり、比較的大きい差Vdを許容する。商標を含む第3画像種類の第3基準値Va3と、ロゴタイプを含む第1文字種類の第4基準値Va4とは、それらの間の値である。
 以上のように、本実施例の生成処理は、以下の2点を除いて、第1実施例の生成処理(図4)と同じである。
(1)オブジェクト種類D1cの決定に物体検出モデルM1によって決定された種類が使用される。
(2)オブジェクト種類D1cの種類数が5である。
 従って、本実施例は、第1実施例と同じ種々の利点を有する。例えば、作業者がオブジェクト領域の座標と種類とを決定しなくても、プロセッサ210は、適切な対応関係データD1を生成できる。
 また、図8で説明したように、対応関係データD1を生成する処理において、プロセッサ210は、訓練済の物体検出モデルM1を使用することによって(図4:S130)、オブジェクト領域の種類(ここでは、オブジェクト種類D1c)を決定する。プロセッサ210は、物体検出モデルM1による検出結果を使用して、適切な対応関係データD1を生成できる。
 また、本実施例では、図9で説明したように、検査条件を示す基準値Vxは、オブジェクト領域の種類に応じて、5個の値Va1-Va5のいずれかに設定される。すなわち、検査条件の総数Lは、2以上の値である5である。そして、L個の検査条件は、外観が正常であることを差Vdが示すと判断されるための互いに異なる基準を示す複数の検査条件を含んでいる。本実施例では、以下の3個の基準値グループの間で、基準が異なっている。
(第1グループ)Va2
(第2グループ)Va3、Va4
(第3グループ)Va1、Va5
 このように、本実施例では、オブジェクト領域の種類に対応付けられた適切な検査条件に従って各オブジェクトの領域が検査されるので、ラベルシート800の適切な検査が可能である。そして、図4、図8の生成処理では、プロセッサ210は、このような検査で参照される対応関係データD1を、適切に生成できる。
 また、図8に示すように、オブジェクト領域の種類は、規格または法律に基づいて設けられるマークを含む第1画像種類を含むL個の種類のうちのいずれかである。そして、図9のS370aで説明したように、第1画像種類に対応付けられる第1基準値Va1は、L個の基準値Va1-Va5のうち、最も小さい。すなわち、第1画像種類に対応付けられる第1基準値Va1は、L個の種類に対応付けられるL個の基準値Va1-Va5のうち、最も満たされ難い基準値である。従って、規格または法律に基づいて設けられるマークが不具合を有する場合に、そのマークの差Vdが外観の異常を示さないと誤って判断される可能性は、低減される。なお、本実施例では、説明文を含む第2文字種類の第5基準値Va5は、第1基準値Va1と同じである。従って、説明文が不具合を有する場合に、その説明文の差Vdが外観の異常を示さないと誤って判断される可能性は、低減される。このように、複数の種類に対応する複数の基準値Va1、Va5が、最も小さい基準値(すなわち、最も満たされ難い基準値)であってよい。
 また、図8に示すように、オブジェクト領域の種類は、写真を含む第2画像種類を含むL個の種類のうちのいずれかである。そして、図9のS370aで説明したように、第2画像種類に対応付けられる第2基準値Va2は、L個の基準値Va1-Va5のうち、最も大きい。すなわち、第2画像種類に対応付けられる第2基準値Va2は、L個の基準値Va1-Va5のうち、最も満たされ易い基準値である。従って、写真の不具合が許容すべき小さい不具合である場合に、その写真の差Vdが外観の異常を示していると判断される可能性は、低減される。
 また、図8に示すように、オブジェクト領域の種類は、文字を含む第1文字種類および第2文字種類と、イラストレーションと写真との一方または両方を含む第2画像種類および第3画像種類と、を含むL個の種類のうちのいずれかである。そして、図9のS370aで説明したように、第1文字種類、第2文字種類に対応付けられる基準値Va4、Va5は、第2画像種類、第3画像種類に対応付けられる基準値Va2、Va3のいずれよりも小さい。すなわち、第1文字種類、第2文字種類に対応付けられる基準値Va4、Va5は、第2画像種類、第3画像種類に対応付けられる基準値Va2、Va3のいずれよりも、満たされ難い。従って、不具合を有する文字の差Vdが外観の異常を示さないと誤って判断される可能性が低減される。そして、許容すべき小さい不具合を有するイラストレーションの差Vd、または、許容すべき小さい不具合を有する写真の差Vdが、外観の異常を示すと判断される可能性が低減される。
C.第3実施例:
 図10は、オブジェクト種類決定処理の別の実施例を示すフローチャートである。第1データ処理装置200(図1)のプロセッサ210は、図4のS160で、図6の処理の代わりに図10の処理を実行する。本実施例では、プロセッサ210は、訓練済の分類モデルに注目オブジェクト領域の画像データを入力することによって、検査条件に対応付けられるオブジェクト領域の種類(すなわち、オブジェクト種類D1c(図5))を決定する。本実施例では、オブジェクト種類D1cは、図8の実施例と同様に、5個の種類のいずれかに決定される。そして、オブジェクト810-870と、オブジェクト種類D1cと、の対応関係は、図8の実施例の対応関係と同じであることとする。
 図11は、分類モデルの例を示す概略図である。本実施例では、分類モデルM3は、畳込ニューラルネットワークを形成するプログラムモジュールである。図示を省略するが、第1データ処理装置200の不揮発性記憶装置230には、訓練済の分類モデルM3のデータが、予め格納される。
 分類モデルM3は、p個(pは1以上の整数)の畳込層V31-V3pと、畳込層V31-V3pに続くq個(qは1以上の整数)の全結合層N31-N3qと、を有している(pは、例えば、2。qは、例えば、3)。p個の畳込層V31-V3pのうちの1以上の畳込層の直後には、プーリング層が設けられる。分類モデルM3は、分類モデルM3に入力される入力画像データM3iに基づいて、出力データM3oを生成する。出力データM3oは、オブジェクト領域の複数の種類のそれぞれの確信度を示している。最も大きい確信度に対応付けられる種類が、入力画像データM3iによって表されるオブジェクト領域の種類を示している。
 畳込層V31-V3pは、入力されるデータに対して、フィルタを使用する畳込処理と、バイアスの加算処理と、を含む処理を実行する。畳込層V31-V3pは、複数のフィルタの複数の重みと複数のバイアスとを含む演算パラメータのセットを、それぞれ有している。プーリング層は、直前の畳込層から入力されたデータに対して、データの次元数を削減する処理を実行する。本実施例では、プーリング層は、最大プーリングを行う。全結合層N31-N3qは、直前の層から入力されたデータの次元を削減する。全結合層N31-N3qは、複数の重みと複数のバイアスとを含む演算パラメータのセットを、それぞれ有している。
 畳込層V31-V3pと全結合層N31-N3qとのそれぞれによって生成されるデータは、活性化関数に入力されて変換される。本実施例では、最後の層(ここでは、全結合層N3q)には、Softmaxが使用され、他の層には、ReLUが使用される。
 分類モデルM3の訓練には、オブジェクト810-870のいずれかを表す複数の画像の画像データが使用される。訓練用のプロセッサ(例えば、プロセッサ210)は、画像データを使用して、分類モデルM3の各層V31-V3p、N31-N3qの演算を実行することによって、出力データM3oを生成する。そして、訓練用のプロセッサは、出力データM3oが、正解のデータに近づくように、分類モデルM3の複数の演算パラメータを調整する。例えば、ロゴタイプ810の画像の画像データが、分類モデルM3に入力される。ロゴタイプ810には、第1文字種類が対応付けられている。従って、出力データM3oによって示される第1文字種類の確信度が最も大きくなるように、分類モデルM3の複数の演算パラメータが調整される。他のオブジェクト820-870についても、同様に、オブジェクトに対応付けられるオブジェクト種類D1cの確信度が最も大きくなるように、分類モデルM3の複数の演算パラメータが調整される。
 演算パラメータの調整方法は、種々の方法であってよい。本実施例では、損失関数を使用して算出される損失が小さくなるように、分類モデルM3の複数の演算パラメータが調整される。損失関数は、出力データM3oと、分類モデルM3に入力される入力画像データM3iに対応付けられる正解のデータと、の間の差の評価値を算出する種々の関数であってよい(例えば、交差エントロピー、二乗和誤差など)。また、複数の演算パラメータを調整するためのアルゴリズムとしては、例えば、誤差逆伝播法と勾配降下法とを使用したアルゴリズムが採用されてよい。ここで、いわゆるAdamの最適化が行われてよい。なお、正解のデータは、作業者によって、予め生成される。
 S210b(図10)では、プロセッサ210は、注目オブジェクト領域のオブジェクト領域画像データを使用して、訓練済の分類モデルM3(図11)の各層V31-V3p、N31-N3qの演算を実行することによって、出力データM3oを生成する。出力データM3oは、注目オブジェクト領域の適切なオブジェクト種類D1cを示している。プロセッサ210は、オブジェクト種類D1cを、出力データM3oによって示される種類に決定する。そして、プロセッサ210は、図10の処理を終了する。
 以上のように、本実施例では、対応関係データD1を生成する処理において、プロセッサ210は、オブジェクト領域の種類を分類するように訓練された分類モデルM3を使用することによって、オブジェクト領域の種類(ここでは、オブジェクト種類D1c)を決定する。プロセッサ210は、分類モデルM3による分類結果を使用して、適切な対応関係データD1を生成できる。
 また、本実施例の生成処理は、オブジェクト種類D1cの決定に分類モデルM3が使用される点を除いて、第2実施例の生成処理(図4)と同じである。従って、本実施例は、第2実施例と同じ種々の利点を有する。
D.第4実施例:
 図12は、対応関係データD1の生成処理の別の実施例を示すフローチャートである。本実施例では、図4のS180とS190との間に、S510-S560が挿入される。S180の判断結果がYesである場合に、処理は、S510へ移行する。S180の判断結果がNoである場合、処理は、S150へ移行する。本実施例は、上記の第1-第3実施例のそれぞれに、適用可能である。
 法律または規格に基づいて設けられるマークは、他のオブジェクトと共に示される場合がある。例えば、「CEマーク」は「製造国を表す文字列」と共に示され得る。この場合、「製造国を表す文字列」には、「CEマーク」の検査条件と同等の検査条件が適用されることが好ましい。本実施例では、認証マーク820(図3(A))が「CEマーク」であることとする。そして、オブジェクト種類D1c(図5)として選択可能な複数の種類には、特定検査条件に対応付けられる特定条件情報(特定種類とも呼ぶ)が、追加される。特定検査条件は、「CEマーク」の検査条件の基準と同じ基準を示しており、「CEマーク」と共に示される「製造国を表す文字列」に適用される。本実施例では、第2文字列870が、「製造国を表す文字列」である。なお、ラベルシールに「CEマーク」が含まれない場合、「製造国を表す文字列」のオブジェクト種類D1cは、上記の各実施例でのオブジェクト種類D1cと同じである(例えば、図6の文字種類、または、図8の第1文字種類)。
 S510(図12)では、プロセッサ210は、S130(図4)で検出された複数のオブジェクト領域から、「CEマーク」を表すオブジェクト領域を検索する。検索方法は、任意の方法であってよい。例えば、予め準備された「CEマーク」の画像データを使用するパターンマッチングが、採用されてよい。以下、S510で検索されるオブジェクトを第1オブジェクトとも呼ぶ。「CEマーク」は、第1オブジェクトの例である。
 S520では、プロセッサ210は、第1オブジェクトを表す第1オブジェクト領域が見つかるか否かを判断する。第1オブジェクト領域が見つからない場合(S520:No)、プロセッサ210は、S190(図4)へ移行する。
 第1オブジェクト領域が見つかる場合(S520:Yes)、S530で、プロセッサ210は、複数のオブジェクト領域から、「製造国を表す文字列(本実施例では、第2文字列870)」を表すオブジェクト領域を検索する。検索方法は、任意の方法であってよい。例えば、予め準備された「MADE IN」の文字列の画像データを使用するパターンマッチングが、採用されてよい。以下、S530で検索されるオブジェクトを第2オブジェクトとも呼ぶ。「製造国を表す文字列」は、第2オブジェクトの例である。
 S540では、プロセッサ210は、第2オブジェクトを表す第2オブジェクト領域が見つかるか否かを判断する。第2オブジェクト領域が見つからない場合(S540:No)、プロセッサ210は、S190(図4)へ移行する。
 第2オブジェクト領域が見つかる場合(S540:Yes)、S550で、プロセッサ210は、第2オブジェクト領域の種類は特定種類であると判断する。そして、S560で、プロセッサ210は、対応関係データD1(図5)のうち、第2オブジェクト領域のオブジェクト種類D1cを示すデータを、特定種類を示すデータに変更する。そして、プロセッサ210は、S190(図4)へ移行する。このように、ラベルシートが「CEマーク」を含む場合、「製造国を表す文字列」のオブジェクト種類D1cは、特定種類に設定される。図示を省略するが、検査処理では、第2データ処理装置300のプロセッサ310は、「製造国を表す文字列」の検査条件の基準を、特定種類に対応付けられる基準(本実施例では、「CEマーク」の検査条件の基準と同じ)に設定する。
 以上のように、本実施例の生成処理では、プロセッサ210は、以下の処理を実行する。S510(図12)では、プロセッサ210は、ラベルシートに含まれるK個のオブジェクト領域から、予め決められた第1オブジェクト(本実施例では、認証マーク820)を表す第1オブジェクト領域を検索する。第1オブジェクト領域が見つかる場合(S520:Yes)、プロセッサ210は、S530で、K個のオブジェクト領域から、予め決められた第2オブジェクト(本実施例では、第2文字列870)を表す第2オブジェクト領域を検索する。そして、第2オブジェクト領域が見つかる場合(S540:Yes)、S550-S560では、プロセッサ210は、第2オブジェクト領域を定めるオブジェクト領域情報D1b(図5)に対応付けられる条件情報D1cを、予め決められた特定検査条件に対応付けられる特定条件情報に設定する。この構成によれば、ラベルシートが第1オブジェクトと第2オブジェクトとを含む場合に、プロセッサ210は、第2オブジェクト領域に特定検査条件を対応付ける対応関係データD1を生成できる。このように、プロセッサ210は、ラベルシートに含まれる複数のオブジェクトに応じて、柔軟に、オブジェクト領域と条件情報D1cとの対応関係を決定できる。
E.第5実施例:
 図13は、ラベルシートの別の例を示す概略図である。図3(A)のラベルシート800とは異なり、ラベルシート800eでは、図3(A)のオブジェクト820、830、850、870が、オブジェクト820e、830e、850e、870eに置換されている。認証マーク820eは、図3(A)の認証マーク820とは異なるマークである。説明文830eは、図3(A)の説明文830の情報とは異なる情報を説明する。第1文字列850eは、図3(A)の第1文字列850のモデル番号とは異なるモデル番号を表している。第2文字列870eは、図3(A)の第2文字列870の製造国とは異なる製造国を表している。そして、写真860は、省略されている。また、ラベルシート800e内の説明文830eの位置は、ラベルシート800(図3(A))内の説明文830の位置と異なっている。以下、図3(A)のラベルシート800を、第1種ラベルシート800と呼び、図13のラベルシート800eを、第2種ラベルシート800eと呼ぶ。また、第1種ラベルシート800のための対応関係データD1を、第1対応関係データD1と呼ぶ。
 互いに異なる複数のラベルシート800、800eが検査され得る。この場合、第1データ処理装置200(図1)は、第1種ラベルシート800のための第1対応関係データD1に加えて、第2種ラベルシート800eのための第2対応関係データを生成する。第2対応関係データは、第1対応関係データD1(図5)と同様に、オブジェクト番号D1aと、オブジェクト領域情報D1bと、条件情報D1cと、の対応関係を示している。
 図14は、生成処理の例を示すフローチャートである。S610では、プロセッサ210は、第1種ラベルシート800のための第1対応関係データD1を生成する。S610の生成処理は、上記の複数の実施例から任意に選択された実施例の生成処理と同じであってよい。S620では、プロセッサ210は、第2種ラベルシート800eのための第2対応関係データを生成する。S620の生成処理のアルゴリズムは、S610の生成処理のアルゴリズムと同じであってよい。物体検出モデルM1(図1)は、第1種ラベルシート800に含まれるオブジェクト810-870に加えて、第2種ラベルシート800eに含まれるオブジェクト810、820e、830e、840、850e、870を検出するように、予め訓練される。S620では、プロセッサ210は、第2種ラベルシート800eの撮影画像データを使用して、第2対応関係データを生成する。
 以上のように、プロセッサ210は、第1対応関係データD1を生成する処理に加えて、第2種ラベルシート800eのための第2対応関係データを生成する処理を実行する。第2対応関係データの生成処理は、図4の処理を含んでいる。S130では、プロセッサ210は、T個(本実施例では、T=6)のオブジェクトを含み外観の異常の無い第2種ラベルシート800eの撮影画像を表す撮影画像データから、訓練済の物体検出モデルM1を使用して、T個のオブジェクト810、820e、830e、840、850e、870に対応するT個のオブジェクト領域を検出する。S135-S180では、プロセッサ210は、T個のオブジェクト領域にそれぞれ対応するT個の対応関係を示す第2対応関係データを生成する。T個の対応関係のそれぞれは、図5の対応関係と同様に、オブジェクト領域情報D1bとオブジェクト種類D1cとの対応関係を示している。オブジェクト領域情報D1b(具体的には、座標D1b1、D1b2)は、第2種ラベルシート800eの撮影画像内のオブジェクト領域を定める情報の例である。また、第1対応関係データD1のオブジェクト種類D1cと同様に、第2対応関係データのオブジェクト種類D1cは、U個(Uは、1以上、T以下の整数。例えば、U=L)の検査条件のうちオブジェクト領域の種類に対応付けられる検査条件を示している。このように、オブジェクト種類D1cは、検査条件を示す条件情報の例である。そして、図4のS190では、プロセッサ210は、第2対応関係データを記憶装置215に格納する。
 この構成によれば、第2種ラベルシート800eの検査時にオブジェクト領域の検査条件(ここでは、基準値Vx)の決定のために参照される第2対応関係データは、適切に、生成される。仮に、作業者が、各オブジェクト領域の座標と種類とを示す情報を決定し、決定した情報を第1データ処理装置200に入力する場合、作業者の負担は大きい。特に、図3(A)、図13の実施例のように複数のラベルシート800、800eがそれぞれ複数のオブジェクトを含む場合、複数のオブジェクトのそれぞれの正しい対応関係を決定することは、作業者によって容易ではない。本実施例では、作業者がオブジェクト領域の座標と種類とを決定しなくても、プロセッサ210は、複数のラベルシート800、800eのための適切な複数の対応関係データを生成できる。従って、作業者の負担は、大幅に軽減される。
F.変形例:
(1)予め決められたルールに基づいてオブジェクト領域の種類を決定する処理は、図6の処理に代えて、他の種々の処理であってよい。例えば、プロセッサ210は、各色成分毎の成分値の分散を算出してよい。そして、プロセッサ210は、全ての色成分の全ての分散が分散閾値以上である、という第2条件が満たされるか否かを判断してよい。プロセッサ210は、第2条件が満たされる場合、S260へ移行し、第2条件が満たされない場合、S250へ移行してよい。また、プロセッサ210は、より詳細に画像を分析することによって、図8の実施例のように、より多くの種類からオブジェクト領域の種類を決定してよい。
(2)オブジェクト領域の種類を分類する分類モデルの構成は、図11の構成に代えて、画像データと種類との対応関係を示し得る他の種々の構成であってよい。例えば、分類モデルは、複数の全結合層で構成されてよい。
(3)図12の実施例において、S510で検索される第1オブジェクト領域と、S530で検索される第2オブジェクト領域とは、「CEマーク」と「製造国を表す文字列」とに代えて、他の任意のオブジェクトを表す領域であってよい。例えば、第1オブジェクト領域は、「GSマーク」であり、第2オブジェクト領域は、「法令に基づく注意事項を説明する説明文」であってよい。いずれの場合も、第2オブジェクト領域に対応付けられる検査条件は、任意の条件であってよい。例えば、第2オブジェクト領域に対応付けられる検査条件によって許容される不具合は、第1オブジェクト領域に対応付けられる検査条件によって許容される不具合よりも、小さくてよい。
(4)対応関係データD1(図5)のオブジェクト領域情報D1bは、座標D1b1、D1b2に代えて、撮影画像内のオブジェクト領域を定める任意の情報であってよい。例えば、オブジェクト領域情報D1bは、オブジェクト領域の中心の座標と、オブジェクト領域の第1方向Dxの長さと、オブジェクト領域の第2方向Dyの長さと、を示してよい。オブジェクト領域情報D1bとしては、撮影画像のうち、オブジェクト領域に含まれる部分と、オブジェクト領域に含まれない部分とを定める種々の情報を、採用可能である。
 また、条件情報D1cは、オブジェクト領域の種類の識別番号に代えて、検査条件を示す任意の情報であってよい。例えば、条件情報D1cは、基準値Vxを示してよい。なお、オブジェクト領域の種類の識別番号は、検査条件の識別番号を示している、ということができる。
(5)検査処理は、図7、図9の処理に代えて、複数のオブジェクトを含む対象物(例えば、ラベルシート800、800e)を検査する種々の処理であってよい。例えば、差Vdの算出式は、注目オブジェクト画像と注目オブジェクト領域に対応する基準画像との間の差の評価値を算出する種々の算出式であってよい。例えば、差Vdは、2個の画像の間で各画素の色値を比較する場合に、予め決められた基準値以上の色値の差を示す画素である異色画素の総数であってよい。色値の差は、視覚的な色の違いが大きいほど大きい種々の値であってよい。例えば、色値の差は、RGBの3個の差分の3個の絶対値の合計値であってよい。また、差Vdは、画像の全画素に対する異色画素の割合であってよい。差Vdは、注目オブジェクト画像と基準画像との間の視覚的な差の大きさを示す種々の値であってよい。
(6)第1種ラベルシート800に適用される検査条件の総数Lは、1以上、K以下の任意の整数であってよい(Kは、第1種ラベルシート800に含まれるオブジェクトの総数)。Lが2以上の場合には、複数の検査条件が検査に使用されるので、第1種ラベルシート800の適切な検査が可能である。オブジェクトの総数Kは、1以上の任意の整数であってよい。Kが2以上の場合には、第1種ラベルシート800は、複数のオブジェクトを使用して種々の情報を表すことができる。同様に、第2種ラベルシート800eに適用される検査条件の総数Uは、1以上、T以下の任意の整数であってよい(Tは、第2種ラベルシート800eに含まれるオブジェクトの総数)。Uが2以上の場合には、複数の検査条件が検査に使用されるので、適切な検査が可能である。オブジェクトの総数Tは、1以上の任意の整数であってよい。Tが2以上の場合には、第2種ラベルシート800eは、複数のオブジェクトを使用して種々の情報を表すことができる。ここで、Uは、Lと異なってよい。Tは、Kと異なってよい。いずれの場合も、数K、L、T、Uは、予め決められている。
 L個の検査条件に対応するL個の基準値は、種々の値であってよい。例えば、図9の実施例では、2個の検査条件に対応する2個の基準値Va1、Va5が、最も小さい基準値(すなわち、最も満たされ難い基準値)である。複数の検査条件に対応する複数の基準値(例えば、Va2、Va4)が、最も大きい基準値(すなわち、最も満たされ易い基準値)であってよい。このように、複数の検査条件の複数の基準値が同じであってよい。これに代えて、L個の検査条件のL個の基準値は、互いに異なってよい。U個の検査条件に対応するU個の基準値も、種々の値であってよい。
(7)検査条件に対応付けられるオブジェクト領域の種類は、種々の種類であってよい。オブジェクト領域の種類は、「規格または法律に基づいて設けられるマークを含む第1種類」と、「写真を含む第2種類」と、「文字を含む第3種類」と、のうちの1以上を含んでよい。また、オブジェクト領域の種類は、「写真との一方または両方を含む第4種類」を含んでよい。
(8)複数の検査条件の間で満たされやすさを比較する場合、画像のサイズ(すなわち、画素数)の違いの影響を緩和するために、画像のサイズに応じて正規化された差Vdを使用することが好ましい。例えば、上記実施例では、差Vdは、全ての画素の差分合計値の平均値であり、差Vdに対するサイズの影響は緩和されている。従って、差Vdが同じである場合に、第1の検査条件に基づく検査結果が合格であり、第2の検査条件に基づく検査結果が不合格である場合、第2の検査条件は、第1の検査条件よりも、満たされ難い。
(9)物体検出モデルは、YOLOモデルに代えて、他の任意のモデルであってよい。物体検出モデルは、例えば、「YOLO v3」などの改良されたYOLOモデルであってよい。また、SSD、R-CNN、Fast R-CNN, Faster R-CNN、Mask R-CNNなどの、他のモデルが使用されてよい。
(10)検査の対象物は、製品(例えば、複合機、ミシン、カッティングマシン、携帯端末など)に貼られるラベルシートに限らず、1以上のオブジェクトを含む任意の物であってよい。例えば、対象物は、製品に直接的に印刷されるラベル画像であってよい。また、対象物は、製品に取り付けられる札、付属品など、製品の任意の部分であってよい。いずれの場合も、対象物に含まれるオブジェクトは、マーク、文字列などの2次元画像で表されるオブジェクトに限らず、立体的な形状を有する3次元のオブジェクトを含んでよい。このようなオブジェクトも、撮影画像データを使用して、検査され得る。
(11)対応関係データ(例えば、図5の対応関係データD1)の生成と、対象物の検査と、に使用される画像データの色成分は、RGBの3色成分に限らず、任意の色成分であってよい。例えば、輝度値のみを示すモノクロ画像データが、使用されてよい。また、CMYKの4色成分の画像データが、使用されてよい。
(12)生成処理(例えば、図4の生成処理)を実行する生成装置は、パーソナルコンピュータ(例えば、データ処理装置200(図1))とは異なる種類の装置であってよい(例えば、デジタルカメラ、スキャナ、スマートフォン、サーバ)。また、ネットワークを介して互いに通信可能な複数の装置(例えば、コンピュータ)が、生成処理の機能を一部ずつ分担して、全体として、生成処理の機能を提供してもよい(これらの装置を備えるシステムが生成装置に対応する)。検査処理(例えば、図7の検査処理)を実行する検査装置についても、同様である。また、同じ装置が、生成処理と検査処理との両方を実行してもよい。
 上記各実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部あるいは全部をハードウェアに置き換えるようにしてもよい。例えば、図6の決定処理は、専用のハードウェア回路によって実現されてよい。
 また、本発明の機能の一部または全部がコンピュータプログラムで実現される場合には、そのプログラムは、コンピュータ読み取り可能な記録媒体(例えば、一時的ではない記録媒体)に格納された形で提供することができる。プログラムは、提供時と同一または異なる記録媒体(コンピュータ読み取り可能な記録媒体)に格納された状態で、使用され得る。「コンピュータ読み取り可能な記録媒体」は、メモリーカードやCD-ROMのような携帯型の記録媒体に限らず、各種ROM等のコンピュータ内の内部記憶装置や、ハードディスクドライブ等のコンピュータに接続されている外部記憶装置も含み得る。
 以上、実施例、変形例に基づき本発明について説明してきたが、上記した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれる。
110…デジタルカメラ、190…支持台、191…上面、200…第1データ処理装置、210…プロセッサ、215…記憶装置、220…揮発性記憶装置、230…不揮発性記憶装置、231…生成プログラム、240…表示部、250…操作部、270…通信インタフェース、300…第2データ処理装置、310…プロセッサ、315…記憶装置、320…揮発性記憶装置、330…不揮発性記憶装置、331…検査プログラム、340…表示部、350…操作部、370…通信インタフェース、900…複合機、901…第1側面、909…底面、1000…データ処理システム

Claims (11)

  1.  対象物の外観の検査用のデータを生成するコンピュータのためのコンピュータプログラムであって、
     K個(Kは、1以上の整数)のオブジェクトを含み外観の異常の無い第1種対象物の第1撮影画像を表す第1撮影画像データから、訓練済の物体検出モデルを使用して、前記K個のオブジェクトに対応するK個のオブジェクト領域を検出する第1領域検出機能と、
     前記K個のオブジェクト領域にそれぞれ対応するK個の対応関係を示す第1対応関係データを生成する第1データ生成機能であって、前記K個の対応関係のそれぞれは、前記第1種対象物の撮影画像内のオブジェクト領域を定める情報であるオブジェクト領域情報と、検査条件を示す条件情報と、の対応関係を示し、前記条件情報は、L個(Lは、1以上、K以下の整数)の検査条件のうち前記オブジェクト領域の種類に対応付けられる検査条件を示す、前記第1データ生成機能と、
     前記第1対応関係データを記憶装置に格納する第1データ格納機能と、
     をコンピュータに実現させる、コンピュータプログラム。
  2.  請求項1に記載のコンピュータプログラムであって、
     前記第1データ生成機能は、オブジェクト領域の画像を予め決められたルールに基づいて分析することによって、前記オブジェクト領域の前記種類を決定するように構成されている、
     コンピュータプログラム。
  3.  請求項1に記載のコンピュータプログラムであって、
     前記第1データ生成機能は、前記訓練済の物体検出モデル、または、オブジェクト領域の種類を分類するように訓練された分類モデルを使用することによって、前記オブジェクト領域の前記種類を決定するように構成されている、
     コンピュータプログラム。
  4.  請求項1から3のいずれかに記載のコンピュータプログラムであって、
     前記Lは、2以上であり、
     前記L個の検査条件は、それぞれ、検査用の撮影画像中の前記オブジェクト領域情報によって示される領域の画像である注目オブジェクト画像と、前記オブジェクト領域情報に予め対応付けられる異常の無いオブジェクトの画像である基準オブジェクト画像と、の間の差が、前記注目オブジェクト画像によって表されるオブジェクトの外観が正常であることを示すと判断するための条件であり、
     前記L個の検査条件は、前記外観が正常であることを前記差が示すと判断されるための互いに異なる基準を示す複数の検査条件を含む、
     コンピュータプログラム。
  5.  請求項4に記載のコンピュータプログラムであって、
     前記オブジェクト領域の前記種類は、規格または法律に基づいて設けられるマークを含む第1種類を含むL個の種類のうちのいずれかであり、
     前記第1種類に対応付けられる検査条件によって示される基準は、前記L個の種類に対応付けられるL個の検査条件によって示されるL個の基準のうち、最も満たされ難い基準である、
     コンピュータプログラム。
  6.  請求項4または5に記載のコンピュータプログラムであって、
     前記オブジェクト領域の前記種類は、写真を含む第2種類を含むL個の種類のうちのいずれかであり、
     前記第2種類に対応付けられる検査条件によって示される基準は、前記L個の種類に対応付けられるL個の検査条件によって示されるL個の基準のうち、最も満たされ易い基準である、
     コンピュータプログラム。
  7.  請求項4または5に記載のコンピュータプログラムであって、
     前記オブジェクト領域の前記種類は、文字を含む第3種類と、イラストレーションと写真との一方または両方を含む第4種類と、を含むL個の種類のうちのいずれかであり、
     前記第3種類に対応付けられる検査条件によって示される基準は、前記第4種類に対応付けられる検査条件によって示される基準と比べて、満たされ難い、
     コンピュータプログラム。
  8.  請求項1から7のいずれかに記載のコンピュータプログラムであって、さらに、
     前記K個のオブジェクト領域から、予め決められた第1オブジェクトを表す第1オブジェクト領域を検索する第1検索機能と、
     前記第1オブジェクト領域が見つかる場合に、前記K個のオブジェクト領域から、予め決められた第2オブジェクトを表す第2オブジェクト領域を検索する第2検索機能と、
     をコンピュータに実現させ、
     前記第1データ生成機能は、前記第2オブジェクト領域が見つかる場合に、前記第2オブジェクト領域を定めるオブジェクト領域情報に対応付けられる条件情報を、予め決められた特定検査条件に対応付けられる特定条件情報に設定するように構成されている、
     コンピュータプログラム。
  9.  請求項1から8のいずれかに記載のコンピュータプログラムであって、さらに、
     T個(Tは、1以上の整数)のオブジェクトを含み外観の異常の無い第2種対象物の第2撮影画像を表す第2撮影画像データから、前記訓練済の物体検出モデルを使用して、前記T個のオブジェクトに対応するT個のオブジェクト領域を検出する第2領域検出機能と、
     前記T個のオブジェクト領域にそれぞれ対応するT個の対応関係を示す第2対応関係データを生成する第2データ生成機能であって、前記T個の対応関係のそれぞれは、前記第2種対象物の撮影画像内のオブジェクト領域を定める情報であるオブジェクト領域情報と、検査条件を示す条件情報と、の対応関係を示し、前記条件情報は、U個(Uは、1以上、T以下の整数)の検査条件のうち前記オブジェクト領域の種類に対応付けられる検査条件を示す、前記第2データ生成機能と、
     前記第2対応関係データを記憶装置に格納する第2データ格納機能と、
     をコンピュータに実現させる、コンピュータプログラム。
  10.  対象物の外観の検査用のデータを生成する生成装置であって、
     K個(Kは、1以上の整数)のオブジェクトを含み外観の異常の無い第1種対象物の第1撮影画像を表す第1撮影画像データから、訓練済の物体検出モデルを使用して、前記K個のオブジェクトに対応するK個のオブジェクト領域を検出する第1領域検出部と、
     前記K個のオブジェクト領域にそれぞれ対応するK個の対応関係を示す第1対応関係データを生成する第1データ生成部であって、前記K個の対応関係のそれぞれは、前記第1種対象物の撮影画像内のオブジェクト領域を定める情報であるオブジェクト領域情報と、検査条件を示す条件情報と、の対応関係を示し、前記条件情報は、L個(Lは、1以上、K以下の整数)の検査条件のうち前記オブジェクト領域の種類に対応付けられる検査条件を示す、前記第1データ生成部と、
     前記第1対応関係データを記憶装置に格納する第1データ格納部と、
     を備える、生成装置。
  11.  対象物の外観の検査用のデータを生成する生成方法であって、
     K個(Kは、1以上の整数)のオブジェクトを含み外観の異常の無い第1種対象物の第1撮影画像を表す第1撮影画像データから、訓練済の物体検出モデルを使用して、前記K個のオブジェクトに対応するK個のオブジェクト領域を検出する第1領域検出工程と、
     前記K個のオブジェクト領域にそれぞれ対応するK個の対応関係を示す第1対応関係データを生成する第1データ生成工程であって、前記K個の対応関係のそれぞれは、前記第1種対象物の撮影画像内のオブジェクト領域を定める情報であるオブジェクト領域情報と、検査条件を示す条件情報と、の対応関係を示し、前記条件情報は、L個(Lは、1以上、K以下の整数)の検査条件のうち前記オブジェクト領域の種類に対応付けられる検査条件を示す、前記第1データ生成工程と、
     前記第1対応関係データを記憶装置に格納する第1データ格納工程と、
     を備える、生成方法。
PCT/JP2022/029289 2021-08-06 2022-07-29 コンピュータプログラム、生成装置、および、生成方法 WO2023013546A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-129595 2021-08-06
JP2021129595A JP2023023776A (ja) 2021-08-06 2021-08-06 コンピュータプログラム、生成装置、および、生成方法

Publications (1)

Publication Number Publication Date
WO2023013546A1 true WO2023013546A1 (ja) 2023-02-09

Family

ID=85154739

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/029289 WO2023013546A1 (ja) 2021-08-06 2022-07-29 コンピュータプログラム、生成装置、および、生成方法

Country Status (2)

Country Link
JP (1) JP2023023776A (ja)
WO (1) WO2023013546A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012174101A (ja) * 2011-02-23 2012-09-10 Oki Electric Ind Co Ltd ラベル検査システム、ラベル検査装置及びラベル検査プログラム
JP2021051044A (ja) * 2019-09-26 2021-04-01 株式会社イシダ 検査装置及びラベル貼付装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012174101A (ja) * 2011-02-23 2012-09-10 Oki Electric Ind Co Ltd ラベル検査システム、ラベル検査装置及びラベル検査プログラム
JP2021051044A (ja) * 2019-09-26 2021-04-01 株式会社イシダ 検査装置及びラベル貼付装置

Also Published As

Publication number Publication date
JP2023023776A (ja) 2023-02-16

Similar Documents

Publication Publication Date Title
US9172824B2 (en) Apparatus, system, and method of inspecting image, and recording medium storing image inspection control program
US8861845B2 (en) Detecting and correcting redeye in an image
JP4335476B2 (ja) 画像の顕著性及びアピール性に基づいて写真印画の数、寸法、及び、倍率を変更する方法
JP4431949B2 (ja) 赤目補正方法及びこの方法を実施する装置
US8331670B2 (en) Method of detection document alteration by comparing characters using shape features of characters
US11574489B2 (en) Image processing system, image processing method, and storage medium
KR20100124738A (ko) 입력 화상을 처리하는 기계 구현 방법, 입력 화상을 처리하는 장치 및 컴퓨터 판독가능 매체
JP2005310068A (ja) 白目補正方法及びこの方法を実施する装置
JP2000149018A (ja) 画像処理方法、画像処理装置及び記録媒体
US20220180122A1 (en) Method for generating a plurality of sets of training image data for training machine learning model
CN109738450B (zh) 笔记本键盘的检测方法和装置
CN111985465A (zh) 文本识别方法、装置、设备及存储介质
US9131193B2 (en) Image-processing device removing encircling lines for identifying sub-regions of image
US20090285457A1 (en) Detection of Organ Area Corresponding to Facial Organ Image in Image
US11368607B2 (en) Information processing apparatus and non-transitory computer readable medium storing program for image color conversion
JP2006285956A (ja) 赤目検出方法および装置並びにプログラム
US20230316697A1 (en) Association method, association system, and non-transitory computer-readable storage medium
US9424488B2 (en) Applying a segmentation engine to different mappings of a digital image
WO2023013546A1 (ja) コンピュータプログラム、生成装置、および、生成方法
US9756220B2 (en) Image data generating apparatus, printer, image data generating method, and non-transitory computer readable medium for extracting one or more pixels corresponding to a metallic-color region
US20230061533A1 (en) Inspection apparatus capable of reducing inspection workload, method of controlling inspection apparatus, and storage medium
JP6855175B2 (ja) 画像処理装置、画像処理方法およびプログラム
JP5157848B2 (ja) 画像処理装置、画像処理方法、コンピュータプログラム、及び、情報記録媒体
JP2001222717A (ja) 文書画像認識方法、装置及びコンピュータ読み取り可能な記録媒体
WO2022239671A1 (ja) 画像処理方法、コンピュータプログラム、画像処理装置、および、訓練方法

Legal Events

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

Ref document number: 22852965

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE