[go: up one dir, main page]

CN109800781A - A kind of image processing method, device and computer readable storage medium - Google Patents

A kind of image processing method, device and computer readable storage medium Download PDF

Info

Publication number
CN109800781A
CN109800781A CN201811497639.XA CN201811497639A CN109800781A CN 109800781 A CN109800781 A CN 109800781A CN 201811497639 A CN201811497639 A CN 201811497639A CN 109800781 A CN109800781 A CN 109800781A
Authority
CN
China
Prior art keywords
image
target
target image
classified
principal component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811497639.XA
Other languages
Chinese (zh)
Inventor
李书通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201811497639.XA priority Critical patent/CN109800781A/en
Publication of CN109800781A publication Critical patent/CN109800781A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a kind of image processing method, device and computer readable storage medium, method includes: to extract image feature information respectively to multiple target images using principal component analysis network PCANet;Wherein, multiple target images include image to be classified and sample image;According to image feature information, image to be classified and sample image are clustered by unsupervised segmentation algorithm, obtain the classification results of image to be classified.The embodiment of the present invention is when needing to classify to image to be classified, it does not need pre- to first pass through the sample training neural network model including mass data label, but image feature information is extracted to multiple target images by principal component analysis network PCANet respectively, image to be classified and sample image are clustered by unsupervised segmentation algorithm again, after cluster, image to be classified can be classified as one kind with part sample image, therefore, even if only less sample image, it is also able to achieve the automatic classification to image to be classified.

Description

