WO2022124224A1 - 方法、システム、および、コンピュータプログラム - Google Patents

方法、システム、および、コンピュータプログラム Download PDF

Info

Publication number
WO2022124224A1
WO2022124224A1 PCT/JP2021/044428 JP2021044428W WO2022124224A1 WO 2022124224 A1 WO2022124224 A1 WO 2022124224A1 JP 2021044428 W JP2021044428 W JP 2021044428W WO 2022124224 A1 WO2022124224 A1 WO 2022124224A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
logo
image data
region
area
Prior art date
Application number
PCT/JP2021/044428
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 WO2022124224A1 publication Critical patent/WO2022124224A1/ja
Priority to US18/331,511 priority Critical patent/US20230316697A1/en

Links

Images

Classifications

    • 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/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • 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/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/09Recognition of logos

Definitions

  • This specification relates to a technique for associating information with image data.
  • Patent Document 1 proposes a technique for evaluating the accuracy of information given by an operator and causing the operator to process an image according to the evaluation.
  • Appropriate information association is required for proper training of machine learning models.
  • Appropriate information varies depending on the machine learning model to be trained. Under such circumstances, it has not been easy to associate appropriate information with image data.
  • This specification discloses a technique for associating appropriate information with image data.
  • An association method for associating information with image data used for training a machine learning model in which an acquisition step of acquiring target image data of a target image, which is an image to be processed, and analysis of the target image data. By doing so, a detection step of detecting an object region showing an image of the object of interest from the target image, and a determination step of determining an extended region including the target region and an outer portion of the target region.
  • An association method comprising the association step of associating the annotation data indicating the annotation information including the area information indicating the extended area with the target image data and storing the annotation data in the storage device.
  • the annotation information including the area information indicating the extended area including the object area detected by analyzing the target image data, the outer part of the target area, and the target image data is associated with the target image data. Since it is stored in the storage device, an area including another area in addition to the area indicating the object of interest can be associated with the target image data.
  • the technique disclosed in the present specification can be realized in various aspects, for example, a method and a specific device for specifying information to be associated with image data, an association method and an association device for associating information with image data.
  • a method and device for generating learning image data, a computer program for realizing the function of those methods or devices, a recording medium on which the computer program is recorded (for example, a recording medium that is not temporary), and the like. can do.
  • FIG. 1 is explanatory drawing which shows the information processing apparatus as one Example.
  • FIG. 1 is a schematic diagram showing an example of the configuration of the logo detection model NN1.
  • FIG. 1 is a schematic diagram showing an outline of the operation of the logo detection model NN1.
  • (A) is an explanatory diagram showing an example of a logo image.
  • (B) is a histogram showing an example of the distribution range of color values.
  • (C) is an explanatory diagram showing a divided partial region.
  • (D) is an explanatory diagram showing an example of a color change logo image generated by the additional adjustment process.
  • (A)-(H) is a schematic diagram showing an example of a candidate image. It is a flowchart which shows the example of the training process of the logo detection model NN1.
  • (A) is a schematic diagram showing an example of the configuration of the sheet detection model NN2.
  • (B) is an explanatory diagram showing an outline of the operation of the seat detection model NN2. It is a flowchart which shows the example of the generation processing of the type 2 data set DS2.
  • (A) is an explanatory diagram showing an example of a target image.
  • (B) is an explanatory diagram showing an example of a logo area.
  • (C) is an explanatory diagram showing an example of a plurality of blocks.
  • (D) is an explanatory diagram showing an example of a uniform block.
  • (E) is an explanatory diagram showing an example of a candidate for an extended region. It is a flowchart which shows the example of the process which determines the candidate of an extended area.
  • (A) is an explanatory diagram showing an example of a UI screen.
  • (B) is an explanatory diagram showing an example of the modified contour LAeo.
  • (C) is an explanatory diagram showing an example of a UI screen. It is a flowchart which shows the example of the training process of a sheet detection model NN2.
  • FIG. 1 is an explanatory diagram showing an information processing apparatus as an embodiment.
  • the information processing apparatus 200 is, for example, a personal computer.
  • the information processing apparatus 200 performs various processes for training a machine learning model used for inspecting an object (for example, a product such as a printer).
  • the information processing device 200 includes a processor 210, a storage device 215, a display unit 240, an operation unit 250, and a communication interface 270. These elements are connected to each other via a bus.
  • the storage device 215 includes a volatile storage device 220 and a non-volatile storage device 230.
  • the processor 210 is a device configured to perform data processing, for example, a CPU.
  • the volatile storage device 220 is, for example, a DRAM
  • the non-volatile storage device 230 is, for example, a flash memory.
  • the non-volatile storage device 230 includes programs 231, 232, 233, 234, a logo detection model NN1, a first-class data set DS1 for training the logo detection model NN1, a sheet detection model NN2, and a sheet detection model NN2. It stores the second-class data set DS2 for training.
  • the models NN1 and NN2 are so-called machine learning models, and in this embodiment, they are program modules. Details of the program 231-234, the models NN1 and NN2, and the datasets DS1 and DS2 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 configured to receive operations by the user, such as a button, a lever, and a touch panel arranged on the display unit 240. The user can input various requests and instructions to the information processing apparatus 200 by operating the operation unit 250.
  • the communication interface 270 is an interface for communicating with other devices (for example, a USB interface, a wired LAN interface, and an IEEE 802.11 wireless interface).
  • a digital camera 100 is connected to the communication interface 270.
  • the digital camera 100 generates image data of a captured image by photographing the object DV to be inspected.
  • the object DV is a printer (the object DV is also referred to as a printer DV).
  • Shot image: 2 (A) and 2 (B) are schematic views showing an example of a photographed image.
  • the first captured image 700x of FIG. 2A shows the first printer DVx without any defect.
  • a label sheet 910L (simply referred to as a sheet 910L) is attached to the first printer DVx.
  • the first captured image 700x includes an image of the sheet 910L.
  • the second captured image 700y of FIG. 2B shows a second printer DVy having a defect.
  • the sheet 910L is not attached to the second printer DVy, and the second captured image 700y does not include the image of the sheet 910L.
  • the sheet 910L includes the logo image 910.
  • the logo image 910 indicates the character string "SAMPLE”.
  • the sheet 910L includes another area (for example, an area showing an image of another character string) in addition to the area of the logo image 910.
  • the logo is not limited to a character string, but may be various images such as figures, marks, and symbols.
  • the sheet 910L is not limited to a character string, and may be configured by using various kinds of elements (for example, figures, patterns, photographs, etc.).
  • the sheet detection model NN2 (FIG. 1) is a machine learning model that detects an image of a label sheet (for example, sheet 910L) from a photographed image of a printer using photographed image data which is image data showing a photographed image. If the image on the label sheet is detected, the printer inspection result is acceptable. If the image on the label sheet is not detected, the printer inspection result is unacceptable.
  • Image data of various images including the image of the sheet is used for training of the sheet detection model NN2.
  • Various information is associated with the data used for training (here, image data).
  • the process of associating information with data is also called annotation or labeling.
  • annotation information includes area information that specifies an area indicating a sheet to be detected. For example, when the image data of the first captured image 700x of FIG. 2A is used for training, the annotation information includes the area information indicating the frame Fx surrounding the sheet 910L.
  • Annotation information is usually determined by the worker. For example, the operator determines the frame Fx surrounding the sheet 910L by observing the first captured image 700x.
  • various image data are used for training.
  • the display mode of the sheet may differ among a plurality of image data, such as the position of the sheet, the color of the sheet, and the size of the sheet. It is not easy for the operator to determine the appropriate annotation information for each of the various image data. For example, the operator may determine an inappropriate frame that encloses only a portion of the sheet 910L. Therefore, in this embodiment, the information processing apparatus 200 (FIG. 1) detects a logo image (for example, a logo image 910) from the training image by using the logo detection model NN1.
  • a logo image for example, a logo image 910
  • the information processing apparatus 200 determines an extended area including a logo area which is an area showing a logo image and a portion outside the logo area.
  • the extended region may adequately represent a sheet (eg, sheet 910L).
  • the information processing apparatus 200 associates the annotation information including the area information indicating the extended area with the image data.
  • the logo detection model NN1 and the sheet detection model NN2 will be described in this order.
  • FIG. 3A is a schematic diagram showing an example of the configuration of the logo detection model NN1.
  • the logo detection model NN1 is an object detection model called YOLO (You only look once).
  • YOLO for example, wrote 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 create a frame containing an object called a bounding box, the certainty that the box contains an object, and the probability of each type of object when the box contains an object (also known as class probability). Call), and predict.
  • the logo detection model NN1 has m (m is an integer of 1 or more) convolutional layers CV11-CV1m and n (n is 1 or more) following the convolutional layers CV11-CV1m. It has a fully connected layer CN11-CN1n (where m is, for example, 24. n is, for example, 2). Immediately after one or more of the m folding layers CV11-CV1m, a pooling layer is provided.
  • the convolutional layer CV11-CV1m executes a process including a convolution process and a bias addition process on the input data.
  • the convolution process is (p ⁇ q ⁇ r) for the input data. This is a process of sequentially applying s-dimensional filters and calculating a correlation value indicating the correlation between the input data and the filter (p, q, r, s are integers of 1 or more). In the process of applying each filter, a plurality of correlation values are sequentially calculated while sliding the filter. One filter contains (p ⁇ q ⁇ r) weights.
  • the bias addition process is a process of adding a bias to the calculated correlation value. One bias is prepared for each filter.
  • the dimension of the filter (p ⁇ q ⁇ r) and the number s of the filters are usually different between m convolutional layers CV11-CV1m.
  • the convolutional layer CV11-CV1m each has a parameter set including a plurality of weights and a plurality of biases of the plurality of filters.
  • the pooling layer executes a process of reducing the number of dimensions of the data input from the immediately preceding convolutional layer.
  • various processes such as average pooling and maximum pooling can be used.
  • the pooling layer performs maximum pooling.
  • Maximum pooling reduces the number of dimensions by selecting the maximum value in the window while sliding a window of a predetermined size (eg, 2x2) with a predetermined stride (eg, 2).
  • the fully connected layer CN11-CN1n is g-dimensional data (that is, g-values) using f-dimensional data (that is, f values; f is an integer of 2 or more) input from the immediately preceding layer. g is an integer of 2 or more).
  • Each of the output g values is a value obtained by adding a bias to the inner product of the vector composed of the input f values and the vector composed of the f weights (inner product + bias). ..
  • the convolutional layer CV11-CV1m outputs g-dimensional data using (f ⁇ g) weights and g biases.
  • the number of dimensions f of the input data and the number of dimensions g of the output data are usually different between the n fully connected layers CN11-CN1n.
  • the fully coupled layer CN11-CN1n each has a parameter set containing a plurality of weights and a plurality of biases.
  • the data generated by each of the convolutional layer CV11-CV1m and the fully connected layer CN11-CN1n is input to the activation function and converted.
  • the activation function various functions can be used.
  • a linear activation function is used for the last layer (here, the fully connected layer CN1n), and a leak-normalized linear unit (Leaky Rectified Linear Unit:) is used for the other layers. LReLU) is used.
  • FIG. 3B is a schematic diagram showing an outline of the operation of the logo detection model NN1.
  • Image 800 is an example of an input image input to the logo detection model NN1.
  • the input image 800 is represented by the color values of the first direction Dx, the second direction Dy perpendicular to the first direction Dx, and the respective color values of the plurality of pixels arranged in a matrix along the first direction Dx.
  • the color value is represented by three component values of R (red), G (green), and B (blue).
  • the input image 800 shows two types of logo images 910 and 920.
  • the first logo image 910 is an image of the character string of "SAMPLE”.
  • the second logo image 920 is another logo image different from the first logo image 910, and is an image of the character string of "SAMPLE 2".
  • the logo detection model NN1 divides the input image 800 into S ⁇ S grid cells 801 (also simply referred to as cells 801) (S is an integer of 2 or more, and S is, for example, 5).
  • S is an integer of 2 or more, and S is, for example, 5).
  • the center of each of the logo images 910 and 920 is included in any cell 801.
  • the detection result of the logo images 910, 920 (more generally, the object) is indicated by the predicted value associated with the cell 801 including the center of the object area (details will be described later).
  • Each cell 801 is associated with a Bn rectangular bounding box (Bn is an integer of 1 or more. Bn is, for example, 2).
  • Bn is an integer of 1 or more. Bn is, for example, 2.
  • a plurality of first-class bounding boxes BB1c related to the first logo image 910 and a plurality of second-class bounding related to the second logo image 920 are shown. Box BB2c and.
  • the following five predicted values are associated with each bounding box. That is, the center position x of the first direction Dx with respect to the cell 801, the center position y of the second direction Dy with respect to the cell 801, the width w of the first direction Dx, the height h of the second direction Dy, and the certainty.
  • the certainty of the bounding box associated with that cell 801 is expected to be zero.
  • the certainty is expected to be the same as the IOU (Intersection over Union) between the area of the bounding box and the object area.
  • IOU is a ratio obtained by dividing the area of the intersection of the two regions by the area of the region of the union of the two regions.
  • Such confidence indicates the degree of matching between the bounding box and the object area.
  • the certainty is calculated independently of the object type.
  • the logo detection model NN1 detects a C type logo image (C is an integer of 1 or more. C is, for example, 3).
  • the type of logo image is also called a class or a logo class.
  • Each cell 801 is further associated with C class probabilities.
  • the C class probabilities correspond to the C types of the object (here, the logo image).
  • the class probability is a probability under the condition that the center of the object area is included in the cell 801 and indicates the probability for each type of object. Regardless of the total number of bounding boxes Bn associated with one cell 801, C class probabilities are associated with one cell 801.
  • the left part in the middle of FIG. 3B shows a class probability map.
  • the class probability map is a class identifier specified for each cell 801 and indicates a class identifier corresponding to the highest class probability. As shown in the figure, in the cell 801 close to the first logo image 910, the probability of the class identifier of "1" which is the type of the first logo image 910 is high. In cell 801 close to the second logo image 920, the probability of the class identifier of "2", which is the type of the second logo image 920, is high.
  • the plurality of first-class bounding boxes BB1c on the right side of the figure are bounding boxes associated with the cell 801 indicating the class identifier of "1" on the class probability map.
  • the plurality of type 2 bounding boxes BB2c are bounding boxes associated with the cell 801 indicating the class identifier of "2" on the class probability map.
  • the logo detection model NN1 (FIG. 3 (A)) outputs output data 830 showing predicted values of S ⁇ S ⁇ (Bn ⁇ 5 + C).
  • a bounding box having a certainty of a threshold value or higher is adopted as a box (referred to as an object box) indicating a detected object (here, a logo image).
  • the class identifier corresponding to the highest class probability among the C class probabilities corresponding to the object box is adopted as the class identifier associated with the object box.
  • a plurality of bounding boxes overlapping one logo image may be candidates for the object box.
  • Non-maximal suppression is a process of deleting one box (for example, a box having a lower certainty) when the IOU between the two boxes is equal to or more than the standard.
  • FIG. 4 is a flowchart showing an example of a generation process of the first-class data set DS1 for training of the logo detection model NN1.
  • the processor 210 (FIG. 1) executes the process of FIG. 4 according to the first program 231.
  • the processor 210 acquires logo image data, which is image data of the logo image.
  • the logo image data is RGB bitmap data and is stored in advance in the non-volatile storage device 230 (not shown).
  • FIG. 5A is an explanatory diagram showing an example of a logo image.
  • the first logo image 910 is shown.
  • the first logo image 910 includes a character area 911 and a background area 912.
  • the plurality of pixels in the character area 911 have approximately the same color
  • the plurality of pixels in the background area 912 have approximately the same color.
  • the logo image data may be data generated by using an image editing application program.
  • the logo image data may be data generated by scanning a logo sample with a scanner (not shown).
  • the processor 210 includes a plurality of data including the data of the first logo image 910, the data of the second logo image 920 (FIG. 3 (B)), and the data of the third logo image (not shown). Get the data of the logo image.
  • both the second logo image 920 and the third logo image include a character area showing a plurality of characters and a background area, as in the first logo image 910.
  • the processor 210 clusters the color values of a plurality of pixels of the logo image. As a result, the distribution range of the color values of the logo image is divided into T partial color ranges (T is an integer of 2 or more).
  • FIG. 5B is a histogram showing an example of the distribution range of color values.
  • the horizontal axis represents the luminance value Bv.
  • the range of the luminance value Bv is divided into a plurality of sections.
  • the vertical axis shows the number of pixels in each section.
  • This histogram shows the distribution of the luminance value Bv of the first logo image 910 (FIG. 5A).
  • the bright first partial color range R1 indicates the distribution range of the luminance value Bv in the character region 911
  • the dark second partial color range R2 indicates the distribution range of the luminance value Bv in the background region 912.
  • the processor 210 calculates the luminance value Bv from the RGB color values of each of the plurality of pixels, and generates a histogram of the luminance value Bv.
  • the processor 210 specifies the range indicated by the continuous plurality of sections as one cluster (that is, a partial color range). In the example of FIG. 5B, two partial color ranges R1 and R2 are specified.
  • FIG. 5C is an explanatory diagram showing a divided partial region.
  • the logo image 910 is divided into a type 1 region A1 and a type 2 region A2.
  • the first kind region A1 corresponds to the first partial color range R1, that is, the character region 911
  • the second kind region A2 corresponds to the second partial color range R2, that is, the background region 912.
  • one type of partial region corresponding to one partial color range may include a plurality of regions separated from each other, such as the first type region A1.
  • other logo images are similarly divided into a plurality of areas by S115 and S120.
  • the logo image is divided into T-type partial regions having similar colors.
  • the method of dividing the distribution range of color values into T partial color ranges may be various methods of associating a plurality of pixels having similar colors with one partial color range.
  • the range of the luminance value Bv may be divided by the luminance value Bv corresponding to the valley of the histogram.
  • the distribution range of the color value may be divided into T partial color ranges by using various color components (for example, hue, saturation, etc.), not limited to the luminance value Bv.
  • various clustering algorithms such as the k-means method may be used.
  • the total number T of the partial color ranges (that is, the number of types T of the partial areas) is determined for each logo image. Instead of this, T may be predetermined.
  • the processor 210 In S125, the processor 210 generates K color change logo image data (K is an integer of 1 or more) by performing an adjustment process of randomly changing the color of one or more kinds of partial areas.
  • K is an integer of 1 or more
  • three color-changing logo images 910a, 910b, and 910c are shown as examples of the color-changing logo image generated from the first logo image 910.
  • the processor 210 also generates a color change logo image from other logo images.
  • the processor 210 changes the entire color of one type of partial area to the same color randomly determined. For example, when the color of the type 1 region A1 is changed, all the colors of the plurality of characters included in the type 1 region A1 are changed to the same color.
  • the color after the change may be a color close to the color before the change.
  • the color change process is performed by adding a random value in the range of -100 or more and +100 or less to the color value of each color component. May be the process of adding.
  • the processor 210 randomly determines the total number of color change logo image data to be generated for each logo image. Instead of this, the total number of color-changing logo image data to be generated may be predetermined for each logo image.
  • the processor 210 executes additional adjustment processing of the color change logo image data.
  • the additional adjustment process includes one or both of the size change process and the aspect ratio change process.
  • the resizing process may be either an enlargement process or a reduction process.
  • FIG. 5D is an explanatory diagram showing an example of a color change logo image generated by the additional adjustment process.
  • the first color change logo image 910a1 is an image generated by the size change process (here, the reduction process).
  • the second color change logo image 910a2 is an image generated by the aspect ratio change process.
  • the processor 210 also performs additional adjustment processing on the color change logo image generated from the other logo image.
  • the processor 210 randomly determines whether or not to execute the additional adjustment process, the color change logo image to be the target of the additional adjustment process, and the content of the additional adjustment process.
  • the processor 210 acquires background image data.
  • the background image data is image data indicating a background image on which the logo image should be arranged.
  • the processor 210 randomly acquires background image data to be processed from a plurality of background image data (not shown) prepared in advance.
  • the plurality of background image data are stored in advance in the storage device 215 (for example, the non-volatile storage device 230) (not shown).
  • the plurality of background image data includes data of a background image showing a solid color image of a single color and data of a background image of a photograph.
  • a monochromatic solid image is an image composed of a plurality of pixels having the same color.
  • each background image is a rectangular image surrounded by two sides parallel to the first direction Dx and two sides parallel to the second direction Dy.
  • the processor 210 generates candidate image data by arranging L logo images (L is an integer of 1 or more) on the background image.
  • the processor 210 selects L logo images from a plurality of logo images including the logo image acquired in S110, the color change logo image generated in S125, and the color change logo image generated in S130. do.
  • the processor 210 randomly determines the position of each logo image on the background image. Instead, the processor 210 may place the logo image at a predetermined position on the background image. In either case, the processor 210 determines the position of each logo image so that the plurality of logo images do not overlap each other.
  • the total number L of the logo images is determined to be a value within the range of 1 or more and not more than the maximum number of logo images that can be arranged on the background image. For example, the processor 210 randomly determines L and randomly selects L logo images.
  • FIGS. 6A-C are schematic views showing an example of a candidate image.
  • the three candidate images 800a-800c of FIGS. 6A-C are the background images 800az, 800bz, 800cz, the four logo images arranged on the background images 800az, 800bz, 800cz, and the four logo images. Includes.
  • the main features of these candidate images 800a-800c are as follows.
  • Candidate image 800b The background image 800bz is a photographic image.
  • (I3) Candidate image 800c The logo images 910 and 910c obtained from the first logo image 910 and the logo images 920a and 920b obtained from the second logo image 920 are included. As shown by the logo images 920a and 920b in FIG. 6C, the second logo image 920 is divided into a type 1 region A21 and a type 2 region A22.
  • the logo image 920a is an image generated by changing the color of the second logo image 920.
  • the logo image 920b is an image generated by the color change and reduction processing of the second logo image 920.
  • the processor 210 generates new candidate image data by performing image processing on the candidate image data.
  • This image processing includes one or more processes selected from the group consisting of the following seven processes P1-P7.
  • P1-P7 Upside down inversion process to invert the candidate image upside down
  • P2 Left / right inversion process to invert the left and right of the candidate image
  • P3 Rotation process to rotate the candidate image
  • the color change target image in the candidate image is shown. Shift processing to move the part shown in the area of the color change target image in parallel without changing the area
  • P5 Blur processing to blur the candidate image
  • Color adjustment processing to adjust the color of the candidate image
  • the five candidate images 800d-800h in FIGS. 6D and 6H are examples of candidate images generated by the image processing of S145.
  • the candidate image 800f of FIG. 6F includes a background image 800fz and two logo images 910 and 910b arranged on the background image 800fz.
  • the other candidate images 800d, 800e, 800g, 800h include a background image 800dz, 800ez, 800gz, 800hz, and four logo images arranged on the background image.
  • the main features of these candidate images 800d-800h are as follows. (I4)
  • Candidate image 800d The background image 800dz is a solid image of a single color, left-right inversion processing is performed, and the logo image 910s is generated by shift processing.
  • Candidate image 800e The background image 800ez is a photographic image, and upside down processing is performed.
  • Candidate image 800f A rotation process and a noise addition process for adding noise NZ are performed.
  • Candidate image 800 g Blurring processing is performed.
  • Candidate image 800h Color adjustment processing is being performed.
  • the first direction Dx (FIG. 6 (D)) indicates the right direction. Therefore, the left-right reversal process reverses the position of the first direction Dx.
  • the second direction Dy (FIG. 6 (E)) indicates a downward direction. Therefore, the upside-down processing reverses the position of the second direction Dy.
  • the shift process (FIG. 6 (D)) translates the original logo image to the left within the original area of the logo image 910s.
  • the portion of the logo image after movement that protrudes from the original area of the logo image 910s has been deleted. For example, a part of the left side of the first type region A1 has been deleted.
  • the color of the blank portion 910v generated by the translation of the original logo image is set to the same color as the color of the second type region A2 indicating the background region.
  • the processor 210 randomly determines the movement direction and the movement amount by the shift process.
  • the original candidate image is rotated counterclockwise within the original region of the candidate image 800f.
  • the portion outside the original region of the candidate image 800f is deleted.
  • a copy of a part of the background image 800fz is assigned to the blank portion 800fv generated by the rotation of the original candidate image.
  • the processor 210 randomly determines the center of rotation, the direction of rotation, and the angle of rotation.
  • a plurality of target pixels are randomly selected from a plurality of pixels of the candidate image 800f, and a random number value is added to each color value of the plurality of target pixels.
  • the noise addition process may be various other processes. For example, a random number value may be added to all the pixels of the candidate image. Further, the noise image prepared in advance may be superimposed on the candidate image.
  • the blurring process (FIG. 6 (G)) is also called a smoothing process.
  • the blurring process is a process using an average value filter, and the entire 800 g of the candidate image is processed.
  • the blurring process may be various processes for smoothing the color value (for example, another smoothing filter such as a median filter or a Gaussian filter may be used).
  • the color adjustment process (FIG. 6 (H)) is a gamma correction process for reducing the luminance value in this embodiment, and the entire candidate image 800h is processed.
  • the color adjustment process may be an arbitrary process for adjusting the color of the candidate image (for example, a gamma correction process for increasing the luminance value, a contrast enhancement process, a saturation adjustment process, a white balance adjustment process, etc.).
  • the processor 210 randomly determines whether or not to execute the image processing of S145, the candidate image to be image-processed, and the content of the image processing. For example, the processes to be executed are randomly selected from the seven processes P1-P7.
  • the processor 210 has a first-class data set DS1 (FIG. 1) from a plurality of candidate image data including the candidate image data generated in S140 and the candidate image data generated in S145.
  • Z first-class training image data D11 (Z is an integer of 1 or more) to be included in the first type learning image data D11 are randomly selected (the number Z is also randomly determined).
  • the processor 210 generates Z label data D12 corresponding to Z first-class learning image data D11.
  • the label data D12 is data that determines a target value (that is, a correct answer) of the output data 830 of the logo detection model NN1 (FIG. 3A).
  • Such label data D12 is also referred to as teacher data.
  • the label data D12 shows the area information D121 indicating the area of the logo image in the candidate image and the logo class D122 indicating the type of the logo image.
  • the area information D121 includes the center position of the area in the candidate image (specifically, the position of the first direction Dx and the position of the second direction Dy), the width of the first direction Dx, and the height of the second direction Dy. , Is shown.
  • the logo image is classified into C classes.
  • Logo class D122 indicates any one of the C classes.
  • the processor 210 specifies a combination of the area information D121 and the logo class D122 of each of the L logo images in the candidate image based on the processing content of S125-S145.
  • the area information D121 is determined to indicate the smallest rectangle including the entire logo image. Then, when the candidate image includes L logo images, the processor 210 generates label data D12 indicating L combinations of the area information D 121 and the logo class D 122.
  • the processor 210 associates the first-class learning image data D11 (FIG. 1) with the label data D12 and stores them in the storage device 215 (for example, the non-volatile storage device 230).
  • the entire type 1 learning image data D11 and the label data D12 associated with each other are also referred to as the type 1 labeled data LD1.
  • the first-class data set DS1 includes a plurality of first-class labeled data LD1s.
  • the processor 210 may store the labeled data LD1 in an external storage device (not shown) connected to the information processing device 200.
  • the processor 210 determines whether or not a predetermined number of first-class learning image data D11 (that is, first-class labeled data LD1) has been generated. For proper training of the logo detection model NN1, the total number of each of the C label images contained in the first-class data set DS1 is set to a large reference value (for example, 1000) or more. When the total number of any of the C label images is less than the reference value (S160: No), the processor 210 shifts to S125 and generates new labeled data LD1. When the total number of each of the C label images is equal to or greater than the reference value (S160: Yes), the processor 210 ends the process of FIG.
  • a predetermined number of first-class learning image data D11 that is, first-class labeled data LD1
  • the generated plurality of labeled data LD1s show various images as described in FIGS. 6A-6H.
  • the first-class data set DS1 includes a plurality of such first-class labeled data LD1s.
  • the information processing device 200 is an example of a system that generates a plurality of first-class learning image data D11.
  • FIG. 7 is a flowchart showing an example of the training process of the logo detection model NN1 (FIG. 3 (A)).
  • the logo detection model NN1 is trained so that the output data 830 indicates the appropriate area information and the appropriate logo class of the logo image in the input image 800.
  • a plurality of calculation parameters used for the calculation of the logo detection model NN1 (including a plurality of calculation parameters used for each calculation of the plurality of layers CV11-CV1m and CN11-CN1n) are adjusted.
  • the processor 210 performs the process of FIG. 7 according to the second program 232.
  • the processor 210 acquires the first-class data set DS1 from the non-volatile storage device 230.
  • the processor 210 divides the plurality of labeled data LD1s of the first-class data set DS1 into a training data set and a confirmation data set. For example, the processor 210 adopts 70% of the randomly selected labeled data LD1 as the training data set and the remaining 30% of the labeled data LD1 as the confirmation data set.
  • Nt the total number of labeled data LD1s in the training data set
  • Nv the total number of labeled data LD1s in the confirmation data set is Nv (Nt and Nv are both 2 or more). integer).
  • the processor 210 initializes a plurality of arithmetic parameters of the logo detection model NN1. For example, each operation parameter is set to a random value.
  • the processor 210 calculates the learning loss using the learning data set. Specifically, the processor 210 inputs Nt first-class learning image data D11 into the logo detection model NN1 and generates Nt output data 830. Then, the processor 210 calculates the learning loss by using the Nt output data 830 and the Nt label data D12 associated with the Nt type 1 learning image data D11.
  • the loss function is used to calculate the learning loss.
  • the loss function may be various functions for calculating the evaluation value of the difference between the output data 830 and the label data D12.
  • the loss function disclosed in the above paper of YOLO is used.
  • This loss function contains the following five components. That is, the loss function corresponds to the difference in center position, the difference in size (that is, width and height), and the difference in certainty with respect to the bounding box that should indicate the region of region information D121. Contains individual ingredients.
  • the bounding box indicating the area of the area information D121 is the area of the area information D121 and the bounding box among the Bn bounding boxes associated with the cell 801 (FIG. 3B) including the center position of the area information D121.
  • this loss function is a component corresponding to the difference between the certainty of the bounding box and the ideal certainty (specifically, zero) for the bounding box that should not correspond to the area of the area information D121. Includes. Further, this loss function includes a component corresponding to the difference between the C class probabilities and the C correct class probabilities for the cell including the center position of the area information D121.
  • the processor 210 calculates the total value of Nt losses calculated by using the loss function as a learning loss.
  • the learning loss may be various values having a correlation with the Nt loss, such as the average value and the median of the Nt loss.
  • the processor 210 uses the learning loss to update a plurality of arithmetic parameters of the logo detection model NN1. Specifically, the processor 210 adjusts the calculation parameters according to a predetermined algorithm so that the learning loss is small.
  • a predetermined algorithm for example, an algorithm using an error back propagation method and a gradient descent method is used.
  • the processor 210 calculates the confirmation loss using the confirmation data set.
  • the confirmation loss calculation method is the same as the learning loss calculation method described in S240, except that the confirmation data set is used instead of the learning data set.
  • the processor 210 inputs Nv first-class learning image data D11 of the confirmation data set into the logo detection model NN1 having the calculation parameters updated in S250, and Nv output data 830. Generate. Then, the processor 210 calculates the confirmation loss by using the Nv output data 830 and the Nv label data D12 associated with the Nv type 1 learning image data D11.
  • the processor 210 determines whether or not the training has been completed.
  • the conditions for completing the training may be various conditions.
  • the condition for completing the training is that both the learning loss and the confirmation loss are equal to or less than the predetermined reference value.
  • the conditions for completing the training may be various conditions indicating that both the learning loss and the confirmation loss are small.
  • the reference value of learning loss may be different from the reference value of confirmation loss.
  • the processor 210 shifts to S240 and continues the training.
  • the processor 210 uses the logo detection model NN1 including the adjusted arithmetic parameters as a trained model in the storage device 215 (here, the non-volatile storage device 230). Store. Then, the processor 210 ends the process of FIG. 7.
  • the processor 210 may store the logo detection model NN1 in an external storage device (not shown) connected to the information processing device 200.
  • the output data 830 from the trained logo detection model NN1 has the following features.
  • a cell containing the center of the logo image can indicate a bounding box that appropriately indicates the area of the logo image and has high certainty and appropriate class probability.
  • the plurality of bounding boxes indicated by the output data 830 may include inappropriate bounding boxes that do not indicate the area of the logo image. Inappropriate bounding boxes are associated with low certainty. Therefore, the logo image can be appropriately identified by using a bounding box having a high degree of certainty.
  • the processor 210 generates a plurality of first-class learning image data D11 used for training of the logo detection model NN1 for detecting the logo which is an example of the object. Specifically, in S110, the processor 210 acquires the logo image data of the logo image, which is the image of the logo. In S115 and S120, the processor 210 divides the logo image into T-type partial regions corresponding to T (T is an integer of 2 or more) partial color ranges obtained by dividing the color distribution range of the logo image. do. The processor 210 executes an adjustment process including a process (S125) of changing each color of one or more types of partial regions to a color different from the original color.
  • T is an integer of 2 or more
  • the processor 210 generates a plurality of color change logo image data of the plurality of color change logo images.
  • the plurality of color change logo images are logo images, respectively.
  • the plurality of color change logo images have the same kind of partial regions of different colors from each other.
  • the color change logo images 910a and 910b of FIG. 5C have the same type 1 region A1 having different colors from each other.
  • the processor 210 generates candidate image data of the candidate image in S135 and S140.
  • the candidate image data corresponds to the training image data D11
  • the candidate image corresponds to the training image of the training image data D11.
  • the processor 210 executes the processing of S125-S140 a plurality of times.
  • the processor 210 generates a plurality of color change logo image data. Then, the processor 210 generates a plurality of candidate image data of a plurality of candidate images by using one or more background image data and a plurality of color change logo image data.
  • the candidate image includes a background image indicated by any one or more background image data, and one or more color change logo images arranged on the background image (FIG. 6 (A) -FIG. 6 (H)).
  • the plurality of candidate images include different color-changing logo images among the generated plurality of color-changing logo images.
  • the candidate image 800c (FIG. 6 (C)) includes a color change logo image 910c that is not included in the candidate image 800f (FIG. 6 (F)).
  • the candidate image 800f includes a color change logo image 910b that is not included in the candidate image 800c.
  • the processor 210 can generate a plurality of training image data D11 showing images of logos expressed in various colors.
  • Such a plurality of training image data D11 can appropriately train a machine learning model (for example, logo detection model NN1) that processes a logo image.
  • the background image data of one or more includes the background image data of the background image 800 bz of the photograph. Therefore, the processor 210 can generate a plurality of training image data D11 indicating the image of the logo on the background image of the photograph.
  • a plurality of training image data D11 can train a machine learning model (for example, a logo detection model NN1) so as to appropriately process the image of the logo on the background image of the photograph.
  • the plurality of background image data available may include a plurality of background image data showing different photographs.
  • the plurality of background images may include various photographs such as landscapes, people, furniture, and stationery.
  • Such a plurality of training image data D11 can train a machine learning model (for example, a logo detection model NN1) so as to appropriately process a logo image regardless of the content of the background image.
  • the background image data of one or more includes the background image data of the background image 800az showing a solid image of a single color. Therefore, the processor 210 can generate a plurality of training image data showing an image of a logo on a background image showing a solid color image.
  • a plurality of training image data D11 can train a machine learning model (for example, a logo detection model NN1) so as to appropriately process a logo image on a background image showing a solid color image.
  • the plurality of background image data that can be used may include a plurality of background image data showing solid images of different colors from each other.
  • Such a plurality of training image data D11 can train a machine learning model (for example, a logo detection model NN1) so as to appropriately process a logo image regardless of the color of the background image.
  • a plurality of types of training image data D11 having a plurality of types of background images showing different contents, such as a background image of a photograph and a background image showing a solid color image, are generated.
  • Such a plurality of types of training image data D11 can train a machine learning model (for example, a logo detection model NN1) so as to appropriately process logo images on various background images.
  • the processor 210 executes an image adjustment process including S125 (FIG. 4) in order to generate a plurality of color change logo image data.
  • the adjustment process further includes S130.
  • S130 includes one or both of a process of changing the size of the color-changing object image and a process of changing the aspect ratio of the color-changing object image. Therefore, the processor 210 can generate the training image data D11 indicating the image of the logo in which any one or both of the size and the aspect ratio are changed.
  • Such training image data D11 is a machine learning model (eg, logo detection model NN1) so as to appropriately process an image of a logo whose size, aspect ratio, or both have been changed. Can be trained.
  • the process of generating the training image data D11 includes the background image 800 az and a plurality of processes arranged on the background image 800 az. It includes a process of generating the training image data D11 of the training image 800a including the color change logo images 910b, 910a2, 910c.
  • a machine learning model for detecting the logo image for example, as compared with the case where one learning image data D11 shows one color-changing logo image.
  • logo detection model NN1 can be trained efficiently.
  • the process of generating the training image data D11 is the background image 800 cz and one or more color change logo images arranged on the background image 800 cz. It includes a process of generating the training image data D11 of the image 800c including the 910c and the images 920a and 920b of other logos arranged on the background image 800cs.
  • a machine learning model that detects a logo image when one learning image data D11 shows an image of a logo and an image of another logo, as compared with a case where one learning image data D11 shows only an image of the same logo. (For example, logo detection model NN1) can be trained efficiently.
  • the processor 210 arranges a plurality of logo images on one learning image so as not to overlap each other. .. Therefore, the training image data D11 can appropriately train a machine learning model (for example, the logo detection model NN1) that detects the logo image.
  • a machine learning model for example, the logo detection model NN1
  • the process of generating the training image data D11 is performed on the candidate image data of the candidate image including the background image and one or more color change logo images arranged on the background image. It includes a process of generating training image data D11 by performing image processing.
  • the image processing includes one or more processes selected from the group consisting of the above seven processes P1-P7. Therefore, the processor 210 can generate the learning image data D11 showing the logo expressed in various formats.
  • Such learning image data D11 can train a machine learning model (eg, logo detection model NN1) to appropriately process logo images represented in various formats.
  • FIG. 8A is a schematic view showing an example of the configuration of the sheet detection model NN2.
  • the sheet detection model NN2 is a YOLO model, and its configuration is the same as that of the logo detection model NN1 (FIG. 3A).
  • the sheet detection model NN2 consists of p convolutional layers CV21-CV2p (p is an integer of 1 or more) and q fully connected layers CN21-CN2q following the convolutional layer CV21-CV2p (q is an integer of 1 or more). And (p is, for example, 24. q is, for example, 2).
  • a pooling layer (for example, a layer for max-pooling) is provided.
  • p may be different from m in FIG. 3 (A).
  • q may be different from n in FIG. 3 (A).
  • FIG. 8B is an explanatory diagram showing an outline of the operation of the seat detection model NN2.
  • the image 700 is an example of an input image input to the sheet detection model NN2.
  • the input image 700 is an image of the printer DV taken in the same manner as the captured images 700x and 700y of FIGS. 2 (A) and 2 (B).
  • the input image 700 is represented by the color values of the first direction Dx, the second direction Dy perpendicular to the first direction Dx, and the respective color values of the plurality of pixels arranged in a matrix along the first direction Dx.
  • the color value is represented by three component values of R (red), G (green), and B (blue).
  • the input image 700 includes an image of the sheet 910L including the first logo image 910.
  • the sheet detection model NN2 detects the area of the image of the object in the same manner as the logo detection model NN1 of FIGS. 3 (A) and 3 (B).
  • the difference from the logo detection model NN1 is that the sheet detection model NN2 is trained to detect the image of the label sheet instead of the logo image.
  • a C-type label sheet corresponding to the C-type logo image can be used. There is a one-to-one correspondence between the type of label sheet and the type of logo image. Then, the sheet detection model NN2 detects an image of the C type label sheet.
  • the type of label sheet is also referred to as a sheet class.
  • the sheet detection model NN2 detects a bounding box showing an image of a label sheet according to the same algorithm as the algorithm of the logo detection model NN1 of FIG. 3 (B).
  • the bounding box BBL showing the sheet 910L is detected.
  • a class identifier CLL is associated with the bounding box BBL.
  • the class identifier CLL is a class identifier corresponding to the highest class probability among the C class probabilities.
  • the class identifier of "1" indicates the first sheet 910L.
  • the sheet detection model NN2 outputs output data 730 indicating S ⁇ S ⁇ (Bn ⁇ 5 + C) predicted values. Similar to the output data 830 of FIG. 3A, the output data 730 shows the image area of the object (here, the label sheet) by a bounding box having a certainty of the threshold value or higher. Further, the class identifier corresponding to the highest class probability among the C class probabilities corresponding to the bounding box is adopted as the class identifier associated with the bounding box.
  • FIG. 9 is a flowchart showing an example of the generation process of the second type data set DS2 (FIG. 1) for training the seat detection model NN2.
  • the Type 2 data set DS2 contains a plurality of Type 2 labeled data LD2s.
  • the type 2 labeled data LD2 includes the type 2 learning image data D21 including the image of the label sheet, and the label data D22 associated with the type 2 learning image data D21.
  • the label data D22 shows the area information D221 indicating the area of the sheet image in the image and the sheet class information D222 indicating the type of the sheet image, similarly to the label data D12 described in S150 and S155 of FIG. There is.
  • the processor 210 executes a process of associating the label data D22 indicating the area information D221 and the label data D22 with the type 2 learning image data D21 (this process is an annotation process). An example).
  • the processor 210 executes the process of FIG. 9 according to the third program 233.
  • the processor 210 acquires the target image data which is the image data to be processed.
  • the processor 210 acquires unprocessed sheet image data as target image data from a plurality of sheet image data prepared in advance.
  • the plurality of sheet image data are stored in the storage device 215 (for example, the non-volatile storage device 230) in advance (not shown).
  • Each of the plurality of sheet image data indicates an image including a label sheet.
  • a C-type label sheet corresponding to the C-type logo image can be used.
  • the plurality of sheet image data includes C type sheet image data indicating the C type label sheet.
  • FIG. 10A is an explanatory diagram showing an example of a target image.
  • the target image 700a includes an image region of the first sheet 910L and a background region 700az.
  • the image of the first sheet 910L includes the first logo image 910.
  • the sheet image data is generated by arranging the sheet image on the background image showing the monochromatic solid image indicated by the background image data.
  • the background area indicates the outer surface of the printer.
  • the color of the outer surface of the printer is the same regardless of the position. Therefore, even on the actual captured image, the image in the background region is a solid image of approximately a single color.
  • the background image is not limited to a monochromatic solid image, but may be various images such as a photographed image of the outer surface of the printer.
  • the plurality of sheet image data may be generated by photographing a printer having a label sheet with a digital camera.
  • the processor 210 identifies the logo area by analyzing the target image data using the logo detection model NN1 (FIG. 3 (A)). Specifically, the processor 210 generates the output data 830 by inputting the target image data into the logo detection model NN1. Then, the processor 210 adopts a rectangular area surrounded by a bounding box (specifically, a bounding box having a certainty of a certainty equal to or higher than a predetermined threshold value) indicated by the output data 830 as a logo area.
  • FIG. 10B is an explanatory diagram showing an example of a logo area.
  • the bounding box BBt shows the first logo image 910 on the target image 700a.
  • the processor 210 determines whether or not the logo area has been detected. When the logo area is detected (S320: Yes), in S325, the processor 210 determines the extended area including the logo area.
  • FIG. 11 is a flowchart showing an example of a process for determining a candidate for an expansion area.
  • the processor 210 divides the target image into a plurality of blocks.
  • FIG. 10C is an explanatory diagram showing an example of a plurality of blocks.
  • the target image 700a is divided into a plurality of blocks BL having a predetermined shape.
  • the arrangement of the plurality of blocks BL in the target image 700a is predetermined.
  • the processor 210 calculates the edge strength value of each of the plurality of blocks BL.
  • the edge intensity value is an evaluation value of the ratio of the change in color to the change in position on the target image.
  • the processor 210 uses a so-called Laplacian filter to calculate the edge amount of each pixel (for example, the absolute value of the calculation result by the filter).
  • a predetermined color component for example, a luminance value
  • the processor 210 calculates the average value of the edge amounts of the plurality of pixels in the block BL as the edge strength value of the block BL.
  • the edge strength value may be calculated by various other methods.
  • the filter may be any filter for calculating the edge amount instead of the Laplacian filter (Sobel filter, Prewit filter, etc.).
  • the edge strength value of the block BL may be various values having a correlation with the edge amounts of the plurality of pixels, such as a median value and a mode value, instead of the average value of the edge amounts of the plurality of pixels.
  • the processor 210 specifies a block BL having an edge strength value equal to or less than a predetermined reference as a uniform block.
  • a block BL having an edge strength value equal to or less than a predetermined reference is also referred to as a non-uniform block.
  • FIG. 10D is an explanatory diagram showing an example of a uniform block.
  • the block BL1 with hatching is the uniform block BL1
  • the block BL2 without hatching is the non-uniform block BL2.
  • the plurality of blocks BL of the background region 700az outside the first sheet 910L are uniform blocks BL1.
  • a large number of block BLs are non-uniform block BL2.
  • the plurality of block BLs among the plurality of block BLs showing the first sheet 910L are uniform blocks BL1.
  • the label sheet may include other elements such as characters, figures, marks, symbols, etc.
  • the proportion of the uniform block BL1 among the plurality of block BLs showing the label sheet 910L is small.
  • the pixel showing the contour 910Lo of the label sheet 910L has a large edge amount. Therefore, the block BL showing the contour 910Lo of the label sheet 910L is likely to be the non-uniform block BL2.
  • the processor 210 adopts the same area as the logo area as the initial area of the extended area. Then, the processor 210 determines the candidate of the extended area including the logo area by moving the outline of the extended area toward the outside of the logo area. The processor 210 moves the contour so that the entire contour is included in the uniform block BL1.
  • FIG. 10E is an explanatory diagram showing an example of a candidate for an extended region.
  • the candidate expansion region LAe on the target image 700a includes the logo region LA and the outer portion of the logo region LA.
  • the entire contour LAeo of the candidate expansion region LAe is included in the uniform block BL1.
  • the block BL showing the contour 910Lo of the label sheet 910L is likely to be the non-uniform block BL2. Therefore, the processor 210 can determine the candidate expansion region LAe having the contour LAeo that surrounds the contour 910Lo of the label sheet 910L from the outside. Such a candidate extension region LAe includes the entire label sheet 910L.
  • the process of moving the contour may be various processes.
  • the contour LAo of the logo area LA is composed of four sides (that is, an upper side, a lower side, a left side, and a right side) forming a rectangle.
  • the processor 210 repeats the process of moving the four sides in order by a predetermined amount to the outside until the entire four sides are included in the uniform block BL1.
  • the processor 210 can determine the candidate expansion region LAe that includes the entire label sheet 910L and is smaller than the target image 700a.
  • the processor 210 ends the process of FIG. 11, that is, S325 of FIG. 9, in response to the completion of S440.
  • the processor 210 selects candidate seat class information, which is a candidate for seat class information, from C sheet class information based on the logo class specified in S315.
  • the processor 210 corresponds to the two sheet class information corresponding to the two logo images 910 and 920. Is adopted as a candidate.
  • the C type logo image that can be used includes a third logo image (not shown). Then, when the logo class specified in S315 corresponds to the third logo image, the processor 210 adopts one sheet class information corresponding to the third logo image as a candidate.
  • the correspondence between the logo class specified in S315 and the candidate seat class information is predetermined.
  • the candidate seat class information seat class information that may be appropriate in light of the logo class specified in S315 is adopted.
  • the processor 210 selects the candidate associated with the logo class.
  • FIG. 12A is an explanatory diagram showing an example of a UI screen.
  • the UI screen 600 includes a first user interface image 610 and a second user interface image 620. This UI screen 600 shows an example in which the number of candidate sheet class information selected in S330 (FIG. 9) is 2 or more.
  • the first user interface image 610 is a user interface image for allowing the user to change the position of the contour LAeo of the candidate extension area LAe.
  • the first user interface image 610 shows the target image 700a including the first sheet 910L and the contour LAeo of the candidate expansion region LAe. The user can move the contour LAeo by operating the operation unit 250 (FIG. 1).
  • the second user interface image 620 is a user interface image for allowing the user to specify sheet class information indicating the classification of the candidate extension area LAe (that is, the classification of the label sheet).
  • the second user interface image 620 shows a candidate area 621 showing one or more candidates for sheet class information selectable by the user, and a check box 622 showing one candidate selected from one or more candidates. ..
  • the solid check box 622 indicates selectable candidates, and the dashed check box 622 indicates non-selectable candidates.
  • the selectable candidates are the candidates selected in S330.
  • the second user interface image 620 shows four seat class information CC1, CC2, CC3, and CC4.
  • the first sheet class information CC1 corresponds to the first logo image 910 (FIG. 3B)
  • the second sheet class information CC2 corresponds to the second logo image 920
  • the third sheet class information CC3 is illustrated.
  • the fourth sheet class information CC4 indicates a barcode.
  • the two seat class information CC1 and CC2 can be selected, and the other seat class information CC3 and CC4 cannot be selected.
  • the user can check (ie, select) one of one or more selectable candidates by operating the operation unit 250 (FIG. 1).
  • the processor 210 adopts the seat class information corresponding to the logo class specified in S315 as the default seat class information.
  • the processor 210 displays the second user interface image 620 in a state where the default seat class information is selected.
  • FIG. 12C shows an example of a UI screen when the number of candidate sheet class information selected in S330 (FIG. 9) is 1.
  • the first user interface image 610 shows a target image 700c including an image of the label sheet 930L.
  • the label sheet 930L includes the third logo image 930.
  • the second user interface image 620 shows that the third sheet class information CC3 can be selected, and the other sheet class information CC1, CC2, and CC4 cannot be selected.
  • the display of non-selectable candidates may be omitted.
  • FIG. 12B is an explanatory diagram showing an example of the modified contour LAeo.
  • the user brings each of the four sides of the contour LAeo closer to the contour 910Lo of the label sheet 910L.
  • the candidate expansion region LAe can appropriately indicate the region of the label sheet 910L.
  • the processor 210 determines the region having the contour of the changed position as the final expansion region. The user can input an instruction to accept the contour LAeo without changing the position by operating the operation unit 250. In this case, the processor 210 determines the candidate expansion region LAe determined in S325 as the final expansion region.
  • the processor 210 determines whether or not the total number of selectable candidates for seat class information is 1. When the number of selectable candidates is larger than 1 (S345: No), in S355, the processor 210 accepts the user to specify the seat class information. In the example of FIGS. 12A and 12B, the user can select one of the two seat class information CC1 and CC2 by operating the operation unit 250 (FIG. 1). For example, the logo class identified in S315 (FIG. 9) can be erroneous. That is, the default seat class information adopted in S335 may be incorrect. The user can confirm appropriate sheet class information by observing the label sheet displayed on the first user interface image 610. Then, the user can specify appropriate seat class information by operating the operation unit 250. If the default seat class information is correct, the user can input an instruction to accept the default seat class information by operating the operation unit 250. After S355, the processor 210 shifts to S360.
  • the processor 210 determines the seat class information to the candidate seat class specified in S330. Then, the processor 210 shifts to S360.
  • the processor 210 In S360, the processor 210 generates annotation data indicating annotation information including the area information indicating the candidate extension area LAe and the sheet class information determined in S350 or S355. In S365, the processor 210 associates the target image data with the annotation data and stores them in the storage device 215 (for example, the non-volatile storage device 230). The whole of the target image data and the annotation data associated with each other forms the second type labeled data LD2 (FIG. 1). The target image data corresponds to the type 2 learning image data D21, and the annotation data corresponds to the label data D22. The processor 210 may store the labeled data LD2 in an external storage device (not shown) connected to the information processing device 200.
  • the processor 210 shifts to S370. If the logo area is not detected in S315 (S320: No), the processor 210 skips S325-S365 and shifts to S370. In S370, the processor 210 determines whether or not the processing of all the sheet image data is completed. When unprocessed sheet image data remains (S370: No), the processor 210 shifts to S310 and processes new target image data. When the processing of all the sheet image data is completed (S370: Yes), the processor 210 ends the processing of FIG. As a result, the second type data set DS2 is generated.
  • the information processing apparatus 200 is an example of a system that associates the label data D22 with the type 2 learning image data D21.
  • FIG. 13 is a flowchart showing an example of the training process of the seat detection model NN2 (FIG. 8A).
  • the sheet detection model NN2 is trained so that the output data 730 shows appropriate region information and appropriate sheet class information of the image of the label sheet in the input image 700.
  • a plurality of calculation parameters used for the calculation of the sheet detection model NN2 (including a plurality of calculation parameters used for each calculation of the plurality of layers CV21-CV2p and CN21-CN2q) are adjusted.
  • the processor 210 performs the process of FIG. 13 according to the fourth program 234.
  • the training process of FIG. 13 is the same as that of the training process of FIG. 7, except that the model to be trained is the sheet detection model NN2 and the data set used for training is the second type data set DS2. It is the same.
  • S510-S580 of FIG. 13 is the same as S210-S280 of FIG. 7 (detailed description is omitted).
  • the output data 730 from the trained sheet detection model NN2 can adequately indicate the image region of the label sheet as well as a bounding box with high certainty and appropriate class probabilities.
  • the processor 210 may store the sheet detection model NN2 in the storage device 215 in S580, and may instead store it in an external storage device (not shown) connected to the information processing device 200. good.
  • the trained sheet detection model NN2 (FIG. 8 (A)) can be used for printer inspection.
  • the processor 210 inputs the photographed image data of the printer (for example, the photographed image described with reference to FIGS. 2A and 2B) into the sheet detection model NN2.
  • the output data 730 output from the sheet detection model NN2 indicates the area of the label sheet detected from the captured image. If the label sheet is detected, the printer inspection result is acceptable. If the label sheet is not detected, the printer inspection result is unacceptable.
  • the processor 210 executes a process of associating information with the second-class learning image data D21 used for training the sheet detection model NN2, which is an example of the machine learning model.
  • the processor 210 inputs the target image data (that is, the second type learning image data D21) of the target image (for example, the target image 700a (FIG. 10A)) which is the image to be processed. get.
  • the processor 210 analyzes the target image data to detect a logo region (for example, the logo region LA) showing an image of the logo which is an example of the object of interest from the target image.
  • the processor 210 determines a candidate extension area LAe including a logo area and a portion outside the logo area.
  • the processor 210 stores the annotation data (that is, the label data D22) indicating the annotation information including the area information indicating the extended area LAe in the storage device 215 in association with the target image data. In this way, the processor 210 can associate the area information indicating the candidate extended area LAe including the other area in addition to the area LA indicating the logo with the type 2 learning image data D21. For example, as described with reference to FIGS.
  • the processor 210 uses the area information D221 indicating the area of the label sheet 910L including the logo image 910 and other images as the second type learning image. It can be associated with the data D21.
  • area information D221 is suitable for training a machine learning model (for example, sheet detection model NN2) that processes an area including another area (for example, a label sheet area) in addition to the area showing the logo. ..
  • the image of the object of interest is a logo image. Therefore, the processor 210 can associate the area information D221 indicating the extended area including the other area in addition to the area showing the logo image with the type 2 learning image data D21.
  • the region detected in S315 is a rectangular region.
  • various object detection models can be used to detect a rectangular area showing an image of an object of interest (for example, a logo image) (for example, SSD (Single Shot MultiBox Detector), R-CNN (for example). Region Based Convolutional Neural Networks) etc.). Therefore, the processor 210 can appropriately detect the area.
  • the process of determining the expansion area includes S325 (FIG. 9).
  • S325, that is, the process of FIG. 11 expands the extended area from the same area as the logo area LA toward the outside of the logo area LA by analyzing the target image data as described with reference to FIG. 10 (E). Includes processing to do.
  • this process is performed by the processor 210.
  • a candidate for the extended region LAe is determined. In this way, since the processor 210 (that is, the information processing apparatus 200) expands the expansion area LAe, the information processing apparatus 200 can reduce the burden on the user.
  • S325, that is, the process of FIG. 11, includes the process of S410-S430 and the process of S440.
  • the processor 210 analyzes the target image data to specify the block BL having an edge intensity value equal to or less than the reference as the uniform block BL1. ..
  • the edge intensity value is an evaluation value of the ratio of the change in color to the change in position on the target image.
  • the condition for selecting the block BL as the uniform block BL1 (also referred to as the uniform condition) indicates that the edge strength value is equal to or less than the reference. Further, as described with reference to FIG.
  • the processor 210 extends the extended area toward the outside of the logo area LA so that the entire contour LAeo of the extended area LAe is included in the uniform block BL1. Expand. In this way, the processor 210 can appropriately expand the expansion region LAe by using the uniform block BL1.
  • the extended area LAe can be extended to the boundary between the area of the large object (for example, the label sheet 910L) including the object of interest (here, the logo image 910) and other elements, and the background area.
  • the area LAe expanded in this way is suitable for training a machine learning model (for example, sheet detection model NN2) that processes an area of a large object including an area showing a logo as well as other areas.
  • the process of determining the extended region LAe includes S335 and S340 (FIG. 9).
  • the processor 210 displays a first user interface image 610 for causing the user to change the position of the contour LAeo of the candidate expansion region LAe. Display on 240.
  • the processor 210 determines the region having the contour of the position changed by the user as the extended region. Therefore, the processor 210 can use the contour modified by the user to determine an appropriate extension area.
  • the processor 210 when S355 (FIG. 9) is executed, in S335, as described in FIG. 12A and the like, the processor 210 is a sheet class indicating the classification of the extended region LAe (that is, the classification of the label sheet).
  • a second user interface image 620 for allowing the user to specify the information is displayed on the display unit 240.
  • the processor 210 stores the annotation data indicating the annotation information including the sheet class information specified by the user in the storage device 215 in association with the target image data. Therefore, the processor 210 can associate appropriate seat class information with the target image data.
  • the second user interface image 620 includes a candidate area 621 showing one or more candidates of sheet class information that can be selected by the user. .. Then, as described in S330, the candidate area 621 has one or more seat class information associated with the logo included in the logo area detected in S315 among the C predetermined sheet class information. Is shown as one or more candidates. For example, when the first logo image 910 (FIG. 12 (A)) is detected, the sheet class information CC1 and CC2 associated with the first logo image 910 are candidates. Therefore, the user can easily select appropriate seat class information.
  • the processor 210 associates in advance with the logo included in the logo area detected in S315 among the predetermined C sheet class information.
  • the obtained candidate sheet class information is determined as the sheet class information to be included in the annotation information.
  • the processor 210 selects the third sheet class information CC3 associated with the third logo image 930 as a candidate. do.
  • the processor 210 determines the seat class information to be included in the annotation information in the third sheet class information CC3.
  • the processor 210 stores the annotation data indicating the annotation information including the determined sheet class information in the storage device 215 in association with the target image data. Therefore, the processor 210 can associate appropriate seat class information with the target image data.
  • the process of generating the training image data for training the object detection model may be various other processes instead of the process of FIG.
  • a predetermined region pattern for example, the first type region A1 and the second type region A1 and the second
  • It may be a process of dividing the logo image according to the area pattern indicating the seed area A2).
  • the changed color may be various colors.
  • the changed color may be a predetermined color different from the original color.
  • the changed color is expressed by halftone dots different from the original halftone dots (for example, the number of lines different from the original halftone dots). It may be a halftone color.
  • the background image that can be used in S135-S140 is not limited to a solid color image and a photograph, but may be various images such as figures and patterns. Also, from the available background images, either one or both of the photograph and the solid color image may be omitted.
  • any one of the size change process and the aspect ratio change process may be omitted. Further, S130 may be omitted.
  • the processor 210 may determine the processing contents according to a predetermined plan, instead of randomly determining the processing contents.
  • the number C of the types of the logo image (that is, the number C of the classification (class)) is not limited to 3, and may be various numbers of 1 or more such as 1, 2, 4.
  • a plurality of logo images may be arranged so as to partially overlap each other. Further, a part of the logo image may be deleted.
  • one or more processes arbitrarily selected from the above seven processes P1-P7 may be omitted from the available processes. Further, S145 may be omitted.
  • the machine learning model that detects the logo image is not limited to the YOLO model described in FIG. 3 (A), and may be an improved YOLO model such as "YOLO v3".
  • other models such as SSD, R-CNN, Fast R-CNN, Faster R-CNN, and Mask R-CNN may be used.
  • the object to be detected by the object detection model is not limited to the logo image, but may be any object (for example, a part mounted on a printer, a barcode, etc.). Then, the first-class data set DS1 generated by the process of FIG. 4 (or the process of a modification thereof) may be used for training of various object detection models.
  • the process of associating information with the image data used for training the machine learning model may be various other processes instead of the process of FIG.
  • the process for detecting the logo area (S315) may be various other processes instead of the process using the logo detection model NN1.
  • the processor 210 may detect the logo area by pattern matching using the reference logo image data indicating the reference logo image.
  • the process of determining the expansion area may be various other processes instead of the processes of S325 and S340.
  • the processor 210 may determine an extended area using a single template image showing a logo area and an extended area associated with the logo area. Specifically, the processor 210 determines the position of the template image with respect to the target image so that the logo area in the target image and the logo area of the template image match. Then, the processor 210 determines the extended area indicated by the template image at the determined position as the extended area to be applied to the target image.
  • the object of interest used to determine the extended area is not limited to the logo image, but may be any object such as a barcode.
  • the shape of the object region (for example, the logo region) showing the image of the object of interest may be any other shape instead of the rectangular shape.
  • the shape of the object region may be a polygon such as a triangle, a pentagon, or a hexagon, or may be a shape defined by a contour including a curved portion such as a circle or an ellipse.
  • the shape of the object region may be a shape determined by the contour of the object.
  • the process of specifying the uniform area on the target image may be various other processes instead of the process of S410-S430 in FIG.
  • the uniform region is a region that satisfies the uniform condition.
  • the uniform condition is a condition indicating that the ratio of the color change to the position change on the target image is equal to or less than the standard.
  • the edge intensity value of the block BL may be various values indicating the ratio of the color change to the position change.
  • the edge intensity value may be, for example, the difference between the highest and lowest luminance values in the block BL.
  • the processor 210 may specify a uniform region by using a histogram of color values (for example, luminance values) of a plurality of pixels of the target image. Specifically, the processor 210 may specify one continuous region formed by a plurality of pixels included in one section of the histogram as one uniform region. In this case, it is a uniform condition that the color value is included in one section.
  • one UI screen 600 shows a first user interface image 610 and a second user interface image 620. That is, the process of displaying the UI screen 600 on the display unit 240 includes a process of displaying the first user interface image 610 and a process of displaying the second user interface image 620. Instead, the processor 210 may display the first user interface image 610 on a screen different from the screen showing the second user interface image 620.
  • S340 in FIG. 9 may be omitted.
  • the processor 210 may determine the candidate expansion area determined in S325 as it is as the final expansion area.
  • the first user interface image 610 may be omitted from the UI screen (FIGS. 12A to 12C).
  • S350 in FIG. 9 may be omitted.
  • the processor 210 may select a plurality of candidate seat class information in S330 regardless of the logo class specified in S315, and may accept the user's designation of seat class information in S355. Further, S355 may be omitted.
  • the processor 210 selects one candidate sheet class information associated with the logo class in S330, regardless of the logo class specified in S315, and the sheet class information is specified in S330 in S350. You may decide on a candidate seat class.
  • the sheet class information may be omitted from the annotation information. For example, when the number C of the label sheet types is 1, even if the sheet class information is omitted, appropriate training using the second type data set DS2 is possible.
  • the machine learning model that detects the image of the label sheet is not limited to the YOLO model described in FIG. 8 (A), but is YOLO v3, SSD, R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN, etc. It may be another model.
  • the inspection target using the machine learning model is not limited to a printer, but may be any product such as a scanner, a multifunction device, a digital camera, a cutting machine, and a mobile terminal.
  • the case containing the product may be the subject of inspection.
  • the machine learning model may be trained to detect various other objects, not limited to label sheets.
  • a machine learning model may detect a component to be mounted on a printer from an image taken by the printer.
  • the image of the detection object eg, label sheet
  • the extended region containing the feature portion can be used as an area indicating the detection target.
  • Annotation information including area information indicating such an extended area may be associated with image data for training.
  • image data and annotation information are not limited to object detection models, and may be used for training of various machine learning models such as classification models.
  • the color space of the input image data input to the machine learning model may be another color space such as a CMYK color space instead of RGB.
  • the input image data may represent an image by a luminance value.
  • the input image data may be generated by executing various image processes such as a resolution conversion process and a trimming process.
  • the method of associating the image data with the label data may be any method.
  • the label data may include identification data that identifies the image data associated with the label data.
  • the processor 210 may generate table data showing the correspondence between the image data and the label data. Further, the processor 210 may store the image data and the label data associated with each other in one data file.
  • the training process of the machine learning model may be various methods suitable for the machine learning model instead of the processes of FIGS. 7 and 13.
  • the loss function used to calculate the loss is various functions for calculating the evaluation value of the difference between the output data 730 and 830 and the label data such as the cross entropy error. It may be there.
  • the loss function may be various functions for calculating the loss having a correlation between the error of the region indicating the object and the error of the probability for each type of the object.
  • the method of adjusting the arithmetic parameters included in the machine learning model may be various other methods such as a method of propagating a target value (also called Target Propagation) instead of the error backpropagation method.
  • the training completion condition may be various conditions indicating that the difference between the data output from the machine learning model and the label data is small. For example, confirmation loss may be omitted from the conditions for completing training. In this case, in the processing of FIGS. 7 and 13, all the labeled data may be used as a learning data set. Further, the processor 210 may determine that the training is completed when the completion instruction is input from the operator, and may determine that the training is not completed when the training continuation instruction is input.
  • the operator may determine whether or not to end the training by referring to the output data output using the confirmation data set, for example. Instead of this, the condition for completing the training was that the calculation of the learning loss and the update of the calculation parameters (for example, S240-S250 (FIG. 7) and S540-S550 (FIG. 13)) were repeated a predetermined number of times. It's okay.
  • the condition for completing the training was that the calculation of the learning loss and the update of the calculation parameters (for example, S240-S250 (FIG. 7) and S540-S550 (FIG. 13)) were repeated a predetermined number of times. It's okay.
  • the data set generation process of FIG. 4, the training process of FIG. 7, the annotation process of FIG. 9 (data set generation process), the training process of FIG. 13, and the inspection process (not shown) are respectively. It may be executed by different information processing devices. A process arbitrarily selected from these processes may be shared by a plurality of devices (for example, an information processing device such as a computer) capable of communicating with each other via a network.
  • devices for example, an information processing device such as a computer
  • a part of the configuration realized by the hardware may be replaced with software, and conversely, a part or all of the configuration realized by the software may be replaced with the hardware. May be good.
  • the functions of the models NN1 and NN2 in FIG. 1 may be realized by a dedicated hardware circuit.
  • 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 may be used while being stored in the same or different recording medium (computer-readable recording medium) as it was provided.
  • the "computer-readable recording medium” is not limited to a portable recording medium such as a memory card or a CD-ROM, but is connected to an internal storage device in the computer such as various ROMs or a computer such as a hard disk drive. It may also include an external storage device.

