GENERATION UNIT, DATA SET GENERATION DEVICE, SYNTHETIC IMAGE GENERATION METHOD, AND SYNTHETIC IMAGE GENERATION PROGRAM

The system addresses the limitation of fixed-camera datasets by grouping and processing frame images from moving cameras, efficiently generating datasets for supervised learning with reduced effort and time.

JP7547845B2Active Publication Date: 2024-09-10OMRON CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2020132290
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-08-04
Publication Date
2024-09-10
Estimated Expiration
2040-08-04

AI Technical Summary

Technical Problem

Existing methods for generating datasets for image recognition models using fixed cameras cannot effectively utilize frame images captured by cameras with freely changeable angles, limiting the generation of diverse and efficient datasets.

Method used

A system that classifies and processes frame images captured by a moving camera, grouping them based on similar background features, and generates composite images with associated teacher data to create a dataset for supervised learning.

Benefits of technology

Enables the generation of datasets for machine learning using frame images captured by cameras with variable angles, reducing manpower and time required for creating large amounts of supervised learning data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007547845000007
    Figure 0007547845000007
  • Figure 0007547845000001
    Figure 0007547845000001
  • Figure 0007547845000006
    Figure 0007547845000006
Patent Text Reader

Abstract

To provide a technique that can generate a dataset used for machine learning based on frame images photographed by a mobile camera installed in such a manner that its angle can be freely changed.SOLUTION: Frame images picked up by an imaging apparatus are input to an image input unit. A separation processing unit extracts, for each of processing target frame images selected from the frame images input to the image input unit, an object captured in the processing target frame image, and separates the image into a foreground image related to the extracted object and a background image other than the extracted object. A group processing unit performs grouping of the processing target frame images based on the background images obtained through the separation performed by the separation processing unit.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a technique for generating a dataset used in machine learning for creating and evaluating an image recognition model, and in particular to a technique for generating a dataset consisting of image data for supervised learning. [Background technology]

[0002] Conventionally, machine learning is used to process frame images captured by a camera (imaging device), create an image recognition model to detect objects (substances) captured in the frame images, such as people, vehicles, and abandoned objects, and evaluate the created image recognition model. A technology has been proposed to automatically generate a dataset used in this machine learning (for example, see Patent Documents 1 and 2).

[0003] The dataset is made up of a large amount of supervised learning image data. The supervised learning image data is a set of images (learning images) of objects that are associated with correct labels (teaching data) that indicate the positions of the objects on the learning images and the types of the objects.

[0004] The devices described in Patent Documents 1 and 2 generate supervised learning image data for use in machine learning by processing frame images captured by a camera with a fixed angle (hereinafter referred to as a fixed camera) in the following procedure. (1) A background image in which no object is captured is generated using multiple frame images. (2) For each frame image, an image of the captured object is extracted. (3) A composite image is generated by pasting the image of the object extracted in (2) onto the background image generated in (1). The composite image generated in this way is the learning image. (4) (3) creates a correct label indicating the position where the image of the object was pasted, the type of this object, etc. (5) The training image (synthetic image) generated in (3) is associated with the correct label created in (4) to generate supervised training image data. By repeating the above steps (3) to (5) while varying the position at which the object image is pasted relative to the background image, or while varying the object image pasted onto the background image, a large amount of supervised learning image data (i.e., a dataset) can be generated. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] JP 2014-59729 A [Patent Document 2] JP 2019-101740 A Summary of the Invention [Problem to be solved by the invention]

[0006] However, Patent Documents 1 and 2 disclose configurations for generating a data set based on frame images captured by a fixed camera. Therefore, the configurations disclosed in Patent Documents 1 and 2 make it impossible to generate a data set based on frame images captured by a camera (hereinafter, referred to as a mobile camera in contrast to a fixed camera) that is installed so that the angle can be freely changed.

[0007] The mobile camera referred to here is, for example, a PTZ camera that is attached to a pan head that rotates around two perpendicular axes and whose angle can be changed in the pan and tilt directions. The imaging magnification Z is adjusted by the control unit of the mobile camera body.

[0008] An object of the present invention is to provide a technology that can generate a dataset to be used in machine learning based on frame images captured by a moving camera that is installed so that the angle can be freely changed. [Means for solving the problem]

[0009] In order to achieve the above object, the classification unit of the present invention is configured as follows.

[0010] The image input unit receives frame images captured by an imaging device. For each frame image to be processed selected from the frame images input to the image input unit, the separation processing unit extracts an object captured in the frame image to be processed and separates the frame images into a foreground image relating to the extracted object and a background image other than the extracted object. The separation processing unit may be configured to select frame images captured by the imaging device in order as frame images to be processed, or may select frame images to be processed at intervals of a predetermined number of frames (for example, at intervals of 2 to 5 frames), or may randomly select frame images to be processed.

