CN110211094A - Black eye intelligent determination method, device and computer readable storage medium - Google Patents

Black eye intelligent determination method, device and computer readable storage medium Download PDF

Info

Publication number
CN110211094A
CN110211094A CN201910370457.4A CN201910370457A CN110211094A CN 110211094 A CN110211094 A CN 110211094A CN 201910370457 A CN201910370457 A CN 201910370457A CN 110211094 A CN110211094 A CN 110211094A
Authority
CN
China
Prior art keywords
sample collection
black eye
negative sample
data
gradient
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
CN201910370457.4A
Other languages
Chinese (zh)
Other versions
CN110211094B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910370457.4A priority Critical patent/CN110211094B/en
Publication of CN110211094A publication Critical patent/CN110211094A/en
Application granted granted Critical
Publication of CN110211094B publication Critical patent/CN110211094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Radiology & Medical Imaging (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to a kind of artificial intelligence technologys, disclose a kind of black eye intelligent determination method, it include: reception face image set, the face image set is divided into positive sample collection and negative sample collection by tally set, after carrying out pretreatment operation to the positive sample collection and the negative sample collection, the tally set is input to black eye judgment models, the black eye judgment models are input to after the data of the positive sample collection and negative sample collection are carried out the operation of direction gradient histogram, the black eye judgment models are trained based on algorithm of support vector machine, training is exited when the loss function value in the algorithm of support vector machine is less than threshold value;Test set to the black eye judgment models for receiving user judge whether there is black eye, and export result.The present invention also proposes a kind of black eye intelligent judging device and a kind of computer readable storage medium.Accurately black eye intelligent judgment function may be implemented in the present invention.

Description

Black eye intelligent determination method, device and computer readable storage medium
Technical field
The present invention relates to automated intelligents after field of artificial intelligence more particularly to a kind of input based on human face data Judge black eye method, apparatus and computer readable storage medium.
Background technique
Black eye is due to staying up late, and mood swing is big, and asthenopia, aging lead to eye part skin vascular flow speed excessively It is slowly formed viscous flow, tissue is for hypoxgia, and metabolic waste accumulation is excessive in blood vessel, causes eye pigmentation.Age is bigger People, the subcutaneous fat around eyes becomes thinner, so black eye just becomes apparent from.It is black with the presence of many people in today's society Eyelet is without knowing, it is therefore desirable to judge with the presence or absence of black eye, however, also depositing for black-eyed accurately identify There are many problems, if application scenarios majority is more complicated, target shadow caused by the variation of the local dynamic station of background, uneven illumination Etc. difficulty can be increased to identification, in addition, face is non-rigid targets, possess posture feature abundant, locating for same face Different postures, often difference is very big in detection and identification.
Summary of the invention
The present invention provides a kind of black eye intelligent determination method, device and computer readable storage medium, main purpose It is to provide a kind of scheme for realizing accurately black eye intelligent judgment function.
To achieve the above object, a kind of black eye intelligent determination method provided by the invention, comprising:
Data receiver layer receive face image set, the face image set by tally set be divided into positive sample collection with Negative sample collection, the positive sample collection and the negative sample collection are carried out include gray processing, binaryzation and noise reduction pretreatment operation Afterwards, the positive sample collection of the pretreatment completion and negative sample collection and the tally set are input to data analysis layer;
Data analysis layer receives the positive sample collection that pretreatment is completed and negative sample collection and the tally set, and will be described Tally set is input to black eye judgment models, and the data of the positive sample collection and negative sample collection are carried out direction gradient histogram fortune The black eye judgment models are input to after calculation, the black eye judgment models are based on algorithm of support vector machine to the negative sample This collection and the positive sample collection are trained, and are moved back when the loss function value in the algorithm of support vector machine is less than threshold value It trains out;
Data in the test set are mapped to higher-dimension sky based on nonlinear mapping method by the test set for receiving user Between, the black eye judgment models judgement is input to after the test set that the mapping is completed is carried out the operation of direction gradient histogram Whether there is black eye, and exports result.
Optionally, the data in the positive sample collection be include black-eyed face, the data in the negative sample collection are It does not include black-eyed face.
Optionally, the noise reduction process uses self-adapting image denoising filter method:
G (x, y)=η (x, y)+f (x, y)
Wherein, (x, y) indicates that image slices vegetarian refreshments coordinate, f (x, y) are based on the self-adapting image denoising filter method pair The positive sample collection and the negative sample collection carry out the output data after noise reduction process, and η (x, y) is noise, and g (x, y) is described Positive sample collection and the negative sample collection,For the noise population variance of the positive sample collection and the negative sample collection,It is described The pixel grey scale mean value of (x, y),For the pixel grey scale variance of (x, y), L indicates current pixel point coordinate.
Optionally, black to being input to after the data progress direction gradient histogram operation of the positive sample collection and negative sample collection Eyelet judgment models, comprising:
Calculate the gradient magnitude and gradient direction value of each pixel (x, y) of data in the face image set, and by institute Gradient magnitude is stated as the first component, the gradient direction value forms gradient matrix as second component;
Data in the gradient matrix are divided into multiple fritters, and are added the gradient magnitude and gradient direction of each fritter Value obtains additive value, and the additive value connected to form gradient direction noxkata feature and be input to black eye judgment models.
Optionally, the algorithm of support vector machine includes Nonlinear Mapping and constraint solving;
The Nonlinear Mapping are as follows:
κ(xi, xj)=< θ (xi), θ (xj)>
Wherein, < θ (xi), θ (xj) > indicate the gradient direction noxkata feature (xi, xj) Nonlinear Mapping inner product meter It calculates, κ (xi, xj) it is the gradient direction noxkata feature (xi, xj) nonlinear mapping function;
The constraint solving are as follows:
Wherein, αi>=0, i=1,2 ... m
Wherein, m is the quantity of the gradient direction noxkata feature, αi, αjMultiply for the Lagrangian number of the constraint solving The factor, yi, yjFor the label of the positive negative sample, s.t is constraint condition.
In addition, to achieve the above object, the present invention also provides a kind of black eye intelligent judging device, which includes depositing Reservoir and processor are stored with the black eye intelligent decision program that can be run on the processor in the memory, described Black eye intelligent decision program realizes following steps when being executed by the processor:
Data receiver layer receive face image set, the face image set by tally set be divided into positive sample collection with Negative sample collection, the positive sample collection and the negative sample collection are carried out include gray processing, binaryzation and noise reduction pretreatment operation Afterwards, the positive sample collection of the pretreatment completion and negative sample collection and the tally set are input to data analysis layer;
Data analysis layer receives the positive sample collection that pretreatment is completed and negative sample collection and the tally set, and will be described Tally set is input to black eye judgment models, and the data of the positive sample collection and negative sample collection are carried out direction gradient histogram fortune The black eye judgment models are input to after calculation, the black eye judgment models are based on algorithm of support vector machine to the negative sample This collection and the positive sample collection are trained, and are moved back when the loss function value in the algorithm of support vector machine is less than threshold value It trains out;
Data in the test set are mapped to higher-dimension sky based on nonlinear mapping method by the test set for receiving user Between, the black eye judgment models judgement is input to after the test set that the mapping is completed is carried out the operation of direction gradient histogram Whether there is black eye, and exports result.
Optionally, the data in the positive sample collection be include black-eyed face, the data in the negative sample collection are It does not include black-eyed face.
Optionally, the noise reduction process uses self-adapting image denoising filter method:
G (x, y)=η (x, y)+f (x, y)
Wherein, (x, y) indicates that image slices vegetarian refreshments coordinate, f (x, y) are based on the self-adapting image denoising filter method pair The positive sample collection and the negative sample collection carry out the output data after noise reduction process, and η (x, y) is noise, and g (x, y) is described Positive sample collection and the negative sample collection,For the noise population variance of the positive sample collection and the negative sample collection,It is described The pixel grey scale mean value of (x, y),For the pixel grey scale variance of (x, y), L indicates current pixel point coordinate.
Optionally, black to being input to after the data progress direction gradient histogram operation of the positive sample collection and negative sample collection Eyelet judgment models, comprising:
Calculate the gradient magnitude and gradient direction value of each pixel (x, y) of data in the face image set, and by institute Gradient magnitude is stated as the first component, the gradient direction value forms gradient matrix as second component;
Data in the gradient matrix are divided into multiple fritters, and are added the gradient magnitude and gradient direction of each fritter Value obtains additive value, and the additive value connected to form gradient direction noxkata feature and be input to black eye judgment models.
Optionally, the algorithm of support vector machine includes Nonlinear Mapping and constraint solving;
The Nonlinear Mapping are as follows:
κ(xi, xj)=< θ (xi), θ (xj)>
Wherein, < θ (xi), θ (xj) > indicate the gradient direction noxkata feature (xi, xj) Nonlinear Mapping inner product meter It calculates, κ (xi, xj) it is the gradient direction noxkata feature (xi, xj) nonlinear mapping function;
The constraint solving are as follows:
Wherein, αi>=0, i=1,2 ... m
Wherein, m is the quantity of the gradient direction noxkata feature, αi, αjMultiply for the Lagrangian number of the constraint solving The factor, yi, yjFor the label of the positive negative sample, s.t is constraint condition.
In addition, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computer can It reads to be stored with black eye intelligent decision program on storage medium, the black eye intelligent decision program can be by one or more Processor executes, the step of to realize black eye intelligent determination method as described above.
Black eye intelligent determination method, device and computer readable storage medium proposed by the present invention, data receiver layer connect Face image set is received, the face image set is divided into positive sample collection and negative sample collection by tally set, by the positive sample Collection and negative sample collection and the tally set are input to data analysis layer;Data analysis layer receives the positive sample that pretreatment is completed Collection and negative sample collection and the tally set, and the tally set is input to black eye judgment models, by the positive sample collection The black eye judgment models are input to after carrying out the operation of direction gradient histogram with the data of negative sample collection, the black eye is sentenced Disconnected model is based on algorithm of support vector machine and is trained to the negative sample collection and the positive sample collection, until it is described support to Loss function value in amount machine algorithm exits training when being less than threshold value;The test set of user is received, Nonlinear Mapping side is based on Data in the test set are mapped to higher dimensional space by method, and the test set that the mapping is completed is carried out direction gradient histogram It is input to the black eye judgment models after operation and judges whether there is black eye, and exports result.Due to service efficiency of the present invention Higher supporting vector machine model, and early period reduces the noise for influencing model judgement based on a variety of data preprocessing methods, therefore Accurately black eye intelligent judgment function may be implemented in the present invention.
Detailed description of the invention
Fig. 1 is the flow diagram for the black eye intelligent determination method that one embodiment of the invention provides;
Fig. 2 is the schematic diagram of internal structure for the black eye intelligent judging device that one embodiment of the invention provides;
The mould of black eye intelligent decision program in the black eye intelligent judging device that Fig. 3 provides for one embodiment of the invention Block schematic diagram.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to limit this hair It is bright.
The present invention provides a kind of black eye intelligent determination method.Shown in referring to Fig.1, provided for one embodiment of the invention The flow diagram of black eye intelligent determination method.This method can be executed by device, the device can by software and/ Or hardware realization.
In the present embodiment, black eye intelligent determination method includes:
S1, data receiver layer receive face image set, and the face image set is divided into positive sample collection by tally set With negative sample collection, to the positive sample collection and the negative sample collection carry out include gray processing, binaryzation and noise reduction pretreatment grasp After work, the positive sample collection of the pretreatment completion and negative sample collection and the tally set are input to data analysis layer.
Data in positive sample collection described in present pre-ferred embodiments be include black-eyed face, the negative sample collection Interior data be do not include black-eyed face.
In present pre-ferred embodiments, gray processing operation is using rule of three by the positive sample collection and described negative Data in sample switch to black-white-gray format from rgb format.The rule of three is as follows: obtaining the positive sample collection and described negative The pixel is switched to black-white-gray format according to such as minor function by R, G, B pixel value of each pixel in sample:
0.30*R+0.59*G+0.11*B。
The binarization operation includes first given threshold, when the pixel in the black-white-gray format is greater than the threshold value, The pixel becomes 255, and when the pixel in the black-white-gray format is less than the threshold value, the pixel becomes 0, i.e., described Black and white format indicates that the pixel value of the positive sample collection and the negative sample collection is 0 or 255.
The noise reduction is to carry out noise reduction process, institute to the black and white formatted data based on self-adapting image denoising filter method State self-adapting image denoising filter method are as follows:
G (x, y)=η (x, y)+f (x, y)
Wherein, (x, y) indicates that image slices vegetarian refreshments coordinate, f (x, y) are based on self-adapting image denoising filter method to described Black and white formatted data carries out the output data after noise reduction process, and η (x, y) is noise, and g (x, y) is the black and white formatted data,For the noise population variance of the black and white formatted data,For the pixel grey scale mean value of (x, y),For (x, y) Pixel grey scale variance, L indicate current pixel point coordinate.
S2, data analysis layer receive the positive sample collection and negative sample collection and the tally set that pretreatment is completed, and by institute It states tally set and is input to black eye judgment models, the data of the positive sample collection and negative sample collection are subjected to direction gradient histogram The black eye judgment models are input to after operation, the black eye judgment models are based on algorithm of support vector machine to described negative Sample set and the positive sample collection are trained, when the loss function value in the algorithm of support vector machine is less than threshold value Exit training.
In present pre-ferred embodiments, the data of the positive sample collection and negative sample collection carry out the operation of direction gradient histogram After be input to black eye judgment models, comprising: calculate the gradient width of each pixel (x, y) of data in the face image set Value and gradient direction value, and using the gradient magnitude as the first component, the gradient direction value forms ladder as second component Spend matrix;Data in the gradient matrix are divided into multiple fritters, and calculate the gradient magnitude and gradient direction value of each fritter And value, and described and value connected and forms gradient direction noxkata feature and is input to black eye judgment models.
Algorithm of support vector machine described in present pre-ferred embodiments includes Nonlinear Mapping and constraint solving;
The Nonlinear Mapping are as follows:
κ(xi, xj)=< θ (xi), θ (xj) >
Wherein, < θ (xi), θ (xj) > indicate the gradient direction noxkata feature (xi, xj) Nonlinear Mapping inner product meter It calculates, κ (xi, xj) it is the gradient direction noxkata feature (xi, xj) nonlinear mapping function;
The constraint solving are as follows:
Wherein, αi>=0, i=1,2 ... m
Wherein, m is the quantity of the gradient direction noxkata feature, αi, αjMultiply for the Lagrangian number of the constraint solving The factor, yi, yjFor the label of the positive negative sample, s.t is constraint condition.
Loss function described in present pre-ferred embodiments is least square method, and the loss function value is L (e):
Wherein, e is the trained values of the black eye judgment models and the error amount of the tally set, and k is the positive sample The total quantity of collection and the negative sample collection, yiFor the tally set, y 'iFor the trained values, the threshold value is traditionally arranged to be 0.01。
Data in the test set are mapped to higher-dimension based on nonlinear mapping method by S3, the test set for receiving user Space is sentenced the black eye judgment models are input to after the test set progress direction gradient histogram operation of the mapping completion It is disconnected whether to have black eye, and export result.
The mapping of data described in present pre-ferred embodiments uses the nonlinear mapping method of the support vector machines.
Invention also provides a kind of black eye intelligent judging device.Referring to shown in Fig. 2, provided for one embodiment of the invention The schematic diagram of internal structure of black eye intelligent judging device.
In the present embodiment, the black eye intelligent judging device 1 can be PC (Personal Computer, individual Computer) or terminal devices such as smart phone, tablet computer, portable computer, it is also possible to a kind of server etc..This is black Eyelet intelligent judging device 1 includes at least memory 11, processor 12, communication bus 13 and network interface 14.
Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, and the readable storage medium storing program for executing includes dodging It deposits, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Storage Device 11 can be the internal storage unit of black eye intelligent judging device 1 in some embodiments, such as the black eye is intelligently sentenced The hard disk of disconnected device 1.Memory 11 is also possible to the external storage of black eye intelligent judging device 1 in further embodiments The plug-in type hard disk being equipped in equipment, such as black eye intelligent judging device 1, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) blocks, flash card (Flash Card) etc..Further, memory 11 is gone back Can both including black eye intelligent judging device 1 internal storage unit and also including External memory equipment.Memory 11 not only may be used It is installed on the application software and Various types of data of black eye intelligent judging device 1, such as black eye intelligent decision journey for storage The code etc. of sequence 01 can be also used for temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute black eye intelligent decision program 01 etc..
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 optionally may include standard wireline interface and wireless interface (such as WI-FI interface), usually use It is communicated to connect in being established between the device 1 and other electronic equipments.
Optionally, which can also include user interface, and user interface may include display (Display), defeated Enter unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It can Selection of land, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also fit When be known as display screen or display unit, for being shown in the information handled in black eye intelligent judging device 1 and for showing Show visual user interface.
Fig. 2 illustrates only the black eye intelligent judging device with component 11-14 and black eye intelligent decision program 01 1, it will be appreciated by persons skilled in the art that structure shown in fig. 1 does not constitute the limit to black eye intelligent judging device 1 It is fixed, it may include perhaps combining certain components or different component layouts than illustrating less perhaps more components.
In 1 embodiment of device shown in Fig. 2, black eye intelligent decision program 01 is stored in memory 11;Processor Following steps are realized when the black eye intelligent decision program 01 stored in 12 execution memories 11:
Step 1: data receiver layer receives face image set, the face image set is divided the sample that is positive by tally set This collection and negative sample collection, the positive sample collection and the negative sample collection are carried out include gray processing, binaryzation and noise reduction pre- place After reason operation, the positive sample collection of the pretreatment completion and negative sample collection and the tally set are input to data analysis layer.
Data in positive sample collection described in present pre-ferred embodiments be include black-eyed face, the negative sample collection Interior data be do not include black-eyed face.
In present pre-ferred embodiments, gray processing operation is using rule of three by the positive sample collection and described negative Data in sample switch to black-white-gray format from rgb format.The rule of three is as follows: obtaining the positive sample collection and described negative The pixel is switched to black-white-gray format according to such as minor function by R, G, B pixel value of each pixel in sample:
0.30*R+0.59*G+0.11*B
The binarization operation includes first given threshold, when the pixel in the black-white-gray format is greater than the threshold value, The pixel becomes 255, and when the pixel in the black-white-gray format is less than the threshold value, the pixel becomes 0, i.e., it is described Black and white format indicates that the pixel value of the positive sample collection and the negative sample collection is 0 or 255.
The noise reduction is to carry out noise reduction process, institute to the black and white formatted data based on self-adapting image denoising filter method State self-adapting image denoising filter method are as follows:
G (x, y)=η (x, y)+f (x, y)
Wherein, (x, y) indicates that image slices vegetarian refreshments coordinate, f (x, y) are based on self-adapting image denoising filter method to described Black and white formatted data carries out the output data after noise reduction process, and η (x, y) is noise, and g (x, y) is the black and white formatted data,For the noise population variance of the black and white formatted data,For the pixel grey scale mean value of (x, y),For (x, y) Pixel grey scale variance, L indicate current pixel point coordinate.
Step 2: data analysis layer receives the positive sample collection that pretreatment is completed and negative sample collection and the tally set, and The tally set is input to black eye judgment models, the data of the positive sample collection and negative sample collection are subjected to direction gradient The black eye judgment models are input to after histogram operation, the black eye judgment models are based on algorithm of support vector machine to institute It states negative sample collection and the positive sample collection is trained, until the loss function value in the algorithm of support vector machine is less than threshold Training is exited when value.
In present pre-ferred embodiments, the data of the positive sample collection and negative sample collection carry out the operation of direction gradient histogram After be input to black eye judgment models, comprising: calculate the gradient width of each pixel (x, y) of data in the face image set Value and gradient direction value, and using the gradient magnitude as the first component, the gradient direction value forms ladder as second component Spend matrix;Data in the gradient matrix are divided into multiple fritters, and calculate the gradient magnitude and gradient direction value of each fritter And value, and described and value connected and forms gradient direction noxkata feature and is input to black eye judgment models.
Algorithm of support vector machine described in present pre-ferred embodiments includes Nonlinear Mapping and constraint solving;
The Nonlinear Mapping are as follows:
κ(xi, xj)=< θ (xi), θ (xj)>
Wherein, < θ (xi), θ (xj) > indicate the gradient direction noxkata feature (xi, xj) Nonlinear Mapping inner product meter It calculates, κ (xi, xj) it is the gradient direction noxkata feature (xi, xj) nonlinear mapping function;
The constraint solving are as follows:
Wherein, αi>=0, i=1,2 ... m
Wherein, m is the quantity of the gradient direction noxkata feature, αi, αjMultiply for the Lagrangian number of the constraint solving The factor, yi, yjFor the label of the positive negative sample, s.t is constraint condition.
Loss function described in present pre-ferred embodiments is least square method, and the loss function value is L (e):
Wherein, e is the trained values of the black eye judgment models and the error amount of the tally set, and k is the positive sample The total quantity of collection and the negative sample collection, yiFor the tally set, y 'iFor the trained values, the threshold value is traditionally arranged to be 0.01。
Step 3: receiving the test set of user, the data in the test set are mapped to based on nonlinear mapping method Higher dimensional space judges mould for the black eye is input to after the test set progress direction gradient histogram operation of the mapping completion Type judges whether there is black eye, and exports result.
The mapping of data described in present pre-ferred embodiments uses the nonlinear mapping method of the support vector machines.
Optionally, in other embodiments, black eye intelligent decision program can also be divided into one or more mould Block, one or more module are stored in memory 11, and (the present embodiment is processor by one or more processors 12) performed to complete the present invention, the so-called module of the present invention is the series of computation machine program for referring to complete specific function Instruction segment, for describing implementation procedure of the black eye intelligent decision program in black eye intelligent judging device.
For example, referring to shown in Fig. 3, intelligently sentence for the black eye in one embodiment of black eye intelligent judging device of the present invention The program module schematic diagram of disconnected program, in the embodiment, the black eye intelligent decision program can be divided into data receiver Module 10, support vector machines training module 20, black eye judgment module 30 be illustratively:
The data reception module 10 is used for: receiving face image set, the face image set is divided by tally set Be positive sample set and negative sample collection, carries out including gray processing, binaryzation and noise reduction to the positive sample collection and the negative sample collection Pretreatment operation after, positive sample collection and negative sample collection and the tally set that the pretreatment is completed are input to data Process layer.
The support vector machines training module 20 is used for: receive pretreatment complete positive sample collection and negative sample collection and The tally set, and the tally set is input to black eye judgment models, by the data of the positive sample collection and negative sample collection Be input to the black eye judgment models after carrying out the operation of direction gradient histogram, the black eye judgment models be based on supporting to Amount machine algorithm is trained the negative sample collection and the positive sample collection, the loss in the algorithm of support vector machine Functional value exits training when being less than threshold value.
The black eye judgment module 30 is used for: being received the test set of user, is based on nonlinear mapping method for the survey Data in examination collection map to higher dimensional space, input after the test set that the mapping is completed is carried out the operation of direction gradient histogram Black eye is judged whether there is to the black eye judgment models, and exports result.
The program modules quilts such as above-mentioned data reception module 10, support vector machines training module 20, black eye judgment module 30 Functions or operations step and the above-described embodiment realized when execution are substantially the same, and details are not described herein.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with black eye intelligent decision program, the black eye intelligent decision program can be executed by one or more processors, with Realize following operation:
Face image set is received, the face image set is divided into positive sample collection and negative sample collection by tally set, right The positive sample collection and the negative sample collection carry out include gray processing, binaryzation and noise reduction pretreatment operation after, will be described pre- It handles the positive sample collection completed and negative sample collection and the tally set is input to data analysis layer;
The positive sample collection and negative sample collection and the tally set that pretreatment is completed are received, and the tally set is inputted To black eye judgment models, it is input to after the data of the positive sample collection and negative sample collection are carried out the operation of direction gradient histogram The black eye judgment models, the black eye judgment models are based on algorithm of support vector machine to the negative sample collection and described Positive sample collection is trained, and exits training when the loss function value in the algorithm of support vector machine is less than threshold value;
Data in the test set are mapped to higher-dimension sky based on nonlinear mapping method by the test set for receiving user Between, the black eye judgment models judgement is input to after the test set that the mapping is completed is carried out the operation of direction gradient histogram Whether there is black eye, and exports result.
Computer readable storage medium specific embodiment of the present invention and above-mentioned black eye intelligent judging device and method are each Embodiment is essentially identical, does not make tired state herein.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And And the terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that Process, device, article or method including a series of elements not only include those elements, but also including not arranging clearly Other element out, or further include for this process, device, article or the intrinsic element of method.Not more In the case where limitation, the element that is limited by sentence "including a ...", it is not excluded that include the element process, device, There is also other identical elements in article or method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but many situations It is lower the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to the prior art The part to contribute can be embodied in the form of software products, which is stored in as described above In one storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be Mobile phone, computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content, it is relevant to be applied directly or indirectly in other Technical field is included within the scope of the present invention.

