Generating training data for object recognition
Patent Information
- Application Number
- DE112020005732
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-11-22
- Filing Date
- 2020-11-17
- Publication Date
- 2024-10-02
- Estimated Expiration
- 2040-11-17
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND The present disclosure relates to methods, computer systems, and computer program products for generating training data for object recognition in images. BACKGROUND The use of deep learning neural networks (DNNs) can enable effective training for object detection. Image annotation information is included in the DNN training procedures. Mainstream object detection models, such as SSD (Solid State Disk) and YOLO, have limitations in detecting a specific object size. Therefore, detecting tiny objects in a high-resolution image is a challenging task. The most common solution to this problem is to slice the high-resolution image into many small images. This makes the target size relatively large enough for the detection models. If the target is tiny compared to the size of the input image, it is necessary to slice the image into hundreds of small images during the pre-inference process. This means that training data must be sliced into hundreds of small images.It is necessary to annotate each of the small images. Generating annotations for enormous sliced data represents a significant workload. One solution to reduce the workload is to develop a program that can automatically generate new annotations for these small images from the original annotations. However, this automatic approach might generate an annotation in a meaningless region where no target object is contained within the region. The number of business models for small object detection is increasing these days. An efficient automatic method for generating high-quality sliced annotations for training data reduces the enormous workload and improves the accuracy of the deep learning model. Therefore, there is a need in the field to address the aforementioned problem. Documents have already been published in this context. The document "The power of tiling for small object detection. In: Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition Workshops. 2019. pp. 1-10" by OZGE UNEL, F., Ozkalayci, B.O., and Cigla, C. describes deep neural network-based techniques as the state of the art for object detection and classification. However, it also points out that problems with object detection still exist in systems with little memory and low computing power. A new method is presented for the specific task of pedestrian and vehicle detection. Furthermore, the document CN 106 570 453 A also describes a method for pedestrian detection that can be used for various applications in the field of video surveillance of robots and automotive security.Furthermore, document WO 2019 / 196131 A1 describes a method and apparatus for filtering regions of interest in images from thermal cameras for use in vehicles. These regions of interest also refer to pedestrians. Finally, document US Pat. No. 8,755,595 B1 describes an automatic extraction of characteristic ground-truth data from images. In this context, bounding boxes and candidate word templates are also used to describe an object. SUMMARY The above-mentioned problem is solved by the subject matter of the independent claims. Further embodiments are specified by the respective dependent claims. From a first aspect, the present invention provides a method for generating training data for object recognition, the method comprising: dividing an image into a plurality of sliced images, the image comprising meta-information for an object in the image, the meta-information comprising bounding box information associated with a bounding box surrounding the object, and marker information for markers associated with the object, the markers being arranged within the bounding box; designating at least one sliced object image from the plurality of sliced images, at least a portion of the bounding box overlapping with each of the respective sliced object images;Designating at least one training data image from the designated sliced object images based on the bounding box information and the marker information; and generating the training data from the at least one designated training data image. From a further aspect, the present invention provides a computer system comprising: one or more computer-readable storage media having program instructions collectively stored on the one or more computer-readable storage media; and one or more processors configured to execute the program instructions to perform a method for generating training data for object recognition, the method comprising: dividing an image into a plurality of sliced images, the image comprising meta-information for an object in the image, the meta-information comprising bounding box information associated with a bounding box surrounding the object and marker information for markers associated with the object, the markers being located within the bounding box;Identifying at least one sliced object image from the plurality of sliced images, wherein at least a portion of the bounding box overlaps with each of the respective sliced object images; Identifying at least one training data image from the identified sliced object images based on the bounding box information and the marker information; and generating the training data from the at least one identified training data image. From a further aspect, the present invention provides a computer program product for generating training data for object recognition, the computer program product comprising: one or more computer-readable storage media and program instructions stored collectively on the one or more computer-readable storage media, the program instructions comprising: program instructions for dividing an image into a plurality of sliced images, the image comprising meta-information for an object in the image, the meta-information comprising bounding box information associated with a bounding box surrounding the object and marker information for markers associated with the object, the markers being located within the bounding box;Program instructions for designating at least one sliced object image from the plurality of sliced images, wherein at least a portion of the bounding box overlaps with each of the respective sliced object images; program instructions for designating at least one training data image from the designated sliced object images based on the bounding box information and the marker information; and program instructions for generating the training data from the at least one designated training data image. From a further aspect, the present invention provides a computer program product for generating training data for object recognition in images, the computer program product comprising a computer-readable storage medium readable by a processing circuit and storing instructions for executing a method for performing the steps of the invention by the processing circuit. From a further aspect, the present invention provides a computer program stored on a computer-readable medium and loadable into the internal memory of a digital computer, comprising software code portions that, when executed on a computer, can perform the steps of the invention. Embodiments of the present disclosure relate to a method for generating training data for object recognition. In certain embodiments, the method includes dividing an image into a plurality of sliced images. The image includes meta-information for an object in the image, wherein the meta-information comprises bounding box information associated with a bounding box surrounding the object and marker information for markers associated with the object, wherein the markers are located within the bounding box. The method includes designating at least one sliced object image from the plurality of sliced images, wherein at least a portion of the bounding box overlaps with each of the respective sliced object images. The method further includes designating at least one training data image from the designated sliced object images based on the marker information.The method also includes generating the training data from the designated training data images. Other embodiments of the present disclosure are directed to a computer system and a computer program product for performing the method The foregoing summary is not intended to describe every illustrated embodiment or every implementation of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS The drawings included in this application are incorporated in and constitute a part of the specification. They illustrate embodiments of the present disclosure and, together with the description thereof, explain the principles of the disclosure. The drawings are only illustrative of particular embodiments and do not limit the disclosure. Fig. 1 is a block diagram of a processing system according to embodiments. Fig. 2 is a block diagram of an illustrative cloud computing environment having one or more compute nodes, with local computing units used by cloud customers to exchange data, according to embodiments. Fig. 3 is a block diagram of a set of functional abstraction layers provided by a cloud computing environment, according to embodiments. Fig.4 is a block diagram of a method for generating training data for objects in an image using markers, according to embodiments. FIG. 5 is a block diagram of a method for generating training data for objects in an image using image histogram comparisons, according to embodiments. FIG. 6 illustrates a method for marking an object in an image using a labeling tool and user input, according to embodiments. FIG. 7 illustrates a method for splitting an image into a plurality of sliced images using an image slicer algorithm, according to embodiments. FIG. 8 illustrates a method for generating training data for small object detection using image histogram comparisons, according to embodiments. DETAILED DESCRIPTION The embodiments described herein provide methods, computer systems, and computer program products for generating training data for object recognition in digital images that reduce the amount of image annotation information that must be processed when performing training. The flowcharts and cross-sectional diagrams in the figures illustrate these methods according to various embodiments. In some alternative implementations, the steps in the flowcharts may occur in a different order than that described in the figures. A digital image is a digital representation or facsimile of a physical object or collection of physical objects. Technologies exist that can detect or recognize specific objects present in a given digital image. For example, software installed on a digital camera can detect that objects, such as a human face or human eyes, are present in an image captured by a camera sensor. Photo editing software applications can also detect that objects, such as straight lines, are present in the edited digital image. Neural networks and other deep learning modules can be used to assist with this object detection. An artificial neural network (ANN) (also called a neural network) is a data processing system constructed from a number of simple, highly connected processing elements (nodes) that process information through their dynamic state response to external inputs. ANNs are processing units (algorithms and / or hardware) loosely modeled after the neural structure of the mammalian cerebral cortex, but on a much smaller scale. A large ANN might have hundreds or thousands of processing units, whereas a mammalian brain has billions of neurons, with a corresponding increase in the magnitude of their total interaction and the behavior they exhibit. A feedforward neural network is an artificial neural network in which connections between units do not form a circle. A deep learning neural network (DNN) is an artificial neural network (ANN) with multiple hidden layers of units between the input and output layers. Similar to shallow ANNs, DNNs can model complex nonlinear relationships. DNN architectures, e.g., for object detection and parsing, generate composite models in which the object is expressed as a layered composition of source images. The additional layers allow for the composition of features from lower layers, resulting in the potential to model complex data with fewer units than a similarly operating shallow network. DNNs are typically designed as feedforward networks. In machine learning, a convolutional neural network (CNN or ConvNet) is a type of feedforward ANN in which the connectivity patterns between its nodes (neurons) are inspired by the organization of animal visual cortex, whose neurons are arranged to respond to overlapping regions that divide a visual field into tiles. Convolutional networks mimic biological processes and are configured as variations of multilayer perceptrons designed to use minimal amounts of preprocessing when processing data, such as digital images. Thus, a CNN is a class of DNN commonly applied to analyzing visual imagery.In the field of computer vision, convolutional neural networks excel in image classification, which consists of categorizing images given a set of classes and having the network determine the strongest class present in the image. In recent years, region convolutional neural networks (R-CNNs) have been developed to address the tasks of object detection, localization, and classification. In general, an R-CNN is a special type of CNN capable of localizing and recognizing objects in images. The output of the R-CNN is generally a set of bounding boxes tightly matched to each of the detected objects, as well as a class output for each detected object. In recent years, new architectures have been created to address specific processing bottlenecks associated with R-CNN and its successors, enabling improvements in real-time object detection. Two examples of these new architectures are "You Only Look Once" (YOLO) and "Single Shot Detector" (SSD MultiBox). Object detection architectures such as YOLO and SSD have limitations in detecting certain smaller objects. With these architectures, it is difficult to detect very small objects in a high-resolution digital image. One solution to this problem is to slice the high-resolution image into many small images. This makes the target size large enough for the object detection models. When the target image is very small compared to the size of the input image, it is necessary to slice the image into hundreds (or more) smaller sliced images during preprocessing and inference (e.g., the process of using a trained machine learning algorithm to make a prediction). Consequently, it is also necessary to slice the training data into hundreds of smaller images. There is also a need to annotate each of the small images. Generally, annotation refers to assigning metadata (e.g., the name of the image creator, keywords related to the image, image captions, titles and comments, image size, image location, etc.) to an image. Annotating very large amounts of sliced data results in a very large workload. One method to reduce this workload is to automatically generate new annotations for the small images from the original annotations. However, this method results in annotations in areas that do not contain target objects, which may reduce the accuracy of the deep learning model. Referring now to the drawings, wherein like reference numerals represent the same or similar elements, and initially to Fig. 1, an exemplary processing system 100 to which the present embodiments may be applied is shown, according to one embodiment. The processing system 100 includes at least one processor (CPU) 104 operatively connected to other components via a system bus 102. In certain embodiments, the CPU preprocesses an image with a labeling tool, where the labeling tool enables a user to create a bounding box for an object in the image and create markers for the object within the bounding box. In certain embodiments, the CPU preprocesses the image with a slice tool, which divides the image into a plurality of smaller images based on a size of a detection target object.A cache 106, a read-only memory (ROM) 108, a random-access memory (RAM) 110, an input / output (I / O) adapter 120, a sound adapter 130, a network adapter 140, a user interface adapter 150, and a display adapter 160 are operatively connected to the system bus 102. A first storage unit 122 and a second storage unit 124 are operatively connected to the system bus 102 through the I / O adapter 120. The storage units 122 and 124 may be one of a disk storage unit (e.g., a magnetic or optical disk storage unit), a solid-state magnetic unit, and so on. The storage units 122 and 124 may be the same type of storage unit or different types of storage units. A speaker 132 is operatively connected to the system bus 102 through the sound adapter 130. A transceiver 142 is operatively connected to the system bus 102 through the network adapter 140. A display unit 162 is operatively connected to the system bus 102 through the display adapter 160. A first user input unit 152, a second user input unit 154, and a third user input unit 156 are operatively connected to the system bus 102 through the user interface adapter. The user input units 152, 154, and 156 may be any of a keyboard, a mouse, a keypad, an image capture unit, a motion capture unit, a microphone, a unit embodying the functionality of at least two of the foregoing units, or any other suitable types of input units. The user input units 152, 154, and 156 may be the same type of user input unit or different types of user input units. The user input units 152, 154, and 156 are used to input and output information to and from the system 100.In certain embodiments, a graphics processing unit (GPU) 170 is operatively connected to the system bus 102. In these embodiments, the GPU performs training and reasoning on the image using a deep learning object detection model. Processing system 100 may also include other elements (not shown) that one of ordinary skill in the art would readily contemplate, as well as omit certain elements. For example, a variety of other input devices and / or output devices may be included in processing system 100, depending on the particular implementation thereof, as one of ordinary skill in the art would readily understand. For example, various types of wireless and / or wired input and / or output devices may be used. Furthermore, additional processors, controllers, memory, and so forth may also be used in a variety of configurations, as one of ordinary skill in the art would readily appreciate. These and other variations of processing system 200 will be readily contemplated by those of ordinary skill in the art, given the teachings of the present disclosure provided herein. It should be understood at the outset that, although this disclosure contains a detailed description of cloud computing, implementation of the teachings herein is not limited to a cloud computing environment. Rather, embodiments of the present disclosure may be implemented in conjunction with any type of computing environment now known or later developed. Cloud computing is a service delivery model for enabling seamless, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management effort or interaction with a service provider. A cloud computing environment is service-oriented with a focus on state independence, low coupling, modularity, and semantic interoperability. At the heart of cloud computing lies an infrastructure containing a network of interconnected nodes. Referring to Fig. 2, an illustrative cloud computing environment 250 is depicted. As shown, the cloud computing environment 250 includes one or more cloud computing nodes 210 with which local computing devices used by cloud users, such as a personal digital assistant (PDA) or cellular phone 254A, a desktop computer 254B, a laptop computer 254C, and / or an automotive computer system 254N, can communicate. The nodes 600 can communicate with each other. They can be physically or virtually grouped into one or more networks, such as private, community, public, or hybrid clouds (not shown), as described above, or a combination thereof.This enables the cloud computing environment 250 to offer infrastructure, platforms, and / or software as services for which a cloud user does not need to maintain resources on a local computing device. It should be noted that the types of computing devices 254A through N shown in Fig. 2 are merely illustrative, and that the computing nodes 210 and the cloud computing environment 250 may communicate with any type of computer-based device via any type of network and / or via any type of network-accessible connection (e.g., using a web browser). Referring to Fig. 3, a set of functional abstraction layers provided by the cloud computing environment 250 (Fig. 2) is shown. It should be understood from the outset that the components, layers, and functions shown in Fig. 3 are intended to be illustrative only, and embodiments of the invention are not limited thereto. As shown, the following layers and corresponding functions are provided: A hardware and software layer 360 includes hardware and software components. Examples of hardware components include: mainframe computers 361; Reduced Instruction Set Computer (RISC) architecture-based servers 362; servers 363; blade servers 364; storage devices 365; and networks and network components 366. In some embodiments, software components include network application server software 367 and database software 368. A virtualization layer 370 provides an abstraction layer from which the following examples of virtual entities can be provided: virtual servers 371, virtual storage 372, virtual networks 373, including virtual private networks, virtual applications and operating systems 374; and virtual clients 375. In one example, a management layer 380 may provide the functions described below. Resource provisioning 381 provides for the dynamic procurement of computing resources and other resources used to perform tasks within the cloud computing environment. Metering and pricing 382 provides cost tracking when using resources within the cloud computing environment, as well as billing or invoicing for the consumption of these resources. In one example, these resources may include application software licenses. Security provides identity verification for cloud users and tasks, as well as protection for data and other resources. A user portal 383 provides users and system administrators with access to the cloud computing environment.Service level management 384 provides allocation and management of cloud computing resources so that required service objectives are met. Service level agreement (SLA) planning and fulfillment 385 provides pre-ordering and procurement of cloud computing resources for which future requirements are anticipated, in accordance with an SLA. A workload layer 390 provides examples of the functionality for which the cloud computing environment can be used. Examples of workloads and functions that can be provided by this layer include: mapping and navigation 391; software development and lifecycle management 392; virtual classroom education delivery 393; data analytics processing 394; transaction processing 395; and object recognition training processing 396. Referring now to Figure 4, this figure illustrates a method for generating training data for objects in an image using bounding boxes and markers according to embodiments. In these embodiments, the image is sliced into a plurality of smaller images, and only a subset of the sliced images (and associated annotation information) is used for training data. In certain embodiments, an annotation file is created for the original image in step 400. In certain embodiments, a user has provided input through an annotation tool. The annotation tool allows the user to create bounding boxes for any objects in the image and to create markers within the bounding boxes. In certain embodiments, the bounding box is a region of the image that includes the topmost, rightmost, leftmost, and bottommost extreme points of the object. Thus, the bounding box may have coordinates that identify the topmost and leftmost pixel positions, as well as the bottommost and rightmost pixel positions. Consequently, the bounding box also has a size in the horizontal direction and a size in the vertical direction.In certain embodiments, a marker is a visual feature of an identified object identified by a user with an annotation tool (e.g., a marker can be any feature sufficiently distinct from a background portion of an image). An identified object can have a plurality of markers, and these markers can be located at different locations on the identified object. In certain embodiments, the markers are represented by an XY pixel coordinate within the image. In certain embodiments, the markers are labeled with a numerical value that represents the relative importance of the marker relative to other markers. Thus, in step 400, the annotation file contains information regarding the bounding box of the object and the object's markers.In one example, the annotation information is stored as metadata in an Extensible Markup Language (XML) file or another file format known in the art. At this stage of the process, the entire original image was processed to determine the locations of any objects contained within it, and an XML file was generated containing the metadata regarding these markers and the bounding boxes specified by the user. In step 402, in certain embodiments, the CPU (see Fig. 1, Fig. 104) executes a slice script that divides the original image into a plurality of smaller sliced images (e.g., partial image sections of the entire image). In certain examples, there may be hundreds or thousands of sliced images, depending on the overall size / resolution of the image and the size of the target objects labeled therein. A given sliced image may or may not contain a bounding box (or a portion of a bounding box). In certain embodiments, if the sliced image does not contain a bounding box, it will also not contain any markers (e.g., all markers are contained within the boundaries of the bounding boxes). In contrast, if the sliced image does contain a bounding box (or a portion thereof), it may or may not contain a marker.For example, a user can specify a marker for an object within a bounding box. However, if the slice script divides the image into sufficiently small image pieces (e.g., where the object and the respective bounding box are larger than one), the bounding box can be split into multiple sliced images. In this case, the single marker would invariably appear only in one of the multiple sliced images and not in the others. At step 404, in certain embodiments, the method includes analyzing each of the sliced images and then determining whether there are any bounding boxes (or portions thereof) contained therein. If there is at least one portion of a bounding box in a sliced image, the process continues to step 406. If there are no bounding boxes in a sliced image, the process continues to step 408 to determine whether there are one or more sliced images to analyze. If it is determined in step 406 that the sliced image contains a bounding box, the method includes analyzing the sliced image to determine if any markers are present in the bounding box. In certain embodiments, if there is at least one marker in a particular sliced image, the method includes updating the annotation file to include annotation information for the sliced image (e.g., the bounding box information and the marker information) in step 410. After the annotation file is updated in step 410, the process continues to step 412 to determine if there are one or more bounding boxes in the sliced image. For example, a sliced image may contain multiple objects that were previously marked with a bounding box. If it is determined in step 406 that there are no markers in the bounding box of the sliced image, the annotation file is not updated. In other embodiments, there must be more than one marker in a given sliced image in order for the sliced image to be selected for training data (e.g., updating the annotation file). In other embodiments, each marker has an associated importance value. The importance value indicates the relative value (or relative importance) of the marker relative to other markers or to a predetermined importance threshold. In one embodiment where the markers have designated importance values, the annotation file is updated when there is at least one marker within the sliced image that meets a certain threshold level of importance. In another embodiment where there are multiple markers within a given sliced image, the annotation file is updated when the sum of the importance values of all markers within the sliced image meets a certain threshold. In another embodiment, the annotation file is updated when at least one marker occurs in the sliced image and when a center position of the bounding box of the object occurs within the sliced image. Thus, according to certain embodiments of the present invention, only those sliced images with specific markers or markers that meet specific marker criteria are used. Thus, not all sliced images are used for training data. Accordingly, the total number of annotations that must be generated for the sliced images is reduced, and the overall processing workload for training purposes is reduced. Furthermore, by annotating only those sliced images in which an object is present (e.g., excluding meaningless regions), there is an improvement in the accuracy of the deep learning model generated based on the training data. Referring again to Fig. 4, if it is determined in step 412 that there are more bounding boxes in the sliced image, the process returns to step 406 for further analysis of all markers contained within the next bounding box. If it is determined in step 412 that there are no bounding boxes in a sliced image, the process proceeds to step 408 to determine if there are more sliced images to analyze. Therefore, the marker analysis is repeated for each bounding box that appears in the sliced image. If it was determined in step 408 that there are additional sliced images to analyze, the process returns to step 404. If it was determined in step 408 that there are no additional sliced images to analyze, the process ends in step 414. After the process ends in step 414, the entire original image has been analyzed, and the annotation file has been generated for each sliced image (e.g., where the markers meet the applicable marker criteria). At this stage, training can take place with a deep learning object detection model (e.g., using the graphics processing unit (GPU) 170 shown in Figure 1) using the training data (e.g., sliced images) and the generated annotation files. Referring now to Fig. 5, this figure shows a method for generating training data for objects in an image using image histograms according to certain embodiments. In these embodiments, the image is sliced into a plurality of smaller images, and only a subset of the sliced images (and associated annotation information) are used for training data. In certain embodiments, steps 400, 402, 404, 408, 410, 412, and 414 are the same as those described above for Fig. 4. However, instead of using markers to determine whether a sliced image is to be used for training data as in the process of Fig. 4, image histograms are used to determine whether the sliced image qualifies for training data. In step 506 of Fig. 5, the method includes comparing an image histogram of the original annotation region (e.g.,at least a portion of the area of the image encompassed by the bounding box of the object) with an image histogram of the sliced annotation area (e.g., at least a portion of the area of the sliced image). In general, an image histogram is a type of histogram that acts as a graphical representation of the tonal distribution in a digital image. In the image histogram, the number of pixels for each tonal value is plotted. By viewing the histogram for a specific image, a viewer is able to assess the entire tonal distribution at a glance. In other embodiments, a histogram is generated based on a cumulative color value for all pixels in a row (or column) of pixels. Histograms may be based on grayscale pixel information from the image or based on color pixel information (e.g., RGB). It is understood that any other suitable method for generating an image histogram may be used, provided that a comparison can be made between the bounding box image and the respective sliced image.More generally, it is understood that any other suitable method of image comparison may be used (e.g., other than an image histogram method), provided that a comparison can be made between the bounding box image and the respective sliced image. If, in step 506, a similarity between both image histograms meets or exceeds a set threshold, the method includes updating the annotation file to include annotation information for the sliced image (e.g., the bounding box information and / or the marker information). After the annotation file is updated in step 410, the process proceeds to step 412 to determine whether there are one or more bounding boxes in the sliced image. If, in step 506, a similarity between both image histograms does not meet a set threshold, the annotation region is not selected for the training data. As indicated above, the remaining steps in the method are the same as those described with respect to Fig. 4. Referring now to Fig. 6, this figure shows an example of a user using a labeling tool to create a bounding box and markers for an object in the original image (e.g., pre-cropped). This figure is a graphical representation of step 400 shown and described above with respect to Figs. 4 and 5. In the upper portion of Fig. 6, an original image 602 contains an object 604 (e.g., a nanometer- or micrometer-scale defect on a component of an electronic device) for marking. In a general sense, the object can be any visual feature that has a certain threshold difference from a background of the image and any feature that a user identifies as abnormal. In the lower portion of Fig. 6, a bounding box 610 of the object 604 is determined.In certain embodiments, the bounding box has coordinates that identify the top and leftmost pixel position, as well as the bottom and rightmost pixel position. Consequently, the bounding box 610 also has a size in the horizontal direction and a size in the vertical direction, and this size is based on the size of the object 604 in the image 602. As also shown in the lower portion of Figure 6, a plurality of markers 608 are generated associated with the object 604. It is understood that a user may generate any suitable number of markers for a given object, depending on the size and / or relevance of the object to the user. Instead of a user manually identifying and marking objects with a marking tool (e.g., generating the bounding box and markers), an automated optical inspection (AOI) system identifies the objects using a camera to autonomously scan the unit to obtain images, and then uses an image processing algorithm (or other suitable methods) to identify the objects or defects in the images. Referring now to Fig. 7, this figure shows an example of applying an image slicing algorithm to an original image to generate a plurality of sliced images. This figure is a graphical representation of step 406, shown and described above with respect to Fig. 4, and step 506, shown and described above with respect to Fig. 5. In the upper portion of Fig. 7, the bounding box 610 and markers 608 associated with object 604 have been identified by the user with labeling tool 600. The image slicing algorithm 702 slices the original image 602 into a plurality of sliced images 704, shown in the lower portion of Fig. 7. In this example, there are 24 sliced images 704. It should be understood that there may be any suitable number of sliced images (e.g., hundreds or more).In certain embodiments, the number of sliced images is based on the size of the original image 602 and / or the sizes of the different objects detected in the image. As shown in the lower portion of Figure 7, the bounding box 610 of object 604 occurs in four of the sliced images (e.g., sliced images 706, 708, 710, and 712). It should be understood that the bounding box 610 may appear in any number of sliced images, depending on the size of object 604. There are three markers 714, 716, and 718 associated with object 604. In this example, two of markers 714 and 716 occur in sliced image 712, and one of markers 718 occurs in sliced image 710. In this example embodiment, if more than one marker occurs in a given sliced image, the annotation information associated with the sliced image is selected for training data. In certain embodiments, only the sliced images that coincide with the location of the bounding box (e.g., sliced images 706, 708, 710, and 712) are considered for possible training data.In this example, object 604 appears in sliced image 706. However, since sliced image 706 contains no markers, it is not selected for training data. Furthermore, in this example, bounding box 610 appears in sliced image 708. However, in sliced image 708, not only does the object not appear in this sliced image, but there are also no markers in this sliced image 708. Therefore, sliced image 708 is not selected for training data. In this example, sliced image 712 contains two of markers 714 and 716, and thus it is selected for training data. Similarly, sliced image 710 contains one of markers 718, and it is also selected for training data. Accordingly, only two (e.g., the sliced images 710 and 712) of the four sliced images (e.g., the sliced images 706, 708, 710, and 712) are selected for training data.Accordingly, the number of annotations that need to be generated for the sliced image data is reduced, and the overall processing workload for training is reduced. Referring now to Fig. 8, this figure shows an embodiment in which image histogram comparisons are performed on the sliced images to determine whether they should be selected for training data. As shown in Fig. 8, the bounding box 610 of object 604 occurs in four of the sliced images (e.g., sliced images 706, 708, 710, and 712). It should be understood that the bounding box 610 may occur in any number of sliced images, depending on the size of object 604 and the size / resolution of the sliced images. In this example embodiment, an image histogram of the sliced image is generated for each of the sliced images 706, 708, 710, and 712. As shown in Fig.8, a sliced image histogram 814 corresponds to sliced image 706, a sliced image histogram 816 corresponds to sliced image 708, a sliced image histogram 818 corresponds to sliced image 712, and a sliced image histogram 820 corresponds to sliced image 710. In this embodiment, a bounding box histogram 824 is also generated. If the histogram of a sliced image has a similarity to the bounding box histogram beyond a certain threshold, the sliced image is selected for training data. In this example, sliced image histograms 814, 818, 820 of sliced images 706, 712, and 710 have sufficient similarity to the bounding box histogram 824 and are therefore selected for training data. However, since sliced image histogram 816 does not have sufficient similarity to the bounding box histogram 824 (e.g., the shape of the histogram is relatively flat), it is not selected for training data. Accordingly, only three images (e.g., the sliced images 706, 710, and 712) of the four sliced images (e.g., the sliced images 706, 708, 710, and 712) are selected for training data.Accordingly, the number of annotations that need to be generated for the sliced image data is reduced, and the overall processing workload for training is reduced. In certain embodiments, both histogram comparison and marker analysis are used in combination to determine whether to use a sliced image for training data. The order in which these analyses are performed can be changed. The present invention may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions embodied thereon for causing a processor to perform aspects of the present invention. The computer-readable storage medium may be any physical device capable of retaining and storing instructions for use by an instruction-executing system. The computer-readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a removable computer diskette, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM).Flash memory), static random access memory (SRAM), removable compact disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device such as punched cards or raised structures in a groove on which instructions are stored, and any suitable combination thereof. A computer-readable storage medium, as used herein, shall not be construed as containing transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., pulses of light traveling through fiber optic cables), or electrical signals transmitted through a wire. Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to respective computing / processing devices or to an external computer or storage device via a network such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, fiber optic transmission lines, wireless transmission, routers, firewalls, switching devices, gateway computers, and / or edge servers.A network adapter card or network interface in each computing / processing unit receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the corresponding computing / processing unit. Computer-readable program instructions for performing operations of the present invention may be assembly language instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, or the like, as well as conventional procedural programming languages such as the C programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server.In the latter case, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, over the Internet using an Internet service provider). In some embodiments, electronic circuits, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits to perform aspects of the present invention. Aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowcharts and / or block diagrams, as well as combinations of blocks in the flowcharts and / or block diagrams, may be implemented by computer-readable program instructions. These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine such that the instructions, executed by the processor of the computer or other programmable data processing device, produce a means for implementing the functions / steps defined in the flowchart block(s) and / or block diagrams.These computer-readable program instructions may also be stored on a computer-readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium having instructions stored thereon comprises an article of manufacture, including instructions that implement aspects of the function / step specified in the flowchart block(s) and / or block diagrams. The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of process steps to be performed on the computer, other programmable apparatus, or other device to produce a computer-executable process such that the instructions executing on the computer, other programmable apparatus, or other device implement the functions / steps defined in the block(s) of flowcharts and / or block diagrams. The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this context, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions that include one or more executable instructions for performing the particular logical function(s). In some alternative implementations, the functions specified in the block may occur in a different order than shown in the figures.For example, two blocks shown in sequence may actually be accomplished as one step, executed simultaneously, substantially simultaneously, in a partially or completely temporally overlapping manner, or the blocks may sometimes be executed in reverse order depending on the respective functionality. It should also be noted that each block of the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, may be implemented by dedicated hardware-based systems that perform the specified functions or steps. The descriptions of the various embodiments have been presented for illustrative purposes and are not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein has been chosen to best explain the principles of the embodiments, practical application, or technical improvement over technologies found in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
A computer-implemented method for generating training data for object recognition, the method comprising: splitting (402) an image (602) into a plurality of sliced images (704), the image comprising meta-information for an object (604) in the image (602), the meta-information comprising bounding box information associated with a bounding box surrounding the object (604) and marker information for markers associated with the object (604), the markers being arranged within the bounding box; identifying at least one sliced object image from (602) the plurality of sliced images (704), at least a portion of the bounding box overlapping each of the respective sliced object images; identifying at least one training data image from the identified sliced object images (704) based on the bounding box information and the marker information;Generating the training data from the at least one labeled training data image; and wherein the method further comprises:generating an image histogram (814) for a region of the image corresponding to the bounding box; and generating an image histogram (814, 816, 818, 820) for each of the sliced object images (704; 706, 708, 710, 712); wherein the marker information for each marker includes a numerical value, wherein labeling the at least one training data image requires that a cumulative numerical value for all markers in the respective sliced object image (704; 706, 708, 710, 712) meets a threshold, and wherein labeling the at least one training data image requires that the image histogram (814, 816, 818, 820) for the bounding box has a threshold level of correspondence with the image histogram (814, 816, 818, 820) for the respective sliced object image (704; 706, 708, 710, 712). 708, 710, 712) is fulfilled.; The method of claim 1, further comprising:excluding from the training data of the plurality of sliced object images (704) all sliced object images (602) that do not have a marker. Method according to one of the preceding claims, wherein for each marker the marker information comprises a numerical value and wherein labeling the at least one training data image requires that a cumulative numerical value for all markers in the respective sliced object image (704) meets a threshold value. The method of any preceding claim, further comprising:generating a bounding box image histogram (824) for a region of the image corresponding to the bounding box; andgenerating a histogram (814) of a sliced object image (704) for each of the sliced object images (706, 708, 710, 712), wherein labeling the at least one training data image requires that the bounding box image histogram satisfy a threshold level of correspondence to the sliced object image histogram for the respective sliced object image. The method of any preceding claim, wherein generating the training data includes generating annotation information for each of the training data images. Method according to one of the preceding claims, wherein the bounding box corresponds to a maximum width and a maximum height of the object. A computer system (100), comprising:one or more computer-readable storage media having program instructions collectively stored on the one or more computer-readable storage media; andone or more processors (104) configured to execute the program instructions to perform a method according to any one of claims 1 to 6 for generating training data for object recognition. A computer program product for generating training data for object recognition, the computer program product comprising: one or more computer-readable storage media and program instructions stored collectively on the one or more computer-readable storage media, the program instructions being executable by one or more computer systems (100) or controllers to cause the one or more computer systems (100) to carry out the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Pedestrian detection method, device and system
CN106570453A
Automatic extraction of character ground truth data from images
US8755595B1
Method and apparatus for filtering regions of interest for vehicle-mounted thermal imaging pedestrian detection
WO2019196131A1
CN000106570453A