Landscapes

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

Abstract

適切な情報を画像データに関連付ける。処理対象の画像である対象画像の対象画像データを取得する。対象画像データを分析することによって、対象画像内から、注目対象物の画像を示す対象物領域を検出する。対象物領域と対象物領域の外側の部分とを含む拡張領域を決定する。拡張領域を示す領域情報を含むアノテーション情報を示すアノテーションデータを対象画像データに関連付けて記憶装置に格納する。

Description

方法、システム、および、コンピュータプログラム
 本明細書は、画像データに情報を関連付ける技術に関する。
 従来から、画像を処理する機械学習モデルが、用いられている。機械学習モデルをトレーニングするために、画像データと、画像データに関連する情報(メタデータとも呼ばれる)と、が用いられる。メタデータは、例えば、画像中のオブジェクトに関連する情報(オブジェクトの位置、オブジェクトを示す領域、オブジェクトの識別情報など)を示している。画像データに関連する情報は、作業者によって付与される。画像データに対する情報の付与は、アノテーションとも呼ばれる。特許文献1には、作業者によって付与された情報の正確性を評価し、評価に応じた画像を作業者に処理させる技術が、提案されている。
特開2020-24665号公報
 機械学習モデルの適切なトレーニングのためには、適切な情報の関連付けが要求される。適切な情報は、トレーニング対象の機械学習モデルによって種々に変化する。このような状況下で、適切な情報を画像データに関連付けることは、容易ではなかった。
 本明細書は、適切な情報を画像データに関連付ける技術を開示する。
 本明細書に開示された技術は、以下の適用例として実現することが可能である。