[0011] The group processing unit groups the frame images to be processed based on the background images separated by the separation processing unit. For example, the group processing unit classifies frame images to be processed that have similar background images into the same group based on the similarity of the feature amounts of the background images separated by the separation processing unit. Background images are similar between frame images with similar angles of the imaging device. Therefore, the frame images to be processed are grouped by the group processing unit according to the angles of the imaging device. As a result, for each group, the frame images to be processed that belong to that group can be considered to be frame images captured by a camera installed at a fixed angle (fixed camera).

[0012] The group processing unit may also be configured to set a representative feature of a background image for each group into which the frame images to be processed are classified, and to classify into the same group those frame images whose similarity between the feature of the background image and the representative feature exceeds a first threshold value.

[0013] In this case, the group processing unit can be configured to merge groups whose representative feature similarity between groups exceeds a second threshold value that is smaller than the first threshold value into one group, thereby making it possible to optimize the total number of groups into which frame images are classified.

[0014] The imaging device is attached to a pan head that rotates, for example, around two orthogonal axes, and the imaging direction is changed in accordance with the rotation of the pan head.

[0015] In addition, the learning image data generation unit of the present invention includes a specific background image generation unit that selects one of the groups into which the classification unit has classified the frame images to be processed, and generates a specific background image based on the frame images to be processed that belong to the selected target group, a composite image generation unit that generates a composite image by pasting an image related to an object onto the specific background image generated by the specific background image generation unit, and a teacher data generation unit that generates teacher data for the composite image, including the pasting position of the image related to the object in the composite image, and the type of the object.

[0016] With this configuration, data sets to be used in machine learning can be easily generated using frame images captured by a camera with a variable angle.

[0017] For example, the composite image generation section may be configured to process the frame images to be processed that have been classified into the corresponding group by the separation section of the classification unit, extract images relating to objects, and process the images and paste them onto the learning background image. Effect of the Invention

[0018] According to this invention, a data set to be used in machine learning can be generated based on frame images captured by a moving camera that is installed so that the angle can be freely changed. [Brief description of the drawings]

[0019] [Figure 1]FIG. 2 is a block diagram showing a configuration of a main part of a data set generating device. [Diagram 2] FIG. 2 is a block diagram showing the configuration of the main parts of a classification unit. [Diagram 3] FIG. 3(A) is a diagram showing a frame image to be processed, FIG. 3(B) is a diagram showing a detected object image, and FIG. 3(C) is a diagram showing a background image. [Figure 4] FIG. 2 is a block diagram showing the configuration of the main parts of a generation unit. [Diagram 5] 13 is a flow chart showing a separation process performed by the classification unit. [Figure 6] 4 is a flowchart showing a classification process performed by the classification unit. [Figure 7] 13 is a flowchart showing a data set generation process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] Hereinafter, an embodiment of the present invention will be described.

[0021] <1. Application Examples> 1 is a block diagram showing the configuration of the main parts of a dataset generation device according to this example. The dataset generation device 1 according to this example includes a classification unit 2 and a generation unit 3. The dataset generation device 1 also includes a frame image database 4 (frame image DB4), a background image database 5 (background image DB5), a foreground image database 6 (foreground image DB6), a group database 7 (group DB7), and a dataset database 8 (dataset DB8).

[0022] In this example, a camera 10, which is an imaging device, is connected to the dataset generation device 1. The camera 10 is a video camera with a frame rate of several tens of frames / sec (e.g., 10 to 30 frames / sec). The camera 10 outputs captured video images to the dataset generation device 1 connected thereto.

[0023] The camera 10 is also attached to a camera platform 11. The camera platform 11 rotates the attached camera 10 body around two perpendicular axes. The imaging direction (angle) of the camera 10 changes in the pan direction and tilt direction in response to the rotation of the camera platform 11. The pan direction and tilt direction are perpendicular to each other. A PTZ control device 15 controls the movement of the camera platform 11 and changes the angle of the camera 10. The PTZ control device 15 can also instruct the camera 10 on the imaging magnification (Zoom).

[0024] In this example, the camera 10 is connected to the dataset generation device 1, but the camera 10 may record the captured video on a recording medium such as a hard disk drive (HDD) or a solid state drive (SSD), and connect this recording medium to the dataset generation device 1. The camera 10 may upload the captured video to a cloud server or the like, and the dataset generation device 1 may download the video uploaded by the camera 10.

[0025] The classification unit 2 stores frame images of the video captured by the camera 10 in the frame image DB4. The frame image DB4 is a database that stores frame numbers in association with frame images. The frame number may be any code that can identify the frame image, and may be, for example, a code indicating the capture date and time of the frame image, a serial number indicating the order in which the frame images were captured, or a number determined by other methods.