Claims (10)

1. a kind of black eye intelligent determination method, which is characterized in that the described method includes:
Data receiver layer receives face image set, and the face image set is divided into positive sample collection and negative sample by tally set Collection, the positive sample collection and the negative sample collection are carried out include gray processing, binaryzation and noise reduction pretreatment operation after, by institute It states the positive sample collection for pre-processing completion and negative sample collection and the tally set is input to data analysis layer;
Data analysis layer receives the positive sample collection and negative sample collection and the tally set that pretreatment is completed, and by the tally set Black eye judgment models are input to, are inputted after the data of the positive sample collection and negative sample collection are carried out the operation of direction gradient histogram To the black eye judgment models, the black eye judgment models are based on algorithm of support vector machine to the negative sample collection and described Positive sample collection is trained, and exits training when the loss function value in the algorithm of support vector machine is less than threshold value;
Data in the test set are mapped to higher dimensional space based on nonlinear mapping method by the test set for receiving user, will The black eye judgment models are input to after the test set progress direction gradient histogram operation that the mapping is completed to judge whether there is Black eye, and export result.
2. black eye intelligent determination method as described in claim 1, which is characterized in that the data in the positive sample collection are packets Include black-eyed face, the data in the negative sample collection be do not include black-eyed face.
3. black eye intelligent determination method as claimed in claim 1 or 2, which is characterized in that the noise reduction process is using adaptive Answer image noise reduction filter method:
G (x, y)=η (x, y)+f (x, y)
Wherein, (x, y) indicate image slices vegetarian refreshments coordinate, f (x, y) be based on the self-adapting image denoising filter method to it is described just Sample set and the negative sample collection carry out the output data after noise reduction process, and η (x, y) is noise, and g (x, y) is the positive sample Collection and the negative sample collection,For the noise population variance of the positive sample collection and the negative sample collection,For (x, y) Pixel grey scale mean value,For the pixel grey scale variance of (x, y), L indicates current pixel point coordinate.
4. such as the black eye intelligent determination method in claim 3, which is characterized in that the positive sample collection and negative sample collection Data are input to black eye judgment models after carrying out the operation of direction gradient histogram, comprising:
Calculate the gradient magnitude and gradient direction value of each pixel (x, y) of data in the face image set, and by the ladder Amplitude is spent as the first component, and the gradient direction value forms gradient matrix as second component;
Data in the gradient matrix are divided into multiple fritters, and are added the gradient magnitude of each fritter and gradient direction value obtains Additive value, and the additive value connected to form gradient direction noxkata feature and be input to black eye judgment models.
5. black eye intelligent determination method as described in claim 1, which is characterized in that the algorithm of support vector machine includes non- Linear Mapping and constraint solving;
The Nonlinear Mapping are as follows:
κ(xI,xj)=< θ (xi), θ (xj)>
Wherein, < θ (xi), θ (xj) > indicate the gradient direction noxkata feature (xi, xj) Nonlinear Mapping inner product calculate, κ (xi, xj) it is the gradient direction noxkata feature (xi, xj) nonlinear mapping function;
The constraint solving are as follows:
Wherein, αi>=0, i=1,2 ... m
Wherein, m is the quantity of the gradient direction noxkata feature, αi, αjMultiply the factor for the Lagrangian number of the constraint solving, yi, yjFor the label of the positive negative sample, s.t is constraint condition.
6. a kind of black eye intelligent judging device, which is characterized in that described device includes memory and processor, the memory On be stored with the black eye intelligent decision program that can be run on the processor, the black eye intelligent decision program is described Processor realizes following steps when executing:
Data receiver layer receives face image set, and the face image set is divided into positive sample collection and negative sample by tally set Collection, the positive sample collection and the negative sample collection are carried out include gray processing, binaryzation and noise reduction pretreatment operation after, by institute It states the positive sample collection for pre-processing completion and negative sample collection and the tally set is input to data analysis layer;
Data analysis layer receives the positive sample collection and negative sample collection and the tally set that pretreatment is completed, and by the tally set Black eye judgment models are input to, are inputted after the data of the positive sample collection and negative sample collection are carried out the operation of direction gradient histogram To the black eye judgment models, the black eye judgment models are based on algorithm of support vector machine to the negative sample collection and described Positive sample collection is trained, and exits training when the loss function value in the algorithm of support vector machine is less than threshold value;
Data in the test set are mapped to higher dimensional space based on nonlinear mapping method by the test set for receiving user, will The black eye judgment models are input to after the test set progress direction gradient histogram operation that the mapping is completed to judge whether there is Black eye, and export result.
7. black eye intelligent judging device as described in claim 1, which is characterized in that the noise reduction process is using adaptive figure As noise reduction filtering method:
G (x, y)=η (x, y)+f (x, y)
Wherein, (x, y) indicate image slices vegetarian refreshments coordinate, f (x, y) be based on the self-adapting image denoising filter method to it is described just Sample set and the negative sample collection carry out the output data after noise reduction process, and η (x, y) is noise, and g (x, y) is the positive sample Collection and the negative sample collection,For the noise population variance of the positive sample collection and the negative sample collection,For (x, y) Pixel grey scale mean value,For the pixel grey scale variance of (x, y), L indicates current pixel point coordinate.
8. black eye intelligent judging device as claimed in claim 1 or 2, which is characterized in that the positive sample collection and negative sample The data of this collection are input to black eye judgment models after carrying out the operation of direction gradient histogram, comprising:
Calculate the gradient magnitude and gradient direction value of each pixel (x, y) of data in the face image set, and by the ladder Amplitude is spent as the first component, and the gradient direction value forms gradient matrix as second component;
Data in the gradient matrix are divided into multiple fritters, and are added the gradient magnitude of each fritter and gradient direction value obtains Additive value, and the additive value connected to form gradient direction noxkata feature and be input to black eye judgment models.
9. black eye intelligent judging device as described in claim 1, which is characterized in that the algorithm of support vector machine includes non- Linear Mapping and constraint solving;
The Nonlinear Mapping are as follows:
κ(xi, xj)=< θ (xi), θ (xj)>
Wherein, < θ (xi), θ (xj) > indicate the gradient direction noxkata feature (xi, xj) Nonlinear Mapping inner product calculate, κ (xi, xj) it is the gradient direction noxkata feature (xi, xj) nonlinear mapping function;
The constraint solving are as follows:
Wherein, αi>=0, i=1,2 ... m
Wherein, m is the quantity of the gradient direction noxkata feature, αi, αjMultiply the factor for the Lagrangian number of the constraint solving, yi, yjFor the label of the positive negative sample, s.t is constraint condition.
10. a kind of computer readable storage medium, which is characterized in that be stored with black eye on the computer readable storage medium Intelligent decision program, the black eye intelligent decision program can be executed by one or more processor, to realize as right is wanted Described in asking any one of 1 to 5 the step of black eye intelligent determination method.
CN201910370457.4A 2019-05-06 2019-05-06 Intelligent judging method and device for black eye and computer readable storage medium Active CN110211094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910370457.4A CN110211094B (en) 2019-05-06 2019-05-06 Intelligent judging method and device for black eye and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910370457.4A CN110211094B (en) 2019-05-06 2019-05-06 Intelligent judging method and device for black eye and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110211094A true CN110211094A (en) 2019-09-06
CN110211094B CN110211094B (en) 2023-05-26