[適用例1]機械学習モデルのトレーニングに用いられる画像データに情報を関連付ける関連付け方法であって、処理対象の画像である対象画像の対象画像データを取得する取得工程と、前記対象画像データを分析することによって、前記対象画像内から、注目対象物の画像を示す対象物領域を検出する検出工程と、前記対象物領域と前記対象物領域の外側の部分とを含む拡張領域を決定する決定工程と、前記拡張領域を示す領域情報を含むアノテーション情報を示すアノテーションデータを前記対象画像データに関連付けて記憶装置に格納する関連付け工程と、を備える、関連付け方法。
 この構成によれば、対象画像データを分析することによって検出される対象物領域と、対象物領域の外側の部分と、を含む拡張領域を示す領域情報を含むアノテーション情報が対象画像データに関連付けて記憶装置に格納されるので、注目対象物を示す領域に加えて他の領域を含む領域を、対象画像データに関連付けることができる。
 なお、本明細書に開示の技術は、種々の態様で実現することが可能であり、例えば、画像データに関連付けるべき情報を特定する方法および特定装置、画像データに情報を関連付ける関連付け方法および関連付け装置、学習画像データの生成方法および生成装置、それらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体(例えば、一時的ではない記録媒体)、等の形態で実現することができる。
一実施例としての情報処理装置を示す説明図である。 (A)、(B)は、撮影画像の例を示す概略図である。 (A)は、ロゴ検出モデルNN1の構成の例を示す概略図である。(B)は、ロゴ検出モデルNN1の動作の概要を示す概略図である。 第1種データセットDS1の生成処理の例を示すフローチャートである。 (A)は、ロゴ画像の例を示す説明図である。(B)は、色値の分布範囲の例を示すヒストグラムである。(C)は、分割された部分領域を示す説明図である。(D)は、追加調整処理によって生成される色変更ロゴ画像の例を示す説明図である。 (A)-(H)は、候補画像の例を示す概略図である。 ロゴ検出モデルNN1のトレーニング処理の例を示すフローチャートである。 (A)は、シート検出モデルNN2の構成の例を示す概略図である。(B)は、シート検出モデルNN2の動作の概要を示す説明図である。 第2種データセットDS2の生成処理の例を示すフローチャートである。 (A)は、対象画像の例を示す説明図である。(B)は、ロゴ領域の例を示す説明図である。(C)は、複数のブロックの例を示す説明図である。(D)は、均一ブロックの例を示す説明図である。(E)は、拡張領域の候補の例を示す説明図である。 拡張領域の候補を決定する処理の例を示すフローチャートである。 (A)は、UI画面の例を示す説明図である。(B)は、変更された輪郭LAeoの例を示す説明図である。(C)は、UI画面の例を示す説明図である。 シート検出モデルNN2のトレーニング処理の例を示すフローチャートである。
A.第1実施例:
A1.装置構成:
 図1は、一実施例としての情報処理装置を示す説明図である。本実施例では、情報処理装置200は、例えば、パーソナルコンピュータである。情報処理装置200は、対象物(例えば、プリンタなどの製品)の検査に用いられる機械学習モデルをトレーニングするための種々の処理を実行する。情報処理装置200は、プロセッサ210と、記憶装置215と、表示部240と、操作部250と、通信インタフェース270と、を備えている。これらの要素は、バスを介して互いに接続されている。記憶装置215は、揮発性記憶装置220と、不揮発性記憶装置230と、を含んでいる。
 プロセッサ210は、データ処理を行うように構成された装置であり、例えば、CPUである。揮発性記憶装置220は、例えば、DRAMであり、不揮発性記憶装置230は、例えば、フラッシュメモリである。不揮発性記憶装置230は、プログラム231、232、233、234と、ロゴ検出モデルNN1と、ロゴ検出モデルNN1のトレーニングのための第1種データセットDS1と、シート検出モデルNN2と、シート検出モデルNN2のトレーニングのための第2種データセットDS2と、を格納している。モデルNN1、NN2は、いわゆる機械学習モデルであり、本実施例では、プログラムモジュールである。プログラム231-234と、モデルNN1、NN2と、データセットDS1、DS2と、の詳細については、後述する。
 表示部240は、液晶ディスプレイ、有機ELディスプレイなどの、画像を表示するように構成された装置である。操作部250は、ボタン、レバー、表示部240上に重ねて配置されたタッチパネルなどの、ユーザによる操作を受け取るように構成された装置である。ユーザは、操作部250を操作することによって、種々の要求と指示を情報処理装置200に入力可能である。通信インタフェース270は、他の装置と通信するためのインタフェースである(例えば、USBインタフェース、有線LANインタフェース、IEEE802.11の無線インタフェース)。通信インタフェース270には、デジタルカメラ100が接続されている。デジタルカメラ100は、検査の対象物DVを撮影することによって、撮影画像の画像データを生成する。以下、対象物DVがプリンタであることとする(対象物DVを、プリンタDVとも呼ぶ)。