[0026] The classification unit 2 selects frame images to be processed from among the frame images stored in the frame image DB 4. The classification unit 2 may be configured to select frame images of a moving image captured by the camera 10 as frame images to be processed in the order in which they were captured, or may be configured to select frame images to be processed at intervals of a predetermined number of frames (for example, at intervals of 2 to 5 frames), or may be configured to randomly select frame images to be processed.

[0027] The classification unit 2 extracts (detects) objects such as people, vehicles, abandoned objects, etc. captured in the selected frame image to be processed, and separates the frame image to be processed into a foreground image relating to the detected objects and a background image other than the objects.

[0028] Classification unit 2 stores the separated background image of the frame image to be processed in background image DB5, and stores the separated foreground image of the frame image to be processed in foreground image DB6. Background image DB5 stores the frame number of the frame image to be processed and the background image of this frame image to be processed in association with each other. Furthermore, foreground image DB6 stores the frame number of the frame image to be processed, the foreground image of the frame image to be processed, the type of object related to this foreground image, and the position of the foreground image on the frame image to be processed in association with each other.

[0029] Furthermore, the classification unit 2 divides the frame images to be processed into groups. The classification unit 2 performs classification processing to divide frame images having similar background images into the same group based on the background images of the frame images to be processed stored in the background image DB 5. For example, the classification unit 2 divides the frame images to be processed into groups based on the degree of similarity in the feature amounts of the background images.

[0030] Between frame images captured by camera 10, the smaller the difference in the angle of camera 10 (i.e., the more similar the angle of camera 10), the greater the similarity in the feature amounts of the background images. In other words, between frame images captured by camera 10, the greater the difference in the angle of camera 10, the smaller the similarity in the feature amounts of the background images.

[0031] The classification unit 2 groups together a collection of processing target frame images in which the difference in angle of the camera 10 falls within a certain range. That is, for each group, the difference in angle of the camera 10 between the processing target frame images belonging to that group is relatively small. The group DB 7 stores group data in which the frame numbers of the processing target frame images classified into that group are registered.

[0032] In classifying the processing target frame images, the classification unit 2 may determine that there are processing target frame images that do not belong to any group, and may determine that there are processing target frame images that belong to two or more groups. In other words, the classification unit 2 does not classify processing target frame images so that they always belong to one group.

[0033] In this way, the frame images to be processed are classified into groups by the classification unit 2. Each group is a collection of frame images to be processed in which the difference in the angles of the cameras 10 falls within a certain range. In other words, each group can be considered to be a collection of frame images captured by a fixed camera.

[0034] The generation unit 3 sequentially selects groups into which the processing target frame images have been classified by the classification unit 2, and generates supervised learning image data using the processing target frame images classified into the selected group (hereinafter referred to as the target group). The generation unit 3 uses multiple processing target frame images belonging to the target group to generate a specific background image for that group. For example, the generation unit 3 generates a background image that does not contain any foreground image parts as the specific background image, based on the background images (background images separated by the classification unit 2) of the multiple processing target frame images belonging to the target group stored in the background image DB5.

[0035] The generation unit 3 generates a composite image by pasting a foreground image (a foreground image stored in the foreground image DB 6) separated from a processing target frame image belonging to the target group at an appropriate position on the specific background image generated for the target group. At this time, the generation unit 3 processes the foreground image according to the pasting position. The processing of the foreground image includes, for example, enlarging, reducing, changing the aspect ratio, and rotating.

[0036] Furthermore, the generation unit 3 generates training data for this composite image. The training data is data indicating the position where the foreground image is pasted in the specific background image, the type of object related to the foreground image, etc. The generation unit 3 generates supervised learning image data in which the composite image and the training data are associated with each other.

[0037] In this way, the dataset generation device 1 can generate a dataset to be used for machine learning by using frame images captured at various angles by the camera 10. In particular, the dataset generation device 1 can generate a large amount of supervised learning image data by varying the pasting position of a foreground image relative to a specific background image or by varying the foreground image pasted onto a learning background image. Therefore, the dataset generation device 1 can significantly reduce the manpower and time required to create a dataset consisting of a large amount of supervised learning image data.

[0038] Furthermore, the frame image DB4, background image DB5, foreground image DB6, group DB7, and data set DB8 may be configured on a recording medium such as a hard disk drive (HDD) or a solid state drive (SSD).

[0039] <2. Configuration example> 2 is a block diagram showing the configuration of the main part of the classification unit 2. The classification unit 2 in this example includes a control unit 21 and an image input unit 22.

[0040] The control unit 21 has a separation processing unit 21a and a group processing unit 21b. The control unit 21 controls the operation of the classification unit 2. The separation processing unit 21a and the group processing unit 21b will be described later.

[0041] Moving images captured by the camera 10 are input to the image input unit 22. The moving images input to the image input unit 22 are stored in the frame image DB4. The frame rate of the moving images input to the image input unit 22 is several tens of frames / sec (for example, 10 to 30 frames / sec). As described above, the frame image DB4 stores frame numbers and frame images in association with each other.