Image processing method and device and computer readable storage medium
Technical Field
The present invention relates to the field of neural network technologies, and in particular, to an image processing method, an image processing apparatus, and a computer-readable storage medium.
Background
With the development of neural network technology, neural network technology has been applied in the fields of image processing, speech recognition, etc., and particularly in the field of image classification processing, neural networks are widely applied.
In the prior art, when a neural network is used to classify images and the like, image samples containing a large amount of label data need to be collected in advance, a neural network model is trained through the samples, and then, when new images need to be classified, new images can be classified through the trained neural network model.
However, the applicant has found that the following often occur: in some cases, it is difficult to find an image sample containing a large amount of label data, so that a neural network model cannot be trained through the image sample, and thus images in the scene cannot be classified through the neural network model.
Disclosure of Invention
In view of the above, embodiments of the present invention are proposed in order to provide an image processing method, apparatus, and computer-readable storage medium that overcome or at least partially solve the above-mentioned problems.
According to a first aspect of the present invention, there is provided an image processing method, the method comprising:
respectively extracting image characteristic information from the target images by adopting a PCANet (principal component analysis network); wherein the plurality of target images comprise an image to be classified and a sample image;
and clustering the image to be classified and the sample image through an unsupervised classification algorithm according to the image characteristic information to obtain a classification result of the image to be classified.
According to a second aspect of the present invention, there is provided an image processing apparatus comprising:
the image characteristic information extraction module is used for respectively extracting image characteristic information from the target images by adopting a PCANet (principal component analysis network); wherein the plurality of target images comprise an image to be classified and a sample image;
and the clustering module is used for clustering the image to be classified and the sample image through an unsupervised classification algorithm according to the image characteristic information to obtain a classification result of the image to be classified.
According to a third aspect of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing any of the image processing methods.
The embodiment of the invention has the following advantages:
when the images to be classified need to be classified, a neural network model does not need to be trained through a sample comprising a large number of data labels in advance, the images to be classified and the sample images are used as target images, image characteristic information is extracted from a plurality of target images through a principal component analysis network PCANet, then the images to be classified and the sample images are clustered through an unsupervised classification algorithm according to the extracted image characteristic information, after clustering, the images to be classified and part of the sample images are classified into one class, and classification results of the images to be classified can be obtained according to the classes of the sample images.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of image feature information extraction according to an embodiment of the present invention;
FIG. 3 is a flowchart of image feature information clustering according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an image processing process according to an embodiment of the present invention;
fig. 5 is a block diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 6 is a detailed block diagram of an image processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
It should be understood that the specific embodiments described herein are merely illustrative of the invention, but do not limit the invention to only some, but not all embodiments.
Referring to fig. 1, a flow chart of an image processing method is shown.
It can be understood that the embodiment of the present invention may be applied to a server side, where the server side may be a WEB server (world wide WEB), or may be a server in other forms, and the embodiment of the present invention may also be applied to other image processing apparatuses, and the embodiment of the present invention is not limited in this respect.
The method specifically comprises the following steps:
step 101: respectively extracting image characteristic information from the target images by adopting a PCANet (principal component analysis network); wherein the plurality of target images comprise an image to be classified and a sample image.
In the embodiment of the present invention, the core of the principal component Analysis network PCANet is a multi-stage filter that is learned by using a Principal Component Analysis (PCA). Specifically, a simple PCANet deep learning network is established through operations of PCA calculation, binary hash calculation, block histogram calculation and the like.
PCANet can also be thought of as a convolutional neural network in nature. In a common convolutional neural network, the convolutional templates of each layer are initialized randomly; unlike other deep learning networks, the PCANet is difficult to train and requires a lot of parameter setting skills, and the hyper-parameters of the PCANet only include the size of the filter, the number of filters in each stage and the block size of the histogram in the output layer; in specific application, the size of the filter and the size of the histogram block can be determined through cross validation or grid search, and the performance of the principal component analysis network can be improved by finely adjusting the number of the filters in each stage. The weight value of the PCANet is obtained through initialization of a PCA method, wherein the PCA is used for calculating the weight value of each layer in the network, and the network can obtain a high recognition rate without training the weight value.
The PCANet can extract the image characteristic information of the target image through a simple model, a large amount of time is not needed to be consumed to train the neural network model in the process, the whole process does not need manual parameter adjusting and training processes, the image characteristic information of each target image can be automatically extracted, high-quality image characteristic information can be extracted aiming at different characteristic learning tasks, and a good effect is achieved.
In specific application, when the PCANet is adopted to respectively extract image characteristic information from a plurality of target images, the plurality of target images can comprise images to be classified and sample images with data labels; the image feature information may be information capable of reflecting main component features of the target image, and through analysis of the image feature information, the association relationship between the image to be classified and the sample image may be obtained.
For example, in the medical field, because of the evolution of diseases, medical updates, etc., there is usually no large amount of diagnosed medical image data to train neural network models in deep learning, and medical experts are usually required to classify new medical images empirically in the prior art. In the embodiment of the invention, after the medical image of the patient is acquired, the medical image of the patient can be used as the image to be classified, part of the medical image corresponding to the diagnosed disease can be arranged in the medical database, the disease can be used as the data label of the image, the diagnosed medical image can be used as the sample image, and the disease of the patient can be automatically determined by analyzing the incidence relation between the image to be classified and the sample image.
In a specific application, the image feature information may specifically be: for example, if the target images are multiple brain radiological images, the multiple brain radiological images can be registered on the same standard brain template to reduce the influence of data individual difference and noise on the experimental result, then a part of the brain radiological image having a key effect on brain diseases is used as image feature information, specifically, information such as pixels and positions can be used for representing the image feature information, and the image feature information of the sample image can be represented in a computer language by using a matrix.
Step 102: and clustering the image to be classified and the sample image through an unsupervised classification algorithm according to the image characteristic information to obtain a classification result of the image to be classified.
In the embodiment of the invention, the unsupervised classification algorithm can be a k-means clustering algorithm, and the k-means clustering algorithm refers to the following steps: firstly, randomly selecting k (k is a natural number not more than n) objects from n (n is a natural number) data objects as an initial clustering center; for the other objects left, they are respectively assigned to the most similar clusters (represented by the cluster centers) according to their similarity (distance) to the cluster centers; then calculating the cluster center of each obtained new cluster (the mean value of all objects in the cluster); this process is repeated until the standard measure function begins to converge, typically using the mean square error as the standard measure function.
In the specific application, the images to be classified and the sample images can be clustered by using an unsupervised classification method k-means, after clustering, the images to be classified and part of the sample images can be classified into one class, and the classification results of the images to be classified can be obtained according to the classes of the sample images.
In summary, when images to be classified need to be classified, a neural network model does not need to be trained through a sample comprising a large number of data labels in advance, the images to be classified and sample images are used as target images, image feature information is extracted from a plurality of target images through a principal component analysis network PCANet, then the images to be classified and the sample images are clustered through an unsupervised classification algorithm according to the extracted image feature information, after clustering, the images to be classified and part of the sample images are classified into one class, and classification results of the images to be classified can be obtained according to the classes of the sample images.
The following possible embodiments are provided in the present invention with respect to step 101.
Referring to fig. 2, a schematic flow chart of a specific implementation method of step 101 is shown, in the embodiment of the present invention, the steps of extracting image feature information from a plurality of target images by using a PCA set are mainly divided into a first step of PCA convolution (a first principal component analysis method PCA convolution calculation), a second step of PCA convolution (a second principal component analysis method PCA convolution calculation), and output (hash operation and local histogram operation). In specific application, specifically, the steps 201 to 204 are performed to extract feature information of each target image by using PCANet.
As shown in fig. 2, the method may specifically include the following steps:
step 201: and respectively carrying out PCA convolution calculation on the plurality of target images by using a first principal component analysis method to obtain a first principal component characteristic vector of each target image.
As a specific implementation manner of the embodiment of the present invention, the performing a PCA convolution calculation on each of the plurality of target images to obtain a first principal component feature vector of each of the target images includes:
respectively carrying out slice processing on the plurality of target images, and obtaining a plurality of first image slices aiming at each target image; vectorizing a first image slice of each target image, and obtaining a plurality of first vectorization results for each target image; for each target image, combining a plurality of first vectorization results of the target image to obtain a first matrix of the target image; calculating by an average pooling algorithm according to the first matrix of each target image to obtain a first result matrix; and according to a preset first filtering parameter, performing PCA calculation on the first result matrix to obtain a first principal component eigenvector of each target image.
For example, given that the plurality of target images are N different r × s three-dimensional MRI (Magnetic resonance imaging) images, the target images may be represented by a two-dimensional matrix for the ith target image Ii
Wherein,and a two-dimensional matrix representing the target image, wherein N is an integer greater than 1, and i is an integer greater than 0.
Respectively performing slice processing on the plurality of target images, and obtaining a plurality of first image slices for each target image, which may specifically be: to be provided withk1×k2The size of the segment overlap-sliding truncates each pixel, and the overlap-sliding truncate may specifically be: pixel by 9 x 9 of the target image, k1×k2Take 3 x 3 as an example, in the first truncation, k1×k2Corresponding to the first to third rows of the first column, the first to third rows of the second column and the first to third rows of the third column of pixels of the target image, with the pixel center at the second row of the second column of the target image, and k at the next cut1×k2Corresponding to the first to third rows of the second column, the first to third rows of the third column and the first to third rows of the fourth column of pixels of the target image, the pixel center being at the second row of the third column of the target image, and so on, a plurality of first image slices can be slidingly intercepted; for each target image, vectorizing a plurality of first image slices of the target image to obtain a plurality of first vectorized results of the target image, and combining the plurality of first vectorized results of the target image to obtain k of the target image1×k2And (r-k)1+1)×(s-k2+1) columns of the first matrix XiThen, after all the first matrixes are processed by the following average pooling algorithm, a first result matrix X is obtained:
wherein,is to XiAfter vectorization, the mean vector is subtracted.
Assume that the first filtering parameter of the first stage PCA is L1Calculating the first result matrix by using a PCA algorithm to obtain a first principal component feature vector of each target image, wherein for the ith first principal component feature vector, the PCA algorithm expression is as follows:
wherein the formula represents: the first principal component feature vector is obtained by dividing the vectorProjection onto a two-dimensional matrixThe function of the matrix is calculated to obtain,representation calculation XXTThe ith principal component feature vector of (1); l is an integer greater than 0.
Step 202: and performing second PCA convolution calculation on the first principal component characteristic vector of each target image to obtain a second principal component characteristic vector of each target image.
As a specific implementation of the embodiment of the present invention, the performing a second PCA convolution on the first principal component feature vector of each target image to obtain a second principal component feature vector of each target image includes:
carrying out slicing processing on the first principal component feature vector of each target image to obtain a plurality of second image slices aiming at each target image; vectorizing a second image slice of each target image, and obtaining a plurality of second vectorization results for each target image; for each target image, combining a plurality of second vectorization results of the target image to obtain a second matrix of the target image; calculating to obtain a second result matrix through an average pooling algorithm according to the second matrix of each target image; and performing PCA calculation on the second result matrix according to preset second filtering parameters to obtain a second principal component eigenvector of each target image.
In a specific application, the step of the second PCA convolution is similar to the first PCA convolution, and for the ith second image slice, the expression is:
where denotes the process of 2D convolution. The first PCA convolution is the same, all the segments are cut through overlapping sliding, and a plurality of second image slices can be obtained aiming at each target image; for each target image, vectorizing a plurality of second image slices of the target image to obtain a plurality of second vectorized results of the target image, and combining the plurality of second vectorized results of the target image to obtain k of the target image1×k2And (r-k)1+1)×(s-k2+1) columns of the first matrixAnd after all the second matrixes are processed by the following average pooling algorithm, a second result matrix is obtained:
combination YlThe matrix of results is:
second PCA Algorithm resultsThe expression is as follows:
L2representing the second filter parameter.
In the embodiment of the present invention, the meanings of the letters and symbols in the formula correspond to step 201, and are not described herein again.
Step 203: and carrying out Hash operation on the second principal component characteristic vector of each target image to obtain a Hash value of each target image.
As a specific implementation of the embodiment of the present invention, the performing a hash operation on the second principal component feature vector of each target image to obtain a hash value of each target image includes: performing binarization and weighting processing on the second principal component feature vector of each target image to obtain a hash value T of each target imagei l. The specific formula can be:
wherein H (-) denotes binarizing the feature value using Hervesseld step function,is W1 2And (4) corresponding weight values.
Step 204: and carrying out local histogram operation on the hash value of each target image to obtain image characteristic information of each target image.
As a specific implementation of the embodiment of the present invention, the performing a local histogram operation on the hash value of each target image to obtain image feature information of each target image includes:
and respectively carrying out blocking and histogram statistical calculation on the hash value of each target image to obtain the image characteristic information of each target image.
In specific application, the original sample data isCorresponding output Ti l,l∈[1,L1]The blocks can be divided into B blocks, the blocks are represented by a histogram, and then the blocks represented by the histogram are represented by vectorization through a formula, wherein the specific formula can be as follows:
whereinRepresents a pair Ti lFunction for performing blocking and histogram statistics, fiDenotes the extraction of the ith original sample using PCANetThe final image characteristic information.
In conclusion, through the first-step PCA convolution and the second-step PCA convolution and output, the deep-level features of each target image are extracted, and image feature information is obtained.
In the embodiment of the invention, the image characteristic information of each target image can be automatically extracted through the PCANet under the conditions of not needing to train a special neural network recognition model and not needing to participate in manual work, and the extraction process is simple and efficient.
The following possible implementation is provided in the present embodiment with respect to step 102.
Referring to fig. 3, a flowchart of a specific implementation method of step 102 is shown, where the unsupervised classification algorithm is specifically a k-means clustering algorithm, and as shown in fig. 3, for each target image, the image feature information corresponding to the target image includes a plurality of feature points; step 102 may specifically include the following steps:
step 301: and randomly initializing central points of k clusters in a plurality of characteristic points of the target characteristic images, wherein k is a preset integer.
In the embodiment of the present invention, for example, the extracted image feature information of each target image includes m × n pixel points, one pixel point may correspond to one feature point, and then each target image corresponds to m × n feature points, after the feature points of all target images are aggregated, k feature points may be arbitrarily selected from all feature points as a clustering center point, and a k value may be set according to online experience or an actual application scenario.
Step 302: and calculating Euclidean distances between other feature points and the k central points.
In a specific application, Euclidean distance (Euclidean metric) is a commonly used distance definition, which refers to the true distance between two points in a multidimensional space, or the natural length of a vector. For example, the euclidean distance in two and three dimensions may be the actual distance between two points. When the k-means algorithm is used for clustering, an algorithm for calculating Euclidean distances between other feature points and the k central points is generally adopted. The other feature points may be other feature points than the center point among all the feature points.
Step 303: and classifying each of the other feature points into a category of a center point closest to the other feature points.
In the embodiment of the present invention, after the euclidean distances between other feature points and the k center points are calculated, each of the other feature points may be classified into the category of the center point closest to the other feature points.
Step 304: after all feature points are classified into k clusters, new k center points are initialized based on each of the clusters.
In the embodiment of the invention, after all the feature points are classified, a new round of initializing k central points and a new round of Euclidean distance calculation are required.
Step 305: judging that the sum of the distances of all the feature points of the set in each cluster is minimum, if not, repeating the process, and if so, executing a step 306; each cluster corresponds to a category of the sample image.
In the embodiment of the present invention, the sum of distances of all feature points in each set in each cluster can be obtained during each clustering, and if the sum of distances of all feature points in each set in each cluster is not the minimum, it can be said that clustering has not been completed, and steps 301 to 304 need to be repeatedly performed to further complete clustering; if the sum of the distances of all feature points in the set in each cluster is minimum, it can be said that clustering is completed, each cluster will include a sample image, and the category of the sample image can be used as the category of the cluster.
Step 306: and obtaining a classification result of the image to be classified according to the category of the cluster where the image to be classified is located.
In the embodiment of the scheme, the class of the cluster where the image to be classified is located can be used as the classification result of the image to be classified.
In the embodiment of the invention, all target characteristic images are clustered into k clusters through a k-means algorithm, and the classification result of the image to be classified can be obtained according to the sample image category of the cluster where the image to be classified is located.
Referring to fig. 4, a process diagram of the image processing method according to the embodiment of the present invention is shown.
As shown in fig. 4, after the target image is output by the input layer, the first principal component feature vector is obtained after the slicing processing and the first PCA convolution calculation in the first stage, the first principal component feature vector is further sliced in the second stage, the second PCA convolution calculation is performed to obtain the second principal component feature vector, after the binary hash operation and the local histogram operation are performed on the second principal component feature vector by the output layer, the image feature information of each target image is output to the unsupervised classification algorithm k-means, and after k-means clustering, the classification result of the image to be classified is output.
In the embodiment of the invention, the whole process does not need the manual parameter adjusting and training process, and the category of the image to be classified can be automatically identified; the neural network model does not need to be trained according to a large number of data labels, so that the time and the process of model training are reduced; and the classification of the images to be classified is realized by analyzing the distance relation of the image characteristic information, and the time of training a classifier model is not needed. Therefore, when some scenes with insufficient sample amount are encountered, the method provided by the embodiment of the invention can be used for efficiently and accurately classifying the images to be classified through clustering between the images to be classified and the sample images.
In summary, when images to be classified need to be classified, a neural network model does not need to be trained through a sample comprising a large number of data labels in advance, the images to be classified and sample images are used as target images, image feature information is extracted from a plurality of target images through a principal component analysis network PCANet, then the images to be classified and the sample images are clustered through an unsupervised classification algorithm according to the extracted image feature information, after clustering, the images to be classified and part of the sample images are classified into one class, and classification results of the images to be classified can be obtained according to the classes of the sample images.
As a preferable mode of the embodiment of the present invention, before step 101, the method may further include: and carrying out standardization processing on the plurality of source images according to a preset standard to obtain a plurality of target images.
In the embodiment of the invention, the preset standard can be set according to the actual application scene. For example, if the source image is a plurality of brain magnetic resonance images, the plurality of brain magnetic resonance images include an image to be classified and a determined sample image, because machines for capturing the brain magnetic resonance images are different or head differences of different patients may exist, sizes, contents, and the like of the plurality of brain magnetic resonance images are not uniform, so that the plurality of brain magnetic resonance images can be firstly matched with one brain template to obtain a plurality of standardized target images, so as to avoid inaccurate classification caused by image differences.
It can be understood that, a person skilled in the art may also set an adaptive preset standard according to an actual application scenario, and perform corresponding standardization processing, which is not specifically limited in this embodiment of the present invention.
As a preferable mode of the embodiment of the present invention, after step 102, the method may further include: and adding a data label to the classified image to be classified.
In the embodiment of the present invention, the data tag may be a classification result of the image to be classified, for example, if the image to be classified is a medical magnetic resonance image, the data tag may be disease information corresponding to the medical magnetic resonance image. And adding data labels to the classified sample images, and collecting enough samples with the data labels along with the increase of the images corresponding to the data labels, so that the samples with the data labels can be used for training a supervised or large neural network to realize classification with stronger functions.
It can be understood that, a person skilled in the art may also add an adaptive data tag to the image to be classified according to an actual application scenario, and the content of the data tag is not specifically limited in the embodiment of the present invention.
In experiments, the inventors used a medical image database to demonstrate the effectiveness of the method of embodiments of the invention. The target image can be an MRI image, the cross position of the hippocampus center in the target image is adjusted through medical image analysis software MRIacron, and all the MRI images are registered to the same standard brain template so as to reduce the influence of data individual difference and noise on the experimental result. In the process of data analysis, using SPM12(Statistical Parametric Mapping) software based on a simulation platform MATLAB platform, SPM12 configures a positron density template and spline interpolation with a weighted image, and other parameters are set as default values. Through detection, the accuracy of simulation classification can reach more than 90%, and it can be understood that if the method provided by the embodiment of the invention is applied to the medical field, the accuracy and rapidness of diagnosis of diseases can be greatly improved.
In summary, when images to be classified need to be classified, a neural network model does not need to be trained through a sample comprising a large number of data labels in advance, the images to be classified and sample images are used as target images, image feature information is extracted from a plurality of target images through a principal component analysis network PCANet, then the images to be classified and the sample images are clustered through an unsupervised classification algorithm according to the extracted image feature information, after clustering, the images to be classified and part of the sample images are classified into one class, and classification results of the images to be classified can be obtained according to the classes of the sample images.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 5, there is shown a block diagram of an image processing apparatus, which may specifically include:
an image feature information extraction module 510, configured to extract image feature information for each of the plurality of target images using a principal component analysis network PCANet; wherein the plurality of target images comprise an image to be classified and a sample image;
and the clustering module 520 is configured to cluster the image to be classified and the sample image according to the image feature information by using an unsupervised classification algorithm to obtain a classification result of the image to be classified.
Preferably, referring to fig. 6, on the basis of fig. 5, the image feature information extraction module 510 includes:
the first principal component feature vector calculation submodule 5101 is configured to perform first Principal Component Analysis (PCA) convolution calculation on the plurality of target images respectively to obtain first principal component feature vectors of the target images;
a second principal component feature vector calculation submodule 5102, configured to perform second PCA convolution on the first principal component feature vectors of the target images to obtain second principal component feature vectors of the target images;
a hash value operator module 5103, configured to perform a hash operation on the second principal component feature vector of each target image to obtain a hash value of each target image;
the image feature information calculation submodule 5104 is configured to perform local histogram operation on the hash value of each target image to obtain image feature information of each target image.
Preferably, the first principal component feature vector calculation submodule 5101 includes:
a first slicing unit 51011, configured to respectively slice the plurality of target images, and obtain a plurality of first image slices for each target image;
a first vectorization unit 51012, configured to perform vectorization on a first image slice of each target image, and obtain a plurality of first vectorization results for each target image;
a first combining unit 51013, configured to combine, for each of the target images, a plurality of first vectorization results of the target image, respectively, to obtain a first matrix of the target image;
a first result matrix determination unit 51014, configured to obtain a first result matrix by calculating a first matrix of each of the target images through an average pooling algorithm;
the first principal component eigenvector determining unit 51015 is configured to perform PCA calculation on the first result matrix according to a preset first filter parameter to obtain a first principal component eigenvector of each target image.
Preferably, the second principal component feature vector calculation sub-module 5102 includes:
a second slicing unit 51021, configured to slice the first principal component feature vectors of the target images, and obtain a plurality of second image slices for each target image;
a second vectorization unit 51022, configured to perform vectorization on a second image slice of each target image, and obtain a plurality of second vectorization results for each target image;
a second combining unit 51023, configured to combine, for each of the target images, a plurality of second vectorization results of the target image to obtain a second matrix of the target image;
a second result matrix determination unit 51024, configured to calculate, according to the second matrix of each target image, a second result matrix through an average pooling algorithm;
the second principal component eigenvector determining unit 51025 is configured to perform PCA calculation on the second result matrix according to a preset second filtering parameter to obtain a second principal component eigenvector of each target image.
Preferably, the hash value operator module 5103 includes: a hash value calculation unit 51031, configured to perform binarization and weighting processing on the second principal component feature vectors of the target images to obtain hash values of the target images;
the image feature information calculation submodule 5104 includes: the image feature information calculation unit 51041 is configured to perform blocking and histogram statistical calculation on the hash values of the target images, respectively, to obtain image feature information of the target images.
Preferably, for each target image, the image feature information corresponding to the target image includes a plurality of feature points; the clustering module 520 includes:
a central point determining submodule 5201 configured to arbitrarily initialize central points of the k clusters among the plurality of feature points of the plurality of target feature images;
the euclidean distance calculating submodule 5202 is configured to calculate euclidean distances between the other feature points and the k central points;
a classification submodule 5203 configured to classify each of the other feature points into a class of a central point closest to the other feature points;
an initialization sub-module 5204, configured to initialize new k central points based on each cluster after all the feature points are classified into k clusters;
a repeat execution sub-module 5205 for repeating the execution steps of the above process sub-modules until the sum of distances of all feature points of the set in each cluster is minimum; each cluster corresponds to a category of the sample image;
a classification result obtaining sub-module 5206, configured to obtain a classification result of the image to be classified according to a category of a cluster in which the image to be classified is located;
wherein k is a preset integer.
Preferably, the method further comprises the following steps:
a data label adding module 530, configured to add a data label to the classified image to be classified.
And the standardization processing module 540 is configured to standardize the plurality of source images according to a preset standard to obtain a plurality of target images.
When the images to be classified need to be classified, a neural network model does not need to be trained through a sample comprising a large number of data labels in advance, the images to be classified and the sample images are used as target images, image characteristic information is extracted from a plurality of target images through a principal component analysis network PCANet, then the images to be classified and the sample images are clustered through an unsupervised classification algorithm according to the extracted image characteristic information, after clustering, the images to be classified and part of the sample images are classified into one class, and classification results of the images to be classified can be obtained according to the classes of the sample images.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (fransitory media), such as modulated data signals and carrier waves.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable image processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable image processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable image processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable image processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing detailed description of an image processing method and an image processing apparatus according to the present invention has been presented, and the principles and embodiments of the present invention are explained herein by using specific examples, which are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (17)