A2.撮影画像:
 図2(A)、図2(B)は、撮影画像の例を示す概略図である。図2(A)の第1撮影画像700xは、不具合の無い第1プリンタDVxを示している。第1プリンタDVxには、ラベルシート910L(単に、シート910Lとも呼ぶ)が貼られている。第1撮影画像700xは、シート910Lの画像を含んでいる。図2(B)の第2撮影画像700yは、不具合を有する第2プリンタDVyを示している。第2プリンタDVyには、シート910Lが貼られておらず、第2撮影画像700yは、シート910Lの画像を含んでいない。以下、適切なラベルシートがプリンタに貼られているか否かが、検査されることとする。
 本実施例では、シート910Lは、ロゴ画像910を含んでいる。ロゴ画像910は、文字列「SAMPLE」を示している。また、シート910Lは、ロゴ画像910の領域に加えて、他の領域(例えば、他の文字列の画像を示す領域)を含んでいる。なお、ロゴは、文字列に限らず、図形、マーク、シンボルなど、種々の画像であってよい。また、シート910Lは、文字列に限らず、種々の種類の要素(例えば、図形、模様、写真など)を用いて構成されてよい。
 シート検出モデルNN2(図1)は、撮影画像を示す画像データである撮影画像データを用いてプリンタの撮影画像からラベルシート(例えば、シート910L)の画像を検出する機械学習モデルである。ラベルシートの画像が検出される場合、プリンタの検査結果は合格である。ラベルシートの画像が検出されない場合、プリンタの検査結果は不合格である。
 シート検出モデルNN2のトレーニングには、シートの画像を含む種々の画像の画像データが用いられる。トレーニングに用いられるデータ(ここでは、画像データ)には、種々の情報が関連付けられる。データに情報を関連付ける処理は、アノテーション、または、ラベリングとも呼ばれる。以下、アノテーションによって関連付けられる情報を、アノテーション情報とも呼ぶ。本実施例では、アノテーション情報は、検出すべきシートを示す領域を特定する領域情報を含んでいる。例えば、図2(A)の第1撮影画像700xの画像データがトレーニングに用いられる場合、アノテーション情報は、シート910Lを囲む枠Fxを示す領域情報を含んでいる。
 アノテーション情報は、通常は、作業者によって決定される。例えば、作業者は、第1撮影画像700xを観察することによって、シート910Lを囲む枠Fxを決定する。また、トレーニングには、種々の画像データが用いられる。例えば、複数の画像データの間で、シートの位置やシートの色やシートの大きさなど、シートの表示態様が異なり得る。種々の画像データのそれぞれの適切なアノテーション情報を決定することは、作業者にとって容易ではない。例えば、作業者は、シート910Lの一部分のみを囲む不適切な枠を決定し得る。そこで、本実施例では、情報処理装置200(図1)は、ロゴ検出モデルNN1を用いて、トレーニング用の画像からロゴ画像(例えば、ロゴ画像910)を検出する。そして、情報処理装置200は、ロゴ画像を示す領域であるロゴ領域と、ロゴ領域の外側の部分と、を含む拡張領域を決定する。拡張領域は、シート(例えば、シート910L)を適切に示し得る。そして、情報処理装置200は、拡張領域を示す領域情報を含むアノテーション情報を、画像データに関連付ける。以下、ロゴ検出モデルNN1、シート検出モデルNN2の順に、説明を行う。
A3.ロゴ検出モデルNN1の構成:
 図3(A)は、ロゴ検出モデルNN1の構成の例を示す概略図である。本実施例では、ロゴ検出モデルNN1は、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モデルは、畳込ニューラルネットワークを用いて、バウンディングボックスと呼ばれるオブジェクトを含む枠と、ボックスがオブジェクトを含むことの確信度と、ボックスがオブジェクトを含む場合のオブジェクトの種類毎の確率(クラス確率とも呼ぶ)と、を予測する。
 図3(A)に示すように、ロゴ検出モデルNN1は、m個(mは1以上の整数)の畳込層CV11-CV1mと、畳込層CV11-CV1mに続くn個(nは1以上の整数)の全結合層CN11-CN1nと、を有している(mは、例えば、24。nは、例えば、2)。m個の畳込層CV11-CV1mのうちの1以上の畳込層の直後には、プーリング層が設けられる。
 畳込層CV11-CV1mは、入力されるデータに対して、畳込処理とバイアスの加算処理とを含む処理を実行する。畳込処理は、入力されたデータに対して、(p×q×r)