[0042] It is not necessary to store all frame images of the moving image input to image input unit 22 in frame image DB4. For example, frame images extracted at intervals of a predetermined number of frames (e.g., at intervals of 2 to 5 frames) from the frame images of the moving image input to image input unit 22 may be stored in frame image DB4. With this configuration, the storage capacity of frame image DB4 can be reduced.

[0043] Next, the separation processing unit 21a and the group processing unit 21b included in the control unit 21 will be described.

[0044] The separation processing unit 21a selects a frame image to be processed from among the frame images stored in the frame image DB 4. The separation processing unit 21a may be configured to select the frame images stored in the frame image DB 4 one by one in the order in which they were captured as the frame images to be processed, or may be configured to select them at intervals of a predetermined number of frames (for example, at intervals of 2 to 5 frames), or may even be configured to randomly select the frame images to be processed.

[0045] The separation processing unit 21a performs object detection processing for detecting captured objects (people, vehicles, abandoned objects, etc.) in the selected frame image to be processed. This object detection processing detects objects captured in the frame image to be processed, for example, by a known method using Mask R-CNN. The separation processing unit 21a may also be configured to detect objects captured in the frame image to be processed by a known pattern matching method. The separation processing unit 21a may also be configured to detect objects captured in the frame image to be processed by other methods.

[0046] The separation processing unit 21a separates the frame image to be processed into a foreground image related to the detected object and a background image other than the foreground image. The separation processing unit 21a associates the frame number of the frame image to be processed, the foreground image of the frame image to be processed, the type of object related to this foreground image, and the position of the foreground image (object) on the frame image to be processed, and stores them in the foreground image DB6. When the separation processing unit 21a detects multiple objects captured in the frame image to be processed, it stores the foreground image, object type, and position on the frame image to be processed for each detected object in the foreground image DB6.

[0047] Furthermore, the separation processing unit 21a stores in the background image DB5 the frame number of the frame image to be processed and the background image of the frame image to be processed in association with each other.

[0048] For example, when the separation processing unit 21a selects the frame image shown in Fig. 3(A) as the frame image to be processed, it detects the vehicle 100 captured in this frame image to be processed as an object. The separation processing unit 21a stores the image of the vehicle 100 shown in Fig. 3(B) in the foreground image DB6 as a foreground image, and stores the background image shown in Fig. 3(C) in the background image DB5. As shown in Fig. 3(C), the background image is an image in which an area 200 (area 200 shown by hatching in Fig. 3(C)) where the foreground image (vehicle 100) was captured is missing.

[0049] The group processing unit 21b performs classification processing to divide the frame images stored in the frame image DB4 into groups based on the background images stored in the background image DB5. In this example, the group processing unit 21b calculates the feature amount of the background image for each background image stored in the background image DB5. The group processing unit 21b divides the frame images having similar feature amounts into provisional groups. The feature amounts of the background images are similar between frame images in which the camera 10 is shot at approximately the same angle.

[0050] For example, the group processing unit 21b detects a group of frame images whose background image features are similar to a certain degree, and performs provisional grouping by grouping the detected group of frame images into one group (provisional group).

[0051] The group processing unit 21b determines the representative feature amount of the background image for each temporary group. This representative feature amount of the background image may be the median or average value of the feature amount of the background image calculated for the frame images belonging to the temporary group. Furthermore, if there are any temporary groups in which the similarity of the representative feature amount of the background image exceeds the inter-group threshold, the group processing unit 21b integrates these groups into one temporary group and determines the representative feature amount of the background image for the integrated temporary group. This inter-group threshold corresponds to the second threshold referred to in this invention.

[0052] The group processing unit 21b generates a corresponding main group for each temporary group. For each temporary group, the group processing unit 21b calculates the similarity between the feature amount of the background image and the representative feature amount of this temporary group for the frame images belonging to that temporary group, and extracts frame images for which the calculated similarity exceeds a group threshold. The group processing unit 21b sets the group consisting of the frame images extracted here as the main group. In other words, the main group is obtained by removing, from the frame images belonging to the temporary group, frame images of the background image whose feature amount with the representative feature amount does not exceed the group threshold.

[0053] Therefore, the frame images belonging to the group classified by the group processing unit 21b have a similarity to the representative feature amount that exceeds the group threshold value. This group threshold value corresponds to the first threshold value in this invention.

[0054] The group DB 7 stores group data in which, for each of the main groups classified by the group processing unit 21b, the frame numbers of the frame images belonging to that main group are associated with each of the main groups.

[0055] The control unit 21 of the classification unit 2 is composed of a hardware CPU, memory, and other electronic circuits. When the hardware CPU executes the frame image classification program according to the present invention, it operates as a separation processing unit 21a and a group processing unit 21b. The memory also has an area for expanding the frame image classification program according to the present invention and an area for temporarily storing data and the like generated when the frame image classification program is executed. The control unit 21 may be an LSI that integrates the hardware CPU, memory, and the like. Also, the hardware CPU is a computer that executes the frame image classification method according to the present invention.

