Image processing device, image recognition device, image processing program, and image recognition program
By dividing images into blocks and using a unified Gaussian mixture model to integrate frequency distributions, the method reduces computational demands while maintaining high recognition accuracy, suitable for devices with limited resources.
Patent Information
- Application Number
- JP2021054053
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-26
- Publication Date
- 2024-09-12
- Estimated Expiration
- 2041-03-26
AI Technical Summary
Existing image recognition methods using GMM-MRCoHOG features require significant computational resources, particularly on devices with limited resources like FPGAs, due to the need for extensive computing power.
The method involves dividing images into blocks, calculating frequency distributions of brightness gradient co-occurrence, unifying these distributions across blocks using a Gaussian mixture model (GMM), and generating a unified basis function to reduce computational requirements.
This approach significantly reduces computational resources by using a unified basis function across blocks, maintaining high recognition accuracy and enabling implementation on devices with limited resources.
Smart Images

Figure 0007549841000004 
Figure 0007549841000009 
Figure 0007549841000010
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device, an image recognition device, an image processing program, and an image recognition program, and relates to, for example, those that perform image recognition of a learned object. [Background technology]
[0002] As demand for self-driving technology grows, research is being actively conducted into detecting pedestrians and vehicles using image recognition. One such technique uses GMM-MRCoHOG features as shown in Patent Document 1. This technique maps the frequency distribution of co-occurrence of brightness gradient directions between different resolutions of the same image into a feature space as a continuous value, and boasts extremely robust discrimination capabilities compared to image recognition techniques using prior art HOG (Histograms of Oriented Gradients) features, CoHOG (Co-occurrence Histograms of Oriented Gradients) features, MRCoHOG (Multiple Resolution Co-occurrence. Histograms of Oriented Gradients) features, etc.
[0003] More specifically, HOG features, CoHOG features, and MRCoHOG features all represent the frequency distribution of the intensity gradient direction of each pixel as a histogram by voting the intensity gradient direction of each pixel into a bin corresponding to a quantized direction (generally eight directions). In the case of HOG features, the intensity gradient direction of each pixel is voted, in the case of CoHOG features, the co-occurrence of intensity gradient directions of two pixels is voted, and in the case of MRCoHOG features, the co-occurrence of intensity gradient directions at pixels across different resolutions is voted. In contrast to these, the GMM-MRCoHOG feature uses a Gaussian Mixture Model (GMM) to place the brightness gradient direction in a state space as continuous values, and expresses the frequency distribution of co-occurrences as a multi-peak probability density function. While the first three form a state space with fixed bins, the GMM-MRCoHOG feature can form the state space autonomously.
[0004] However, in image recognition using GMM-MRCoHOG features, the image to be recognized is divided into multiple blocks and a different basis function optimized for each block is used, which has the problem of requiring a lot of computational resources, such as memory capacity and CPU computing power. Saving computational resources is extremely important, especially when implementing on a field programmable gate array (FPGA) where computational resources are limited. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2018-124963 A Summary of the Invention [Problem to be solved by the invention]
[0006] The present invention aims to save computational resources in image recognition using intensity gradient orientation. [Means for solving the problem]
[0007] (1) The invention described in claim 1 provides an image processing apparatus comprising: an image acquisition means for acquiring an image for image recognition training; a division means for dividing the acquired image into a plurality of blocks; a frequency distribution acquisition means for acquiring a frequency distribution of co-occurrence of luminance gradient directions for each of the divided blocks; a unification means for integrating the frequency distributions acquired for each of the acquired blocks into a single frequency distribution; and a basis function generation means for generating basis functions serving as a standard for image recognition based on the unified frequency distribution. (2) In the invention as set forth in claim 2, there is provided the image processing device as set forth in claim 1, characterized in that the unifying means performs the unification by superimposing the frequency distributions in the plurality of blocks. (3) The invention described in claim 3 provides the image processing device described in claim 2, characterized in that the unification means generates samples based on the frequency distribution for each of the acquired blocks, and adds up the generated samples across the multiple blocks, thereby superimposing the frequency distributions in the multiple blocks. (4) The invention described in claim 4 provides an image processing device according to claim 1, claim 2, or claim 3, characterized in that the frequency distribution acquisition means acquires a frequency distribution of co-occurrence of brightness gradient directions between different resolutions of the same image. (5) The invention described in claim 5 provides an image processing device described in any one of claims 1 to 4, characterized in that the image acquisition means acquires a plurality of images, and the unification means unifies the frequency distribution for each block of the plurality of images into a single frequency distribution. (6) The invention described in claim 6 provides an image processing device according to any one of claims 1 to 5, characterized in that the image acquisition means acquires a recognition target image including a recognition target and a non-recognition target image not including a recognition target, and the frequency distribution acquisition means acquires a frequency distribution in a corresponding block based on a difference in frequency distribution of a luminance gradient direction in the corresponding block between the recognition target image and the non-recognition target image. (7) In the invention described in claim 7, there is provided an image processing device described in any one of claims 1 to 6, characterized in that the basis function is a probability density function based on a Gaussian mixture model, and the image processing device is provided with a determination means for determining an appropriate number of mixtures based on a balance between the likelihood and the number of mixtures. (8) In the invention described in claim 8, there is provided an image processing device described in any one of claims 1 to 7, characterized in that a weighting is set for the multiple blocks when integrating the frequency distributions, and the unifying means integrates the frequency distributions for each of the multiple blocks in accordance with the weighting. (9) The invention described in claim 9 provides an image recognition device comprising: a basis function acquisition means for acquiring a basis function described in any one of claims 1 to 8; an image acquisition means for acquiring an image related to image recognition; a division means for dividing the acquired image into blocks; a feature acquisition means for applying the acquired basis function to each of the divided blocks and acquiring a feature for the basis function; and a determination means for determining whether or not a predetermined image recognition target is included in the acquired image using the feature acquired from each of the blocks. (10) The invention described in claim 10 provides an image processing program for implementing on a computer an image acquisition function for acquiring an image for image recognition learning, a division function for dividing the acquired image into a plurality of blocks, a frequency distribution acquisition function for acquiring a frequency distribution of co-occurrence of luminance gradient directions for each of the divided blocks, a unification function for integrating the frequency distributions for each of the acquired blocks into a single frequency distribution, and a basis function generation function for generating basis functions that serve as a standard for image recognition based on the unified frequency distribution. (11) The invention described in claim 11 provides an image recognition program that realizes on a computer a basis function acquisition function for acquiring a basis function described in any one of claims 1 to 8, an image acquisition function for acquiring an image related to image recognition, a division function for dividing the acquired image into blocks, a feature acquisition function for applying the acquired basis function to each of the divided blocks and acquiring features for the basis function, and a judgment function for judging whether or not a predetermined image recognition target is included in the acquired image using the feature acquired from each of the blocks. Effect of the Invention
[0008] By using a uniform basis function for multiple blocks, computational resources can be saved. [Brief description of the drawings]
[0009] [Figure 1] FIG. 2 is a diagram illustrating an example of a hardware configuration of an image processing apparatus. [Diagram 2] FIG. 13 is a diagram for explaining a process of generating basis functions. [Diagram 3] FIG. 13 is a diagram for explaining a process of generating basis functions. [Figure 4] FIG. 13 is a diagram for explaining a process of generating basis functions. [Diagram 5] FIG. 13 is a diagram for explaining mapping onto a feature space. [Figure 6] FIG. 1 is a diagram for explaining the Akaike information criterion. [Figure 7] FIG. 2 is a diagram showing various mathematical expressions. [Figure 8] 13 is a flowchart for explaining a basis function generation process. [Figure 9] FIG. 1 is a diagram for explaining an image recognition method. [Figure 10] 13 is a graph showing the results of image recognition. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] (1) Overview of the embodiment By adopting a unified GMM-MRCoHOG feature for the state space of all blocks, we unify the basis functions across each block, which can significantly reduce the use of computational resources for hardware implementation. Specifically, the frequency distribution of the brightness gradient direction of each positive and negative image used for learning in each block is approximated by a probability density distribution using kernel density estimation. Next, we focus on characteristic parts of the positive and negative images and calculate the cumulative distribution function using a measure based on the JS information amount. We then use the inverse function method to generate a certain number of samples from the cumulative distribution functions of all blocks in a common feature space, and approximate them with a mixed Gaussian distribution using the EM algorithm. During the approximation, the appropriate number of mixtures is automatically determined using the Akaike information criterion.
[0011] (2) Details of the embodiment FIG. 1 is a diagram showing an example of a hardware configuration of an image processing device 8. As shown in FIG. The image processing device 8 is configured by connecting a CPU 81, a ROM 82, a RAM 83, a storage device 84, a storage medium drive device 85, an input unit 86, an output unit 87, and the like via a bus line. The CPU 81 is a central processing unit that operates according to an image processing program stored in the storage device 84, and performs processing for generating basis functions used for image recognition from learning images.
[0012] The ROM 82 is a read-only memory, and stores basic programs and parameters for operating the CPU 81. The RAM 83 is a readable and writable memory, and provides a working memory when the CPU 81 performs image processing.
[0013] The storage device 84 is configured using a large-capacity storage medium such as a hard disk, and stores image processing programs, learning images (learning image data), and the like. The image processing program is a program that causes the CPU 81 to perform image processing functions.
[0014] The storage medium drive device 85 is a device that drives an external storage medium such as a semiconductor storage device or a hard disk. The CPU 81 can read the learning image data from the storage medium. The input unit 86 includes input devices such as a keyboard and a mouse for receiving input from an operator, and reads various programs and data and receives operations from the operator. The output unit 87 includes output devices such as a display and a printer that present various information to the operator, and outputs the image processing operation screen and the image processing results.
[0015] In addition, the image processing device 8 includes a communication control unit for connecting to a communication network, an interface for connecting to an external device, and the like, and can also download learning image data from an external server.
[0016] The image processing device 8 executes an image processing program to generate basis functions used for image recognition using GMM-MRCoHOG features in accordance with the steps shown in each of Figures 2 to 4. This will be described below. Image recognition using GMM-MRCoHOG features is a technology developed by the inventors of the present application and boasts extremely high recognition accuracy.
[0017] In this embodiment, as shown in Figs. 2(a) and (d), a basis function is created using the Jensen-Shannon (JS) divergence between a positive image 10 in which the image recognition target (a pedestrian) is captured in various poses, and a negative image 20 in which various background scenes are captured excluding the pedestrian. The inventors of the present application have found that use of the JS divergence enables more robust image recognition.
[0018] In the figure, one positive image 10 and one negative image 20 are shown, but the image processing device 8 creates basis functions by learning from approximately 20,000 positive images 10 and negative images 20. In this way, the image processing device 8 is equipped with an image acquisition means for acquiring a plurality of images for image recognition learning, each of which is composed of a recognition target image (positive image 10) containing the recognition target and a non-recognition target image (negative image 20) not containing the recognition target.
[0019] First, the image processing device 8 divides the positive image 10 into a number of identical square blocks 11a, 11b, 11c, .... Here, as an example, the image is divided into a total of 18 blocks 11, three in the horizontal direction and six in the vertical direction, in accordance with the shape of a pedestrian. Thus, the image processing device 8 includes a division means for dividing the image into a plurality of blocks. Then, the image processing device 8 maps the frequency distribution of co-occurrence of the luminance gradient directions of each pixel in each block 11 into the feature space 13a, 13b, 13c, . . . for each block 11 shown in FIG. 2(b).
[0020] The luminance gradient direction is, for example, the direction from low luminance to high luminance at the position of the pixel in question, and will hereinafter be abbreviated to gradient direction. In addition, the space onto which the gradient direction is mapped and the space derived from it (such as the space obtained by subsequent sampling) are spaces into which image features are extracted, and therefore will be referred to as feature spaces. When there is no need to distinguish between the blocks 11a, 11b, 11c, . . . and the feature spaces 13a, 13b, 13c, . . . , they will be simply referred to as the block 11 and the feature space 13, respectively, and the same applies to other similar components.
[0021] FIG. 5 is a diagram for explaining mapping of the gradient direction onto the feature space 13. In FIG. As shown in FIG. 5(a), the image processing device 8 converts the resolution of the positive image 10 to generate a high-resolution image 15, a medium-resolution image 16, and a low-resolution image 17 having different image sizes from the positive image 10. When the resolution of the positive image 10 is appropriate, the positive image 10 is used as is as the high-resolution image 15. The image processing device 8 performs the following processing for each block of the images at each of the above resolutions.
[0022] First, the image processing device 8 calculates the gradient direction for each pixel of the high resolution image 15, the medium resolution image 16, and the low resolution image 17. The angle of the gradient direction is a continuous value from 0° to 360°. It is also possible to use a quantized value such as 36 directions.
[0023] After calculating the gradient direction, the image processing device 8 obtains, in block 11a, the co-occurrence of the gradient directions of a reference pixel (hereinafter, referred to as a pixel of interest) and a pixel located at a distance therefrom (hereinafter, referred to as an offset pixel) as follows.
[0024] First, as shown in FIG. 5(b), the image processing device 8 sets a pixel of interest 5 in the high-resolution image 15, and focuses on offset pixels 1a to 1d that are located at an offset distance 1 from the pixel of interest 5 in the high-resolution image 15 (i.e., adjacent in high resolution). The distance of n pixels is referred to as the offset distance n.
[0025] Then, the image processing device 8 acquires the co-occurrence (combination of gradient directions) of each gradient direction between the pixel of interest 5 and the offset pixels 1a to 1d, and plots the corresponding points as data points 51, 51, ... in the feature space 13a for the block 11a shown in Figure 5(c).
[0026] For example, in FIG. 5(b), when plotting the co-occurrence of the pixel of interest 5 and the offset pixel 1a, if the gradient direction of the pixel of interest 5 is 26° and the gradient direction of the offset pixel 1a is 135°, the image processing device 8 plots a data point 51 at a position in the feature space 13a where the horizontal axis is 26° and the vertical axis is 135°. Similarly, the image processing device 8 obtains co-occurrences between the pixel of interest 5 and offset pixels 1b to 1d and plots them in the feature space 13a. Note that co-occurrences with pixels above and to the left of the pixel of interest 5 are not obtained because these have already been obtained and plotted in the previous stage, since co-occurrences are obtained while moving the pixel of interest 5 sequentially to the right.
[0027] Next, the image processing device 8 similarly obtains co-occurrence of gradient directions with the pixel of interest 5 for offset pixels 2a to 2d of the medium-resolution image 16, which is located at offset distance 2, and plots them in the feature space 13a, and further similarly obtains co-occurrence of gradient directions with the pixel of interest 5 for offset pixels 3a to 3d of the low-resolution image 15, which is located at offset distance 3, and plots them in the feature space 13a.
[0028] In this way, the image processing device 8 plots the co-occurrence of gradient directions with offset pixels at offset distances 1 to 3 ranging from high resolution to low resolution, and then performs similar processing while sequentially moving the pixel of interest 5 within the block 11a (moving the pixel of interest 5 to the medium resolution image 16 and also to the low resolution image 17) to complete the feature space 13a for the block 11a.
[0029] Note that the movement of the pixel of interest 5 is performed within the block 11a, but the offset pixel is selected even if it exceeds the block 11a. Also, an appropriate method is used to process a pixel at the end of the block 11a that does not have an adjacent offset pixel. In the same manner, the image processing device 8 plots data points for blocks 11b, 11c, ... in feature spaces 13b, 13c, .... In this way, a feature space 13 for each block 11 can be obtained, in which the frequency distribution of co-occurrence of gradient directions is represented by the density of data points.
[0030] In this way, the image processing device 8 includes a frequency distribution acquisition means for acquiring the frequency distribution of co-occurrence of brightness gradient directions between different resolutions of the same image for each divided block, and maps the co-occurrence distribution of gradient directions between multiple images with different resolutions into the feature space 13 as continuous values. Returning to FIG. 2, the image processing device 8 also creates feature spaces 23a, 23b, 23c, . . . corresponding to the blocks 11a, 11b, 11c, .
[0031] Next, as shown in Fig. 2(c), the image processing device 8 generates a probability density function fp(x) for each block 11 from the positive data (data points on the feature space 13) plotted in the feature space 13. In the figure, the highs and lows of density are diagrammatically represented by contour lines. Similarly, the image processing device 8 generates a probability density function fn(x) from the negative data (data points on the feature space 23) plotted in the feature space 23, as shown in FIG. 2(f).
[0032] fp(x) and fn(x) are expressed by equations (1) and (2), respectively, with the Gaussian function shown in equation (3) in FIG. 7(a) as the kernel density function. n is the number of data. Xi(p) and Xi(n) are positive and negative data, respectively, and are two-dimensional vector quantities. x is a point in the feature space and is a two-dimensional vector quantity.
[0033] Although the figures show superscript characters, they will be written in normal characters to avoid misconversion of character codes. The same applies to other equations. Also, vector quantities are written in bold, but they will also be written in normal characters to prevent misconversion. h is the bandwidth, which is a parameter that determines the amount of spread of the distribution. Set an appropriate value for this.
[0034] fp(x) and fn(x) represent the probability of co-occurrence of gradient directions in the positive image 10 and the negative image 20, respectively. In this way, the image processing device 8 votes the co-occurrence of the gradient directions of positive data and negative data as continuous values in the feature space, and approximates the voted data points to a probability density function by kernel density function estimation.
[0035] Next, the image processing device 8 combines feature spaces (such as feature space 13a and feature space 23a) in which the positions of blocks on the positive image 10 and the negative image 20 correspond, as shown in FIG. 3(a), and generates JS information 33 for each pair from each fp(x) and fn(x), as shown in FIG. 3(b). In this way, the image processing device 8 generates a JS information amount 33a from the pair of feature space 13a and feature space 23a, generates a JS information amount 33b from the pair of feature space 13b and feature space 23b, and so on, generating the JS information amount 33 for each block 11.
[0036] The JS information amount is expressed as J(fp(x):fn(x)) in equation (5) in Figure 7(b). J(fp(x):fn(x)) is defined using equation (6) so that the KL (Kullback-Leibler) divergence shown in equation (4) has symmetry. JS divergence constructs a metric space that measures the distance between two probability distributions, and by using this, it is possible to calculate the similarity between fp(x) and fn(x) for x.
[0037] The absolute value of J(fp(x):fn(x)) increases as the shapes of fp(x) and fn(x) differ (are less similar). Therefore, the JS information can be used to express the characteristics of either fp(x) or fn(x). The areas where there is a difference between fp(x) and fn(x), where the occurrence probability is biased towards one side, are useful information (it is difficult to determine whether an area where there is no bias is a pedestrian or the background), and the image processing device 8 extracts information on the areas where the difference is large based on the JS information amount. In this way, the frequency distribution acquisition means included in the image processing device 8 acquires the frequency distribution in a block based on the difference in the frequency distribution of the brightness gradient direction in the corresponding block between the recognition target image and the non-recognition target image.
[0038] Next, as shown in FIG. 3(c), the image processing device 8 samples J(fp(x):fn(x)) for each block 11 using an inverse function method with the respective cumulative distribution functions to generate samples (points in the feature space) for each block 11. In this manner, feature spaces 35a, 35b, ... in which samples are generated for each block 11a, 11b, ... are generated from the JS information amounts 33a, 33b, .... In this way, the image processor 8 generates samples based on the frequency distribution for each block.
[0039] Since J(fp(x):fn(x)) is biased towards either positive or negative data, sampling using the inverse function method can be used to generate a large number of samples that are concentrated in areas where the occurrence probability is biased. When J(fp(x):fn(x)) is calculated using kernel density estimation, the number of parameters becomes very large because the number of Gaussian distributions in the underlying equation (3) depends on the number of data. However, this can be reduced by sampling.
[0040] In the above explanation, the feature space 13 is generated for each block from a single positive image 10, but the image processing device 8 creates the feature space 13 for each block by superimposing the feature spaces 13 obtained from a large number of learning positive images 10 for each block. For example, the feature space 13a1 created from the first positive image 10, the feature space 13a2 created from the second positive image 10, ... are added together to create the feature space 13a, and similarly the feature spaces 13b1, 13b2, ... are added together to create the feature space 13b. The same is true for the negative image 20.
[0041] As shown in Figure 4(a), the image processing device 8 generates a feature space 35 using sampling data for each block 11, and then, as shown in Figure 4(b), integrates these feature spaces 35a, 35b, ... by adding together all the samples, thereby generating a unified feature space 36 in which the frequency distribution in the gradient direction is represented by the density of the samples. In this way, the image processing device 8 is equipped with a unification means that integrates and unifies the frequency distributions for each block into a single frequency distribution by superimposing the frequency distributions for each block, and the unification means superimposes the frequency distributions in multiple blocks by adding up the generated samples across multiple blocks. Furthermore, since the image processing device 8 integrates the frequency distributions for a large number of learning images into one, the unifying means unifies the frequency distributions for each block of a plurality of images into one frequency distribution.
[0042] As a modified example, a weighting may be set for each block 11, and the samples in the feature space 35 corresponding to that block 11 may be added according to that weighting. For example, for blocks 11 with low weights, one addition is made per sample, for blocks 11 with high weights, three additions are made per sample, and so on. This allows the weighting of blocks 11 with low importance (such as blocks at the four corners where pedestrians are less likely to be captured) to be set low, and the weighting of blocks 11 with high importance to be set high. In this modified example, weighting is set for a plurality of blocks when integrating frequency distributions, and the unifying means included in the image processing device 8 integrates the frequency distributions for each of the plurality of blocks in accordance with the weighting.
[0043] After generating the unified feature space 36 in this manner, the image processing device 8 determines the number of mixtures using c-AIC (described later) as shown in FIG. 4(c), and further generates a state space by GMM using the EM algorithm (a method for searching for a formula for GMM by repeating the E step and the M step), and sets this as the basis function 37. Here, the state space means a space in which the boundaries and arrangement of features are determined by a histogram, GMM, or the like. In this way, the image processing device 8 includes a basis function generating means for generating basis functions that serve as a reference for image recognition based on a unified frequency distribution. Conventionally, a GMM was generated for each feature space 35a, 35b, ..., and a basis function was generated for each block 11. In contrast, the image processing device 8 of this embodiment is novel in that it generates a basis function 37 common to all blocks 11 from the feature space 36.
[0044] GMM is a model that approximates an arbitrary distribution by linearly superimposing Gaussian distributions, and is expressed by equation (11), where k is the mixture number (the number of Gaussian distributions to be superimposed), N is the probability density function of the kth Gaussian distribution with mean μk and variance-covariance Σk, and θ is the parameter of the mixed normal distribution with mixture number k. αj is a mixing coefficient representing the weight of the Gaussian distributions to be superimposed, and is a positive real number whose sum is 1 when added. The GMM is normalized so that its integration becomes 1, and the GMM can approximate the distribution of samples in the feature space 36 with a multi-modal probability density function p(x|θ).
[0045] In GMM, when the mixture number k is specified, the target distribution is clustered into k clusters and a Gaussian distribution is placed on top of them. In this way, the number of mixtures must be determined to construct an optimal state space using GMM. However, if the number of mixtures is increased too much, the generalization ability of the model decreases and the computational cost increases. Therefore, before generating the GMM, the image processing device 8 automatically determined the number of mixtures using a measure based on the Akaike Information Criterion (AIC).
[0046] FIG. 6 is a diagram for explaining the Akaike information criterion. There are two types of Akaike information criteria: AIC (Akaike's Information Criterion) and c-AIC (correction of AIC), which uses AIC. Here, AIC is a standard for evaluating the quality of a statistical model, and the more excellent the generalization ability of a model, the smaller its value. On the other hand, c-AIC is a version of AIC that can be applied to small samples. As shown in Figure 6(a), AIC is expressed as the sum of the monotonically decreasing degree of fit of the model and the monotonically increasing number of parameters. The model with the smallest AIC value has a good balance between penalty and model complexity and has excellent generalization ability.
[0047] In this embodiment, the AIC is defined by equation (7) in FIG. n is the number of samples, k is the number of mixtures, p is the occurrence probability of sample xi from the GMM, and θk (hat omitted) is a parameter of the GMM composed of the mixture number k. tk is expressed by equation (8), where d is the number of dimensions of the sample data.
[0048] However, AIC assumes a large sample size and tends to overestimate the number of parameters when the number of samples is small. Therefore, in this embodiment, the number of mixtures is determined according to c-AIC expressed by equation (9), which highly evaluates the simplicity of the model when the number of samples is small.
[0049] In equation (9), the first term is constructed by the negative log-likelihood, which is assumed to decrease monotonically as the model becomes more complex. Moreover, the second term is a penalty term depending on the number of parameters and increases monotonically. In this embodiment, the c-AIC values are calculated for several mixture numbers, curve approximation is performed, and the mixture number is determined from the approximated value obtained. By using the curve approximation, it is possible to determine the number of mixtures that results in the lowest c-AIC, without being affected by the variability of the training data.
[0050] After searching for an appropriate number of mixtures in this way, the result is shown in Figure 6(b). The horizontal axis of this graph represents the number of mixtures, and the vertical axis represents the negative log-likelihood. The smaller the negative log-likelihood (i.e., the larger the likelihood), the better the model. The search values plotted on the graph are the calculated values of c-AIC, and the estimated values are points on the approximation curve obtained from the search values. As shown in the graph, when the number of mixtures is about 15 or more, the negative log-likelihood becomes almost constant, and it seems possible to reduce the number of mixtures to about 15. In this way, the image processing device 8 generates the basis functions using a probability density function according to a Gaussian mixture model, and includes a determination means for determining an appropriate number of mixtures based on a balance between the likelihood and the number of mixtures.
[0051] FIG. 8 is a flowchart for explaining the basis function generation process performed by the image processing device 8. The CPU 81 reads one positive image 10 from the storage device 84, and inputs and stores it in the RAM 83 (step 10). Next, the CPU 81 divides the positive image 10 into blocks 11, plots the co-occurrence of gradient directions for each block in the feature space 13, and stores the plot in the RAM 83 (step 15). The CPU 81 performs the above program processing on the positive images 10 as many times as necessary to generate the basis functions. Next, the CPU 81 generates fp(x) for each block 11 by convolving the many feature spaces 13 stored in the RAM 83 for each block 11, and stores the fp(x) in the RAM 83 (step 25).
[0052] Next, the CPU 81 inputs the required number of negative images 20 stored in the storage device 84 into the RAM 83 (step 35) and plots them in the feature space 23 (step 40), and then generates fn(x) for each block 11 and stores them in the RAM 83 (step 50).
[0053] Next, the CPU 81 generates the JS information amount for each block 11 using fp(x) and fn(x) stored in the RAM 83, and stores the amount of JS information in the RAM 83 (step 55). Next, the CPU 81 performs sampling based on the JS information amount stored in the RAM 83, generates a feature space 35 based on the samples for each block 11, and stores the generated feature space in the RAM 83 (step 60).
[0054] Next, the CPU 81 integrates the feature spaces 35 for each block 11 stored in the RAM 83 by adding them together, thereby generating a unified feature space 36, which is stored in the RAM 83 (step 65). Next, the CPU 81 determines the number of mixtures for the feature space 36 stored in the RAM 83 using c-AIC, and further generates a GMM based on the number of mixtures using the EM algorithm (step 70). Then, the CPU 81 stores the GMM in the RAM 83 and sets it as the basis function 37 to be used for image recognition (step 75).
[0055] Next, a method for extracting image features using the basis functions 37 will be described. Although not shown in the figure, the image recognition device 9 has a hardware configuration similar to that of the image processing device 8, and is equipped with a memory device 94 that stores an image recognition program, an image to be recognized, and basis functions 37 generated by the image processing device 8, a CPU 91 that performs image recognition in accordance with the image recognition program, and a RAM 93 that provides working memory for this.
[0056] The image recognition device 9 calculates the burden rate of the image with respect to the basis function 37 as a feature amount of the image, as follows. The burden rate λj is expressed by equation (10) in Figure 7(d), where z is a latent parameter (a k-dimensional vector quantity in which the j-th component is 1 and the others are 0). The contribution rate λj represents the probability that the distribution of data points x is generated from the jth Gaussian distribution. When the calculation is performed for each z, a k-dimensional vector by λj is obtained, which is used as a feature by the image recognition device 9. If the data point x is not similar to either the positive image 10 or the negative image 20, it approaches a 0 vector. Based on this principle, the image recognition device 9 extracts features from an image in the following manner.
[0057] FIG. 9 is a diagram for explaining the image recognition method. The following process is carried out by the CPU 91 in accordance with the image recognition program. As shown in FIG. 9(a), the image recognition device 9 reads an image 40, which is an object of image recognition, into a RAM 93, and sets a rectangular area thereon using a discrimination filter 41a. In this manner, the image recognition device 9 includes an image acquisition means for acquiring an image related to image recognition. Then, the image recognition device 9 divides the image extracted by the discrimination filter 41a into, for example, 3×6 blocks 11a, 11b, . . . like the positive image 10 and the negative image 20. Thus, the image recognition device 9 includes a division means for dividing the acquired image into blocks.
[0058] The image recognition device 9 then plots the co-occurrence of gradient directions across high, medium and low resolution for each block 11 in a feature space 13. Then, the image recognition device 9 reads out the basis function 37 from the storage device 94, and calculates the burden rate of each block 11 with respect to the basis function 37 by using the formula (10) in FIG. In this way, the image recognition device 9 is equipped with a basis function acquisition means for acquiring the basis function generated by the image processing device 8, and a feature acquisition means for applying the basis function to each divided block and acquiring features for the basis function.
[0059] The image recognition device 9 uses the feature amount based on the load ratio calculated in this manner to determine whether or not a pedestrian is captured in the image in the discrimination filter 41 , and stores the determination result in the RAM 93 . There are various possible methods for this. For example, a judgment may be made for each block 11 and then a comprehensive judgment may be made, or the burden rates of each block 11 may be integrated and a judgment may be made as a whole.
[0060] The judgment can be performed, for example, by inputting normalized features into a classifier such as SVM (support vector machine) or AdaBoost. After determining the image in the discrimination filter 41a in this manner, the image recognition device 9 shifts the discrimination filter 41 by one block while scanning the image 40, and performs the same determination. In this manner, the image recognition device 9 includes a determination means for determining whether or not a predetermined image recognition target is included in an image by using the feature amount acquired from each block.
[0061] The image recognition device 9 creates a state space by an optimal GMM that is unified for all blocks 11, and applies the same basis function 37 to each block 11, so that the state spaces of the blocks 11 are compatible with each other. This makes it possible for the block 11 to inherit the feature values once calculated even if the discrimination filter 41 is moved, and eliminates the need to recalculate the feature values each time the discrimination filter 41 in the image is slid.
[0062] For example, the discrimination filter 41a and discrimination filter 41b in FIG. 9(a) share the block 11A. Conventionally, a basis function is set for each block 11 for each discrimination filter 41, so that the feature amount is calculated again even for the same block 11A, as shown in the upper diagram of FIG. 9(b).
[0063] In contrast, the image recognition device 9 uses the same basis function 37, so as shown in the lower diagram of Fig. 9(b), the feature amount of the block 11A becomes the same value in the discrimination filters 41a and 41b, and the feature amount calculated earlier can be inherited. This allows a significant saving of calculation resources.
[0064] As described above, in the conventional method, because different basis functions are used for each block, when calculating the features of adjacent rectangular regions, the feature calculations must be performed again for all regions, even though there are overlapping regions, resulting in high computational costs. However, by adopting a common basis function 37, these problems can be solved.
[0065] Furthermore, in the conventional method that does not use GMM, as shown in the upper diagram of Fig. 9(c), a pair of gradient directions quantized into eight directions is voted for in a two-dimensional histogram set for each block 11. Since the bins of the histogram are set regardless of the recognition target, voting is also performed for bins in which image features do not appear. In contrast, in the method of generating state space by GMM, as shown in the lower diagram of Fig. 9(c), a region with high probability density is formed autonomously in the region where image features appear, so there is no need to process regions where features do not appear, such as region 45. This makes it possible to reduce calculation costs.
[0066] Furthermore, conventionally, a basis function was set for each block 11. For example, if a basis function was generated for a 3×6 block 11, the discrimination filter also had to be 3×6. In contrast, in the method of this embodiment, since the basis function 37 is common, it may be possible to design the discrimination filter by modifying it in block units, for example to 3 × 5. This allows the coupling between the discrimination filter generating system and the discrimination filter using system to be looser than in the past.
[0067] FIG. 10 is a graph showing the results of image recognition performed using the basis functions 37 generated by the image processing device 8. 10(a), (b), and (c) are ROC (Receiver Operating Characteristic) curves based on the c-AIC value when the mixture number k is set to 45, 32, and 15, respectively. The horizontal axis indicates the false positive rate, and the vertical axis indicates the true positive rate.
[0068] The thick line shows the case of GMM-MRCoHOG features using an image recognition device 9 with a unified basis function of basis function 37, the dashed line shows the case of conventional GMM-MRCoHOG features using different basis functions for each block 11, and the thin line shows the case of MRCoHOG features using a histogram, with the closer the curve is to the upper left corner, the better the accuracy.
[0069] As shown in the graph, when k=45 is used, the recognition accuracy is slightly lower when GMM-MRCoHOG features with a unified basis function are used than when conventional GMM-MRCoHOG features are used, but it boasts higher recognition accuracy than when conventional MRCoHOG features are used, and is fully suitable for practical use. For k = 32 and 15, when using GMM-MRCoHOG features with a unified basis function, the recognition accuracy is slightly lower than when k = 45, but it boasts higher recognition accuracy than when using conventional MRCoHOG features, and is fully suitable for practical use.
[0070] Although the present embodiment has been described above, various modifications are possible. For example, in this embodiment, positive and negative images are used, but the basis functions can also be created using only positive images. In addition, in this embodiment, the JS information amount is used as the metric between the probability distributions, but other metrics can also be used.
[0071] As described above, according to this embodiment, the amount of memory used can be significantly reduced by unifying the basis functions used in each block into one. In addition, since the basis functions are common to each block, when calculating the features of adjacent rectangular regions, the features that have already been calculated can be used, making it possible to reduce calculation costs. Although there is concern that the accuracy may decrease due to the unification of basis functions, it is possible to maintain accuracy while suppressing the use of computational resources by automatically determining the number of mixtures using a measure based on the Akaike Information Criterion. If you want to improve accuracy further, you can simply increase the number of mixtures. This makes it possible to install the system in devices that do not have high-performance computing capabilities, such as FPGAs, small computers, or GPGPUs (General-purpose computing on graphics processing units), while still maintaining high recognition capabilities. [Explanation of symbols]
[0072] 5. Pixel of interest 8 Image Processing Device 10 Positive Images 11 Blocks 13, 23, 35, 36 Feature Space 15 High Resolution Images 16 Medium resolution images 17 Low-res images 20 Negative Images 33 JS information amount 37 Basis Functions 40 images 41 Identification Filter 45 areas 81 CPU 82 ROM 83 RAM 84 Storage device 85 Storage media drive 86 Input section 87 Output section
Claims
1. An image acquisition means for acquiring images for image recognition training; A partitioning means for partitioning the acquired image into a plurality of blocks; a frequency distribution acquiring means for acquiring a frequency distribution of co-occurrence of luminance gradient directions for each of the divided blocks; a unifying means for unifying the acquired frequency distributions for each block into a single frequency distribution; a basis function generating means for generating a basis function serving as a criterion for image recognition based on the unified frequency distribution; 13. An image processing device comprising:
2. the unifying means performs the unification by superimposing the frequency distributions in the plurality of blocks.
2. The image processing device according to claim 1,
3. the unifying means generates a sample based on the acquired frequency distribution for each block, and adds up the generated samples across the plurality of blocks, thereby superimposing the frequency distributions in the plurality of blocks.
3. The image processing device according to claim 2.
4. the frequency distribution acquisition means acquires a frequency distribution of co-occurrence of brightness gradient directions between different resolutions of the same image; 4. The image processing device according to claim 1, 2 or 3.
5. The image acquisition means acquires a plurality of images; the unifying means unifies frequency distributions for each block of the plurality of images into a single frequency distribution.
5. The image processing device according to claim 1, wherein the image processing device further comprises: a first input section;
6. The image acquisition means acquires a recognition target image including a recognition target and a non-recognition target image including no recognition target, the frequency distribution acquisition means acquires a frequency distribution in a corresponding block based on a difference between a frequency distribution of a luminance gradient direction in the corresponding block of the recognition target image and the non-recognition target image, 6. An image processing device according to any one of claims 1 to 5.
7. The basis function is a probability density function based on a Gaussian mixture model, and a determination means is provided for determining an appropriate number of mixtures based on a balance between likelihood and number of mixtures.
7. The image processing device according to claim 1, wherein the image processing device further comprises: a first input section;
8. a weighting factor is set for each of the plurality of blocks when integrating the frequency distributions, and the unifying means integrates the frequency distributions of each of the plurality of blocks in accordance with the weighting factor; 8. The image processing device according to claim 1, wherein the image processing device further comprises:
9. A basis function acquisition means for acquiring the basis function according to any one of claims 1 to 8; An image acquisition means for acquiring an image related to image recognition; A partitioning means for partitioning the acquired image into blocks; a feature acquisition means for applying the acquired basis function to each of the divided blocks and acquiring a feature for the basis function; a determination means for determining whether or not a predetermined image recognition target is included in the acquired image by using the feature amount acquired from each block; An image recognition device comprising:
10. An image acquisition function to acquire images for image recognition training; A segmentation function for segmenting the acquired image into a plurality of blocks; a frequency distribution acquisition function for acquiring a frequency distribution of co-occurrence of luminance gradient directions for each of the divided blocks; A unification function for unifying the frequency distributions for each block obtained by integrating them into a single frequency distribution; a basis function generating function for generating a basis function serving as a criterion for image recognition based on the unified frequency distribution; An image processing program that realizes this on a computer.
11. A basis function acquisition function for acquiring the basis function according to any one of claims 1 to 8; An image acquisition function for acquiring an image related to image recognition; A segmentation function for segmenting the acquired image into blocks; a feature acquisition function that applies the acquired basis function to each of the divided blocks and acquires a feature for the basis function; a determination function for determining whether or not a predetermined image recognition target is included in the acquired image by using the feature amount acquired from each block; and An image recognition program that realizes this on a computer.
Citation Information
Patent Citations
Image processing device, image recognition device, image processing program, and image recognition program
JP2018124963A