次元のs個のフィルタを順次に適用し、入力されたデータとフィルタとの相関を示す相関値を算出する処理である(p、q、r、sは、1以上の整数)。各フィルタを適用する処理では、フィルタをスライドさせながら複数個の相関値が順次に算出される。1個のフィルタは、(p×q×r)個の重みを含んでいる。バイアスの加算処理は、算出された相関値に、バイアスを加算する処理である。バイアスは、1個のフィルタに対して1個ずつ準備されている。フィルタの次元(p×q×r)とフィルタの数sとは、通常は、m個の畳込層CV11-CV1mの間で異なっている。畳込層CV11-CV1mは、複数のフィルタの複数の重みと複数のバイアスとを含むパラメータセットを、それぞれ有している。
 プーリング層は、直前の畳込層から入力されたデータに対して、データの次元数を削減する処理を実行する。プーリングの処理としては、平均プーリング、最大プーリングなど、種々の処理を利用可能である。本実施例では、プーリング層は、最大プーリングを行う。最大プーリングは、所定サイズ(例えば、2×2)のウィンドウを所定のストライド(例えば、2)でスライドさせつつ、ウィンドウ内の最大値を選択することによって次元数を削減する。
 全結合層CN11-CN1nは、直前の層から入力されたf次元のデータ(すなわち、f個の値。fは2以上の整数)を用いて、g次元のデータ(すなわち、g個の値。gは2以上の整数)を出力する。出力されるg個の値のそれぞれは、入力されるf個の値で構成されるベクトルとf個の重みで構成されるベクトルとの内積に、バイアスを加えた値(内積+バイアス)である。畳込層CV11-CV1mは、(f×g)個の重みとg個のバイアスとを用いて、g次元のデータを出力する。なお、入力データの次元数fと出力データの次元数gとは、通常は、n個の全結合層CN11-CN1nの間で異なっている。全結合層CN11-CN1nは、複数の重みと複数のバイアスとを含むパラメータセットを、それぞれ有している。
 なお、畳込層CV11-CV1mと全結合層CN11-CN1nとのそれぞれによって生成されるデータは、活性化関数に入力されて変換される。活性化関数としては、種々の関数を利用可能である。本実施例では、最後の層(ここでは、全結合層CN1n)には、線形活性化関数(linear activation function)が用いられ、他の層には、漏洩正規化線形ユニット(Leaky Rectified Linear Unit:LReLU)が用いられる。
 図3(B)は、ロゴ検出モデルNN1の動作の概要を示す概略図である。画像800は、ロゴ検出モデルNN1に入力される入力画像の例である。入力画像800は、第1方向Dxと、第1方向Dxに垂直な第2方向Dyと、に沿ってマトリクス状に並ぶ複数の画素のそれぞれの色値によって、表されている。本実施例では、色値は、R(赤)、G(緑)、B(青)の3個の成分値で表されている。図3(B)の例では、入力画像800は、2種類のロゴ画像910、920を示している。本実施例では、第1ロゴ画像910は、「SAMPLE」の文字列の画像である。第2ロゴ画像920は、第1ロゴ画像910とは異なる別のロゴ画像であり、「SAMPLE2」の文字列の画像である。
 ロゴ検出モデルNN1は、入力画像800を、S×Sのグリッドセル801(単にセル801とも呼ぶ)に分割する(Sは2以上の整数。Sは、例えば、5)。ロゴ画像910、920のそれぞれの中心は、いずれかのセル801に含まれる。ロゴ画像910、920(より一般的には、オブジェクト)の検出結果は、オブジェクト領域の中心を含むセル801に対応付けられた予測値によって、示される(詳細は、後述)。
 各セル801には、Bn個の矩形のバウンディングボックスが対応付けられる(Bnは1以上の整数。Bnは、例えば、2)。図3(B)の中段の右部は、バウンディングボックスの例として、第1ロゴ画像910に関連する複数の第1種バウンディングボックスBB1cと、第2ロゴ画像920に関連する複数の第2種バウンディングボックスBB2cと、を示している。各バウンディングボックスには、以下の5個の予測値が対応付けられる。すなわち、セル801に対する第1方向Dxの中心位置x、セル801に対する第2方向Dyの中心位置y、第1方向Dxの幅w、第2方向Dyの高さh、確信度。セル801にオブジェクト領域の中心が含まれない場合には、そのセル801に対応付けられたバウンディングボックスの確信度は、ゼロであることが期待される。セル801にオブジェクト領域の中心が含まれる場合、そのセル801に対応付けられたバウンディングボックスの確信度が高いことが期待される。具体的には、確信度は、バウンディングボックスの領域とオブジェクト領域との間のIOU(Intersection over Union)と同じであることが期待される。ここで、IOUは、2個の領域の共通部分の面積を、2個の領域の和集合の領域の面積で除算して得られる比率である。このような確信度は、バウンディングボックスとオブジェクト領域との間の一致の程度を示している。なお、確信度は、オブジェクトの種類とは独立に算出される。
 ここで、ロゴ検出モデルNN1は、C種類のロゴ画像を検出することとする(Cは1以上の整数。Cは、例えば、3)。ロゴ画像の種類を、クラス、または、ロゴクラスとも呼ぶ。各セル801には、さらに、C個のクラス確率が対応付けられる。C個のクラス確率は、オブジェクト(ここでは、ロゴ画像)のC個の種類にそれぞれ対応している。クラス確率は、セル801にオブジェクト領域の中心が含まれるという条件下での確率であり、オブジェクトの種類毎の確率を示している。1個のセル801に対応付けられるバウンディングボックスの総数Bnに拘らず、1個のセル801にはC個のクラス確率が対応付けられる。図3(B)の中段の左部は、クラス確率マップを示している。クラス確率マップは、セル801毎に特定されるクラス識別子であって、最高クラス確率に対応するクラス識別子を示している。図示するように、第1ロゴ画像910に近いセル801では、第1ロゴ画像910の種類である「1」のクラス識別子の確率が高い。第2ロゴ画像920に近いセル801では、第2ロゴ画像920の種類である「2」のクラス識別子の確率が高い。図中の右部の複数の第1種バウンディングボックスBB1cは、クラス確率マップ上で「1」のクラス識別子を示すセル801に対応付けられたバウンディングボックスである。複数の第2種バウンディングボックスBB2cは、クラス確率マップ上で「2」のクラス識別子を示すセル801に対応付けられたバウンディングボックスである。
 ロゴ検出モデルNN1(図3(A))は、S×S×(Bn×5+C)個の予測値を示す出力データ830を出力する。S×S×Bn個のバウンディングボックスのうち、閾値以上の確信度を有するバウンディングボックスが、検出されたオブジェクト(ここでは、ロゴ画像)を示すボックス(オブジェクトボックスと呼ぶ)として採用される。また、オブジェクトボックスに対応するC個のクラス確率のうちの最高クラス確率に対応するクラス識別子が、オブジェクトボックスに対応付けられたクラス識別子として採用される。なお、図3(B)の中段の右部に示されるように、1個のロゴ画像に重なる複数のバウンディングボックスが、オブジェクトボックスの候補であり得る。互いに重なる複数のバウンディングボックスから1個のバウンディングボックスを選択するために、「Non-maximal suppression」と呼ばれる処理が行われてよい。この処理は、2個のボックスの間のIOUが基準以上である場合に、1個のボックス(例えば、より低い確信度を有するボックス)を削除する処理である。この処理を繰り返すことにより、1個のロゴ画像に対応する1個のオブジェクトボックスが検出される。例えば、図3(B)の下段に示すように、第1ロゴ画像910を示す第1オブジェクトボックスBB1(クラス識別子CL1=1)と、第2ロゴ画像920を示す第2オブジェクトボックスBB2(クラス識別子CL2=2)と、が検出される。
A4.第1種データセットDS1の生成処理:
 図4は、ロゴ検出モデルNN1のトレーニング用の第1種データセットDS1の生成処理の例を示すフローチャートである。プロセッサ210(図1)は、第1プログラム231に従って、図4の処理を実行する。
 S110では、プロセッサ210は、ロゴ画像の画像データであるロゴ画像データを取得する。本実施例では、ロゴ画像データは、RGBのビットマップデータであり、不揮発性記憶装置230に予め格納されている(図示省略)。図5(A)は、ロゴ画像の例を示す説明図である。図中には、第1ロゴ画像910が示されている。第1ロゴ画像910は、文字領域911と、背景領域912と、を含んでいる。文字領域911の複数の画素は、おおよそ同じ色を有し、背景領域912の複数の画素は、おおよそ同じ色を有している。なお、ロゴ画像データは、画像編集アプリケーションプログラムを用いて生成されたデータであってよい。これに代えて、ロゴ画像データは、ロゴの見本をスキャナ(図示せず)によって読み取ることによって生成されたデータであってよい。なお、本実施例では、プロセッサ210は、第1ロゴ画像910のデータと、第2ロゴ画像920(図3(B))のデータと、図示しない第3ロゴ画像のデータと、を含む複数のロゴ画像のデータを取得する。図示を省略するが、第2ロゴ画像920と第3ロゴ画像とも、第1ロゴ画像910と同様に、複数の文字を示す文字領域と、背景領域と、を含んでいる。
 S115(図4)では、プロセッサ210は、ロゴ画像の複数の画素の色値をクラスタリングする。これにより、ロゴ画像の色値の分布範囲は、T個(Tは2以上の整数)の部分色範囲に区分される。
 図5(B)は、色値の分布範囲の例を示すヒストグラムである。横軸は、輝度値Bvを示している。輝度値Bvの範囲は、複数の区間に区分されている。縦軸は各区間の画素数を示している。このヒストグラムは、第1ロゴ画像910(図5(A))の輝度値Bvの分布を示している。明るい第1部分色範囲R1は、文字領域911における輝度値Bvの分布範囲を示し、暗い第2部分色範囲R2は、背景領域912における輝度値Bvの分布範囲を示している。プロセッサ210は、複数の画素のそれぞれのRGBの色値から輝度値Bvを算出し、輝度値Bvのヒストグラムを生成する。そして、プロセッサ210は、1以上の画素数を有する複数の区間が連続する場合に、連続する複数の区間によって示される範囲を1個のクラスタ(すなわち、部分色範囲)として特定する。図5(B)の例では、2個の部分色範囲R1、R2が特定される。
 S120(図4)では、プロセッサ210は、ロゴ画像を、T個の部分色範囲に対応するT種類の部分領域に分割する。図5(C)は、分割された部分領域を示す説明図である。図5(C)の左部に示されるように、ロゴ画像910は、第1種領域A1と第2種領域A2に分割される。第1種領域A1は、第1部分色範囲R1、すなわち、文字領域911に対応し、第2種領域A2は、第2部分色範囲R2、すなわち、背景領域912に対応している。なお、1個の部分色範囲に対応する1種類の部分領域は、第1種領域A1のように、互いに離れた複数の領域を含んでよい。図示を省略するが、他のロゴ画像も、同様に、S115、S120によって、複数の領域に分割される。
 S115、S120により、ロゴ画像は、似た色を有するT種類の部分領域に分割される。色値の分布範囲をT個の部分色範囲に区分する方法は、似た色を有する複数の画素を1つの部分色範囲に対応付ける種々の方法であってよい。例えば、ヒストグラムの谷に対応する輝度値Bvで、輝度値Bvの範囲が分割されてよい。また、輝度値Bvに限らず、種々の色成分(例えば、色相、彩度など)を用いて、色値の分布範囲がT個の部分色範囲に区分されてよい。また、k平均法など、種々のクラスタリングのアルゴリズムが用いられてよい。なお、部分色範囲の総数T(すなわち、部分領域の種類数T)は、ロゴ画像毎に決定される。これに代えて、Tは、予め決められてもよい。
 S125では、プロセッサ210は、1種類以上の部分領域の色をランダムに変更する調整処理を行うことによって、K個(Kは、1以上の整数)の色変更ロゴ画像データを生成する。図5(C)の右部には、第1ロゴ画像910から生成される色変更ロゴ画像の例として、3個の色変更ロゴ画像910a、910b、910cが示されている。色変更ロゴ画像910a、910b、910cと元のロゴ画像910との間では、第1種領域A1と第2種領域A2とのうちのいずれか1つの色、または、両方の色が、異なっている。図示を省略するが、プロセッサ210は、他のロゴ画像からも、色変更ロゴ画像を生成する。
 なお、本実施例では、プロセッサ210は、1種類の部分領域の全体の色を、ランダムに決定された同じ色に変更する。例えば、第1種領域A1の色が変更される場合、第1種領域A1に含まれる複数の文字の全ての色が、同じ色に変更される。
 変更後の色は、変更前の色に近い色であってよい。例えば、RGBのそれぞれの色値が、ゼロ以上、255以下の範囲の値で表される場合に、色変更の処理は、各色成分の色値に、-100以上、+100以下の範囲の乱数値を加算する処理であってよい。
 また、プロセッサ210は、生成すべき色変更ロゴ画像データの総数を、ロゴ画像毎にランダムに決定する。これに代えて、生成すべき色変更ロゴ画像データの総数は、ロゴ画像毎に予め決められてよい。
 S130では、プロセッサ210は、色変更ロゴ画像データの追加調整処理を実行する。追加調整処理は、サイズ変更処理と、縦横比変更処理と、のうちのいずれか1つ、または、両方を含んでいる。サイズ変更処理は、拡大処理と縮小処理とのいずれかであってよい。図5(D)は、追加調整処理によって生成される色変更ロゴ画像の例を示す説明図である。図中には、色変更ロゴ画像910aから生成された2個の色変更ロゴ画像910a1、910a2が示されている。第1色変更ロゴ画像910a1は、サイズ変更処理(ここでは、縮小処理)によって生成された画像である。第2色変更ロゴ画像910a2は、縦横比変更処理によって生成された画像である。なお、プロセッサ210は、他のロゴ画像から生成された色変更ロゴ画像にも、追加調整処理を行う。なお、プロセッサ210は、追加調整処理を実行するか否かと、追加調整処理の対象の色変更ロゴ画像と、追加調整処理の内容とを、ランダムに決定する。
 S135では、プロセッサ210は、背景画像データを取得する。背景画像データは、ロゴ画像を配置すべき背景画像を示す画像データである。本実施例では、プロセッサ210は、予め準備された複数の背景画像データ(図示省略)から、ランダムに、処理対象の背景画像データを取得する。複数の背景画像データは、記憶装置215(例えば、不揮発性記憶装置230)に予め格納されている(図示省略)。複数の背景画像データは、単色のベタ画像を示す背景画像のデータと、写真の背景画像のデータと、を含んでいる。単色のベタ画像は、同じ色を有する複数の画素で構成される画像である。本実施例では、いずれの背景画像も、第1方向Dxに平行な2辺と第2方向Dyに平行な2辺とで囲まれる矩形状の画像である。
 S140では、プロセッサ210は、背景画像上にL個(Lは1以上の整数)のロゴ画像を配置することによって、候補画像データを生成する。プロセッサ210は、S110で取得されたロゴ画像と、S125で生成された色変更ロゴ画像と、S130で生成された色変更ロゴ画像と、を含む複数のロゴ画像から、L個のロゴ画像を選択する。プロセッサ210は、各ロゴ画像の背景画像上の位置を、ランダムに決定する。これに代えて、プロセッサ210は、背景画像上の予め決められた位置にロゴ画像を配置してよい。いずれの場合も、プロセッサ210は、複数のロゴ画像が互いに重ならないように、各ロゴ画像の位置を決定する。ロゴ画像の総数Lは、1以上、背景画像上に配置可能なロゴ画像の最大数以下、の範囲内の値に決定される。例えば、プロセッサ210は、ランダムにLを決定し、ランダムにL個のロゴ画像を選択する。
 図6(A)-図6(H)は、候補画像の例を示す概略図である。図6(A)-図6(C)の3個の候補画像800a-800cは、背景画像800az、800bz、800czと、背景画像800az、800bz、800cz上に配置された4個のロゴ画像と、を含んでいる。これらの候補画像800a-800cの主な特徴は、以下の通りである。(I1)候補画像800a:背景画像800azが、単色のベタ画像である。
(I2)候補画像800b:背景画像800bzが、写真の画像である。
(I3)候補画像800c:第1ロゴ画像910から得られるロゴ画像910、910cと、第2ロゴ画像920から得られるロゴ画像920a、920bと、を含んでいる。 なお、図6(C)のロゴ画像920a、920bが示すように、第2ロゴ画像920は、第1種領域A21と第2種領域A22とに分割されている。ロゴ画像920aは、第2ロゴ画像920の色変更によって生成された画像である。ロゴ画像920bは、第2ロゴ画像920の色変更と縮小処理とによって生成された画像である。
 S145(図4)では、プロセッサ210は、候補画像データの画像処理を行うことによって、新たな候補画像データを生成する。この画像処理は、以下の7個の処理P1-P7からなる群から選択される1以上の処理を含んでいる。
(P1)候補画像の上下を反転させる上下反転処理
(P2)候補画像の左右を反転させる左右反転処理
(P3)候補画像を回転させる回転処理
(P4)候補画像内の色変更対象物画像を示す領域を変更せずに、色変更対象物画像のうちの領域内に示される部分を平行移動させるシフト処理
(P5)候補画像をぼかすぼかし処理
(P6)候補画像にノイズを付加するノイズ付加処理
(P7)候補画像の色を調整する色調整処理
 図6(D)-図6(H)の5個の候補画像800d-800hは、S145の画像処理によって生成される候補画像の例である。図6(F)の候補画像800fは、背景画像800fzと、背景画像800fz上に配置された2個のロゴ画像910、910bと、を含んでいる。他の候補画像800d、800e、800g、800hは、背景画像800dz、800ez、800gz、800hzと、背景画像上に配置された4個のロゴ画像と、を含んでいる。これらの候補画像800d-800hの主な特徴は、以下の通りである。
(I4)候補画像800d:背景画像800dzが単色のベタ画像であり、左右反転処理が行われており、ロゴ画像910sはシフト処理によって生成されている。
(I5)候補画像800e:背景画像800ezが写真の画像であり、上下反転処理が行われている。
(I6)候補画像800f:回転処理と、ノイズNZを付加するノイズ付加処理と、が行われている。
(I7)候補画像800g:ぼかし処理が行われている。
(I8)候補画像800h:色調整処理が行われている。
 本実施例では、第1方向Dx(図6(D))が右方向を示している。従って、左右反転処理は、第1方向Dxの位置を反転させる。また、第2方向Dy(図6(E))が下方向を示している。従って、上下反転処理は、第2方向Dyの位置を反転させる。
 シフト処理(図6(D))は、ロゴ画像910sの元の領域内で、元のロゴ画像を左に平行移動させている。移動後のロゴ画像のうちロゴ画像910sの元の領域の外にはみ出た部分は、削除されている。例えば、第1種領域A1の左側の一部は、削除されている。また、ロゴ画像910sの元の領域のうち、元のロゴ画像の平行移動により生じる空白部分910vの色は、背景領域を示す第2種領域A2の色と同じ色に設定されている。なお、プロセッサ210は、シフト処理による移動方向と移動量とを、ランダムに決定する。
 回転処理(図6(F))は、候補画像800fの元の領域内で、元の候補画像を反時計回りに回転させている。回転後の候補画像のうち候補画像800fの元の領域の外にはみ出た部分は、削除されている。また、候補画像800fの元の領域のうち、元の候補画像の回転により生じる空白部分800fvには、背景画像800fzの一部のコピーが割り当てられている。なお、プロセッサ210は、回転の中心と回転方向と回転角度とを、ランダムに決定する。
 ノイズ付加処理(図6(F))は、候補画像800fの複数の画素からランダムに複数の対象画素を選択し、複数の対象画素のそれぞれの色値に乱数値を加算する。なお、ノイズ付加処理は、他の種々の処理であってよい。例えば、候補画像の全ての画素に、乱数値が加算されてよい。また、予め準備されたノイズ画像が、候補画像に重ねられてよい。
 ぼかし処理(図6(G))は、平滑化処理とも呼ばれる。本実施例では、ぼかし処理は、平均値フィルタを用いる処理であり、候補画像800gの全体が、処理される。なお、ぼかし処理は、色値を平滑化する種々の処理であってよい(例えば、中央値フィルタ、ガウシアンフィルタなどの他の平滑化フィルタが用いられてよい)。
 色調整処理(図6(H))は、本実施例では、輝度値を低下させるガンマ補正処理であり、候補画像800hの全体が、処理される。なお、色調整処理は、候補画像の色を調整する任意の処理であってよい(例えば、輝度値を高めるガンマ補正処理、コントラスト強調処理、彩度調整処理、ホワイトバランス調整処理、など)。
 なお、プロセッサ210は、S145の画像処理を実行するか否かと、画像処理の対象の候補画像と、画像処理の内容とを、ランダムに決定する。例えば、実行すべき処理は、7個の処理P1-P7からランダムに選択される。
 S150(図4)では、プロセッサ210は、S140で生成された候補画像データと、S145で生成された候補画像データと、を含む複数の候補画像データから、第1種データセットDS1(図1)に含まれるべきZ個(Zは、1以上の整数)の第1種学習画像データD11をランダムに選択する(数Zもランダムに決定される)。そして、プロセッサ210は、Z個の第1種学習画像データD11に対応するZ個のラベルデータD12を生成する。本実施例では、ラベルデータD12は、ロゴ検出モデルNN1(図3(A))の出力データ830の目標値(すなわち、正解)を定めるデータである。このようなラベルデータD12は、教師データとも呼ばれる。具体的には、ラベルデータD12は、候補画像中のロゴ画像の領域を示す領域情報D121と、ロゴ画像の種類を示すロゴクラスD122と、を示している。領域情報D121は、候補画像内の領域の中心位置(具体的には、第1方向Dxの位置と第2方向Dyの位置)と、第1方向Dxの幅と、第2方向Dyの高さと、を示している。また、本実施例では、ロゴ画像は、C個のクラスに分類される。ロゴクラスD122は、C個のクラスのうちのいずれか1つを示している。
 プロセッサ210は、S125-S145の処理の内容に基づいて、候補画像内のL個のロゴ画像のそれぞれの領域情報D121とロゴクラスD122との組み合わせを特定する。領域情報D121は、ロゴ画像の全体を含む最小矩形を示すように、決定される。そして、プロセッサ210は、候補画像がL個のロゴ画像を含む場合に、領域情報D121とロゴクラスD122とのL個の組み合わせを示すラベルデータD12を生成する。
 S155では、プロセッサ210は、第1種学習画像データD11(図1)とラベルデータD12とを関連付けて、記憶装置215(例えば、不揮発性記憶装置230)に格納する。以下、互いに関連付けられた第1種学習画像データD11とラベルデータD12との全体を、第1種ラベル付データLD1とも呼ぶ。第1種データセットDS1は、複数の第1種ラベル付データLD1を含んでいる。なお、プロセッサ210は、ラベル付データLD1を、情報処理装置200に接続された外部記憶装置(図示せず)に格納してもよい。
 S160では、プロセッサ210は、予め決められた数の第1種学習画像データD11(すなわち、第1種ラベル付データLD1)を生成したか否かを判断する。ロゴ検出モデルNN1の適切なトレーニングのためには、第1種データセットDS1に含まれるC個のラベル画像のそれぞれの総数が、大きい基準値(例えば、1000)以上に設定される。C個のラベル画像のいずれかの総数が基準値未満である場合(S160:No)、プロセッサ210は、S125へ移行し、新たなラベル付データLD1を生成する。C個のラベル画像のそれぞれの総数が基準値以上である場合(S160:Yes)、プロセッサ210は、図4の処理を終了する。生成された複数のラベル付データLD1は、図6(A)-図6(H)で説明したような種々の画像を示している。第1種データセットDS1は、このような複数の第1種ラベル付データLD1を含んでいる。なお、情報処理装置200は、複数の第1種学習画像データD11を生成するシステムの例である。