[0056] 4 is a block diagram showing the configuration of the main parts of the generation unit 3. The generation unit 3 has a background image generation unit 31, a composite image generation unit 32, and a teacher data generation unit 33.

[0057] The background image generating unit 31 generates a specific background image for each main group divided by the classification unit 2. The background image generating unit 31 corresponds to the specific background image generating unit referred to in this invention. The background image generating unit 31 selects a main group for which a specific background image is to be generated, and generates a background image without the missing area 200 shown in Fig. 3(C) by using multiple frames of background images that belong to the selected main group and that are separated by the classification unit 2.

[0058] For example, the background image generating unit 31 generates a specific background image by taking a certain frame image as a reference image and complementing a missing area 200 in this reference image with the background image of the area 200 captured in one or more other frame images. For example, a frame image belonging to the selected group and having the highest similarity between the feature amount of the background image and the representative feature amount of the background image determined by the classification unit 2 may be taken as the reference image.

[0059] For each group, composite image generation unit 32 generates a composite image by pasting a foreground image separated from a frame image belonging to that group onto a specific background image generated by background image generation unit 31. Composite image generation unit 32 processes the foreground image according to the position where it is pasted. The foreground image is processed by enlarging, reducing, changing the aspect ratio, rotating, etc.

[0060] The teacher data generating unit 33 generates teacher data indicating the position, type, size, etc. of an object related to the pasted foreground image for the composite image to which the foreground image has been pasted.

[0061] The generation unit 3 stores the supervised learning image data in which the synthetic image and the supervised data are associated with each other in the dataset DB8.

[0062] The generation unit 3 is composed of a hardware CPU, memory, and other electronic circuits. When the hardware CPU executes the supervised learning image data generation program, it operates as a background image generation unit 31, a composite image generation unit 32, and a teacher data generation unit 33. The memory also has an area for expanding the supervised learning image data generation program and an area for temporarily storing data generated during execution of the supervised learning image data generation program. The control unit 21 may be an LSI that integrates the hardware CPU, memory, and the like.

[0063] The dataset generation device 1 may be configured such that one hardware CPU operates as both the classification unit 2 and the generation unit 3.

[0064] <3. Example of operation> First, there will be described the operation of the classification unit 2. The classification unit 2 executes frame image storage processing, separation processing, and classification processing.

[0065] The frame image storage process is a process for storing in the frame image DB4 frame images relating to the moving image input to the image input unit 22. The frame image DB4 stores frame numbers and frame images in association with each other.

[0066] 5 is a flowchart showing the separation process executed by the classification unit 2. The classification unit 2 separates the frame images stored in the frame image DB 4 in the frame image storage process into a foreground image and a background image other than the foreground image. The separation process is executed by the separation processing unit 21a.

[0067] The separation processing unit 21a selects (s1) a frame image to be processed from among the frame images stored in the frame image DB 4. The separation processing unit 21a may select as the frame images to be processed frame images in the order in which they were captured in the moving image captured by the camera 10, may select the frame images to be processed at intervals of a predetermined number of frames (for example, at intervals of 2 to 5 frames), or may select the frame images to be processed randomly.

[0068] The separation processing unit 21a performs an object detection process (s2) for extracting (detecting) an object captured in the processing target frame image selected in s1. The object detection process in s2 may be, for example, a process for detecting an object captured in the processing target frame image using a known Mask R-CNN method, a process for detecting an object captured in the processing target frame image using a known pattern matching method, or a process for detecting an object captured in the processing target frame image using a method other than these.

[0069] Separation processing unit 21a stores the foreground image related to the object detected in s2 in foreground image DB6 (s3). In s3, the frame number of the frame image to be processed, the foreground image related to the detected object, the object type, and the position of the object on the frame image to be processed are stored in foreground image DB6 in association with each other.

[0070] Furthermore, separation processing unit 21a stores the background image from which the foreground image area detected in s2 is missing in background image DB5 (s4). In s4, the frame number of the frame image to be processed and the background image of this frame image to be processed are associated with each other and stored in background image DB5.

[0071] The separation processing unit 21a may perform the processes of s3 and s4 in the reverse order to that described above, or may perform them in parallel.

[0072] The separation processing unit 21a determines whether there is an unprocessed frame target image (s5), and if there is an unprocessed frame target image, returns to s1 and repeats the above process. Also, if the separation processing unit 21a determines in s5 that there is no unprocessed frame image, it ends this process.

[0073] When separation processing unit 21a executes the separation process shown in Figure 5, for each frame image to be processed selected from the frame images stored in frame image DB4, the background image of the frame image to be processed is stored in background image DB5, and the foreground image of the selected frame image to be processed is stored in foreground image DB6.