Family

ID=67786871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910370457.4A Active CN110211094B (en) 2019-05-06 2019-05-06 Intelligent judging method and device for black eye and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110211094B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695463A (en) * 2020-05-29 2020-09-22 深圳数联天下智能科技有限公司 Training method of face impurity detection model and face impurity detection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609502A (en) * 2009-07-24 2009-12-23 西安电子科技大学 Method for detecting human face based on sequence simplifying support vector
CN107958245A (en) * 2018-01-12 2018-04-24 上海正鹏信息科技有限公司 A kind of gender classification method and device based on face characteristic
WO2018200840A1 (en) * 2017-04-27 2018-11-01 Retinopathy Answer Limited System and method for automated funduscopic image analysis
CN108985159A (en) * 2018-06-08 2018-12-11 平安科技(深圳)有限公司 Human-eye model training method, eye recognition method, apparatus, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609502A (en) * 2009-07-24 2009-12-23 西安电子科技大学 Method for detecting human face based on sequence simplifying support vector
WO2018200840A1 (en) * 2017-04-27 2018-11-01 Retinopathy Answer Limited System and method for automated funduscopic image analysis
CN107958245A (en) * 2018-01-12 2018-04-24 上海正鹏信息科技有限公司 A kind of gender classification method and device based on face characteristic
CN108985159A (en) * 2018-06-08 2018-12-11 平安科技(深圳)有限公司 Human-eye model training method, eye recognition method, apparatus, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695463A (en) * 2020-05-29 2020-09-22 深圳数联天下智能科技有限公司 Training method of face impurity detection model and face impurity detection method
CN111695463B (en) * 2020-05-29 2022-07-26 深圳数联天下智能科技有限公司 Training method of face impurity detection model and face impurity detection method