A5.ロゴ検出モデルNN1のトレーニング処理:
 図7は、ロゴ検出モデルNN1(図3(A))のトレーニング処理の例を示すフローチャートである。ロゴ検出モデルNN1は、出力データ830が入力画像800中のロゴ画像の適切な領域情報と適切なロゴクラスとを示すように、トレーニングされる。トレーニングによって、ロゴ検出モデルNN1の演算に用いられる複数の演算パラメータ(複数の層CV11-CV1m、CN11-CN1nのそれぞれの演算に用いられる複数の演算パラメータを含む)が、調整される。なお、プロセッサ210は、第2プログラム232に従って、図7の処理を行う。
 S210では、プロセッサ210は、不揮発性記憶装置230から第1種データセットDS1を取得する。S220では、プロセッサ210は、第1種データセットDS1の複数のラベル付データLD1を、学習用データセットと確認用データセットとに分割する。例えば、プロセッサ210は、ランダムに選択した70%のラベル付データLD1を、学習用データセットとして採用し、残りの30%のラベル付データLD1を、確認用データセットとして採用する。以下、学習用データセットのラベル付データLD1の総数がNt個であり、確認用データセットのラベル付データLD1の総数がNv個であることとする(Nt、Nvは、いずれも、2以上の整数)。
 S230では、プロセッサ210は、ロゴ検出モデルNN1の複数の演算パラメータを初期化する。例えば、各演算パラメータは、乱数値に設定される。
 S240では、プロセッサ210は、学習用データセットを用いて、学習ロスを算出する。具体的には、プロセッサ210は、Nt個の第1種学習画像データD11をロゴ検出モデルNN1に入力し、Nt個の出力データ830を生成する。そして、プロセッサ210は、Nt個の出力データ830と、Nt個の第1種学習画像データD11に対応付けられたNt個のラベルデータD12と、を用いて、学習ロスを算出する。
 学習ロスの算出には、損失関数が用いられる。損失関数は、出力データ830とラベルデータD12との間の差の評価値を算出する種々の関数であってよい。本実施例では、YOLOの上記の論文に開示されている損失関数が用いられる。この損失関数は、以下の5個の成分を含んでいる。すなわち、損失関数は、領域情報D121の領域を示すべきバウンディングボックスに関して、中心位置の差と、大きさ(すなわち、幅と高さ)の差と、確信度の差と、のそれぞれに対応する3個の成分を含んでいる。領域情報D121の領域を示すべきバウンディングボックスは、領域情報D121の中心位置を含むセル801(図3(B))に対応付けられたBn個のバウンディングボックスのうち、領域情報D121の領域とバウンディングボックスの領域との間の最も高いIOUを有するバウンディングボックスである。また、この損失関数は、領域情報D121の領域に対応すべきでないバウンディングボックスに関して、バウンディングボックスの確信度と、理想の確信度(具体的には、ゼロ)と、の間の差に対応する成分を含んでいる。また、この損失関数は、領域情報D121の中心位置を含むセルに関して、C個のクラス確率とC個の正解のクラス確率との間の差に対応する成分を含んでいる。プロセッサ210は、損失関数を用いて算出されるNt個の損失の合計値を、学習ロスとして算出する。なお、学習ロスは、Nt個の損失の平均値や中央値など、Nt個の損失と相関を有する種々の値であってよい。
 S250では、プロセッサ210は、学習ロスを用いて、ロゴ検出モデルNN1の複数の演算パラメータを更新する。具体的には、プロセッサ210は、学習ロスが小さくなるように、所定のアルゴリズムに従って演算パラメータを調整する。所定のアルゴリズムとしては、例えば、誤差逆伝播法と勾配降下法とを用いたアルゴリズムが用いられる。
 S260では、プロセッサ210は、確認用データセットを用いて、確認ロスを算出する。確認ロスの算出方法は、学習用データセットの代わりに確認用データセットを用いる点を除いて、S240で説明した学習ロスの算出方法と同じである。具体的には、プロセッサ210は、確認用データセットのNv個の第1種学習画像データD11を、S250で更新された演算パラメータを有するロゴ検出モデルNN1に入力し、Nv個の出力データ830を生成する。そして、プロセッサ210は、Nv個の出力データ830と、Nv個の第1種学習画像データD11に対応付けられたNv個のラベルデータD12と、を用いて、確認ロスを算出する。
 S270では、プロセッサ210は、トレーニングが完了したか否かを判断する。トレーニング完了の条件は、種々の条件であってよい。本実施例では、トレーニング完了の条件は、学習ロスと確認ロスとの両方が、所定の基準値以下であることである。なお、トレーニング完了の条件は、学習ロスと確認ロスとの両方が小さいことを示す種々の条件であってよい。例えば、学習ロスの基準値は、確認ロスの基準と異なっていてよい。
 トレーニングが完了していない場合(S270:No)、プロセッサ210は、S240へ移行して、トレーニングを継続する。トレーニングが完了した場合(S270:Yes)、S280で、プロセッサ210は、調整済の演算パラメータを含むロゴ検出モデルNN1を、トレーニング済モデルとして、記憶装置215(ここでは、不揮発性記憶装置230)に格納する。そして、プロセッサ210は、図7の処理を終了する。なお、プロセッサ210は、ロゴ検出モデルNN1を、情報処理装置200に接続された外部記憶装置(図示せず)に格納してもよい。
 トレーニングされたロゴ検出モデルNN1からの出力データ830は、以下の特徴を有している。ロゴ画像の中心を含むセルは、ロゴ画像の領域を適切に示すとともに高い確信度と適切なクラス確率とを有するバウンディングボックスを示すことができる。また、出力データ830によって示される複数のバウンディングボックスは、ロゴ画像の領域を示していない不適切なバウンディングボックスを含み得る。不適切なバウンディングボックスには、低い確信度が対応付けられる。従って、高い確信度を有するバウンディングボックスを用いることによって、適切に、ロゴ画像を特定できる。
 以上のように、図4の生成処理では、プロセッサ210は、対象物の例であるロゴを検出するためのロゴ検出モデルNN1のトレーニングに用いられる複数の第1種学習画像データD11を生成する。具体的には、S110では、プロセッサ210は、ロゴの画像であるロゴ画像のロゴ画像データを取得する。S115、S120では、プロセッサ210は、ロゴ画像の色の分布範囲を分割して得られるT個(Tは2以上の整数)の部分色範囲にそれぞれ対応するT種類の部分領域にロゴ画像を分割する。プロセッサ210は、1種類以上の部分領域のそれぞれの色を元の色とは異なる色に変更する処理(S125)を含む調整処理を実行する。これにより、プロセッサ210は、複数の色変更ロゴ画像の複数の色変更ロゴ画像データを生成する。ここで、複数の色変更ロゴ画像は、それぞれ、ロゴの画像である。また、複数の色変更ロゴ画像は、互いに異なる色の同じ種類の部分領域を有する。例えば、図5(C)の色変更ロゴ画像910a、910bは、互いに異なる色の同じ第1種領域A1を有する。そして、プロセッサ210は、S135、S140で、候補画像の候補画像データを生成する。ここで、候補画像データは、学習画像データD11に対応しており、候補画像は、学習画像データD11の学習画像に対応している。また、プロセッサ210は、S125-S140の処理を複数回に亘って実行する。具体的には、プロセッサ210は、複数の色変更ロゴ画像データを生成する。そして、プロセッサ210は、1以上の背景画像データと、複数の色変更ロゴ画像データと、を用いることによって、複数の候補画像の複数の候補画像データを生成する。ここで、候補画像は、1以上の背景画像データのいずれかによって示される背景画像と、背景画像上に配置された1以上の色変更ロゴ画像とを含んでいる(図6(A)-図6(H))。複数の候補画像は、生成された複数の色変更ロゴ画像のうちの互いに異なる色変更ロゴ画像を含んでいる。例えば、候補画像800c(図6(C))は、候補画像800f(図6(F))には含まれない色変更ロゴ画像910cを含んでいる。一方、候補画像800fは、候補画像800cには含まれない色変更ロゴ画像910bを含んでいる。このように、プロセッサ210は、種々の色で表現されるロゴの画像を示す複数の学習画像データD11を生成できる。このような複数の学習画像データD11は、ロゴの画像を処理する機械学習モデル(例えば、ロゴ検出モデルNN1)を、適切にトレーニングできる。
 S135(図4)、図6(B)等で説明したように、1以上の背景画像データは、写真の背景画像800bzの背景画像データを含んでいる。従って、プロセッサ210は、写真の背景画像上のロゴの画像を示す複数の学習画像データD11を生成できる。このような複数の学習画像データD11は、写真の背景画像上のロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。利用可能な複数の背景画像データは、互いに異なる写真を示す複数の背景画像データを含んでよい。複数の背景画像は、風景、人物、家具、文房具など、種々の写真を含んでよい。このような複数の学習画像データD11は、背景画像の内容に拘らずにロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。
 S135(図4)、図6(A)等で説明したように、1以上の背景画像データは、単色のベタ画像を示す背景画像800azの背景画像データを含んでいる。従って、プロセッサ210は、単色のベタ画像を示す背景画像上のロゴの画像を示す複数の学習画像データを生成できる。このような複数の学習画像データD11は、単色のベタ画像を示す背景画像上のロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。利用可能な複数の背景画像データは、互いに異なる色のベタ画像を示す複数の背景画像データを含んでよい。このような複数の学習画像データD11は、背景画像の色に拘らずにロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。
 なお、写真の背景画像と単色のベタ画像を示す背景画像とのように、互いに異なる内容を示す複数種類の背景画像を有する複数種類の学習画像データD11が生成されることが好ましい。このような複数種類の学習画像データD11は、種々の背景画像上のロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。
 また、プロセッサ210は、複数の色変更ロゴ画像データを生成するために、S125(図4)を含む画像の調整処理を実行する。図4の実施例では、調整処理は、さらに、S130を含んでいる。S130は、色変更対象物画像のサイズを変更する処理と、色変更対象物画像の縦横比を変更する処理と、のうちのいずれか1つ、または、両方を含んでいる。従って、プロセッサ210は、サイズと縦横比のうちのいずれか1つ、または、両方が変更されたロゴの画像を示す学習画像データD11を生成できる。このような学習画像データD11は、サイズと縦横比のうちのいずれか1つ、または、両方が変更されたロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。
 また、S140(図4)、図6(A)-図6(H)で説明したように、学習画像データD11を生成する処理は、背景画像800azと、背景画像800az上に配置された複数の色変更ロゴ画像910b、910a2、910cと、を含む学習画像800aの学習画像データD11を生成する処理を含んでいる。1個の学習画像データD11が複数の色変更ロゴ画像を示す場合、1個の学習画像データD11が1個の色変更ロゴ画像を示す場合と比べて、ロゴ画像を検出する機械学習モデル(例えば、ロゴ検出モデルNN1)を、効率的にトレーニングできる。
 また、S140(図4)、図6(C)等で説明したように、学習画像データD11を生成する処理は、背景画像800czと、背景画像800cz上に配置された1以上の色変更ロゴ画像910cと、背景画像800cz上に配置された他のロゴの画像920a、920bと、を含む画像800cの学習画像データD11を生成する処理を含んでいる。1個の学習画像データD11がロゴの画像と他のロゴの画像とを示す場合、1個の学習画像データD11が同じロゴの画像のみを示す場合と比べて、ロゴ画像を検出する機械学習モデル(例えば、ロゴ検出モデルNN1)を、効率的にトレーニングできる。
 また、S140(図4)、図6(A)-図6(H)で説明したように、プロセッサ210は、1個の学習画像上では、複数のロゴ画像を、互いに重ならないように配置する。従って、学習画像データD11は、ロゴ画像を検出する機械学習モデル(例えば、ロゴ検出モデルNN1)を、適切にトレーニングできる。
 また、S145(図4)で説明したように、学習画像データD11を生成する処理は、背景画像と背景画像上に配置された1以上の色変更ロゴ画像とを含む候補画像の候補画像データに画像処理を行うことによって学習画像データD11を生成する処理を含んでいる。ここで、画像処理は、上記の7個の処理P1-P7からなる群から選択される1以上の処理を含んでいる。従って、プロセッサ210は、種々の形式で表現されるロゴを示す学習画像データD11を生成できる。このような学習画像データD11は、種々の形式で表現されるロゴの画像を適切に処理するように、機械学習モデル(例えば、ロゴ検出モデルNN1)をトレーニングできる。
A6.シート検出モデルNN2の構成:
 図8(A)は、シート検出モデルNN2の構成の例を示す概略図である。本実施例では、シート検出モデルNN2は、YOLOモデルであり、その構成は、ロゴ検出モデルNN1(図3(A))の構成と同じである。シート検出モデルNN2は、p個(pは1以上の整数)の畳込層CV21-CV2pと、畳込層CV21-CV2pに続くq個(qは1以上の整数)の全結合層CN21-CN2qと、を有している(pは、例えば、24。qは、例えば、2)。p個の畳込層CV21-CV2pのうちの1以上の畳込層の直後には、プーリング層(例えば、マックスプーリングを行う層)が設けられる。なお、pは、図3(A)のmと異なってよい。また、qは、図3(A)のnと異なってよい。
 図8(B)は、シート検出モデルNN2の動作の概要を示す説明図である。画像700は、シート検出モデルNN2に入力される入力画像の例である。入力画像700は、図2(A)、図2(B)の撮影画像700x、700yと同様に、撮影されたプリンタDVの画像である。入力画像700は、第1方向Dxと、第1方向Dxに垂直な第2方向Dyと、に沿ってマトリクス状に並ぶ複数の画素のそれぞれの色値によって、表されている。本実施例では、色値は、R(赤)、G(緑)、B(青)の3個の成分値で表されている。図8(B)の例では、入力画像700は、第1ロゴ画像910を含むシート910Lの画像を含んでいる。
 シート検出モデルNN2は、図3(A)、図3(B)のロゴ検出モデルNN1と同様に、オブジェクトの画像の領域を検出する。ロゴ検出モデルNN1との差異は、ロゴ画像に代えて、ラベルシートの画像を検出するようにシート検出モデルNN2がトレーニングされる点である。また、本実施例では、C種類のロゴ画像に対応するC種類のラベルシートが利用可能である。ラベルシートの種類とロゴ画像の種類とは、一対一に対応付けられている。そして、シート検出モデルNN2は、C種類のラベルシートの画像を検出する。以下、ラベルシートの種類を、シートクラスとも呼ぶ。
 図示を省略するが、シート検出モデルNN2は、図3(B)のロゴ検出モデルNN1のアルゴリズムと同じアルゴリズムに従って、ラベルシートの画像を示すバウンディングボックスを検出する。図8(B)の例では、シート910Lを示すバウンディングボックスBBLが検出されている。バウンディングボックスBBLには、クラス識別子CLLが対応付けられている。クラス識別子CLLは、C個のクラス確率のうちの最高クラス確率に対応するクラス識別子である。「1」のクラス識別子は、第1シート910Lを示している。
 シート検出モデルNN2は、S×S×(Bn×5+C)個の予測値を示す出力データ730を出力する。図3(A)の出力データ830と同様に、出力データ730は、閾値以上の確信度を有するバウンディングボックスによって、オブジェクト(ここでは、ラベルシート)の画像の領域を示している。また、バウンディングボックスに対応するC個のクラス確率のうちの最高クラス確率に対応するクラス識別子が、バウンディングボックスに対応付けられたクラス識別子として採用される。