[0074] Next, the classification process will be described. Fig. 6 is a flowchart showing the classification process executed by the classification unit. The group processing unit 21b executes this classification process.

[0075] The group processing unit 21b sequentially selects background images stored in the background image DB5, and calculates the feature amounts of the selected background images (s11 to s13). The group processing unit 21b detects the distribution of the feature amounts for the background images stored in the background image DB5 (s14). The distribution of the feature amounts detected in s14 is, for example, a distribution indicating the relationship between the feature amounts of the background images and the number of frames.

[0076] The group processing unit 21b classifies the background images stored in the background image DB5 into provisional groups based on the distribution of the feature values ​​detected in s14 (s15). In s15, a group of background images having similar features to a certain extent and exceeding a predetermined number of frames is extracted from the distribution of the feature values ​​detected in s14, and the extracted group of background images is put into one provisional group. There is one or more groups of background images (provisional groups) extracted in s15.

[0077] Among the background images stored in background image DB5, there may be a background image that does not belong to any of the background image groups extracted in s15, or there may be a background image that belongs to two or more provisional groups.

[0078] The group processing unit 21b calculates a representative feature amount of the background image in each of the provisional groups classified in s15 (s16). The representative feature amount of the background image in this provisional group may be a median or average value of the feature amount of the background image calculated for the background images belonging to the provisional group.

[0079] The group processing unit 21b also determines whether there are any temporary groups to be integrated into one based on the representative feature of the background image calculated in s16 for each temporary group (s17), and integrates these temporary groups if there are any temporary groups to be integrated into one (s18). In s17, if there are any temporary groups in which the similarity of the representative feature of the background image calculated in s16 exceeds a predetermined inter-group threshold (a second threshold in this invention), it is determined that these groups are temporary groups to be integrated into one. The group processing unit 21b calculates the representative feature of the background image for the temporary groups integrated in s18 (s19), and returns to s17. In s19, the representative feature of the background image for the integrated temporary groups is calculated in the same manner as in s16.

[0080] By repeating the processes of s17 to s19, the group processing unit 21b can classify background images having similar feature amounts into one provisional group. The feature amounts are similar to a certain degree between background images belonging to the same provisional group.

[0081] When the group processing unit 21b determines in s17 that there is no temporary group to be integrated, it forms a main group corresponding to each temporary group, thereby classifying the background images stored in the background image DB5 into the main group (s20). In s20, for each temporary group, background images whose similarity to the representative feature of the background images belonging to the temporary group exceeds a group threshold (first threshold in this invention) are extracted, and the extracted background images are grouped into one main group. The group threshold is larger than the inter-group threshold.

[0082] As is clear from the above description, a main group is a group obtained by narrowing down background images that belong to the corresponding provisional group. The feature values ​​of background images that belong to the same main group have a high similarity to the representative feature value of the group. Therefore, the feature values ​​of background images that belong to the same main group also have a high similarity.

[0083] The feature amounts of the background images are similar between frame images captured at approximately the same angle of the camera 10. Therefore, frame images whose background images belong to the same main group are frame images captured at approximately the same angle by the camera 10. In other words, the group processing unit 21b can classify the frame images of the moving image captured by the camera 10 into main groups classified according to the angle of the camera 10 at the time of capture.

[0084] The group processing unit 21b stores, for each classified main group, group data in which the frame numbers of each frame image belonging to that main group are associated with each other in the group DB 7 (s21), and ends this process.

[0085] Next, a process in which the generation unit 3 generates a dataset used in machine learning will be described. The dataset is made up of a large amount of supervised learning image data. As described above, the classification unit 2 classifies the frame images stored in the frame image DB4 into groups according to the angle of the camera 10 at the time of capturing images. The background image DB5 stores a background image obtained by removing a foreground image from each frame image selected as a frame image to be processed. The foreground image DB6 stores a foreground image of an object captured in each frame image selected as a frame image to be processed. The group DB7 stores group data that associates frame images belonging to each group classified by the classification unit 2 with the group.

[0086] FIG. 7 is a flowchart showing a data set generation process in the generation unit.

[0087] The generation unit 3 selects a target group from the main group classified by the classification unit 2 (s31). The generation unit 3 generates a specific background image for the target group selected in s31 (s32). In s32, a background image without missing area 200 is generated using multiple background images belonging to the currently selected target group stored in the background image DB5.

[0088] For example, the generation unit 3 sets the background image having the feature amount most similar to the representative value of the currently selected target group as the reference background image. The generation unit 3 extracts one or more background images (hereinafter referred to as complementary background images) that belong to the same group as the reference background image and in which a region 200 missing from the reference background image (a region in which an object (e.g., a vehicle 100) was captured in a frame image related to the reference background image) is captured. The generation unit 3 generates a background image of the region 200 missing from the reference background image using the extracted complementary background image. The generation unit 3 generates an image by combining the background image of the region 200 missing from the reference background image generated here with the corresponding region 200 in the reference background image, as a specific background image of the currently selected target group. The background image generation section 31 executes the process related to s32.

