CN115713800A - Image classification method and device - Google Patents

Image classification method and device Download PDF

Info

Publication number
CN115713800A
CN115713800A CN202211521143.8A CN202211521143A CN115713800A CN 115713800 A CN115713800 A CN 115713800A CN 202211521143 A CN202211521143 A CN 202211521143A CN 115713800 A CN115713800 A CN 115713800A
Authority
CN
China
Prior art keywords
image
face
features
target
classification model
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
CN202211521143.8A
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211521143.8A priority Critical patent/CN115713800A/en
Publication of CN115713800A publication Critical patent/CN115713800A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The application discloses an image classification method and device. The method comprises the following steps: acquiring a face image to be classified; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images. The method and the device solve the technical problem that the abnormal face image of the cervical vertebra cannot be efficiently and accurately identified in the related technology.

Description

Image classification method and device
Technical Field
The application relates to the technical field of machine learning, in particular to an image classification method and device.
Background
With the influence of modern social environment and life style, more and more people lead to chronic strain of cervical vertebra due to improper working habits, life postures and excessive neck movement, so that the cervical spondylosis is caused to be a state, and the cervical spondylosis is just an important factor influencing the health and safety of people.
Usually, people can judge the cervical spondylosis through auxiliary examination and traditional Chinese medicine experts with profound experience, but the cervical problems cannot be accurately found and predicted by the method, so that various diseases are caused by the cervical vertebra state.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides an image classification method and device, and at least solves the technical problem that a face image with cervical vertebra abnormality cannot be efficiently and accurately identified in the related technology.
According to an aspect of an embodiment of the present application, there is provided an image classification method including: acquiring a face image to be classified; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images.
Optionally, the image classification model is a binary classification model, and the image classification model includes: the method comprises the steps of presetting a number of principal component analysis submodels and target classifiers, wherein the target classifiers are support vector machines based on radial basis functions.
Optionally, the training process of the image classification model includes: acquiring a first sample image set, wherein the first sample image set comprises a first sample image subset and a second sample image subset, images in the first sample image subset are all face images with normal cervical vertebra, and images in the second sample image subset are all face images with abnormal cervical vertebra; preprocessing each image in the first sample image set to obtain a second sample image set, wherein the preprocessing comprises: intercepting a target area in each image, wherein the target area at least comprises an eyebrow area and an eye area; extracting a plurality of first features in each image in the second sample image set, wherein the first features at least comprise eyebrow region features and eye region features; performing principal component analysis on the plurality of first characteristics based on the principal component analysis submodel to obtain a plurality of second characteristics; and performing iterative training on the target classifier based on the plurality of second characteristics, and adjusting the model parameters of the target classifier to obtain an image classification model.
Optionally, acquiring a first set of sample images comprises: acquiring a plurality of face images; and for each face image, acquiring an artificial voting result aiming at the face head portrait, dividing the face image into a first sample image subset when the artificial voting result indicates that the face image is a normal face image of the cervical vertebra, and dividing the face image into a second sample image subset when the artificial voting result indicates that the face image is an abnormal face image of the cervical vertebra.
Optionally, extracting a plurality of first features in each image of the second sample image set comprises: for each image in the second sample image set, converting the image into a gray image based on preset three primary color weights; performing local binary pattern algorithm processing on the gray level image based on a preset unit size, and extracting a plurality of first features in the gray level image, wherein the plurality of first features comprise: a first number of eyebrow region features and a second number of eye region features.
Optionally, after performing principal component analysis on the plurality of first features based on the principal component analysis submodel to obtain a plurality of second features, the method further includes: performing T test based on the second features of the images in the first sample image subset and the second features of the images in the second sample image subset to obtain a P value of each second feature; and deleting the second characteristics when the P value of any second characteristic is larger than a preset threshold value.
Optionally, iteratively training the target classifier based on the second features, and adjusting the model parameters of the target classifier includes: sequentially inputting the plurality of second characteristics into a target classifier by using a cross validation method to obtain a plurality of prediction results; and calculating a plurality of prediction results from four dimensions of sensitivity, specificity, precision and Marx correlation coefficient respectively, and adjusting the Gamma value and the C value of the target classifier according to the calculation results.
According to another aspect of the embodiments of the present application, there is also provided an image classification apparatus including: the acquisition module is used for acquiring a face image to be classified; the extraction module is used for extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; the classification module is used for inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images.
According to another aspect of the embodiments of the present application, there is also provided a nonvolatile storage medium including a stored program, wherein an apparatus in which the nonvolatile storage medium is located executes the above-described image classification method by running the program.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory in which a computer program is stored, and a processor configured to execute the above-described image classification method by the computer program.
In the embodiment of the application, a face image to be classified is obtained; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: a face image with normal cervical vertebra, and a face image with abnormal cervical vertebra. The image classification model for detecting the cervical spondylosis is trained according to the face image, so that the cervical spondylosis can be accurately detected in real time and early-warning is timely performed, and the technical problem that the face image with the cervical spondylosis abnormal cannot be efficiently and accurately identified in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic flow chart diagram of an alternative image classification method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of an alternative eyebrow unevenness according to an embodiment of the application;
FIG. 3 is a schematic view of an alternative abnormal eyebrow fall-off according to an embodiment of the present application;
FIG. 4 is a schematic illustration of an alternative eyebrow growing pox according to embodiments of the application;
FIG. 5 is a schematic view of an alternative eyebrow drop according to an embodiment of the application;
FIG. 6a is a schematic view of an alternative embodiment of eyeball filament segmentation;
FIG. 6b is a schematic diagram of an alternative ocular filament corresponding condition according to an embodiment of the present application;
FIG. 7 is an evaluation index map of an alternative classifier according to embodiments of the present application
Fig. 8 is a schematic structural diagram of an alternative image classification device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Because the traditional Chinese medicine can not accurately detect the cervical spondylosis through a face image, the cervical vertebra state of people causes various diseases. Therefore, an image classification method is provided in the embodiments of the present application, and the image classification method will be described below with reference to specific embodiments.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
Fig. 1 is a schematic flowchart of an alternative image classification method according to an embodiment of the present application, and as shown in fig. 1, the method at least includes steps S102-S106, where:
and step S102, obtaining a face image to be classified.
Because no public database of visual images and videos of patients diagnosed with cervical spondylosis exists at present, in the embodiment of the application, videos can be recorded by recruiting volunteers, a video database for detecting problems of cervical spondylosis is established, and facial images to be classified are obtained from the video database.
And step S104, extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics.
According to the traditional Chinese medicine knowledge of cervical spondylosis, the cervical spondylosis is mainly caused by local arthralgia, namely pain is caused when the cervical spondylosis is passed, and pain is not caused when the cervical spondylosis is passed. Frequently, it is caused by trauma, qi deficiency, blood deficiency, and wind-cold and damp pathogen, so it is easy to cause dizziness, blurred vision, tinnitus, etc. Meanwhile, in the theory of traditional Chinese medicine, facial eyebrows and blood filaments of eyeball blood vessels of a person are closely related to the health of the spine, so that the target area features in the face image to be classified need to be extracted in the embodiment of the application.
The symptoms of the cervical vertebra state are generally classified into large eyebrow pores, uneven eyebrows, abnormal eyebrow fall, eyebrow pox, eyebrow droop, blood filament distribution and the like, so that the dialectical identification of the cervical vertebra state can be defined as follows:
because the eyebrow center is the pressure point of the seventh cervical vertebra, the blackheads and pimples of the eyebrow center are particularly thick, which may be because the cervical vertebra is uncomfortable or has high pressure;
FIG. 2 is a schematic diagram showing an alternative eyebrow height unevenness, which may be caused by various facial problems due to abnormal cervical vertebra flexion, and thus suddenly appear facial eyebrow height unevenness, nose bridge deflection, asymmetric eye ratio, uneven nostril size, and high and low mouth angle, thus illustrating the cervical vertebra possibly having problems;
FIG. 3 is a schematic diagram showing an alternative abnormal eyebrow fall, in which the cervical vertebrae may be affected once abnormal eyebrow fall, alopecia and other problems occur, because the deviated cervical vertebrae may press nerve roots, and the supply of the brain nervous system and the blood supply system is insufficient, so that the nutrition supplied to body hairs is blocked;
FIG. 4 is a schematic diagram showing an alternative eyebrow pox growing, in which the cervical vertebrae are in a fatigue state of bending forward for a long time due to incorrect sitting posture or the same sitting posture for a long time, and the back muscles of the neck are in a tonic state, so that the normal physiological curve of the cervical vertebrae is violated, and the cervical vertebrae fatigue is easily caused to be sick, and the eyebrow pox growing is caused;
FIG. 5 is a schematic view showing an alternative eyebrow drop which occurs due to inflammation, congestion, edema of soft tissues and blood supply insufficiency of the ear nerves and blood circulation disorder caused by imbalance of internal and external balance of cervical vertebrae;
the blood streak of the eyeball corresponds to the cervical spondylosis, and the blood streak of the eyeball and related spots are key information marks for observing the cervical spondylosis. Therefore, the characteristic rule of the blood streak is mastered, and the cervical vertebra disease condition can be detected.
Fig. 6a shows a schematic diagram of an alternative eyeball filament division, which can be obtained by fig. 6a, and the division manner of the eyeball and the corresponding organ tissues; fig. 6b shows a schematic diagram of an alternative eyeball blood streak corresponding disease, and the disease of organ tissues corresponding to different areas of the eyeball can be obtained through fig. 6 b.
For example, when blood filaments appear in the uppermost middle part of the eyeball and move vertically downward, it indicates that the 2 and 3 segments of the cervical vertebra have lesions, and when the brain area of the patient has recessive blood spots, it can be concluded that the cervical vertebra injury of the patient is caused by trauma; blood streak appears in the middle of the upper part of the eyeball, which is slightly left or slightly right by about one millimeter, and hypertrophy and hyperplasia exist in the same direction of the blood streak in the lower part of cervical spondylosis of a patient, which indicates that diseases exist in the lower parts of cervical vertebra 2 and 3; if the emphasis of the blood streak is deviated to the canthus in the same direction, it indicates that the patient is accompanied with discomfort of the shoulder except cervical spondylosis; if the color of the eyeball blood streak is dark and the eyeball blood streak reaches the outer edge of the eyeball, the cervical spondylosis of the patient is serious; if the blood filaments of the left and right cervical vertebrae are connected in the middle, the cervical spondylosis is more serious.
Step S106, inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images.
Wherein, the image classification model can be a two-classification model, and the image classification model includes: the method comprises the steps of presetting a number of principal component analysis submodels and target classifiers, wherein the target classifiers are support vector machines based on radial basis functions.
Specifically, a plurality of binary classification algorithms are adopted to solve the image classification problem, and the binary classification problem generally predicts the classification result through four indexes of sensitivity Sn, specificity Sp, precision Acc and massius MCC, and fig. 7 shows an evaluation index map of an optional classifier, wherein the classifier SVM-L and the classifier SVM-RBF are both support vector machines with linear and RBF kernels; k Nearest Neighbors (KNNs) were used to evaluate how to perform cervical spondylosis detection problems based on simple distances; decision trees (dtrees) are inherently of a nature that is easy to interpret; random forests (RForest) are more prone to better classification performance; the extreme gradient boost (XGBoost) algorithm is a recently developed epoch algorithm.
Through comparison of six different classifiers, the fact that the same support vector frame is shared by the classifier SVM-L and the classifier SVM-RBF is found, but the performance of the classifier SVM-L is much worse than that of the classifier SVM-RBF; the performance of the classifier XGboost is similar to that of the classifier SVM-RBF, the sensitivity Sn of the classifier XGboost is 99.11% best, but the specificity sp of the classifier XGboost is poorer than that of the classifier SVM-RBF. Therefore, the target classifier is selected to be based on the radial basis function, namely the classifier SVM-RBF in the embodiment of the application.
As an alternative embodiment, the training process of the image classification model can be divided into the following steps S1061-S1065, wherein:
step S1061, a first sample image set is obtained, wherein the first sample image set comprises a first sample image subset and a second sample image subset, images in the first sample image subset are face images with normal cervical vertebra, and images in the second sample image subset are face images with abnormal cervical vertebra.
Optionally, acquiring a plurality of face images; and for each face image, acquiring an artificial voting result aiming at the face portrait, dividing the face image into a first sample image subset when the artificial voting result indicates that the face image is a normal face image of the cervical vertebra, and dividing the face image into a second sample image subset when the artificial voting result indicates that the face image is an abnormal face image of the cervical vertebra.
Thus, the first sample image set S may be divided into the first sample image subsets (i.e., positive samples) by the above-described method) Expressed as: p = { P 1 ,P 2 ,P 3 ,...P n A second sample image subset (i.e. negative samples) is represented as: n = { N 1 ,N 2 ,N 3 ,...N m }。
For example, 7 male volunteers and 7 female volunteers were recruited, respectively, and detailed information of each volunteer includes sex, age, and whether or not glasses are worn. It should be noted that the video for detecting the cervical spondylosis problem is recorded on the premise that all volunteers do not have sleep disorders affecting the neurocognitive ability, and do not take food, beverages, medicines and the like affecting the neurocognitive system.
In the embodiment of the application, videos of volunteers in a non-cervical spondylosis state and a cervical spondylosis state are respectively shot, all the volunteers eat normally and have a complete rest in the first day, and the videos in the non-cervical spondylosis state are obtained by recording at 8 am in the second day in the state. The volunteers had no rest for 18 hours continuously, and recorded once in the next morning of the third day in the state of 3.
All the shot videos are shot by a CMOS 500 ten thousand pixel camera in a MacBook Pro (13 inch screen), the video resolution is 1280x720 pixels, the capture frequency is 30 frames per second, the recording time of each video is 5 minutes, and total 9000 (= 5x60x 30) images are obtained.
Since each volunteer recorded two videos in the non-cervical spondylosis state and the cervical spondylosis state, when 300 images were randomly extracted from each video, 8400 images were obtained in total and composed into the first sample image set S. Voting is carried out in a manual labeling mode, and most of the review principles mark each image as whether the cervical spondylosis is suffered or not after passing through, so that a first sample image subset (positive sample) P and a second sample image subset (negative sample) N are obtained, and the division of the first sample image set is completed.
Step S1062, performing preprocessing on each image in the first sample image set to obtain a second sample image set, where the preprocessing includes: and intercepting a target area in each image, wherein the target area at least comprises an eyebrow area and an eye area.
According to the definition of the traditional Chinese medicine theory on the dialectical identification of the cervical spondylosis, the state of the cervical spondylosis can be determined through the morphological modes of the blood streak of the eyeball and the eyebrow area. Therefore, each image in the first sample image set is preprocessed according to whether the image in the first sample image set contains the eyeball and the eyebrow region.
Step S1063, extracting a plurality of first features in each image in the second sample image set, where the first features at least include an eyebrow region feature and an eye region feature.
Optionally, for each image in the second sample image set, converting the image into a grayscale image based on preset three primary color weights; performing local binary pattern algorithm processing on the gray level image based on a preset unit size, and extracting a plurality of first features in the gray level image, wherein the plurality of first features comprise: a first number of eyebrow region features and a second number of eye region features.
For example, each color image in the second sample image set is first converted to a GrayScale image by gray scale = 0.299R + 0.587G + 0.114B, where R/G/B is the pixel value of the red/green/blue channel and may be provided as function imread () of the OpenCV library.
Further, since gamma correction of Y =2.2 is used to normalize the light change and MaxV is set to the maximum grayscale pixel value of the image matrix M after gamma correction, the final image matrix may be calculated as M' = M/(MaxV 255).
Next, the images of the eyeball blood streak and the eyebrow region are scaled to 320 × 320, 64 × 32, and 64 × 64, respectively, and then a plurality of first features in the grayscale image are extracted by using the DXHOSEYE (Local Binary Patterns) algorithm.
Because the local binary pattern algorithm has two values of Width and Height, the parameter unit size pCellSize can be adopted to represent Width x Height and is used for determining a proper parameter index to achieve the optimal classification accuracy, wherein the classifier SVM-RBF is fixed at 16 or 32 in Width, and the classifier SVM-RBF is optimal in performance when the Height is equal to 32; the Width is fixed to be 8, and the classification accuracy of the classifier SVM-RBF is improved by 1.01% when the height is equal to 32 compared with that when the height is equal to 64; when the Width is fixed to be 16 or 32, the classifier SVM-RBF performs best when the height is equal to 32; if the Width is fixed to 8, the classification accuracy of the classifier SVM-RBF is improved by 1.01% when height is equal to 32 compared with that when height is equal to 64. Therefore, the classifier SVM-RBF can achieve an optimal classification accuracy of 90.60% at pcelsize =32 x 32.
Thus, in the present embodiment, the parameter pcelsize of the local binary pattern algorithm is set to 32 × 32, so that an eye image may have 512 first features, and a mouth image may have 1024 first features, so that there are 2048 first features for each image.
Step S1064, performing principal component analysis on the plurality of first features based on the principal component analysis submodel to obtain a plurality of second features.
For example, for each image in the second sample image set, a PCA (i.e., principal component analysis) value of each first feature needs to be calculated, and the first 20 images with larger PCA values are taken as the second features.
Optionally, the features extracted by the local binary pattern algorithm do not have the discrimination capability of detecting a cervical spondylosis sample, and therefore, in the embodiment of the present application, after the principal component analysis submodel performs principal component analysis on the plurality of first features to obtain a plurality of second features, a T test may be performed based on the second features of the images in the first sample image subset and the second features of the images in the second sample image subset to obtain a P value of each second feature; and when the P value of any second feature is larger than a preset threshold value, the second features do not have the detection capability, and the second features are deleted.
Step S1065, performing iterative training on the target classifier based on the plurality of second features, and adjusting model parameters of the target classifier to obtain an image classification model.
Further, a plurality of second characteristics are sequentially input into the target classifier by using a cross validation method to obtain a plurality of prediction results; and calculating a plurality of prediction results from four dimensions of sensitivity, specificity, precision and a Mazis correlation coefficient respectively, and adjusting the Gamma value and the C value of the target classifier according to the calculation results.
For example, a 10-fold cross validation algorithm is adopted, the plurality of second features are sequentially input into a classifier SVM-RBF to obtain a plurality of prediction results, and then the multi-prediction results are further calculated from four dimensions such as sensitivity Sn, specificity Sp, precision Acc and Marx MCC respectively, so that model parameters of a target classifier are adjusted, and an image classification model with more accurate classification results is obtained.
In the embodiment of the application, a face image to be classified is obtained; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images. The image classification model for detecting the cervical spondylosis is trained according to the face image, so that the cervical spondylosis can be accurately detected in real time and early-warning is timely performed, and the technical problem that the face image with the cervical spondylosis abnormal cannot be efficiently and accurately identified in the related technology is solved.
Example 2
According to an embodiment of the present application, there is also provided an image classification apparatus for implementing the image classification method in embodiment 1, as shown in fig. 8, the image classification apparatus at least includes an obtaining module 81, an extracting module 82, and a classifying module 83, where:
and the obtaining module 81 is used for obtaining the face image to be classified.
Because there is no public database of visual images and videos of patients diagnosed with cervical spondylosis at present, in the embodiment of the present application, the obtaining module 81 may record videos by recruiting volunteers, establish a video database for detecting problems of cervical spondylosis, and obtain facial images to be classified from the video database.
And the extraction module 82 is configured to extract target region features in the face image to be classified, where the target region features at least include eyebrow region features and eye region features.
According to the traditional Chinese medicine knowledge of cervical spondylosis, the cervical spondylosis is mainly caused by local arthralgia, namely pain is caused when the cervical spondylosis is passed, and pain is not caused when the cervical spondylosis is passed. It is usually caused by trauma, qi deficiency, blood deficiency, and wind-cold and damp pathogen, so as to cause dizziness, blurred vision, tinnitus, etc. Meanwhile, in the theory of traditional Chinese medicine, facial eyebrows and blood filaments of eyeball blood vessels of a person are closely related to the health of the spine. Therefore, in the embodiment of the present application, the target region features in the face image to be classified are extracted by the extraction module 82.
Wherein, the image classification model is two classification models, and the image classification model includes: the method comprises the steps of presetting a number of principal component analysis submodels and target classifiers, wherein the target classifiers are support vector machines based on radial basis functions.
The classification module 83 is configured to input the target region features into a pre-trained image classification model to obtain an image classification result output by the image classification model, where the image classification model is configured to perform principal component analysis on the target region features and determine, based on an analysis result, an image type of a face image to be classified, where the image type includes one of: normal cervical vertebra face images and abnormal cervical vertebra face images.
As an alternative embodiment, the training of the image classification model may be accomplished by steps S1-S5:
step S1, a first sample image set is obtained, wherein the first sample image set comprises a first sample image subset and a second sample image subset, images in the first sample image subset are all face images with normal cervical vertebra, and images in the second sample image subset are all face images with abnormal cervical vertebra.
Specifically, the first sample image set may be acquired as follows: firstly, acquiring a plurality of face images; and then acquiring an artificial voting result aiming at the face image for each face image, dividing the face image into a first sample image subset when the artificial voting result indicates that the face image is a normal face image of the cervical vertebra, and dividing the face image into a second sample image subset when the artificial voting result indicates that the face image is an abnormal face image of the cervical vertebra.
Step S2, preprocessing each image in the first sample image set to obtain a second sample image set, wherein the preprocessing comprises the following steps: and intercepting a target area in each image, wherein the target area at least comprises an eyebrow area and an eye area.
And S3, extracting a plurality of first features in each image in the second sample image set, wherein the first features at least comprise eyebrow region features and eye region features.
Specifically, the plurality of first features may be extracted by: for each image in the second sample image set, converting the image into a gray image based on preset three primary color weights; performing local binary pattern algorithm processing on the gray image based on a preset unit size, and extracting a plurality of first features in the gray image, wherein the plurality of first features comprise: a first number of eyebrow region features and a second number of eye region features.
And S4, performing principal component analysis on the plurality of first characteristics based on the principal component analysis submodel to obtain a plurality of second characteristics.
Optionally, after performing principal component analysis on the plurality of first features based on the principal component analysis submodel to obtain a plurality of second features, a T test may be performed based on the second features of the images in the first sample image subset and the second features of the images in the second sample image subset to obtain a P value of each second feature; and deleting the second characteristics when the P value of any second characteristic is larger than a preset threshold value.
And S5, performing iterative training on the target classifier based on the plurality of second features, and adjusting model parameters of the target classifier to obtain an image classification model.
Further, iteratively training the target classifier based on the plurality of second features, and adjusting the model parameters of the target classifier, including: sequentially inputting the plurality of second characteristics into a target classifier by using a cross validation method to obtain a plurality of prediction results; and calculating a plurality of prediction results from four dimensions of the sensitivity Sn, the specificity Sp, the precision Acc and the Mazis MCC respectively, and adjusting the Gamma value and the C value of the target classifier according to the calculation results.
It should be noted that, modules in the image classification apparatus in the embodiment of the present application correspond to implementation steps of the image classification method in embodiment 1 one to one, and because the detailed description is already performed in embodiment 1, details that are not partially embodied in this embodiment may refer to embodiment 1, and are not described here again.
Example 3
According to an embodiment of the present application, there is also provided a nonvolatile storage medium including a stored program, wherein a device in which the nonvolatile storage medium is located executes the image classification method in embodiment 1 by running the program.
Specifically, the device in which the nonvolatile storage medium is located executes the following steps by running the program: acquiring a face image to be classified; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images.
According to an embodiment of the present application, there is also provided a processor configured to execute a program, where the program executes to perform the image classification method in embodiment 1.
Specifically, the program executes the following steps when running: acquiring a face image to be classified; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images.
According to an embodiment of the present application, there is also provided an electronic device including: a memory in which a computer program is stored, and a processor configured to execute the image classification method in embodiment 1 by the computer program.
In particular, the processor is configured to implement the following steps by computer program execution: acquiring a face image to be classified; extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics; inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: a face image with normal cervical vertebra, and a face image with abnormal cervical vertebra.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit may be a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, or portions or all or portions of the technical solutions that contribute to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. An image classification method, comprising:
acquiring a face image to be classified;
extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics;
inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: normal cervical vertebra face images and abnormal cervical vertebra face images.
2. The method of claim 1, wherein the image classification model is a binary classification model, the image classification model comprising: the method comprises the steps of presetting a number of principal component analysis submodels and target classifiers, wherein the target classifiers are support vector machines based on radial basis functions.
3. The method of claim 2, wherein the training of the image classification model comprises:
acquiring a first sample image set, wherein the first sample image set comprises a first sample image subset and a second sample image subset, images in the first sample image subset are all face images with normal cervical vertebra, and images in the second sample image subset are all face images with abnormal cervical vertebra;
preprocessing each image in the first sample image set to obtain a second sample image set, wherein the preprocessing comprises: intercepting a target area in each image, wherein the target area at least comprises an eyebrow area and an eye area;
extracting a plurality of first features in each image in the second sample image set, wherein the first features at least comprise eyebrow region features and eye region features;
performing principal component analysis on the plurality of first characteristics based on the principal component analysis submodel to obtain a plurality of second characteristics;
and performing iterative training on the target classifier based on the plurality of second characteristics, and adjusting the model parameters of the target classifier to obtain an image classification model.
4. The method of claim 3, wherein obtaining a first set of sample images comprises:
acquiring a plurality of face images;
and for each face image, acquiring an artificial voting result aiming at the face portrait, dividing the face image into a first sample image subset when the artificial voting result indicates that the face image is a normal face image of the cervical vertebra, and dividing the face image into a second sample image subset when the artificial voting result indicates that the face image is an abnormal face image of the cervical vertebra.
5. The method of claim 3, wherein extracting a plurality of first features in each image of the second set of sample images comprises:
for each image in the second sample image set, converting the image into a gray image based on preset three primary color weights;
performing local binary pattern algorithm processing on the gray level image based on a preset unit size, and extracting a plurality of first features in the gray level image, wherein the plurality of first features comprise: a first number of eyebrow region features and a second number of eye region features.
6. The method of claim 3, wherein after principal component analyzing the plurality of first features based on the principal component analysis submodel to obtain a plurality of second features, the method further comprises:
performing T test based on the second features of the images in the first sample image subset and the second features of the images in the second sample image subset to obtain a P value of each second feature;
and deleting the second characteristics when the P value of any second characteristic is larger than a preset threshold value.
7. The method of claim 3, wherein iteratively training the target classifier based on the second plurality of features, adjusting model parameters of the target classifier comprises:
sequentially inputting the plurality of second characteristics into a target classifier by using a cross validation method to obtain a plurality of prediction results;
and calculating a plurality of prediction results from four dimensions of sensitivity, specificity, precision and a Mazis correlation coefficient respectively, and adjusting the Gamma value and the C value of the target classifier according to the calculation results.
8. An image classification apparatus, comprising:
the acquisition module is used for acquiring a face image to be classified;
the extraction module is used for extracting target region characteristics in the face image to be classified, wherein the target region characteristics at least comprise eyebrow region characteristics and eye region characteristics;
the classification module is used for inputting the target region characteristics into a pre-trained image classification model to obtain an image classification result output by the image classification model, wherein the image classification model is used for performing principal component analysis on the target region characteristics and determining the image type of the face image to be classified based on the analysis result, and the image type comprises one of the following types: a face image with normal cervical vertebra, and a face image with abnormal cervical vertebra.
9. A non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the non-volatile storage medium is provided in a device which executes the program to perform the image classification method of any one of claims 1 to 7.
10. An electronic device, comprising: a memory in which a computer program is stored, and a processor configured to execute the image classification method of any one of claims 1 to 7 by the computer program.
CN202211521143.8A 2022-11-30 2022-11-30 Image classification method and device Pending CN115713800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211521143.8A CN115713800A (en) 2022-11-30 2022-11-30 Image classification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211521143.8A CN115713800A (en) 2022-11-30 2022-11-30 Image classification method and device

Publications (1)

Publication Number Publication Date
CN115713800A true CN115713800A (en) 2023-02-24

Family

ID=85235524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211521143.8A Pending CN115713800A (en) 2022-11-30 2022-11-30 Image classification method and device

Country Status (1)

Country Link
CN (1) CN115713800A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117315357A (en) * 2023-09-27 2023-12-29 广东省新黄埔中医药联合创新研究院 Image recognition method and related device based on traditional Chinese medicine deficiency-excess syndrome differentiation classification

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117315357A (en) * 2023-09-27 2023-12-29 广东省新黄埔中医药联合创新研究院 Image recognition method and related device based on traditional Chinese medicine deficiency-excess syndrome differentiation classification
CN117315357B (en) * 2023-09-27 2024-04-30 广东省新黄埔中医药联合创新研究院 Image recognition method and related device based on traditional Chinese medicine deficiency-excess syndrome differentiation classification

Similar Documents

Publication Publication Date Title
Singh et al. Image processing based automatic diagnosis of glaucoma using wavelet features of segmented optic disc from fundus image
Gao et al. Automatic feature learning to grade nuclear cataracts based on deep learning
Kauppi et al. The diaretdb1 diabetic retinopathy database and evaluation protocol.
EP3659067B1 (en) Method of modifying a retina fundus image for a deep learning model
US9462945B1 (en) System and methods for automatic processing of digital retinal images in conjunction with an imaging device
CN106682389B (en) A kind of Eye disease for monitoring hypertension initiation is health management system arranged
CN111933275B (en) Depression evaluation system based on eye movement and facial expression
CN105559802A (en) Tristimania diagnosis system and method based on attention and emotion information fusion
CN112101424B (en) Method, device and equipment for generating retinopathy identification model
CN113768461B (en) Fundus image analysis method, fundus image analysis system and electronic equipment
CN115713800A (en) Image classification method and device
Tomeo-Reyes et al. Investigating the impact of drug induced pupil dilation on automated iris recognition
CN116433644A (en) Eye image dynamic diagnosis method based on recognition model
Giancardo Automated fundus images analysis techniques to screen retinal diseases in diabetic patients
CN113033387A (en) Intelligent assessment method and system for automatically identifying chronic pain degree of old people
CN110164547A (en) A kind of Chinese medicine facial diagnosis system based on human face region and tongue fur
CN110287795A (en) A kind of eye age detection method based on image analysis
CN116091449A (en) Retina OCT (optical coherence tomography) image lesion classification method based on unsupervised heterogeneous distillation framework
CN112991289B (en) Processing method and device for standard section of image
Yudhana et al. Glucose Content Analysis using Image Processing and Machine Learning Techniques
Che et al. Invariance analysis of saliency models versus human gaze during scene free viewing
CN114693587A (en) Quality control method and quality control system for data annotation of fundus images
CN112329640A (en) Facial nerve palsy disease rehabilitation detection system based on eye muscle movement analysis
Colak et al. Eyematch: An Eye Localization Method For Frontal Face Images
Kaya et al. Performances of cnn architectures on diabetic retinopathy detection using transfer learning

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