Teacher data generation device, teacher data generation method, and teacher data generation program
Patent Information
- Application Number
- JP2024060418
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-05-24
- Filing Date
- 2024-04-03
- Publication Date
- 2024-09-09
- Estimated Expiration
- 2042-05-20
AI Technical Summary
Existing methods for attaching label information to objects using machine learning models often result in reduced robustness, leading to inaccurate labeling of non-identical objects.
A teacher data generation device that generates and modifies polygon data by segmenting images based on brightness gradients and superpixel processing, adding label information to improve accuracy and robustness.
Enhances the precision and efficiency of label assignment by generating and modifying polygons to accurately represent the outline of recognition targets, reducing user workload and calculation costs.
Abstract
Description
[Technical field]
[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims priority to Japanese Patent Application No. 2021-87206 (filed May 24, 2021), the entire disclosure of which is incorporated herein by reference.
[0002] The present disclosure relates to a teacher data generation device, a teacher data generation method, and an image processing device. [Background technology]
[0003] Conventionally, there is known an apparatus that creates training data including labels attached to images based on the results of segmenting the images using a machine learning model (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2019-101535 A Summary of the Invention
[0005] A teacher data generation device according to an embodiment of the present disclosure includes an input unit, a control unit, and an output unit. The input unit acquires at least one input image including an image of a recognition target. The control unit executes a first process of generating polygon data along a contour of a portion determined to be an image of the recognition target from a first region of the input image. The control unit executes a second process of setting segments obtained by dividing the input image based on a luminance gradient. The control unit generates corrected polygon data by correcting the polygon data based on the segments set in the second process. The control unit assigns label information to the input image to generate teacher data. The output unit outputs the teacher data.
[0006] A teacher data generation method according to an embodiment of the present disclosure includes acquiring at least one input image including an image to be recognized. The teacher data generation method includes executing a first process for generating polygon data that follows a contour of a portion determined to be the image to be recognized from a first region of the input image. The teacher data generation method includes executing a second process for setting segments obtained by dividing the input image based on a luminance gradient. The teacher data generation method includes generating corrected polygon data by correcting the polygon data based on the segments set in the second process. The teacher data generation method includes assigning label information to the input image. The teacher data generation method includes generating and outputting teacher data.
[0007] An image processing device according to an embodiment of the present disclosure includes an input unit and a control unit. The input unit acquires at least one input image including an image of a recognition target. The control unit executes a first process of generating polygon data that follows a contour of a portion determined to be the image of the recognition target from a first region of the input image. The control unit executes a second process of setting segments obtained by dividing the input image into regions based on a brightness gradient. The control unit generates corrected polygon data by correcting the polygon data based on the segments set in the second process. [Brief description of the drawings]
[0008] [Figure 1] FIG. 2 is a block diagram showing an example of the configuration of a teacher data generating device according to an embodiment. [Diagram 2] FIG. 2 is a diagram showing an example of an input image including a recognition target. [Diagram 3] FIG. 13 is a diagram showing an example of a preprocessed image obtained by performing preprocessing on an input image. [Figure 4] FIG. 13 is a diagram showing an example of an initial polygon image generated from an initial polygon to be recognized. [Diagram 5] FIG. 13 is a diagram showing an example of an operation screen for selecting a generation mode of an initial polygon. [Figure 6]FIG. 13 shows an example of a segmented image where regions have been generated by running superpixels. [Figure 7] FIG. 13 is a diagram showing an example of a segment image obtained by performing superpixel processing on a specified region. [Figure 8] FIG. 13 is a diagram showing an example of a segment image in which a deletion area is specified from among areas included in a polygon to be recognized. [Figure 9] FIG. 13 is a diagram showing an example of a modified polygon image generated by modifying an initial polygon. [Figure 10] FIG. 11 is a diagram comparing an initial polygon and a modified polygon. [Figure 11] 11 is a flowchart showing an example of a procedure for a teacher data generating method. [Figure 12] 11 is a flowchart showing an example of a procedure for generating an initial polygon by inference using machine learning. [Figure 13] 13 is a flowchart showing an example of a procedure for generating an initial polygon by foreground extraction using hue data. [Figure 14] 13 is a flowchart showing an example of a procedure for generating an initial polygon by graph cut. [Figure 15] 13 is a flowchart illustrating an example of a procedure for performing machine learning for generating an initial polygon based on polygon correction data. [Figure 16] 16 is a flowchart showing a continuation of the procedure in the flowchart of FIG. 15. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] When label information is assigned to an object using a machine learning model, the accuracy of assigning label information to an object different from the learned object may decrease. In other words, the robustness of the assignment of label information may decrease. According to the teacher data generation device and the teacher data generation device according to an embodiment of the present disclosure, the robustness of the assignment of label information may be improved.
[0010] (Configuration example of teacher data generation device 10) A teacher data generation device 10 according to an embodiment of the present disclosure creates teacher data for generating a machine learning model that performs segmentation on pixel-by-pixel basis for image data having pixels, the image data including an image of a recognition target 50 (see FIG. 2, etc.). The machine learning model that performs segmentation is also referred to as a first machine learning model. The teacher data generation device 10 generates, as teacher data, information that associates a polygon representing the contour of the recognition target 50 with at least one input image 40 (see FIG. 2, etc.) including an image of the recognition target 50.
[0011] The teacher data generating device 10 may generate teacher data by, for example, executing the following procedure. The teacher data generating device 10 executes a first process of generating polygon data along the contour of a portion of the input image 40 that is determined to be an image of the recognition target 50. In the first process, the teacher data generating device 10 generates an initial polygon 51 (see FIG. 4) as an initial value of the polygon data. In addition, the teacher data generating device 10 executes a second process of setting segments 52 (see FIG. 6, etc.) obtained by dividing the input image 40 based on a luminance gradient. The teacher data generating device 10 may execute a superpixel as the second process and add segmentation information to the input image 40. In other words, the teacher data generating device 10 executes the superpixel to set the segment 52 for the input image 40. The teacher data generating device 10 corrects the polygon based on the segment 52 set in the image data, and generates a corrected polygon 55 (see FIG. 9). The corrected polygon 55 is also called corrected polygon data. The teacher data generating device 10 generates, as teacher data, data in which modified polygons 55 are generated as polygon data in the input image 40 and label information for the input image 40 is added to the data.
[0012] 1, the teacher data generation device 10 includes an input unit 12, a control unit 14, and an output unit 16. The input unit 12 accepts an input of an input image 40. The control unit 14 acquires the input image 40 from the input unit 12, and generates teacher data based on the input image 40. The output unit 16 outputs the teacher data generated by the control unit 14.
[0013] The input unit 12 has an interface that accepts input of an input image 40. The output unit 16 has an interface that outputs training data. The interface may be configured to include a communication device configured to be capable of wired or wireless communication. The communication device may be configured to be capable of communication using a communication method based on various communication standards. The communication device may be configured using known communication technology.
[0014] The input unit 12 may be configured to include an input device that accepts input of information or data from a user. The input device may be configured to include, for example, a touch panel or a touch sensor, or a pointing device such as a mouse. The input device may be configured to include physical keys. The input device may be configured to include a voice input device such as a microphone.
[0015] The control unit 14 may include at least one processor to provide control and processing power for executing various functions. The processor may execute programs that realize the various functions of the control unit 14. The processor may be realized as a single integrated circuit. The integrated circuit is also called an IC (Integrated Circuit). The processor may be realized as a plurality of communicatively connected integrated circuits and discrete circuits. The processor may be realized based on various other known technologies.
[0016] The control unit 14 may include a memory unit. The memory unit may include an electromagnetic storage medium such as a magnetic disk, or may include a memory such as a semiconductor memory or a magnetic memory. The memory unit stores various information. The memory unit stores programs and the like executed by the control unit 14. The memory unit may be configured as a non-transitory readable medium. The memory unit may function as a work memory for the control unit 14. At least a part of the memory unit may be configured as a separate entity from the control unit 14.
[0017] In this embodiment, the control unit 14 includes an image processing unit 141, an initial polygon generating unit 142, a superpixel unit 143, a polygon correction unit 144, a labeling unit 145, and a teacher data generating unit 146. Each component of the control unit 14 is configured to be capable of executing processing required to generate teacher data. The control unit 14 may include multiple processors corresponding to each of the multiple components. Each processor is configured to be capable of sharing and executing the processing of each component. The control unit 14 may be configured to be capable of executing the necessary processing with one processor.
[0018] (Operation example of teacher data generation device 10) A specific example of the operation of the teacher data generation device 10 will be described below.
[0019] <Image input> The input unit 12 accepts input of an input image 40 exemplified in Fig. 2 and outputs it to the control unit 14. The input image 40 includes an image of a recognition target 50, and is used for generating teacher data. The input unit 12 may accept input of one image as the input image 40, or may accept input of two or more images.
[0020] <Pretreatment> The image processing unit 141 of the control unit 14 executes image processing for the purpose of reducing noise contained in the input image 40 acquired from the input unit 12 and emphasizing the contour of the recognition target 50. The image processing unit 141 may execute processing such as contrast correction, gamma correction, bilateral filtering, or Gaussian filtering. The image processing unit 141 selects processing or adjusts processing parameters so that the contour of the recognition target 50 is emphasized according to the contents of the acquired input image 40 or the purpose of the image processing. The processing executed by the image processing unit 141 is also referred to as preprocessing. An image obtained by executing preprocessing on the input image 40 is also referred to as a preprocessed image 41. The preprocessed image 41 is illustrated in FIG. 3.
[0021] <Initial polygon generation> The initial polygon generating unit 142 of the control unit 14 generates an initial polygon 51 for the preprocessed image 41, as exemplified in FIG. 4. The initial polygon 51 is a line that represents the contour of the recognition target 50. An image in which the initial polygon 51 is generated is also referred to as a polygon generated image 42. When preprocessing is not performed, the initial polygon generating unit 142 generates the initial polygon 51 for the input image 40. The process of generating the initial polygon 51 is included in the first process. The initial polygon generating unit 142 may execute the process described below in order to generate the initial polygon 51.
[0022] <<Machine learning inference>> The initial polygon generation unit 142 may use a pre-trained machine learning model to perform inference of object detection by machine learning on the input image 40 or the preprocessed image 41, and use the output contour information as the initial polygon 51. The machine learning model used for inference to generate the initial polygon 51 is also referred to as a second machine learning model. The initial polygon generation unit 142 may further perform graph cut processing on the polygon generation image 42, using the initial polygon 51 obtained by inference of machine learning as a cost function, in consideration of the possibility that a true contour will not be output when the contour of the recognition target 50 is complex. The initial polygon generation unit 142 may use data obtained by the graph cut processing as the initial polygon 51.
[0023] <<Foreground extraction using hue data>> In contour extraction, it is known that it is effective to use a model specialized for foreground extraction by learning a plurality of recognition targets 50 as one class as a pre-trained model. Therefore, the initial polygon generation unit 142 may specify an area in the input image 40 or the preprocessed image 41, extract background color data of the specified area, and use the foreground contour obtained by using the hue value of the background color data as the initial polygon 51. This method of extracting the foreground is a common method known in chromakey compositing, etc. When the background of the image has a simple structure, the contour can be extracted quickly even when there are a plurality of foreground objects as the recognition targets 50.
[0024] <<Graph cut>> The initial polygon generating unit 142 may apply a cost function created by the user to a graph cut process and use the obtained data as the initial polygon 51.
[0025] <<Select a process>> The teacher data generation device 10 may receive an input from the input unit 12 specifying which process the initial polygon generation unit 142 is to execute. The input unit 12 may include a user interface. For example, the input unit 12 may present a selection screen as shown in Fig. 5 to the user and receive an input from the user to select a process. Each mode illustrated in Fig. 5 may be associated with information specifying which of the above-mentioned processes is to be executed, or may be associated with parameters specified when executing each of the above-mentioned processes.
[0026] The initial polygon generation unit 142 may generate the initial polygon 51 by any one of the following methods: foreground extraction using hue data, graph cut, or inference by machine learning, or a combination of these methods. Foreground extraction using hue data can also be rephrased as background removal based on hue information. Inference by machine learning can also be rephrased as inference of detection of the recognition target 50 by a second machine learning model. In the first process, the initial polygon generation unit 142 may generate polygon data based on a predetermined algorithm including at least one of background removal based on hue information, graph cut, and inference of detection of the recognition target 50 by a second machine learning model.
[0027] The initial polygon generating section 142 may specify at least a partial area of the input image 40, and generate the initial polygons 51 within that area. The area specified as the target for generating the initial polygons 51 is also referred to as a first area.
[0028] <Superpixel> Superpixeling is known as an image processing technique that extracts areas of high luminance gradient in the input image 40 and divides the image into multiple regions along contour lines. As illustrated in Figs. 6 and 7, the superpixel unit 143 of the control unit 14 performs superpixeling on a designated region 53 including at least a portion of the input image 40 to divide it into segments 52. The superpixel unit 143 associates segmentation information, which specifies boundaries of the generated segments 52, with the image. The image with the associated segmentation information is also referred to as a segmented image 43. The execution of superpixeling is included in the second process.
[0029] The superpixel unit 143 may appropriately set a designated region 53 (see FIG. 6) to be the target of the superpixel. The designated region 53 is also referred to as a second region. The superpixel unit 143 may set the designated region 53 so as to include all of the initial polygons 51 based on the data of the initial polygons 51. For example, in FIG. 6, the superpixel unit 143 generates a segment 52 with a range including four recognition targets 50 as the designated region 53. When a plurality of initial polygons 51 are generated, the superpixel unit 143 may set the designated region 53 so as to include each of the initial polygons 51 individually. For example, in FIG. 7, the superpixel unit 143 generates a segment 52 with a range including each of the recognition targets 50 as the designated region 53. The superpixel unit 143 may accept an input specifying a range from a user and set the designated region 53 based on the user's specification. When the superpixel unit 143 automatically sets the designated region 53, it may be possible to set how large the designated region 53 is to be relative to the region of the initial polygon 51. By limiting the processing range rather than the entire image, the superpixel unit 143 can speed up superpixel processing and reduce the load of superpixel processing.
[0030] <Polygon correction> The polygon correction unit 144 of the control unit 14 executes, for example, adding a segment 52 to the initial polygon 51 or deleting a part of the segment 52 from the initial polygon 51 based on the initial polygon 51. The polygon correction unit 144 corrects the initial polygon 51 based on a user operation for a portion where the initial polygon 51 does not accurately capture the contour of the recognition target 50, or deletes data of the initial polygon 51 to which no label is assigned. For example, as shown in FIG. 8, when the initial polygon 51 includes the shadow of the recognition target 50 as the contour of the recognition target 50, the polygon correction unit 144 designates the segment 52 marked with a star as a deletion target region 54 and deletes it from the initial polygon 51. The polygon correction unit 144 can generate a modified polygon 55 that accurately captures the contour of the recognition target 50 as exemplified in FIG. 9 by deleting the deletion target region 54 from the initial polygon 51. The image to which the information of the modified polygon 55 is associated is also called a polygon modified image 44. In addition, if the initial polygon 51 does not completely include the contour of the object to be recognized 50, i.e., if the segment marked with a star 52 forms the contour of the object to be recognized 50, the polygon correction unit 144 may add the segment marked with a star 52 as the initial polygon 51 to generate the corrected polygon 55.
[0031] 10, the initial polygon 51 is compared with the modified polygon 55. The polygon modification unit 144 can generate a modified polygon 55 that represents a contour close to the true contour of the recognition target 50 by deleting a deletion target area 54 from within the range surrounded by the initial polygon 51.
[0032] The polygon correction unit 144 may correct the initial polygon 51 based on the segmentation information generated by the superpixel unit 143 in addition to correcting the initial polygon 51 based on the designation of an arbitrary pixel or region by the user. For example, when an arbitrary pixel value is designated by the user, the polygon correction unit 144 can generate a corrected polygon 55 by correcting the segment 52 including the designated pixel value as the foreground or background. When the initial polygon 51 is corrected based on the segmentation information, the number of user operations required to correct the initial polygon 51 can be reduced compared to the case where the user corrects the initial polygon 51 by inputting the true contour line of the recognition target 50 in a tracing manner. In addition, the correction of the initial polygon 51 can be speeded up. For example, in FIG. 10, by designating the deletion target region 54 within the range surrounded by the initial polygon 51 as the background, the correction of the part corresponding to the shadow of the recognition target 50 can be realized with fewer operations.
[0033] The polygon correction section 144 may automatically correct the initial polygon 51.
[0034] The label assignment unit 145 of the control unit 14 assigns label information to the input image 40 or the preprocessed image 41, the label information explaining the recognition target 50 whose contour is represented by the initial polygon 51 or the corrected polygon 55. When the initial polygon 51 or the corrected polygon 55 is generated in the input image 40 or the preprocessed image 41, the label assignment unit 145 assigns the label information to the initial polygon 51 or the corrected polygon 55. The label assignment unit 145 may accept input of label information from a user and assign the label information designated by the user. The label assignment unit 145 may assign label information determined by inference using machine learning. The label assignment unit 145 may assign the label information at any timing during the period from when the input image 40 is acquired from the input unit 12 until when the corrected polygon 55 is generated by the polygon correction unit 144.
[0035] The teacher data generating unit 146 of the control unit 14 generates data in which the input image 40, the data of the modified polygon 55, and the label information are associated with each other as teacher data, and outputs the generated data to the output unit 16.
[0036] When the control unit 14 acquires a plurality of input images 40 from the input unit 12, the control unit 14 executes the above-described processes for each input image 40 to generate training data.
[0037] The output unit 16 outputs the teaching data acquired from the control unit 14 to an external device.
[0038] As described above, the teacher data generation device 10 according to this embodiment can generate teacher data by generating and modifying the initial polygon 51.
[0039] (Example of how to generate training data) The control unit 14 of the teacher data generation device 10 may execute a teacher data generation method including the steps of the flowchart illustrated in Fig. 11. The teacher data generation method may be realized as a teacher data generation program executed by a processor constituting the control unit 14 of the teacher data generation device 10. The teacher data generation program may be stored in a non-transitory computer-readable medium.
[0040] The control unit 14 of the teacher data generation device 10 acquires the input image 40 via the input unit 12 (step S1). The control unit 14 executes preprocessing on the input image 40 (step S2). The control unit 14 selects a generation mode for the initial polygon 51 (step S3). The control unit 14 selects one of the modes of inference by machine learning, foreground extraction using hue data, and graph cut.
[0041] The control unit 14 generates the initial polygon 51 (step S4). The control unit 14 generates the initial polygon 51 in the mode selected in the procedure of step S3.
[0042] <Machine learning inference> The control unit 14 executes the procedure of the flowchart shown in FIG. 12 in order to generate the initial polygon 51 in the machine learning inference mode.
[0043] The control unit 14 acquires a machine learning model (step S11). The control unit 14 executes inference to detect the contour of the recognition target 50 from the input image 40 using the machine learning model (step S12).
[0044] The control unit 14 determines whether to execute graph cut (step S13). When the control unit 14 determines not to execute graph cut (step S13: NO), the control unit 14 proceeds to the procedure of step S15. When the control unit 14 determines to execute graph cut (step S13: YES), the control unit 14 executes graph cut on the input image 40 using the contour detected by executing inference as a cost function (step S14).
[0045] The control unit 14 generates an initial polygon 51 based on the contour of the recognition target 50 detected by the execution of inference (step S15). After executing the procedure of step S15, the control unit 14 ends the execution of the flowchart in Fig. 12 and proceeds to the procedure of step S5 in Fig. 11.
[0046] <Foreground extraction using hue data> The control unit 14 executes the procedure of the flowchart shown in FIG. 13 in order to generate the initial polygon 51 in the foreground extraction mode using hue data.
[0047] The control unit 14 specifies a range from which the foreground is to be extracted (step S21). The control unit 14 acquires the background color in the specified range as the surrounding hue (step S22). The control unit 14 removes the background (step S23). The control unit 14 generates an initial polygon 51 based on the contour of the foreground extracted by removing the background (step S24). After executing the procedure of step S24, the control unit 14 ends the execution of the flowchart in FIG. 13 and proceeds to the procedure of step S5 in FIG. 11.
[0048] <Graph cut> The control unit 14 executes the procedure of the flowchart shown in FIG. 14 in order to generate the initial polygon 51 in the graph cut mode.
[0049] The control unit 14 generates a mask (step S31). The control unit 14 executes graph cutting based on the mask (step S32). The control unit 14 determines whether graph cutting has been completed (step S33). If graph cutting has not been completed (step S33: NO), the control unit 14 returns to the procedure of step S31. If graph cutting has been completed (step S33: YES), the control unit 14 generates an initial polygon 51 based on the extraction result of the recognition target 50 by graph cutting (step S34). After executing the procedure of step S34, the control unit 14 ends the execution of the flowchart in FIG. 14 and proceeds to the procedure of step S5 in FIG. 11.
[0050] The control unit 14 executes the superpixel (step S5). The control unit 14 corrects the polygon based on the segmentation information that identifies the segment 52 generated by the superpixel (step S6). The control unit 14 assigns label information (step S7). The control unit 14 determines whether there is another input image 40 for generating training data, that is, whether there is next image data (step S8). If there is a next input image 40 (step S8: YES), the control unit 14 returns to the procedure of step S2 to process the next input image 40. If there is no next input image 40 (step S8: NO), the control unit 14 generates training data for the input image 40 by associating the data of the polygon generated in the input image 40 with the label information assigned to the polygon (step S9). After executing the procedure of step S9, the control unit 14 ends the execution of the procedure of the flowchart in FIG. 11.
[0051] The control unit 14 may execute the procedure of adding label information in step S7 at any timing from after step S1 to after step S6. When adding label information before generating the initial polygon 51, the control unit 14 adds the label information to the input image 40. When generating the initial polygon 51 in the input image 40 to which the label information has been added, the control unit 14 adds the label information added to the input image 40 to the generated initial polygon 51. The control unit 14 may extract the recognition target 50 that matches the label information added to the input image 40, and generate the initial polygon 51 for the extracted recognition target 50.
[0052] The control unit 14 may execute the procedure of generating the initial polygon 51 in step S4 of Fig. 11 after the procedure of executing the superpixel in step S5. In this case, the control unit 14 can generate the initial polygon 51 based on segmentation information.
[0053] The control unit 14 may perform superpixeling again on the entire image when correcting a polygon. For example, if the control unit 14 performs superpixeling only on a partial range of the input image 40 in the procedure of step S5, segmentation information outside the range of the superpixels is not associated with the image. Therefore, in various embodiments, it may be assumed that the control unit 14 performs superpixeling again on the entire image when correcting a polygon.
[0054] (Small summary) As described above, according to the teacher data generation device 10 and teacher data generation method of this embodiment, the time required to draw a polygon representing the contour of the recognition target 50 is reduced by generating and correcting the initial polygon 51. In addition, the user's operations for recognizing the recognition target 50 as the foreground and generating the initial polygon 51 are reduced.
[0055] Furthermore, the initial polygon 51 is modified based on segmentation information that specifies the segments 52 that are set by executing superpixel processing on the input image 40 or the preprocessed image 41. In this manner, the initial polygon 51 is modified with high accuracy so that the contour represented by the modified polygon 55 approaches the true contour of the recognition target 50. Furthermore, the time required to modify the initial polygon 51 is reduced.
[0056] Furthermore, the processing load of the superpixel is reduced by limiting the range of the superpixel to the periphery of the initial polygon 51 or the recognition target 50. As a result, the calculation cost can be reduced.
[0057] As a comparative example, a configuration can be considered in which polygon data representing the contour of an object as the recognition target 50 is manually generated by a user. In this case, the more complex the contour of the object is, the greater the workload and time required for the user to specify the contour. According to the teacher data generating device 10 and teacher data generating method of this embodiment, polygons can be generated with high accuracy by generating and correcting initial polygons 51 without user intervention. As a result, the workload and time required for the user can be reduced.
[0058] As a comparative example, a configuration is considered in which teacher data is generated by performing annotation on consecutive images by combining background subtraction and deep learning. However, while this configuration is effective for consecutive images in which an object moves, it is not useful when the image includes multiple images in which the object is different, or when there is no background image in which no object is captured. According to the teacher data generating device 10 and the teacher data generating method of this embodiment, polygons can be generated with high accuracy. As a result, robustness against non-identical objects can be improved.
[0059] As a comparative example, a configuration is considered in which teacher data is generated by detecting the contour of the foreground from an arbitrary background with high accuracy. However, in this configuration, when one image contains images of multiple objects, the work of inputting the shape of the foreground region increases. According to the teacher data generating device 10 and the teacher data generating method of this embodiment, the input of the shape of the foreground region can be omitted by generating the initial polygon 51. As a result, the user's workload and work time can be reduced.
[0060] As a comparative example, a configuration in which a label is assigned to the segmentation of each pixel of an image using a machine learning model is considered. However, in this configuration, in order to improve the accuracy of the assignment of the label, it is necessary to create highly accurate teacher data. In order to create highly accurate teacher data, work time and work cost are required to prepare initial teacher data, and a calculation load and calculation cost are required to execute learning to generate a machine learning model. According to the teacher data generating device 10 and the teacher data generating method of this embodiment, a polygon can be generated with high accuracy by generating the initial polygon 51 and correcting it, without the user's work. As a result, the user's work load and work time can be reduced.
[0061] (Other embodiments) Other embodiments are described below.
[0062] <Feedback on correction data for initial polygon 51> The teacher data generation device 10 may sequentially generate teacher data for each of the multiple input images 40. In this case, the teacher data generation device 10 may feed back correction data for the initial polygon 51 in an input image 40 processed in an earlier order to the generation of the initial polygon 51 in an input image 40 processed in a later order. In this way, the accuracy of the initial polygon 51 is improved. As a result, the workload or calculation load required for correcting the initial polygon 51 can be reduced.
[0063] For example, assume that the initial polygon 51 generated in the input image 40 includes a shadow of an object that is the recognition target 50. In this case, the teacher data generation device 10 causes the polygon correction unit 144 of the control unit 14 to delete the shadow portion from the initial polygon 51 to generate a corrected polygon 55. The control unit 14 characterizes the image of the deleted shadow portion as correction data, and feeds back data characterizing the correction data to the generation of the initial polygon 51 in the input image 40 to be processed in a later order. The control unit 14 can detect the shadow portion from the input image 40 based on the data characterizing the image of the shadow portion as correction data, and can remove the shadow portion from the beginning when generating the initial polygon 51.
[0064] The data characterizing the correction data including the image of the corrected portion such as the shadow portion includes, for example, pixel value information, texture information, or shape information of the image. The data characterizing the correction data of the initial polygon 51 is also called characterization data. The characterization data can also be used as a condition for selecting the type of image processing or determining the parameters of the image processing in the image processing unit 141 of the control unit 14. In other words, the image processing unit 141 may modify parameters to be applied to preprocessing of the input image 40 to be processed later, based on the correction data of the polygon data. The parameters to be applied to the preprocessing are also called preprocessing parameter values.
[0065] When creating training data, the control unit 14 may process a plurality of input images 40 including images of the same type of object. When the control unit 14 processes a plurality of input images 40 including images of the same type of object to generate the initial polygon 51 by machine learning inference, a machine learning model that has been overtrained with respect to the input image 40 may be used as the machine learning model used for inference. For example, when a predetermined condition is satisfied when starting processing of the next input image 40, the control unit 14 may generate and transfer a machine learning model used for generating the initial polygon 51 by learning using training data generated based on the already processed input image 40.
[0066] The control unit 14 may correct the input image 40 as pre-processing of the input image 40 to be processed next, based on the difference between the initial polygon 51 (polygon data) and the modified polygon 55 (modified polygon data) in previously executed processing of the input image 40. The control unit 14 may also correct the input image 40 as pre-processing of the input image 40 to be processed next, based on modification data from the initial polygon 51 (polygon data) to the modified polygon 55 (modified polygon data) in previously executed processing of the input image 40.
[0067] The control unit 14 may feed back the correction data for the initial polygon 51 as described above by executing a teacher data generating method including the procedures of the flowcharts exemplified in FIGS.
[0068] The control unit 14 acquires the input image 40 via the input unit 12 (step S51). The control unit 14 executes pre-processing on the input image 40 (step S52). The control unit 14 selects a generation mode for the initial polygon 51 (step S53). The control unit 14 generates the initial polygon 51 (step S54). The control unit 14 generates the initial polygon 51 in the mode selected in the procedure of step S53. In the procedure of step S54, the control unit 14 may execute the procedure shown in any one of FIG. 12, FIG. 13, or FIG. 14. The procedures from steps S51 to S54 in FIG. 15 correspond to the procedures from steps S1 to S4 in FIG. 11.
[0069] The control unit 14 automatically modifies the initial polygon 51 (step S55). Specifically, the control unit 14 may modify the initial polygon 51 based on modification data of the initial polygon 51 when an input image 40 was processed prior to the input image 40 currently being processed. The control unit 14 may not execute the procedure of step S55.
[0070] The control unit 14 executes the superpixel (step S56). The control unit 14 corrects the polygon based on the segmentation information that identifies the segment 52 generated by the superpixel (step S57). The control unit 14 assigns label information (step S58). The control unit 14 determines whether there is another input image 40 for generating training data, that is, whether there is next image data (step S59). If there is no next input image 40 (step S59: NO), the control unit 14 generates training data for the input image 40 by associating the data of the polygon generated in the input image 40 with the label information assigned to the polygon (step S60). After executing the procedure of step S60, the control unit 14 ends the execution of the procedure of the flowchart in FIG. 11. The procedures from step S56 to S60 in FIG. 15 correspond to the procedures from step S5 to S9 in FIG. 11.
[0071] If the next input image 40 exists (step S59: YES), the control unit 14 determines whether the polygon has been modified in the processing of the previous input image 40 (step S61). If the polygon has not been modified in the processing of the previous input image 40 (step S61: NO), the control unit 14 returns to the procedure of step S52 to process the next input image 40. If the polygon has been modified in the processing of the previous input image 40 (step S61: YES), the control unit 14 characterizes the modified data (step S62). The control unit 14 learns the modified data (step S63). The control unit 14 may generate a machine learning model used to generate the initial polygon 51 by learning the modified data. After executing the procedure of step S63, the control unit 14 returns to the procedure of step S52 to process the next input image 40.
[0072] As described above, the teacher data generation device 10 can improve the accuracy of the initial polygon 51 by feeding back the characterization data. Also, the teacher data generation device 10 can further improve the accuracy of the initial polygon 51 by automatically correcting the initial polygon 51 based on the characterization data. Also, the teacher data generation device 10 can emphasize the contour of the recognition target 50 and make it easier to detect the initial polygon 51 by adjusting parameters in the pre-processing of the input image 40 based on the characterization data. As a result, the accuracy of the initial polygon 51 is further improved.
[0073] The above describes an embodiment of the teacher data generation device 10. However, embodiments of the present disclosure can also be embodied as a method or program for implementing the device, or as a storage medium on which a program is recorded (for example, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a CD-RW, a magnetic tape, a hard disk, or a memory card, etc.).
[0074] The implementation form of the program is not limited to application programs such as object code compiled by a compiler or program code executed by an interpreter, but may be in the form of a program module incorporated into an operating system. Furthermore, the program may or may not be configured so that all processing is performed only by the CPU on the control board. The program may be configured so that a part or all of it is executed by another processing unit mounted on an expansion board or expansion unit added to the board as necessary.
[0075] Although the embodiments of the present disclosure have been described based on the drawings and examples, it should be noted that those skilled in the art can make various modifications or alterations based on the present disclosure. Therefore, it should be noted that these modifications or alterations are included in the scope of the present disclosure. For example, the functions, etc. included in each component, etc. can be rearranged so as not to cause logical inconsistencies, and multiple components, etc. can be combined into one or divided.
[0076] All of the features described in this disclosure and / or all steps of any method or process disclosed herein may be combined in any combination except those combinations in which the features are mutually exclusive. Furthermore, each feature described in this disclosure may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly denied. Thus, unless expressly denied, each disclosed feature is merely one example of a generic series of the same or equivalent features.
[0077] Furthermore, the embodiments of the present disclosure are not limited to any of the specific configurations of the embodiments described above, but rather extend to any novel feature or combination of features described herein, or any novel method or process step or combination of features described herein.
[0078] In this disclosure, descriptions such as "first" and "second" are identifiers for distinguishing the configurations. Configurations distinguished by descriptions such as "first" and "second" in this disclosure may have their numbers exchanged. For example, the first process may exchange identifiers "first" and "second" with the second process. The exchange of identifiers is performed simultaneously. The configurations remain distinguished even after the exchange of identifiers. Identifiers may be deleted. A configuration from which an identifier has been deleted is distinguished by a code. Descriptions of identifiers such as "first" and "second" in this disclosure alone should not be used to interpret the order of the configurations or to justify the existence of an identifier with a smaller number.
[0079] The configuration according to the present disclosure may be realized as an image processing device including an input unit 12 that acquires at least one input image 40 including an image of the recognition target 50, a first process that generates polygon data that follows the contour of a portion determined to be an image of the recognition target 50 from a first region of the input image 40, a second process that sets segments 52 by dividing the input image 40 based on a brightness gradient, and a control unit 14 that generates modified polygon data by modifying the polygon data based on the segments 52 set in the second process. [Explanation of symbols]
[0080] 10 Teacher data generation device (12: input unit, 14: control unit, 16: output unit, 141: image processing unit, 142: initial polygon generation unit, 143: superpixel unit, 144: polygon correction unit, 145: label assignment unit, 146: teacher data generation unit) 40 Input images 41 Pre-processed images 42 Polygon generated images 43 Segment Images 44 Polygon Modified Images 50 Recognition target 51 Initial Polygons 52 Segments 53 Specified area 54 Delete area 55 Modified Polygons
Claims
1. An input unit that acquires at least one input image including an image to be recognized; a control unit that generates contour data that indicates a contour of a portion in the input image that is determined to be the recognition target and that is different from the image; an output unit that outputs the contour data and label information explaining the recognition target as teacher data by associating the contour data and label information with the input image; A teacher data generating device comprising:
2. The control unit: Setting one or more segments by dividing the input image based on a luminance gradient; obtaining the contour data generated based on the segments; The teacher data generating device according to claim 1 .
3. The teacher data generating device described in Claim 2, wherein the control unit modifies the contour data by deleting at least one segment among the plurality of segments from the contour data.
4. The teacher data generating device as described in Claim 2, wherein the control unit modifies the contour data by adding at least one of the segments to the contour data.
5. Obtaining at least one input image including an image to be recognized; generating contour data that indicates a contour of the portion in the input image that is determined to be the recognition target and that is different from the image; outputting said contour data and label information explaining said recognition target as training data in association with said input image; A method for generating teacher data, comprising:
6. Obtaining at least one input image including an image to be recognized; generating contour data that indicates a contour of the portion in the input image that is determined to be the recognition target and that is different from the image; outputting said contour data and label information explaining said recognition target as training data in association with said input image; A teacher data generation program that causes a processor to execute the above.