A7.アノテーション処理(第2種データセットDS2の生成処理):
 図9は、シート検出モデルNN2のトレーニングのための第2種データセットDS2(図1)の生成処理の例を示すフローチャートである。第2種データセットDS2は、複数の第2種ラベル付データLD2を含んでいる。第2種ラベル付データLD2は、ラベルシートの画像を含む第2種学習画像データD21と、第2種学習画像データD21に関連付けられたラベルデータD22と、を含んでいる。ラベルデータD22は、図4のS150、S155で説明したラベルデータD12と同様に、画像中のシート画像の領域を示す領域情報D221と、シート画像の種類を示すシートクラス情報D222と、を示している。後述するように、図9の処理では、プロセッサ210は、領域情報D221とラベルデータD22とを示すラベルデータD22を第2種学習画像データD21に関連付ける処理を実行する(この処理は、アノテーション処理の例である)。プロセッサ210は、第3プログラム233に従って、図9の処理を実行する。
 S310では、プロセッサ210は、処理対象の画像データである対象画像データを取得する。本実施例では、プロセッサ210は、予め準備された複数のシート画像データから、未処理のシート画像データを対象画像データとして取得する。複数のシート画像データは、予め記憶装置215(例えば、不揮発性記憶装置230)に格納されている(図示省略)。複数のシート画像データのそれぞれは、ラベルシートを含む画像を示している。上述したように、本実施例では、C種類のロゴ画像に対応するC種類のラベルシートが利用可能である。複数のシート画像データは、C種類のラベルシートを示すC種類のシート画像データを含んでいる。図10(A)は、対象画像の例を示す説明図である。対象画像700aは、第1シート910Lの画像の領域と、背景領域700azと、を含んでいる。第1シート910Lの画像は、第1ロゴ画像910を含んでいる。
 本実施例では、シート画像データは、背景画像データによって示される単色のベタ画像を示す背景画像上にシートの画像を配置することによって生成されている。プリンタの実際の撮影画像上では、背景領域は、プリンタの外面を示している。本実施例では、プリンタの外面の色は、位置によらず同じである。従って、実際の撮影画像上においても、背景領域の画像は、おおよそ単色のベタ画像である。なお、背景画像は、単色のベタ画像に限らず、プリンタの外面の撮影画像など、種々の画像であってよい。また、複数のシート画像データは、ラベルシートを有するプリンタをデジタルカメラで撮影することによって、生成されてよい。
 S315(図9)では、プロセッサ210は、ロゴ検出モデルNN1(図3(A))を用いて対象画像データを分析することにより、ロゴ領域を特定する。具体的には、プロセッサ210は、ロゴ検出モデルNN1に対象画像データを入力することによって、出力データ830を生成する。そして、プロセッサ210は、出力データ830によって示されるバウンディングボックス(具体的には、予め決められた閾値以上の確信度を有するバウンディングボックス)に囲まれる矩形領域を、ロゴ領域として採用する。図10(B)は、ロゴ領域の例を示す説明図である。バウンディングボックスBBtは、対象画像700a上の第1ロゴ画像910を示している。プロセッサ210は、バウンディングボックスBBtによって囲まれる領域を、ロゴ領域LAとして特定する。また、プロセッサ210は、バウンディングボックスBBtに対応付けられたC個のクラス確率のうちの最高のクラス確率に対応付けられたクラス識別子を、ロゴ領域LAの種類を示すロゴクラスCLtとして特定する(図10(B)の例では、CLt=1)。
 S320(図9)では、プロセッサ210は、ロゴ領域が検出されたか否かを判断する。ロゴ領域が検出された場合(S320:Yes)、S325で、プロセッサ210は、ロゴ領域を含む拡張領域を決定する。
 図11は、拡張領域の候補を決定する処理の例を示すフローチャートである。S410では、プロセッサ210は、対象画像を複数のブロックに分割する。図10(C)は、複数のブロックの例を示す説明図である。対象画像700aは、予め決められた形状の複数のブロックBLに分割されている。対象画像700a内の複数のブロックBLの配置は、予め決められている。
 S420(図11)では、プロセッサ210は、複数のブロックBLのそれぞれのエッジ強度値を算出する。エッジ強度値は、対象画像上の位置の変化に対する色の変化の割合の評価値である。本実施例では、プロセッサ210は、いわゆるラプラシアンフィルタを用いて各画素のエッジ量(例えば、フィルタによる計算結果の絶対値)を算出する。エッジ量の算出には、予め決められた色成分(例えば、輝度値)が用いられる。そして、プロセッサ210は、ブロックBL内の複数の画素のエッジ量の平均値を、ブロックBLのエッジ強度値として算出する。なお、エッジ強度値の算出方法は、他の種々の方法であってよい。例えば、フィルタは、ラプラシアンフィルタに代えて、エッジ量を算出するための任意のフィルタであってよい(ソーベルフィルタ、プレウィットフィルタなど)。また、ブロックBLのエッジ強度値は、複数の画素のエッジ量の平均値に代えて、中央値、最頻値、など、複数の画素のエッジ量と相関を有する種々の値であってよい。
 S430では、プロセッサ210は、予め決められた基準以下のエッジ強度値を有するブロックBLを、均一ブロックとして特定する。以下、複数のブロックBLのうち、均一ブロックとは異なるブロックBLを、非均一ブロックとも呼ぶ。
 図10(D)は、均一ブロックの例を示す説明図である。対象画像700a中の複数のブロックBLのうち、ハッチングが付されたブロックBL1が、均一ブロックBL1であり、ハッチングの無いブロックBL2が、非均一ブロックBL2である。図示するように、第1シート910Lの外側の背景領域700azの複数のブロックBLは、均一ブロックBL1である。第1シート910Lを示す複数のブロックBLのうち多数のブロックBLは、非均一ブロックBL2である。なお、第1シート910Lを示す複数のブロックBLのうちの一部の複数のブロックBLは、均一ブロックBL1である。一般的に、ラベルシートは、ロゴ画像に加えて、文字、図形、マーク、シンボルなど、他の要素を含み得る。従って、ラベルシート910Lを示す複数のブロックBLのうち均一ブロックBL1の割合は、小さい。また、ラベルシート910Lの輪郭910Loを示す画素は、大きなエッジ量を有している。従って、ラベルシート910Lの輪郭910Loを示すブロックBLは、非均一ブロックBL2である可能性が高い。
 S440(図11)では、プロセッサ210は、ロゴ領域と同じ領域を拡張領域の初期領域として採用する。そして、プロセッサ210は、拡張領域の輪郭をロゴ領域の外側に向かって移動させることによって、ロゴ領域を含む拡張領域の候補を決定する。プロセッサ210は、輪郭の全体が均一ブロックBL1に含まれるように、輪郭を移動させる。図10(E)は、拡張領域の候補の例を示す説明図である。対象画像700a上の候補拡張領域LAeは、ロゴ領域LAと、ロゴ領域LAの外側の部分と、を含んでいる。候補拡張領域LAeの輪郭LAeoの全体は、均一ブロックBL1に含まれている。上述したように、ラベルシート910Lの輪郭910Loを示すブロックBLは、非均一ブロックBL2である可能性が高い。従って、プロセッサ210は、ラベルシート910Lの輪郭910Loを外側から囲む輪郭LAeoを有する候補拡張領域LAeを、決定できる。このような候補拡張領域LAeは、ラベルシート910Lの全体を含んでいる。
 輪郭を移動させる処理は、種々の処理であってよい。本実施例では、ロゴ領域LAの輪郭LAoは、矩形を形成する4本の辺(すなわち、上辺、下辺、左辺、右辺)で構成されている。プロセッサ210は、4本の辺を所定量ずつ順番に外側に移動させる処理を、4本の辺の全体が均一ブロックBL1に含まれるまで、繰り返す。これにより、プロセッサ210は、ラベルシート910Lの全体を含むとともに、対象画像700aよりも小さい候補拡張領域LAeを決定できる。
 プロセッサ210は、S440の完了に応じて、図11の処理、すなわち、図9のS325を終了する。
 S330では、プロセッサ210は、S315で特定されたロゴクラスに基づいて、C個のシートクラス情報からシートクラス情報の候補である候補シートクラス情報を選択する。本実施例では、S315で特定されたロゴクラスが2個のロゴ画像910、920のいずれかに対応する場合、プロセッサ210は、2個のロゴ画像910、920に対応する2個のシートクラス情報を、候補として採用する。また、本実施例では、利用可能なC種類のロゴ画像は、図示しない第3ロゴ画像を含むこととする。そして、S315で特定されたロゴクラスが第3ロゴ画像に対応する場合、プロセッサ210は、第3ロゴ画像に対応する1個のシートクラス情報を、候補として採用する。S315で特定されたロゴクラスと、候補シートクラス情報と、の対応関係は、予め決められている。候補シートクラス情報としては、S315で特定されたロゴクラスに照らして適切であり得るシートクラス情報が、採用される。プロセッサ210は、ロゴクラスに対応付けられた候補を選択する。
 S335では、プロセッサ210は、ユーザインタフェース画面(UI画面とも呼ぶ)を表示部240(図1)に表示する。図12(A)は、UI画面の例を示す説明図である。このUI画面600は、第1ユーザインタフェース画像610と、第2ユーザインタフェース画像620と、を含んでいる。このUI画面600は、S330(図9)で選択された候補シートクラス情報の数が2以上である場合の例を示している。
 第1ユーザインタフェース画像610は、候補拡張領域LAeの輪郭LAeoの位置をユーザに変更させるためのユーザインタフェース画像である。第1ユーザインタフェース画像610は、第1シート910Lを含む対象画像700aと、候補拡張領域LAeの輪郭LAeoと、を示している。ユーザは、操作部250(図1)を操作することによって、輪郭LAeoを移動させることができる。
 第2ユーザインタフェース画像620は、候補拡張領域LAeの分類(すなわち、ラベルシートの分類)を示すシートクラス情報をユーザに特定させるためのユーザインタフェース画像である。第2ユーザインタフェース画像620は、ユーザによって選択可能なシートクラス情報の1以上の候補を示す候補領域621と、1以上の候補から選択された1つの候補を示すチェックボックス622と、を示している。実線のチェックボックス622は、選択可能な候補を示し、破線のチェックボックス622は、選択不可能な候補を示している。選択可能な候補は、S330で選択された候補である。
 図12(A)の例では、第2ユーザインタフェース画像620は、4個のシートクラス情報CC1、CC2、CC3、CC4を示している。第1シートクラス情報CC1は、第1ロゴ画像910(図3(B))に対応し、第2シートクラス情報CC2は、第2ロゴ画像920に対応し、第3シートクラス情報CC3は、図示しない第3ロゴ画像に対応し、第4シートクラス情報CC4は、バーコードを示している。そして、2個のシートクラス情報CC1、CC2が選択可能であり、他のシートクラス情報CC3、CC4は、選択不可能である。ユーザは、操作部250(図1)を操作することによって、選択可能な1以上の候補のうちの1つをチェック(すなわち、選択)できる。なお、S335(図9)では、プロセッサ210は、S315で特定されたロゴクラスに対応するシートクラス情報を、デフォルトのシートクラス情報として採用する。そして、プロセッサ210は、デフォルトのシートクラス情報が選択された状態の第2ユーザインタフェース画像620を表示する。
 図12(C)は、S330(図9)で選択された候補シートクラス情報の数が1である場合のUI画面の例を示している。第1ユーザインタフェース画像610は、ラベルシート930Lの画像を含む対象画像700cを示している。ラベルシート930Lは、第3ロゴ画像930を含んでいる。第2ユーザインタフェース画像620は、第3シートクラス情報CC3が選択可能であり、他のシートクラス情報CC1、CC2、CC4は選択不可能であることを示している。
 なお、第2ユーザインタフェース画像620において、選択不可能な候補の表示は、省略されてよい。
 S340(図9)では、プロセッサ210は、ユーザによる輪郭LAeoの位置の変更を受け付ける。図12(B)は、変更された輪郭LAeoの例を示す説明図である。図12(B)の例では、ユーザは、輪郭LAeoの4個の辺のそれぞれを、ラベルシート910Lの輪郭910Loに近づけている。これにより、候補拡張領域LAeは、ラベルシート910Lの領域を適切に示すことができる。輪郭LAeoの位置がユーザによって変更された場合、プロセッサ210は、変更済の位置の輪郭を有する領域を、最終的な拡張領域として決定する。なお、ユーザは、輪郭LAeoの位置を変更せずに受け入れる指示を、操作部250を操作することによって入力できる。この場合、プロセッサ210は、S325で決定された候補拡張領域LAeを、最終的な拡張領域として決定する。
 S345(図9)では、プロセッサ210は、シートクラス情報の選択可能な候補の総数が1であるか否かを判断する。選択可能な候補の数が1よりも大きい場合(S345:No)、S355で、プロセッサ210は、ユーザによるシートクラス情報の指定を受け付ける。図12(A)、図12(B)の例では、ユーザは、操作部250(図1)を操作することにより、2個のシートクラス情報CC1、CC2から1つを選択できる。例えば、S315(図9)で特定されたロゴクラスは、誤りであり得る。すなわち、S335で採用されたデフォルトのシートクラス情報は、誤りであり得る。ユーザは、第1ユーザインタフェース画像610に表示されたラベルシートを観察することによって、適切なシートクラス情報を確認できる。そして、ユーザは、操作部250を操作することによって、適切なシートクラス情報を指定できる。また、デフォルトのシートクラス情報が正しい場合、ユーザは、デフォルトのシートクラス情報を受け入れる指示を、操作部250を操作することによって入力できる。S355の後、プロセッサ210は、S360へ移行する。
 シートクラス情報の選択可能な候補の総数が1である場合(S345:Yes)、S350で、プロセッサ210は、シートクラス情報を、S330で特定された候補シートクラスに決定する。そして、プロセッサ210は、S360へ移行する。
 S360では、プロセッサ210は、候補拡張領域LAeを示す領域情報と、S350またはS355で決定されたシートクラス情報と、を含むアノテーション情報を示すアノテーションデータを生成する。S365では、プロセッサ210は、対象画像データとアノテーションデータとを関連付けて、記憶装置215(例えば、不揮発性記憶装置230)に格納する。互いに関連付けられた対象画像データとアノテーションデータとの全体は、第2種ラベル付データLD2(図1)を形成する。対象画像データは、第2種学習画像データD21に対応し、アノテーションデータは、ラベルデータD22に対応する。なお、プロセッサ210は、ラベル付データLD2を、情報処理装置200に接続された外部記憶装置(図示せず)に格納してもよい。
 S365の後、プロセッサ210は、S370へ移行する。S315でロゴ領域が検出されない場合(S320:No)、プロセッサ210は、S325-S365をスキップして、S370へ移行する。S370では、プロセッサ210は、全てのシート画像データの処理が完了したか否かを判断する。未処理のシート画像データが残っている場合(S370:No)、プロセッサ210は、S310へ移行して、新たな対象画像データの処理を行う。全てのシート画像データの処理が完了した場合(S370:Yes)、プロセッサ210は、図9の処理を終了する。これにより、第2種データセットDS2が生成される。なお、情報処理装置200は、第2種学習画像データD21にラベルデータD22を関連付けるシステムの例である。
A8.シート検出モデルNN2のトレーニング処理:
 図13は、シート検出モデルNN2(図8(A))のトレーニング処理の例を示すフローチャートである。シート検出モデルNN2は、出力データ730が入力画像700中のラベルシートの画像の適切な領域情報と適切なシートクラス情報とを示すように、トレーニングされる。トレーニングによって、シート検出モデルNN2の演算に用いられる複数の演算パラメータ(複数の層CV21-CV2p、CN21-CN2qのそれぞれの演算に用いられる複数の演算パラメータを含む)が、調整される。なお、プロセッサ210は、第4プログラム234に従って、図13の処理を行う。
 図13のトレーニング処理は、トレーニングの対象のモデルがシート検出モデルNN2である点と、トレーニングに用いられるデータセットが第2種データセットDS2である点と、を除いて、図7のトレーニング処理と同じである。図13のS510-S580は、図7のS210-S280と、それぞれ同じである(詳細な説明を省略する)。トレーニングされたシート検出モデルNN2からの出力データ730は、ラベルシートの画像の領域を適切に示すとともに高い確信度と適切なクラス確率とを有するバウンディングボックスを示すことができる。なお、プロセッサ210は、S580で、シート検出モデルNN2を、記憶装置215に格納してよく、これに代えて、情報処理装置200に接続された外部記憶装置(図示せず)に格納してもよい。
 トレーニングされたシート検出モデルNN2(図8(A))は、プリンタの検査に利用できる。プロセッサ210は、シート検出モデルNN2にプリンタの撮影画像データ(例えば、図2(A)、図2(B)で説明した撮影画像)を入力する。シート検出モデルNN2から出力される出力データ730は、撮影画像から検出されたラベルシートの領域を示している。ラベルシートが検出された場合、プリンタの検査結果は合格である。ラベルシートが検出されない場合、プリンタの検査結果は不合格である。
 以上のように、図9の処理では、プロセッサ210は、機械学習モデルの例であるシート検出モデルNN2のトレーニングに用いられる第2種学習画像データD21に情報を関連付ける処理を実行する。具体的には、S310では、プロセッサ210は、処理対象の画像である対象画像(例えば、対象画像700a(図10(A)))の対象画像データ(すなわち、第2種学習画像データD21)を取得する。S315では、プロセッサ210は、対象画像データを分析することによって、対象画像内から、注目対象物の例であるロゴの画像を示すロゴ領域(例えば、ロゴ領域LA)を検出する。S325、S340では、プロセッサ210は、ロゴ領域とロゴ領域の外側の部分とを含む候補拡張領域LAeを決定する。S360、S365では、プロセッサ210は、拡張領域LAeを示す領域情報を含むアノテーション情報を示すアノテーションデータ(すなわち、ラベルデータD22)を対象画像データに関連付けて記憶装置215に格納する。このように、プロセッサ210は、ロゴを示す領域LAに加えて他の領域を含む候補拡張領域LAeを示す領域情報を、第2種学習画像データD21に関連付けることができる。例えば、図12(A)、図12(B)で説明したように、プロセッサ210は、ロゴ画像910と他の画像とを含むラベルシート910Lの領域を示す領域情報D221を、第2種学習画像データD21に対応付けることができる。このような領域情報D221は、ロゴを示す領域に加えて他の領域を含む領域(例えば、ラベルシートの領域)を処理する機械学習モデル(例えば、シート検出モデルNN2)のトレーニングに、適している。
 また、S310(図9)、図10(A)等で説明したように、注目対象物の画像は、ロゴ画像である。従って、プロセッサ210は、ロゴ画像を示す領域に加えて他の領域を含む拡張領域を示す領域情報D221を、第2種学習画像データD21に関連付けることができる。
 また、図10(B)等に示すように、S315(図9)で検出される領域は、矩形状の領域である。注目対象物の画像(例えば、ロゴ画像)を示す矩形状の領域の検出には、YOLOに限らず、種々のオブジェクト検出モデルを利用できる(例えば、SSD(Single Shot MultiBox Detector)、R-CNN(Region Based Convolutional Neural Networks)など)。従って、プロセッサ210は、領域を適切に検出できる。
 また、拡張領域を決定する処理は、S325(図9)を含んでいる。S325、すなわち、図11の処理は、図10(E)等で説明したように、対象画像データを分析することによって、ロゴ領域LAと同じ領域から拡張領域をロゴ領域LAの外側に向かって拡張する処理を含む。本実施例では、この処理は、プロセッサ210によって行われる。また、この処理によって、拡張領域LAeの候補が決定される。このように、プロセッサ210(すなわち、情報処理装置200)が拡張領域LAeを拡張するので、情報処理装置200は、ユーザの負担を軽減できる。
 また、S325、すなわち、図11の処理は、S410-S430の処理と、S440の処理と、を含んでいる。図10(D)等で説明したように、S410-S430の処理では、プロセッサ210は、対象画像データを分析することによって、基準以下のエッジ強度値を有するブロックBLを、均一ブロックBL1として特定する。エッジ強度値は、対象画像上の位置の変化に対する色の変化の割合の評価値である。ブロックBLを均一ブロックBL1として選択するための条件(均一条件とも呼ぶ)は、エッジ強度値が基準以下であること示している。また、図10(E)等で説明したように、S440では、プロセッサ210は、拡張領域LAeの輪郭LAeoの全体が均一ブロックBL1に含まれるように、拡張領域をロゴ領域LAの外側に向かって拡張する。このように、プロセッサ210は、均一ブロックBL1を用いて、適切に拡張領域LAeを拡張できる。例えば、注目対象物(ここでは、ロゴ画像910)と他の要素とを含む大きなオブジェクト(例えば、ラベルシート910L)の領域と、背景領域と、の境界まで、拡張領域LAeを拡張できる。このように拡張された領域LAeは、ロゴを示す領域に加えて他の領域を含む大きなオブジェクトの領域を処理する機械学習モデル(例えば、シート検出モデルNN2)のトレーニングに、適している。
 また、拡張領域LAeを決定する処理は、S335、S340(図9)を含んでいる。S335では、図12(A)、図12(B)等で説明したように、プロセッサ210は、候補拡張領域LAeの輪郭LAeoの位置をユーザに変更させるための第1ユーザインタフェース画像610を表示部240に表示する。S340では、プロセッサ210は、ユーザによる変更済の位置の輪郭を有する領域を、拡張領域として決定する。従って、プロセッサ210は、ユーザによって変更された輪郭を用いて、適切な拡張領域を決定できる。
 また、S355(図9)が実行される場合には、S335で、図12(A)等で説明したように、プロセッサ210は、拡張領域LAeの分類(すなわちラベルシートの分類)を示すシートクラス情報をユーザに特定させるための第2ユーザインタフェース画像620を表示部240に表示する。S360、S365では、プロセッサ210は、ユーザによって特定されたシートクラス情報を含むアノテーション情報を示すアノテーションデータを対象画像データに関連付けて記憶装置215に格納する。従って、プロセッサ210は、適切なシートクラス情報を対象画像データに関連付けることができる。
 また、図12(A)、図12(C)等で説明したように、第2ユーザインタフェース画像620は、ユーザによって選択可能なシートクラス情報の1以上の候補を示す候補領域621を含んでいる。そして、S330で説明したように、候補領域621は、予め決められたC個のシートクラス情報のうち、S315で検出されたロゴ領域に含まれるロゴに予め対応付けられた1以上のシートクラス情報を、1以上の候補として示している。例えば、第1ロゴ画像910(図12(A))が検出された場合には、第1ロゴ画像910に対応付けられたシートクラス情報CC1、CC2が候補である。従って、ユーザは、適切なシートクラス情報を、容易に選択できる。
 また、S350(図9)が実行される場合には、S350で、プロセッサ210は、予め決められたC個のシートクラス情報のうち、S315で検出されたロゴ領域に含まれるロゴに予め対応付けられた候補シートクラス情報を、アノテーション情報に含めるべきシートクラス情報として決定する。例えば、第3ロゴ画像930(図12(C))が検出された場合には、S330で、プロセッサ210は、第3ロゴ画像930に対応付けられた第3シートクラス情報CC3を、候補として選択する。S350では、プロセッサ210は、アノテーション情報に含めるべきシートクラス情報を、第3シートクラス情報CC3に決定する。そして、S360、S365では、プロセッサ210は、決定したシートクラス情報を含むアノテーション情報を示すアノテーションデータを対象画像データに関連付けて記憶装置215に格納する。従って、プロセッサ210は、適切なシートクラス情報を対象画像データに関連付けることができる。
