CN111091160A - Image classification method - Google Patents

Image classification method Download PDF

Info

Publication number
CN111091160A
CN111091160A CN201911376892.4A CN201911376892A CN111091160A CN 111091160 A CN111091160 A CN 111091160A CN 201911376892 A CN201911376892 A CN 201911376892A CN 111091160 A CN111091160 A CN 111091160A
Authority
CN
China
Prior art keywords
visibility
image
prediction algorithm
algorithm
key point
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.)
Granted
Application number
CN201911376892.4A
Other languages
Chinese (zh)
Other versions
CN111091160B (en
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 Milaiwu Network Technology Co ltd
Original Assignee
Beijing Milaiwu Network 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 Milaiwu Network Technology Co ltd filed Critical Beijing Milaiwu Network Technology Co ltd
Priority to CN201911376892.4A priority Critical patent/CN111091160B/en
Publication of CN111091160A publication Critical patent/CN111091160A/en
Application granted granted Critical
Publication of CN111091160B publication Critical patent/CN111091160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an image classification method, which comprises the following steps: marking the position and visibility of a preset key point of a training image; determining a key point position prediction algorithm according to the position of a preset key point; determining a visibility prediction algorithm according to the visibility of the key points; acquiring global features of an image to be classified; predicting the position of a preset key point of the image to be classified according to a key point position prediction algorithm; predicting the visibility of preset key points of the image to be classified according to a visibility prediction algorithm; extracting local features according to the position and visibility of a preset key point; and predicting a corresponding classification result according to the result of splicing the global features and the local features. The image classification method can classify the pictures according to the overall impression of the people in the pictures.

Description

Image classification method
Technical Field
The embodiment of the invention relates to the technical field of image classification, in particular to an image classification method.
Background
Image classification is an image processing method for distinguishing objects of different categories from each other based on different characteristics each reflected in image information. It uses computer to make quantitative analysis of image, and classifies the whole image into one of several categories to replace human visual interpretation.
The existing image classification can be realized by a neural network, but the method may use a background region in the picture as main distinguishing information, so that the accuracy is reduced. Or the method is realized through the geometric characteristics of the human face, but the method mainly aims at the color value and does not consider the integral senses such as the clothing style, the quality characteristics and the like; and based on the difference of picture shooting angles, human postures and the like, the characteristics of large calculation amount and manual design need to be introduced.
Disclosure of Invention
The embodiment of the invention aims to provide an image classification method which can classify pictures according to the overall impression of people in the pictures.
To achieve the purpose, the embodiment of the invention adopts the following technical scheme:
the embodiment of the invention provides an image classification method, which comprises the following steps:
marking the position and visibility of a preset key point of a training image;
determining a key point position prediction algorithm according to the position of a preset key point;
determining a visibility prediction algorithm according to the visibility of the key points;
acquiring global features of an image to be classified;
predicting the position of the preset key point of the image to be classified according to the key point position prediction algorithm;
predicting the visibility of the preset key points of the image to be classified according to a visibility prediction algorithm;
extracting local features according to the position and the visibility of the preset key points;
and predicting a corresponding classification result according to the result of splicing the global feature and the local feature.
Further, before determining the key point position prediction algorithm according to the position of the preset key point corresponding to the mark, the method further includes:
marking the class to which the training image belongs;
determining an image classification algorithm according to the category and the similarity of the training images;
correspondingly, predicting the corresponding classification result according to the result obtained by splicing the global feature and the local feature comprises the following steps:
and predicting a corresponding classification result according to the result of splicing the global feature and the local feature and the image classification algorithm.
Further, before obtaining the global features of the image to be classified, the method further includes:
and processing the images to be classified through a full convolution network algorithm.
Further, the preset key points include the center of the line connecting the two eyes, the left shoulder, the right shoulder and the center of the chest of the person in the image.
Further, predicting a corresponding classification result according to the result of the global feature and the local feature after the global feature and the local feature are spliced and the image classification algorithm, and then:
if the position of the preset key point of the image to be classified and the training loss of the visibility are obtained, increasing a coefficient to train the key point position prediction algorithm and the visibility prediction algorithm in the first step, and reducing or keeping the coefficient to train the image classification algorithm;
secondly, increasing coefficients to train the image classification algorithm, and reducing or keeping the coefficients unchanged to train the key point position prediction algorithm and the visibility prediction algorithm;
the first step and the second step may be alternately repeated.
Further, predicting a corresponding classification result according to the result of the global feature and the local feature after the global feature and the local feature are spliced and the image classification algorithm, and then:
if the position of the preset key point of the image to be classified and the training loss of the visibility are obtained, increasing the types of the loss to train the key point position prediction algorithm, the visibility prediction algorithm and the image classification algorithm;
or reducing the loss category to train the keypoint location prediction algorithm, the visibility prediction algorithm and the image classification algorithm;
or changing the loss category to train the keypoint location prediction algorithm, the visibility prediction algorithm and the image classification algorithm.
Further, the determining a key point position prediction algorithm according to the position of the preset key point corresponding mark comprises:
and determining a key point position prediction algorithm through a mean square error loss function according to the positions of the preset key point corresponding marks.
Further, determining a visibility prediction algorithm according to the visibility of the key point includes:
and determining a visibility prediction algorithm through a cross entropy loss function according to the visibility of the key points.
Further, the global feature and the local feature stitching includes:
converting the global features and the local features into one-dimensional data respectively;
and directly splicing the one-dimensional data.
The embodiment of the invention has the beneficial effects that:
according to the embodiment of the invention, the prediction algorithm is obtained by directly regressing the positions of the key points, local features are extracted in a certain range of the predicted positions of the key points, the local features comprise clothing style and gas quality features, and are combined with the global features of the whole image for classification, so that the classification accuracy can be improved, and the calculation cost can be reduced.
Drawings
Fig. 1 is a flowchart illustrating an image classification method according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating an image classification method according to a second embodiment of the present invention.
Detailed Description
In order to make the technical problems solved, technical solutions adopted and technical effects achieved by the present invention clearer, the technical solutions of the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments.
Example one
The embodiment provides an image classification method, which increases the clothing style, takes the gas characteristics as consideration factors, improves the classification accuracy, and takes the characteristics of key points as a judgment basis so as to reduce the calculation amount and reduce the calculation cost.
Fig. 1 is a flowchart illustrating an image classification method according to an embodiment of the present invention. As shown in fig. 1, the image classification method includes the steps of:
and S11, marking the position and the visibility of the preset key point of the training image.
Specifically, the person in the training image includes at least a body above the abdomen.
In this embodiment, the preset key points include the center of the line connecting the two eyes, the left shoulder, the right shoulder and the center of the chest of the person in the image. These pre-set keypoints are labeled in the training image. The visibility is marked according to whether the preset key points are occluded or not.
And S12, determining a key point position prediction algorithm according to the position of the preset key point.
Specifically, a key point position prediction algorithm is determined through a mean square error loss function according to the position of a preset key point corresponding mark.
S13, determining a visibility prediction algorithm according to the visibility of the key points.
Specifically, a visibility prediction algorithm is determined by a cross entropy loss function according to the visibility of the key points.
And S14, processing the image to be classified through a full convolution network algorithm. The processed feature map is provided for extracting global features, local features and predicting the positions and visibility of key points, and the feature extraction from the original image is avoided, so that the calculation amount is reduced.
And S15, acquiring the global features of the image to be classified. And acquiring the global features of the image from the image processed by the full convolution network algorithm, and using the global features as the basis of input data of subsequent image classification.
S16, predicting the position of the preset key point of the image to be classified according to the key point position prediction algorithm. The center of the line of the two eyes, the center of the left shoulder, the center of the right shoulder and the center of the chest of the person in the image to be classified can be positioned through the key point position prediction algorithm and used as a precondition for subsequently extracting local features.
S17, predicting the visibility of the preset key points of the image to be classified according to a visibility prediction algorithm. After the positions of the center of the line of the two eyes, the left shoulder, the right shoulder and the center of the chest in the image to be classified are predicted, whether the key points are shielded or not is predicted through a visibility prediction algorithm. Increasing visibility as a consideration can improve the accuracy of classification.
And S18, extracting local features according to the positions and the visibility of the preset key points. And acquiring local features of the image according to the position and the visibility of the preset key point in the feature map processed by the full convolution network algorithm, wherein the local features comprise clothing style factors and gas quality feature factors.
And S19, predicting a corresponding classification result according to the result of splicing the global feature and the local feature.
Specifically, the global features and the local features are respectively converted into one-dimensional data, and then the one-dimensional data are directly spliced to be used as input of classification.
According to the embodiment, the prediction algorithm is obtained by directly regressing the positions of the key points, local features are extracted in a certain range of the predicted positions of the key points, the local features comprise clothing styles and gas quality features, and are combined with the global features of the whole image for classification, so that the classification accuracy can be improved, and the calculation cost can be reduced.
Example two
In this embodiment, based on the above embodiments, the classification method and the method for processing prediction loss are refined, and fig. 2 is a schematic flow chart of the image classification method according to the second embodiment of the present invention. As shown in fig. 2, the image classification method includes the steps of:
and S21, marking the position and the visibility of the preset key point of the training image.
Specifically, the person in the training image includes at least a body above the abdomen. Different key points use different labels, and whether they are visible or not, also use different labels. Each label is different.
And S22, determining a key point position prediction algorithm according to the position of the preset key point.
S23, determining a visibility prediction algorithm according to the visibility of the key points.
In other embodiments, other functions may be selected to determine the keypoint location prediction algorithm and the visibility prediction algorithm depending on the particular use case.
S24, marking the category to which the training image belongs;
and classifying the images by manually marking labels according to actual requirements, wherein each label has a corresponding category and has corresponding global features and local features.
And S25, determining an image classification algorithm according to the category and the similarity of the training images.
And combining the categories, extracting the local features of the unclassified image and the local features of the labeled image to compare to obtain local similarity, extracting the unclassified global features and the global features of the labeled image to compare to obtain global similarity, and determining the image classification algorithm through the final similarity obtained by weighted summation of the local similarity and the global similarity. Further, the similarity solution is realized by a similarity calculation function.
And S26, processing the image to be classified through a full convolution network algorithm.
And S27, acquiring the global features of the image to be classified.
S28, predicting the position of the preset key point of the image to be classified according to the key point position prediction algorithm.
S29, predicting the visibility of the preset key points of the image to be classified according to a visibility prediction algorithm.
And S30, extracting local features according to the positions and the visibility of the preset key points.
And S31, predicting a corresponding classification result according to the result of splicing the global feature and the local feature.
Specifically, the corresponding classification result is predicted according to the result of splicing the global feature and the local feature and the image classification algorithm.
In this embodiment, if the position of the preset keypoint of the image to be classified and the training loss of visibility are obtained, the first step is to increase the coefficient to train the keypoint position prediction algorithm and the visibility prediction algorithm, and to reduce or not change the coefficient to train the image classification algorithm;
secondly, increasing coefficients to train the image classification algorithm, and reducing or keeping the coefficients unchanged to train the key point position prediction algorithm and the visibility prediction algorithm;
the first step and the second step may be alternately repeated.
In other embodiments, the position prediction algorithm, the visibility prediction algorithm and the image classification algorithm of the key point can be trained by increasing the types of loss if the training loss of the position and the visibility of the preset key point of the image to be classified is obtained; or reducing the loss category to train the key point position prediction algorithm, the visibility prediction algorithm and the image classification algorithm; or changing the loss category to train the key point position prediction algorithm, the visibility prediction algorithm and the image classification algorithm.
And respectively iterating the trained keypoint position prediction algorithm, the trained visibility prediction algorithm and the trained image classification algorithm to the steps S28, S29 and S31 for prediction.
According to the method and the device, local features are extracted at the position of a predicted key point and the visibility, and after the classification is carried out by combining global features, the loss of the whole network is reduced by acquiring and processing the prediction loss, so that the accuracy of prediction is further improved.
The technical principle of the present invention is described above in connection with specific embodiments. The description is made for the purpose of illustrating the principles of the invention and should not be construed in any way as limiting the scope of the invention. Based on the explanations herein, those skilled in the art will be able to conceive of other embodiments of the present invention without inventive effort, which would fall within the scope of the present invention.

Claims (9)

1. An image classification method, comprising:
marking the position and visibility of a preset key point of a training image;
determining a key point position prediction algorithm according to the position of a preset key point;
determining a visibility prediction algorithm according to the visibility of the key points;
acquiring global features of an image to be classified;
predicting the position of the preset key point of the image to be classified according to the key point position prediction algorithm;
predicting the visibility of the preset key points of the image to be classified according to a visibility prediction algorithm;
extracting local features according to the position and the visibility of the preset key points;
and predicting a corresponding classification result according to the result of splicing the global feature and the local feature.
2. The image classification method according to claim 1, wherein the determining the keypoint location prediction algorithm according to the locations of the preset keypoint correspondence markers further comprises:
marking the class to which the training image belongs;
determining an image classification algorithm according to the category and the similarity of the training images;
correspondingly, predicting the corresponding classification result according to the result obtained by splicing the global feature and the local feature comprises the following steps:
and predicting a corresponding classification result according to the result of splicing the global feature and the local feature and the image classification algorithm.
3. The image classification method according to claim 1, wherein obtaining the global features of the image to be classified further comprises:
and processing the images to be classified through a full convolution network algorithm.
4. The image classification method according to claim 1, wherein the preset key points include a center of a line connecting both eyes, a left shoulder, a right shoulder and a center of a chest of a person in the image.
5. The image classification method according to claim 2, wherein the predicting a corresponding classification result according to the result of the global feature and the local feature splicing and the image classification algorithm further comprises:
if the position of the preset key point of the image to be classified and the training loss of the visibility are obtained, increasing a coefficient to train the key point position prediction algorithm and the visibility prediction algorithm in the first step, and reducing or keeping the coefficient to train the image classification algorithm;
secondly, increasing coefficients to train the image classification algorithm, and reducing or keeping the coefficients unchanged to train the key point position prediction algorithm and the visibility prediction algorithm;
the first step and the second step may be alternately repeated.
6. The image classification method according to claim 2, wherein the predicting a corresponding classification result according to the result of the global feature and the local feature splicing and the image classification algorithm further comprises:
if the position of the preset key point of the image to be classified and the training loss of the visibility are obtained, increasing the types of the loss to train the key point position prediction algorithm, the visibility prediction algorithm and the image classification algorithm;
or reducing the loss category to train the keypoint location prediction algorithm, the visibility prediction algorithm and the image classification algorithm;
or changing the loss category to train the keypoint location prediction algorithm, the visibility prediction algorithm and the image classification algorithm.
7. The image classification method according to claim 1, wherein determining a keypoint location prediction algorithm from the locations of the preset keypoint correspondence markers comprises:
and determining a key point position [ ] position prediction algorithm through a mean square error loss function according to the positions of the preset key point corresponding marks.
8. The image classification method according to claim 1, wherein determining a visibility prediction algorithm based on the visibility of the keypoints comprises:
and determining a visibility prediction algorithm through a cross entropy loss function according to the visibility of the key points.
9. The image classification method according to claim 1, wherein the global feature and the local feature stitching includes:
converting the global features and the local features into one-dimensional data respectively;
and directly splicing the one-dimensional data.
CN201911376892.4A 2019-12-27 2019-12-27 Image classification method Active CN111091160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911376892.4A CN111091160B (en) 2019-12-27 2019-12-27 Image classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911376892.4A CN111091160B (en) 2019-12-27 2019-12-27 Image classification method

Publications (2)

Publication Number Publication Date
CN111091160A true CN111091160A (en) 2020-05-01
CN111091160B CN111091160B (en) 2024-05-03

Family

ID=70398147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911376892.4A Active CN111091160B (en) 2019-12-27 2019-12-27 Image classification method

Country Status (1)

Country Link
CN (1) CN111091160B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494730A (en) * 2022-04-15 2022-05-13 深圳安牌信息技术有限公司 Trademark automatic classification processing system based on image recognition

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2154631A2 (en) * 2008-08-14 2010-02-17 Xerox Corporation System and method for object class localization and semantic class based image segmentation
CN108229353A (en) * 2017-12-21 2018-06-29 深圳市商汤科技有限公司 Sorting technique and device, electronic equipment, storage medium, the program of human body image
CN108304847A (en) * 2017-11-30 2018-07-20 腾讯科技(深圳)有限公司 Image classification method and device, personalized recommendation method and device
CN109325952A (en) * 2018-09-17 2019-02-12 上海宝尊电子商务有限公司 Fashion clothing image partition method based on deep learning
CN109344841A (en) * 2018-08-10 2019-02-15 北京华捷艾米科技有限公司 A kind of clothes recognition methods and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2154631A2 (en) * 2008-08-14 2010-02-17 Xerox Corporation System and method for object class localization and semantic class based image segmentation
CN108304847A (en) * 2017-11-30 2018-07-20 腾讯科技(深圳)有限公司 Image classification method and device, personalized recommendation method and device
CN108229353A (en) * 2017-12-21 2018-06-29 深圳市商汤科技有限公司 Sorting technique and device, electronic equipment, storage medium, the program of human body image
CN109344841A (en) * 2018-08-10 2019-02-15 北京华捷艾米科技有限公司 A kind of clothes recognition methods and device
CN109325952A (en) * 2018-09-17 2019-02-12 上海宝尊电子商务有限公司 Fashion clothing image partition method based on deep learning

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494730A (en) * 2022-04-15 2022-05-13 深圳安牌信息技术有限公司 Trademark automatic classification processing system based on image recognition

Also Published As

Publication number Publication date
CN111091160B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN110298291B (en) Mask-RCNN-based cow face and cow face key point detection method
CN106570486B (en) Filtered target tracking is closed based on the nuclear phase of Fusion Features and Bayes's classification
CN109325952B (en) Fashionable garment image segmentation method based on deep learning
CN108629306B (en) Human body posture recognition method and device, electronic equipment and storage medium
KR100974293B1 (en) METHOD AND SYSTEM FOR AUTOMATED FACE DETECTION and Recognition
CN110532970B (en) Age and gender attribute analysis method, system, equipment and medium for 2D images of human faces
US10769499B2 (en) Method and apparatus for training face recognition model
CN103902962B (en) One kind is blocked or the adaptive face identification method of light source and device
CN111695392B (en) Face recognition method and system based on cascade deep convolutional neural network
CN111126240B (en) Three-channel feature fusion face recognition method
CN105894655B (en) Paper currency detection and recognition methods under complex environment based on RGB-D cameras
KR101835333B1 (en) Method for providing face recognition service in order to find out aging point
CN108898125A (en) One kind being based on embedded human face identification and management system
CN106485253B (en) A kind of pedestrian of maximum particle size structured descriptor discrimination method again
CN109711309B (en) Method for automatically identifying whether portrait picture is eye-closed
US20230041943A1 (en) Method for automatically producing map data, and related apparatus
CN101996308A (en) Human face identification method and system and human face model training method and system
CN112732071A (en) Calibration-free eye movement tracking system and application
CN112036284B (en) Image processing method, device, equipment and storage medium
CN111275058A (en) Safety helmet wearing and color identification method and device based on pedestrian re-identification
CN111091160B (en) Image classification method
CN117496532A (en) Intelligent recognition tool based on 0CR
CN110910497B (en) Method and system for realizing augmented reality map
CN111753618A (en) Image recognition method and device, computer equipment and computer readable storage medium
CN107220612B (en) Fuzzy face discrimination method taking high-frequency analysis of local neighborhood of key points as core

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
GR01 Patent grant
GR01 Patent grant