[0089] The generation unit 3 generates a learning image using the specific background image generated in s32 (s33). The generation unit 3 generates an image in which a foreground image relating to an object is pasted onto the specific background image generated in s32 as a learning image. The foreground image pasted onto the specific background image generated in s32 is a foreground image stored in the foreground image DB6, and is a foreground image separated from a frame image belonging to the currently selected target group. The position at which the foreground image is pasted onto the specific background image generated in s32 is set randomly. In addition, the foreground image pasted onto the specific background image generated in s32 is also determined randomly. In addition, the number of foreground images pasted onto the specific background image generated in s32 is not necessarily one.

[0090] Furthermore, when the generation unit 3 pastes a foreground image onto the specific background image generated in s32, the generation unit 3 processes the foreground image based on the position on the frame image where the foreground image was captured and the position on the specific background image generated in s32 where the foreground image is to be pasted. The processing of the foreground image includes, for example, enlarging, reducing, changing the aspect ratio, and rotating. The composite image generation unit 32 executes the processing related to this s33.

[0091] Furthermore, the generation unit 3 generates teacher data for the learning image generated in s33 (s34). The teacher data generation unit 33 executes the process of s34. The teacher data is data indicating the position of the object on the learning image generated in s33 (the position where the foreground image is pasted on the specific background image generated in s32), the type of this object, etc.

[0092] The generation unit 3 registers the supervised learning image data, which corresponds the learning image generated in s33 with the teacher data generated in s34, in the data set DB8 (s35). In s35, the generation unit 3 registers the supervised learning image data for the currently selected target group in the data set DB8. The generation unit 3 determines whether the supervised learning image data registered in the data set DB8 has reached the required number of frames (s36), and if the required number of frames has not been reached, the process returns to s33 and repeats the above process. The required number of frames is preset.

[0093] Furthermore, when the generation unit 3 determines in s36 that the image data for supervised learning registered in the data set DB8 has reached the required number of frames, it determines whether there is an unprocessed group (s37). When the generation unit 3 determines in s37 that there is an unprocessed group, it returns to s31 and repeats the above-mentioned process. When the generation unit 3 determines in s37 that there is no unprocessed group, it ends this process.

[0094] In this way, the data set generation device 1 can generate a data set to be used in machine learning based on frame images captured by the camera 10 that is installed so that the angle can be freely changed.

[0095] Furthermore, the data set generation device 1 generates a data set to be used in machine learning for each group classified according to the angle of the camera 10. Therefore, the data set generation device 1 can generate a data set on which machine learning can be performed for each angle of the camera 10.

[0096] <4. Modifications> The method of grouping the background images in the group processing unit 21b is not limited to the above-mentioned method, and other methods may be used.

[0097] For example, if the pan angle and tilt angle of the camera head 11 to which the camera 10 is attached can be obtained from the PTZ control device 15, the frame images of the moving image captured by the camera 10 may be classified into groups based on the pan angle and tilt angle of the camera head 11.

[0098] A randomly selected frame image is set as a representative image, and the feature amount of the background image of the representative image is set as the representative feature amount. Then, frame images related to background images whose similarity to the representative feature amount exceeds the above-mentioned group threshold are extracted, and if the number of extracted frame images is equal to or exceeds a predetermined number, these frame images (including the randomly selected frame image) are classified into one group.

[0099] Furthermore, by repeating the selection of the representative image, the frame images captured by the camera 10 can be classified into a plurality of groups according to the angle of the camera 10.

[0100] Furthermore, the order of the processing steps in the separation process shown in FIG. 5, the classification process shown in FIG. 6, and the data set generation process shown in FIG. 7 is merely an example, and the order may be changed as appropriate.

[0101] It should be noted that the present invention is not limited to the above-described embodiment as it is, and that the components can be modified and embodied in the implementation stage without departing from the gist of the invention. In addition, various inventions can be formed by appropriately combining multiple components disclosed in the above-described embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, components from different embodiments may be appropriately combined.

[0102] Furthermore, the correspondence between the configuration according to the present invention and the configuration according to the above-mentioned embodiment can be described as follows. <Additional Notes> an image input unit (22) to which a frame image captured by an imaging device (10) is input; a separation processing unit (21a) for extracting an object captured in each processing target frame image selected from the frame images input to the image input unit (22) and separating the object into a foreground image relating to the extracted object and a background image other than the extracted object; a group processing unit (21b) for grouping processing target frame images based on the background image separated by the separation processing unit (21a); [Explanation of symbols]