1. An image processing method, characterized in that the method comprises:
respectively extracting image characteristic information from the target images by adopting a PCANet (principal component analysis network); wherein the plurality of target images comprise an image to be classified and a sample image;
and clustering the image to be classified and the sample image through an unsupervised classification algorithm according to the image characteristic information to obtain a classification result of the image to be classified.
2. The method according to claim 1, wherein the extracting image feature information for each of the plurality of target images using a PCANet comprises:
performing PCA (principal component analysis) convolution calculation on the target images respectively to obtain first principal component characteristic vectors of the target images;
performing second PCA convolution calculation on the first principal component characteristic vector of each target image to obtain a second principal component characteristic vector of each target image;
performing hash operation on the second principal component characteristic vector of each target image to obtain a hash value of each target image;
and carrying out local histogram operation on the hash value of each target image to obtain image characteristic information of each target image.
3. The method of claim 2, wherein the performing a first Principal Component Analysis (PCA) convolution calculation on each of the plurality of target images to obtain a first principal component feature vector of each of the target images comprises:
respectively carrying out slice processing on the plurality of target images, and obtaining a plurality of first image slices aiming at each target image;
vectorizing a first image slice of each target image, and obtaining a plurality of first vectorization results for each target image;
for each target image, combining a plurality of first vectorization results of the target image to obtain a first matrix of the target image;
calculating by an average pooling algorithm according to the first matrix of each target image to obtain a first result matrix;
and according to a preset first filtering parameter, performing PCA calculation on the first result matrix to obtain a first principal component eigenvector of each target image.
4. The method of claim 2 or 3, wherein performing a second PCA convolution calculation on the first principal component feature vector of each of the target images to obtain a second principal component feature vector of each of the target images comprises:
carrying out slicing processing on the first principal component feature vector of each target image to obtain a plurality of second image slices aiming at each target image;
vectorizing a second image slice of each target image, and obtaining a plurality of second vectorization results for each target image;
for each target image, combining a plurality of second vectorization results of the target image to obtain a second matrix of the target image;
calculating to obtain a second result matrix through an average pooling algorithm according to the second matrix of each target image;
and performing PCA calculation on the second result matrix according to preset second filtering parameters to obtain a second principal component eigenvector of each target image.
5. The method according to claim 2, wherein the performing a hash operation on the second principal component feature vector of each of the target images to obtain a hash value of each of the target images comprises: carrying out binarization and weighting processing on the second principal component feature vectors of the target images to obtain hash values of the target images;
the performing a local histogram operation on the hash value of each target image to obtain image feature information of each target image includes: and respectively carrying out blocking and histogram statistical calculation on the hash value of each target image to obtain the image characteristic information of each target image.
6. The method according to claim 1, wherein for each of the target images, the image feature information corresponding to the target image comprises a plurality of feature points; the clustering the image to be classified and the sample image according to the image characteristic information by an unsupervised classification algorithm to obtain a classification result of the image to be classified comprises the following steps:
randomly initializing central points of k clusters in a plurality of characteristic points of the target characteristic images;
calculating Euclidean distances between other feature points and the k central points;
classifying each of the other feature points into a category of a center point closest to the other feature points;
after all the feature points are classified into k clusters, initializing new k central points based on each cluster;
repeating the above process until the sum of the distances of all the feature points of the set in each cluster is minimum; each cluster corresponds to a category of the sample image;
obtaining a classification result of the image to be classified according to the category of the cluster where the image to be classified is located;
wherein k is a preset integer.
7. The method according to claim 1, wherein after clustering the image to be classified and the sample image by an unsupervised classification algorithm according to the image feature information to obtain a classification result of the image to be classified, the method further comprises:
and adding a data label to the classified image to be classified.
8. The method according to claim 1, wherein before extracting image feature information from each of the plurality of target images using a principal component analysis network (PCANet), the method further comprises:
and carrying out standardization processing on the plurality of source images according to a preset standard to obtain a plurality of target images.
9. An image processing apparatus, characterized in that the apparatus comprises:
the image characteristic information extraction module is used for respectively extracting image characteristic information from the target images by adopting a PCANet (principal component analysis network); wherein the plurality of target images comprise an image to be classified and a sample image;
and the clustering module is used for clustering the image to be classified and the sample image through an unsupervised classification algorithm according to the image characteristic information to obtain a classification result of the image to be classified.
10. The apparatus of claim 9, wherein the image feature information extraction module comprises:
the first principal component eigenvector calculation sub-module is used for respectively carrying out PCA (principal component analysis) convolution calculation on the plurality of target images to obtain first principal component eigenvectors of each target image;
the second principal component feature vector calculation submodule is used for carrying out second PCA convolution calculation on the first principal component feature vector of each target image to obtain a second principal component feature vector of each target image;
the hash value operator module is used for carrying out hash operation on the second principal component characteristic vector of each target image to obtain a hash value of each target image;
and the image characteristic information calculation submodule is used for carrying out local histogram operation on the hash value of each target image to obtain the image characteristic information of each target image.
11. The apparatus of claim 10, wherein the first principal component feature vector calculation sub-module comprises:
the first slicing unit is used for respectively carrying out slicing processing on the plurality of target images and obtaining a plurality of first image slices aiming at each target image;
a first vectorization unit, configured to perform vectorization on a first image slice of each target image, and obtain, for each target image, a plurality of first vectorization results;
a first combining unit, configured to combine, for each target image, a plurality of first vectorization results of the target image to obtain a first matrix of the target image;
the first result matrix determining unit is used for calculating through an average pooling algorithm according to the first matrix of each target image to obtain a first result matrix;
and the first principal component eigenvector determining unit is used for carrying out PCA calculation on the first result matrix according to a preset first filtering parameter to obtain a first principal component eigenvector of each target image.
12. The apparatus according to claim 10 or 11, wherein the second principal component feature vector calculation sub-module comprises:
a second slicing unit, configured to perform slicing processing on the first principal component feature vector of each target image, and obtain a plurality of second image slices for each target image;
a second vectorization unit, configured to perform vectorization on a second image slice of each target image, and obtain a plurality of second vectorization results for each target image;
a second combining unit, configured to combine, for each target image, a plurality of second vectorization results of the target image to obtain a second matrix of the target image;
the second result matrix determining unit is used for calculating a second result matrix through an average pooling algorithm according to the second matrix of each target image;
and the second principal component eigenvector determining unit is used for carrying out PCA calculation on the second result matrix according to a preset second filtering parameter to obtain a second principal component eigenvector of each target image.
13. The apparatus of claim 10, wherein the hash value operator module comprises: a hash value calculation unit, configured to perform binarization and weighting on the second principal component feature vector of each target image to obtain a hash value of each target image;
the image feature information calculation sub-module includes: and the image characteristic information calculation unit is used for respectively carrying out blocking and histogram statistical calculation on the hash value of each target image to obtain the image characteristic information of each target image.
14. The apparatus according to claim 9, wherein for each of the target images, the image feature information corresponding to the target image comprises a plurality of feature points; the clustering module comprises:
a central point determining submodule, configured to initialize central points of k clusters at will among a plurality of feature points of the plurality of target feature images;
the Euclidean distance calculation submodule is used for calculating Euclidean distances between other feature points and the k central points;
a classification submodule for classifying each of the other feature points into a class of a central point closest to the other feature points;
the initialization submodule is used for initializing new k central points based on each cluster after all the characteristic points are classified into k clusters;
a repeated execution submodule for repeating the execution steps of the process submodule until the sum of distances of all feature points of the set in each cluster is minimum; each cluster corresponds to a category of the sample image;
the classification result obtaining sub-module is used for obtaining the classification result of the image to be classified according to the category of the cluster where the image to be classified is located;
wherein k is a preset integer.
15. The apparatus of claim 9, further comprising:
and the data label adding module is used for adding a data label to the classified image to be classified.
16. The apparatus of claim 9, further comprising:
and the standardization processing module is used for carrying out standardization processing on the plurality of source images according to a preset standard to obtain a plurality of target images.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the image processing method according to any one of claims 1 to 8.
CN201811497639.XA 2018-12-07 2018-12-07 A kind of image processing method, device and computer readable storage medium Pending CN109800781A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811497639.XA CN109800781A (en) 2018-12-07 2018-12-07 A kind of image processing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811497639.XA CN109800781A (en) 2018-12-07 2018-12-07 A kind of image processing method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109800781A true CN109800781A (en) 2019-05-24