Also Published As

Publication number Publication date
CN110211094B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN107633204B (en) Face occlusion detection method, apparatus and storage medium
CN110349147B (en) Model training method, fundus macular region lesion recognition method, device and equipment
CN107909065A (en) The method and device blocked for detecting face
CN108416326B (en) Face recognition method and device
CN111597870B (en) Human body attribute identification method based on attention mechanism and multi-task learning
CN109145766A (en) Model training method, device, recognition methods, electronic equipment and storage medium
CN108171260A (en) A kind of image identification method and system
CN110135421A (en) Licence plate recognition method, device, computer equipment and computer readable storage medium
CN109858384A (en) Method for catching, computer readable storage medium and the terminal device of facial image
CN109919179A (en) Aneurysms automatic testing method, device and computer readable storage medium
CN110532883A (en) On-line tracking is improved using off-line tracking algorithm
CN108280455A (en) Human body critical point detection method and apparatus, electronic equipment, program and medium
CN110415212A (en) Abnormal cell detection method, device and computer readable storage medium
CN109871751A (en) Attitude appraisal procedure, device and storage medium based on facial expression recognition
CN112419326B (en) Image segmentation data processing method, device, equipment and storage medium
CN108876858A (en) Method and apparatus for handling image
CN108898587A (en) Image processing method, picture processing unit and terminal device
CN110008997A (en) Image texture similarity recognition method, device and computer readable storage medium
CN107944398A (en) Based on depth characteristic association list diagram image set face identification method, device and medium
CN110037680A (en) The recognition methods of electrocardiogram and device, storage medium, computer equipment
CN108805838A (en) A kind of image processing method, mobile terminal and computer readable storage medium
CN109920018A (en) Black-and-white photograph color recovery method, device and storage medium neural network based
CN110399812A (en) Face characteristic intelligent extract method, device and computer readable storage medium
CN110222571A (en) Black eye intelligent determination method, device and computer readable storage medium
CN109740553A (en) A kind of image, semantic segmentation data screening method and system based on identification

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