[0103] 1. Data set generator 2...Classification unit 3…Generation unit 4...Frame image database (frame image DB) 5...Background image database (background image DB) 6...Foreground image database (foreground image DB) 7...Group Database (Group DB) 8...Dataset Database (Dataset DB) 10. Camera 11... Pan head 15...PTZ control device 21...Control unit 21a...Separation processing section 21b...Group processing section 22...Image input section 31...Background image generation unit 32...Synthetic image generating unit 33…Teacher data generation unit

Claims

1. A specific background image generation unit which extracts an object captured in each frame image to be processed selected from frame images captured by an imaging device and input to an image input unit, separates the object into a foreground image relating to the extracted object and a background image other than the extracted object, selects one of the groups of the frame images to be processed classified by a classification unit which groups the frame images to be processed based on the separated background image, and generates a specific background image based on the frame images to be processed that belong to the selected target group; a composite image generating unit that generates a composite image by pasting an image relating to an object onto the specific background image generated by the specific background image generating unit; A generation unit including a teacher data generation unit that generates teacher data for the composite image, the teacher data including an image pasting position for an object in the composite image and a type of the object.

2. The generation unit according to claim 1 , wherein the composite image generation section processes a foreground image relating to an object extracted by the classification unit by processing a processing target frame image belonging to a corresponding group, and pastes the processed foreground image onto the specific background image.

3. an image input unit to which a frame image captured by an imaging device is input; a separation processing unit which extracts an object captured in each processing target frame image selected from the frame images input to the image input unit, and separates the object into a foreground image relating to the extracted object and a background image other than the extracted object; a group processing unit that groups processing target frame images based on the background image separated by the separation processing unit; a specific background image generating section that selects one of the groups into which the processing target frame images are classified by the classification unit, and generates a specific background image based on the processing target frame images that belong to the selected target group; a composite image generating unit that generates a composite image by pasting an image relating to an object onto the specific background image generated by the specific background image generating unit; a generating unit including a training data generating unit for generating training data including a pasting position of an image related to an object in the composite image and a type of the object in the composite image; A data set generating device comprising:

4. A dataset generating device as described in Claim 3, wherein the group processing unit of the classification unit groups the frame images to be processed based on the similarity of the features of the background image separated by the separation processing unit.

5. A dataset generating device as described in claim 3 or 4, wherein the group processing unit of the classification unit sets a representative feature of a background image for a group into which the frame images to be processed are classified, and classifies into the same group those frame images whose similarity between the feature of the background image and the representative feature exceeds a first threshold value.

6. The dataset generating device described in Claim 5, wherein the group processing unit of the classification unit merges groups in which the similarity of the representative feature between groups exceeds a second threshold value that is smaller than the first threshold value into one group.

7. The data set generating device according to any one of claims 3 to 6, wherein the imaging device is attached to a pan head that rotates around two orthogonal axes, and the imaging direction changes in accordance with the rotation of the pan head.

8. A dataset generating device as described in any one of claims 3 to 7, wherein the synthetic image generation section of the generation unit processes a foreground image relating to an object extracted by processing a frame image to be processed that belongs to a corresponding group by the separation processing section of the classification unit, and pastes the foreground image onto the specific background image.

9. A specific background image generation step for extracting an object captured in each frame image to be processed selected from frame images captured by an imaging device and input to an image input unit, separating the object into a foreground image relating to the extracted object and a background image other than the extracted object, selecting one of the groups of the frame images to be processed classified by a classification unit that groups the frame images to be processed based on the separated background image, and generating a specific background image based on the frame images to be processed that belong to the selected target group; a composite image generating step of generating a composite image by pasting an image relating to an object onto the specific background image generated in the specific background image generating step; A synthetic image generating method executed by a computer, comprising: a training data generating step of generating training data for the synthetic image, the training data including a position at which an image relating to an object in the synthetic image is pasted and a type of the object.

10. A specific background image generation step for extracting an object captured in each frame image to be processed selected from frame images captured by an imaging device and input to an image input unit, separating the object into a foreground image relating to the extracted object and a background image other than the extracted object, selecting one of the groups of the frame images to be processed classified by a classification unit that groups the frame images to be processed based on the separated background image, and generating a specific background image based on the frame images to be processed that belong to the selected target group; a composite image generating step of generating a composite image by pasting an image relating to an object onto the specific background image generated in the specific background image generating step; A synthetic image generating program that causes a computer to execute a training data generating step of generating training data for the synthetic image, the training data including the pasting position of an image related to an object in the synthetic image and the type of the object.

Citation Information

Patent Citations

  • Device for setting supervised area by supervisory camera and its method

    JP2001204007A

  • Information processing program, information processing method, and information processor

    JP2012185730A

  • Object detection and identification unit and method for the same, and dictionary data generation method used for object detection and identification

    JP2014059729A

  • Image recognition device and method and program

    JP2016018538A

  • Information processing device, information processing method and program

    JP2018045302A