Family

ID=66556551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811497639.XA Pending CN109800781A (en) 2018-12-07 2018-12-07 A kind of image processing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109800781A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298400A (en) * 2019-06-28 2019-10-01 北京奇艺世纪科技有限公司 A kind of image classification method, device, equipment and storage medium
CN110889438A (en) * 2019-11-08 2020-03-17 重庆金山医疗技术研究院有限公司 Image processing method and device, electronic equipment and storage medium
CN111325271A (en) * 2020-02-18 2020-06-23 Oppo广东移动通信有限公司 Image classification method and device
CN111626409A (en) * 2020-07-30 2020-09-04 江西高创保安服务技术有限公司 Data generation method for image quality detection
CN111753114A (en) * 2020-06-04 2020-10-09 北京字节跳动网络技术有限公司 Image pre-marking method, device and electronic device
CN112085044A (en) * 2019-06-14 2020-12-15 中南大学 A dynamic classification method of slopes based on automatic monitoring data
CN113011221A (en) * 2019-12-19 2021-06-22 广州极飞科技股份有限公司 Crop distribution information acquisition method and device and measurement system
CN113057585A (en) * 2021-03-15 2021-07-02 中国科学院计算技术研究所 Cognitive disorder detection model and training method thereof
CN113887630A (en) * 2021-09-30 2022-01-04 北京百度网讯科技有限公司 Image classification method, apparatus, electronic device and storage medium
CN114048344A (en) * 2021-11-25 2022-02-15 天翼数字生活科技有限公司 Similar face searching method, device, equipment and readable storage medium
CN114818926A (en) * 2022-04-27 2022-07-29 重庆邮电大学 Authorized user scene recognition scheme based on total blind image feature extraction

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605990A (en) * 2013-10-23 2014-02-26 江苏大学 Integrated multi-classifier fusion classification method and integrated multi-classifier fusion classification system based on graph clustering label propagation
CN104751198A (en) * 2013-12-27 2015-07-01 华为技术有限公司 Method and device for identifying target object in image
CN105447473A (en) * 2015-12-14 2016-03-30 江苏大学 PCANet-CNN-based arbitrary attitude facial expression recognition method
CN108416370A (en) * 2018-02-07 2018-08-17 深圳大学 Image classification method, device based on semi-supervised deep learning and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605990A (en) * 2013-10-23 2014-02-26 江苏大学 Integrated multi-classifier fusion classification method and integrated multi-classifier fusion classification system based on graph clustering label propagation
CN104751198A (en) * 2013-12-27 2015-07-01 华为技术有限公司 Method and device for identifying target object in image
CN105447473A (en) * 2015-12-14 2016-03-30 江苏大学 PCANet-CNN-based arbitrary attitude facial expression recognition method
CN108416370A (en) * 2018-02-07 2018-08-17 深圳大学 Image classification method, device based on semi-supervised deep learning and storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085044A (en) * 2019-06-14 2020-12-15 中南大学 A dynamic classification method of slopes based on automatic monitoring data
CN112085044B (en) * 2019-06-14 2023-11-24 中南大学 A dynamic classification method for slopes based on automated monitoring data
CN110298400A (en) * 2019-06-28 2019-10-01 北京奇艺世纪科技有限公司 A kind of image classification method, device, equipment and storage medium
CN110889438B (en) * 2019-11-08 2023-07-04 重庆金山医疗技术研究院有限公司 Image processing method and device, electronic equipment and storage medium
CN110889438A (en) * 2019-11-08 2020-03-17 重庆金山医疗技术研究院有限公司 Image processing method and device, electronic equipment and storage medium
CN113011221A (en) * 2019-12-19 2021-06-22 广州极飞科技股份有限公司 Crop distribution information acquisition method and device and measurement system
CN113011221B (en) * 2019-12-19 2025-03-04 广州极飞科技股份有限公司 Method, device and measurement system for obtaining crop distribution information
CN111325271A (en) * 2020-02-18 2020-06-23 Oppo广东移动通信有限公司 Image classification method and device
CN111325271B (en) * 2020-02-18 2023-09-12 Oppo广东移动通信有限公司 Image classification method and device
CN111753114A (en) * 2020-06-04 2020-10-09 北京字节跳动网络技术有限公司 Image pre-marking method, device and electronic device
CN111626409A (en) * 2020-07-30 2020-09-04 江西高创保安服务技术有限公司 Data generation method for image quality detection
CN113057585A (en) * 2021-03-15 2021-07-02 中国科学院计算技术研究所 Cognitive disorder detection model and training method thereof
CN113887630A (en) * 2021-09-30 2022-01-04 北京百度网讯科技有限公司 Image classification method, apparatus, electronic device and storage medium
CN114048344A (en) * 2021-11-25 2022-02-15 天翼数字生活科技有限公司 Similar face searching method, device, equipment and readable storage medium
CN114818926A (en) * 2022-04-27 2022-07-29 重庆邮电大学 Authorized user scene recognition scheme based on total blind image feature extraction