B.変形例:
(1)オブジェクト検出モデルのトレーニングのための学習画像データを生成する処理は、図4の処理に代えて、他の種々の処理であってよい。例えば、ロゴ画像をT種類の部分領域に分割する処理(S115-S120)は、ロゴ画像データの色分布を分析せずに、予め決められた領域パターン(例えば、第1種領域A1と第2種領域A2とを示す領域パターン)に従ってロゴ画像を分割する処理であってよい。
 S125では、変更後の色は、種々の色であってよい。例えば、変更後の色は、元の色とは異なる予め決められた色であってよい。また、ロゴ画像の色が、網点を用いて表現されている場合に、変更後の色は、元の網点とは異なる網点(例えば、元の線数とは異なる線数)で表現された色であってよい。
 S135-S140で利用可能な背景画像は、単色のベタ画像と、写真と、に限らず、図形、模様など、種々の画像であってよい。また、利用可能な背景画像からは、写真と、単色のベタ画像と、のうちのいずれか1つ、または、両方が、省略されてよい。
 S130では、サイズ変更処理と、縦横比変更処理と、のうちのいずれか1つが省略されてよい。また、S130が省略されてよい。
 S125、S130、S135、S140、S145のうちの1以上の処理のそれぞれにおいて、プロセッサ210は、処理内容をランダムに決定するのではなく、予め決められた計画に従って、処理内容を決定してよい。
 ロゴ画像の種類の数C(すなわち、分類(クラス)の数C)は、3に限らず、1、2、4など、1以上の種々の数であってよい。
 S140では、複数のロゴ画像が互いに一部分が重なるように配置されてもよい。また、ロゴ画像の一部が削除されてもよい。
 S145では、上記の7個の処理P1-P7から任意に選択された1以上の処理が、利用可能な処理から省略されてよい。また、S145が省略されてよい。
 ロゴ画像を検出する機械学習モデルは、図3(A)で説明したYOLOモデルに限らず、「YOLO v3」などの改良されたYOLOモデルであってよい。また、SSD、R-CNN、Fast R-CNN, Faster R-CNN、Mask R-CNNなどの、他のモデルが用いられてよい。
 オブジェクト検出モデルによって検出されるべき対象物は、ロゴの画像に限らず、任意の対象物(例えば、プリンタに装着される部品、バーコードなど)であってよい。そして、図4の処理(または、その変形例の処理)で生成される第1種データセットDS1は、種々のオブジェクト検出モデルのトレーニングに用いられてよい。
(2)機械学習モデルのトレーニングに用いられる画像データに情報を関連付ける処理は、図9の処理に代えて、他の種々の処理であってよい。例えば、ロゴ領域を検出する処理(S315)は、ロゴ検出モデルNN1を用いる処理に代えて、他の種々の処理であってよい。例えば、プロセッサ210は、基準のロゴ画像を示す基準ロゴ画像データを用いるパターンマッチングによって、ロゴ領域を検出してもよい。
 拡張領域を決定する処理は、S325、S340の処理に代えて、他の種々の処理であってよい。例えば、プロセッサ210は、ロゴ領域と、ロゴ領域に対応付けられた拡張領域と、を示す1枚のテンプレート画像を用いて、拡張領域を決定してよい。具体的には、プロセッサ210は、対象画像中のロゴ領域と、テンプレート画像のロゴ領域と、が一致するように、対象画像に対するテンプレート画像の位置を決定する。そして、プロセッサ210は、決定された位置のテンプレート画像によって示される拡張領域を、対象画像に適用すべき拡張領域として決定する。
 拡張領域の決定に用いられる注目対象物は、ロゴ画像に限らず、バーコードなど、任意の対象物であってよい。また、注目対象物の画像を示す対象物領域(例えば、ロゴ領域)の形状は、矩形状に代えて、他の任意の形状であってよい。例えば、対象物領域の形状は、三角形、五角形、六角形などの多角形でもよく、円、楕円などの曲線部分を含む輪郭によって定められる形状であってよい。また、対象物領域の形状は、対象物の輪郭によって定められる形状であってよい。
 対象画像上の均一領域を特定する処理は、図11のS410-S430の処理に代えて、他の種々の処理であってよい。ここで、均一領域は、均一条件を満たす領域である。均一条件は、対象画像上の位置の変化に対する色の変化の割合が基準以下であることを示す条件である。例えば、ブロックBLのエッジ強度値は、位置の変化に対する色の変化の割合を示す種々の値であってよい。エッジ強度値は、例えば、ブロックBL内の最高輝度値と最低輝度値との間の差分であってよい。また、プロセッサ210は、対象画像の複数の画素の色値(例えば、輝度値)のヒストグラムを用いて、均一領域を特定してよい。具体的には、プロセッサ210は、ヒストグラムの1つの区間に含まれる複数の画素によって形成される連続な1つの領域を、1つの均一領域として特定してよい。この場合、色値が1つの区間に含まれることが、均一条件である。
 図12(A)-図12(C)の実施例では、1個のUI画面600が、第1ユーザインタフェース画像610と第2ユーザインタフェース画像620とを示している。すなわち、UI画面600を表示部240に表示する処理は、第1ユーザインタフェース画像610を表示する処理と、第2ユーザインタフェース画像620を表示する処理と、を含んでいる。これに代えて、プロセッサ210は、第1ユーザインタフェース画像610を、第2ユーザインタフェース画像620を示す画面とは異なる画面で表示してよい。
 図9のS340は、省略されてよい。この場合、プロセッサ210は、S325で決定された候補拡張領域を、そのまま、最終的な拡張領域として決定してよい。また、UI画面(図12(A)-図12(C))からは、第1ユーザインタフェース画像610は省略されてよい。
 図9のS350は省略されてよい。例えば、プロセッサ210は、S315で特定されたロゴクラスに拘わらずに、S330で複数の候補シートクラス情報を選択し、S355で、ユーザによるシートクラス情報の指定を受け付けてよい。また、S355は省略されてよい。例えば、プロセッサ210は、S315で特定されたロゴクラスに拘わらずに、S330でロゴクラスに対応付けられた1個の候補シートクラス情報を選択し、S350で、シートクラス情報を、S330で特定された候補シートクラスに決定してよい。なお、シートクラス情報は、アノテーション情報から省略されてよい。例えば、ラベルシートの種類の数Cが1である場合、シートクラス情報が省略されても、第2種データセットDS2を用いる適切なトレーニングが可能である。
 ラベルシートの画像を検出する機械学習モデルは、図8(A)で説明したYOLOモデルに限らず、YOLO v3、SSD、R-CNN、Fast R-CNN, Faster R-CNN、Mask R-CNNなどの、他のモデルであってよい。
(3)機械学習モデルを用いる検査対象は、プリンタに限らず、スキャナ、複合機、デジタルカメラ、カッティングマシン、携帯端末、などの任意の製品であってよい。また、製品を収容するケースが検査対象であってよい。また、機械学習モデルは、ラベルシートに限らず、他の種々の対象物を検出するようにトレーニングされてよい。例えば、機械学習モデルは、プリンタの撮影画像から、プリンタに装着すべき部品を検出してよい。いずれの場合も、検出対象物(例えば、ラベルシート)の画像が、小さい特徴部分(例えば、ロゴ)の画像を含む場合、特徴部分を含む拡張領域は、検出対象物を示す領域として利用可能である。このような拡張領域を示す領域情報を含むアノテーション情報が、トレーニング用の画像データに関連付けられてよい。このような画像データとアノテーション情報とは、オブジェクト検出モデルに限らず、分類モデルなどの種々の機械学習モデルのトレーニングに、利用されてよい。
(4)機械学習モデルに入力される入力画像データの色空間は、RGBに代えて、CMYK色空間などの他の色空間であってよい。また、入力画像データは、輝度値によって画像を表現してよい。また、入力画像データは、解像度変換処理、トリミング処理などの種々の画像処理を実行することによって、生成されてよい。
(5)画像データとラベルデータと関連付ける方法は、任意の方法であってよい。例えば、ラベルデータは、ラベルデータに関連付けられた画像データを識別する識別データを含んでよい。また、プロセッサ210は、画像データとラベルデータとの対応関係を示すテーブルデータを生成してよい。また、プロセッサ210は、互いに関連付けられた画像データとラベルデータとを、1個のデータファイルに格納してよい。
(6)機械学習モデルのトレーニング処理は、図7、図13の処理に代えて、機械学習モデルに適する種々の方法であってよい。例えば、図7、図13の実施例において、ロスの算出に用いられる損失関数は、交差エントロピー誤差など、出力データ730、830とラベルデータとの間の差の評価値を算出する種々の関数であってよい。例えば、オブジェクト検出モデルが用いられる場合には、損失関数は、オブジェクトを示す領域の誤差と、オブジェクトの種類毎の確率の誤差と、に相関を有する損失を算出する種々の関数であってよい。
 また、機械学習モデルに含まれる演算パラメータを調整する方法は、誤差逆伝播法に代えて、目標値を伝播させる方法(Target Propagationとも呼ばれる)など、他の種々の方法であってよい。また、トレーニング完了の条件は、機械学習モデルから出力されるデータと、ラベルデータと、の間の差が小さいことを示す種々の条件であってよい。例えば、確認ロスは、トレーニング完了の条件から省略されてよい。この場合、図7、図13の処理において、全てのラベル付データが、学習用データセットとして用いられてよい。また、プロセッサ210は、作業者から完了指示が入力された場合にトレーニングが完了したと判断し、トレーニングの継続指示が入力された場合にトレーニングが完了していないと判断してもよい。作業者は、例えば、確認用データセットを用いて出力される出力データを参照して、トレーニングを終了するか否かを判断してよい。これに代えて、トレーニング完了の条件は、学習ロスの算出と演算パラメータの更新(例えば、S240-S250(図7)、S540-S550(図13))が、所定回数、繰り返されたことであってよい。
(7)図4のデータセットの生成処理と、図7のトレーニング処理と、図9のアノテーション処理(データセットの生成処理)と、図13のトレーニング処理と、図示しない検査処理とは、それぞれ、互いに異なる情報処理装置によって実行されてよい。これらの処理から任意に選択された処理が、ネットワークを介して互いに通信可能な複数の装置(例えば、コンピュータなどの情報処理装置)によって分担されてよい。
 上記各実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部あるいは全部をハードウェアに置き換えるようにしてもよい。例えば、図1のモデルNN1、NN2のそれぞれの機能を、専用のハードウェア回路によって実現してもよい。
 また、本発明の機能の一部または全部がコンピュータプログラムで実現される場合には、そのプログラムは、コンピュータ読み取り可能な記録媒体(例えば、一時的ではない記録媒体)に格納された形で提供することができる。プログラムは、提供時と同一または異なる記録媒体(コンピュータ読み取り可能な記録媒体)に格納された状態で、使用され得る。「コンピュータ読み取り可能な記録媒体」は、メモリーカードやCD-ROMのような携帯型の記録媒体に限らず、各種ROM等のコンピュータ内の内部記憶装置や、ハードディスクドライブ等のコンピュータに接続されている外部記憶装置も含み得る。
 以上、実施例、変形例に基づき本発明について説明してきたが、上記した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれる。
100…デジタルカメラ、200…情報処理装置、210…プロセッサ、215…記憶装置、220…揮発性記憶装置、230…不揮発性記憶装置、231…第1プログラム、232…第2プログラム、233…第3プログラム、234…第4プログラム、240…表示部、250…操作部、270…通信インタフェース、610…第1ユーザインタフェース画像、620…第2ユーザインタフェース画像、621…候補領域、622…チェックボックス、DV…対象物(プリンタ)、DVx…第1プリンタ、DVy…第2プリンタ、Dx…第1方向、Dy…第2方向

Claims (11)

  1.  機械学習モデルのトレーニングに用いられる画像データに情報を関連付ける関連付け方法であって、
     処理対象の画像である対象画像の対象画像データを取得する取得工程と、
     前記対象画像データを分析することによって、前記対象画像内から、注目対象物の画像を示す対象物領域を検出する検出工程と、
     前記対象物領域と前記対象物領域の外側の部分とを含む拡張領域を決定する決定工程と、
     前記拡張領域を示す領域情報を含むアノテーション情報を示すアノテーションデータを前記対象画像データに関連付けて記憶装置に格納する関連付け工程と、
     を備える、関連付け方法。
  2.  請求項1に記載の関連付け方法であって、
     前記注目対象物の画像は、ロゴ画像である、
     関連付け方法。
  3.  請求項1または2に記載の関連付け方法であって、
     前記対象物領域は、矩形状の領域である、
     関連付け方法。
  4.  請求項1から3のいずれかに記載の関連付け方法であって、
     前記決定工程は、情報処理装置が、前記対象画像データを分析することによって、前記対象物領域と同じ領域から前記拡張領域を前記対象物領域の外側に向かって拡張する工程である装置拡張工程を含む、
     関連付け方法。
  5.  請求項4に記載の関連付け方法であって、
     前記装置拡張工程は、
      前記情報処理装置が、前記対象画像データを分析することによって、前記対象画像上の位置の変化に対する色の変化の割合が基準以下であることを示す均一条件を満たす領域である均一領域を特定する工程と、
      前記情報処理装置が、前記拡張領域の前記輪郭の全体が前記均一領域に含まれるように、前記拡張領域を前記対象物領域の外側に向かって拡張する工程と、
     を含む、関連付け方法。
  6.  請求項1から5のいずれかに記載の関連付け方法であって、
     前記決定工程は、
      前記拡張領域の前記輪郭の位置をユーザに変更させるための第1ユーザインタフェース画像を表示装置に表示する工程と、
      前記ユーザによる変更済の位置の輪郭を有する領域を、前記拡張領域として決定する工程と、
    を含む、
     関連付け方法。
  7.  請求項1から6のいずれかに記載の関連付け方法であって、さらに、
     前記拡張領域の分類を示すクラス情報をユーザに特定させるための第2ユーザインタフェース画像を表示装置に表示する工程を備え、
     前記関連付け工程は、前記ユーザによって特定されたクラス情報を含む前記アノテーション情報を示す前記アノテーションデータを前記対象画像データに関連付けて前記記憶装置に格納する、
     関連付け方法。
  8.  請求項7に記載の関連付け方法であって、
     前記第2ユーザインタフェース画像は、前記ユーザによって選択可能なクラス情報の1以上の候補を示す候補領域を含み、
     前記候補領域は、予め決められた複数のクラス情報のうち、前記検出された対象物領域に含まれる前記注目対象物に予め対応付けられた1以上のクラス情報を、前記1以上の候補として示している、
     関連付け方法。
  9.  請求項1から6のいずれかに記載の関連付け方法であって、
     前記関連付け工程では、情報処理装置が、予め決められた複数のクラス情報のうち、前記検出された対象物領域に含まれる前記注目対象物に予め対応付けられたクラス情報を含む前記アノテーション情報を示す前記アノテーションデータを前記対象画像データに関連付けて前記記憶装置に格納する、
     関連付け方法。
  10.  機械学習モデルのトレーニングに用いられる画像データに情報を関連付けるシステムであって、
     処理対象の画像である対象画像の対象画像データを取得する取得部と、
     前記対象画像データを分析することによって、前記対象画像内から、注目対象物の画像を示す対象物領域を検出する検出部と、
     前記対象物領域と前記対象物領域の外側の部分とを含む拡張領域を決定する決定部と、
     前記拡張領域を示す領域情報を含むアノテーション情報を示すアノテーションデータを前記対象画像データに関連付けて記憶装置に格納する関連付け部と、
     を備える、システム。
  11.  機械学習モデルのトレーニングに用いられる画像データに情報を関連付けるコンピュータのためのコンピュータプログラムであって、
     処理対象の画像である対象画像の対象画像データを取得する取得機能と、
     前記対象画像データを分析することによって、前記対象画像内から、注目対象物の画像を示す対象物領域を検出する検出機能と、
     前記対象物領域と前記対象物領域の外側の部分とを含む拡張領域を決定する決定機能と、
     前記拡張領域を示す領域情報を含むアノテーション情報を示すアノテーションデータを前記対象画像データに関連付けて記憶装置に格納する関連付け機能と、
     をコンピュータに実現させる、コンピュータプログラム。
PCT/JP2021/044428 2020-12-09 2021-12-03 方法、システム、および、コンピュータプログラム WO2022124224A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/331,511 US20230316697A1 (en) 2020-12-09 2023-06-08 Association method, association system, and non-transitory computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020203995A JP2022091269A (ja) 2020-12-09 2020-12-09 方法、システム、および、コンピュータプログラム
JP2020-203995 2020-12-09

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/331,511 Continuation US20230316697A1 (en) 2020-12-09 2023-06-08 Association method, association system, and non-transitory computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2022124224A1 true WO2022124224A1 (ja) 2022-06-16

Family

ID=81973237

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/044428 WO2022124224A1 (ja) 2020-12-09 2021-12-03 方法、システム、および、コンピュータプログラム

Country Status (3)

Country Link
US (1) US20230316697A1 (ja)
JP (1) JP2022091269A (ja)
WO (1) WO2022124224A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11947893B1 (en) * 2023-06-20 2024-04-02 Microsoft Technology Licensing, Llc Integrating multiple slides for a presentation using a generated common background

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8825655B1 (en) * 2010-12-07 2014-09-02 Google Inc. Automatic learning of logos for visual recognition
JP2020035116A (ja) * 2018-08-29 2020-03-05 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 寄与度決定方法、寄与度決定装置及びプログラム
JP2020101927A (ja) * 2018-12-20 2020-07-02 カシオ計算機株式会社 画像識別装置、識別器学習方法、画像識別方法及びプログラム
JP2020107254A (ja) * 2018-12-28 2020-07-09 株式会社AI−feed 画像検査装置、学習済みモデル生成装置、画像検査システム、画像検査用プログラム、学習済みモデル生成用プログラム、および学習済みモデル

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8825655B1 (en) * 2010-12-07 2014-09-02 Google Inc. Automatic learning of logos for visual recognition
JP2020035116A (ja) * 2018-08-29 2020-03-05 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 寄与度決定方法、寄与度決定装置及びプログラム
JP2020101927A (ja) * 2018-12-20 2020-07-02 カシオ計算機株式会社 画像識別装置、識別器学習方法、画像識別方法及びプログラム
JP2020107254A (ja) * 2018-12-28 2020-07-09 株式会社AI−feed 画像検査装置、学習済みモデル生成装置、画像検査システム、画像検査用プログラム、学習済みモデル生成用プログラム、および学習済みモデル

Also Published As

Publication number Publication date
JP2022091269A (ja) 2022-06-21
US20230316697A1 (en) 2023-10-05

Similar Documents

Publication Publication Date Title
US7454040B2 (en) Systems and methods of detecting and correcting redeye in an image suitable for embedded applications
JP2022091270A (ja) 方法、システム、および、コンピュータプログラム
US8861845B2 (en) Detecting and correcting redeye in an image
TWI467515B (zh) 掃描文件之彩色捨去
US7620251B2 (en) Apparatus for selecting image of specific scene, program therefor, and recording medium storing the program
JP4335476B2 (ja) 画像の顕著性及びアピール性に基づいて写真印画の数、寸法、及び、倍率を変更する方法
US8391595B2 (en) Image processing method and image processing apparatus
JP4708909B2 (ja) デジタル画像の対象物検出方法および装置並びにプログラム
US8995761B2 (en) Image processing apparatus, image processing method, and computer-readable medium
US9305208B2 (en) System and method for recognizing offensive images
US9667833B2 (en) History generating apparatus and history generating method
US9131193B2 (en) Image-processing device removing encircling lines for identifying sub-regions of image
WO2022124224A1 (ja) 方法、システム、および、コンピュータプログラム
US8482812B2 (en) Image processing apparatus for detecting object from image and method thereof
US9509870B2 (en) Image processing apparatus, image processing method, and storage medium enabling layout varations
JP2007116419A (ja) 原稿使用色特定方法、画像処理装置およびプログラム
JP2019140538A (ja) 画像処理装置、画像形成装置、画像処理方法、及びプログラム
JP4998496B2 (ja) 画像処理装置、情報処理装置および画像読取装置
WO2023013546A1 (ja) コンピュータプログラム、生成装置、および、生成方法
US20220415025A1 (en) Information processing apparatus, information processing method, non-transitory computer-readable storage medium storing program, and system
JP2009230556A (ja) オブジェクト検出装置、オブジェクト検出方法、オブジェクト検出プログラムおよび印刷装置
JP5609573B2 (ja) ドライバープログラム、および、印刷システム
JP2005184403A (ja) 画像処理装置
JP2008293135A (ja) 画像処理装置及び方法
JP2004030052A (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: 21903328

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21903328

Country of ref document: EP

Kind code of ref document: A1