Similar Documents

Publication Publication Date Title
CN109800781A (en) A kind of image processing method, device and computer readable storage medium
US11593943B2 (en) RECIST assessment of tumour progression
EP3478728B1 (en) Method and system for cell annotation with adaptive incremental learning
JP2015087903A (en) Apparatus and method for information processing
CN113987243A (en) A kind of image file gathering method, image file gathering device and computer readable storage medium
CN105894046A (en) Convolutional neural network training and image processing method and system and computer equipment
CN102236675A (en) Method for processing matched pairs of characteristic points of images, image retrieval method and image retrieval equipment
Nizami et al. No-reference image quality assessment using bag-of-features with feature selection
Stojnić et al. Detection of pollen bearing honey bees in hive entrance images
Medeiros et al. Image segmentation via multi-scale stochastic regional texture appearance models
CN112597997A (en) Region-of-interest determining method, image content identifying method and device
CN108805181A (en) A kind of image classification device and sorting technique based on more disaggregated models
CN114463574A (en) A scene classification method and device for remote sensing images
Rampun et al. Breast density classification using local ternary patterns in mammograms
WO2024141204A1 (en) Method for image segmentation
CN114998585B (en) Open-world semantic segmentation method and device based on region-aware metric learning
Rampun et al. Breast density classification using multiresolution local quinary patterns in mammograms
Beljadid et al. Automatic fabric defect detection employing deep learning
CN113469976A (en) Object detection method and device and electronic equipment
CN112968968B (en) Internet of things equipment flow fingerprint identification method and device based on unsupervised clustering
JP7557302B2 (en) Apparatus, method and system for generating a model for identifying an object of interest from an image - Patents.com
CN115984671A (en) Model online updating method and device, electronic equipment and readable storage medium
David et al. Authentication of Vincent van Gogh’s work
CN110298400A (en) A kind of image classification method, device, equipment and storage medium
Liu et al. Ensemble Learning with multiclassifiers on pediatric hand radiograph segmentation for bone age assessment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190524