CN110163092A - Demographic method, device, equipment and storage medium based on recognition of face - Google Patents

Demographic method, device, equipment and storage medium based on recognition of face Download PDF

Info

Publication number
CN110163092A
CN110163092A CN201910297454.2A CN201910297454A CN110163092A CN 110163092 A CN110163092 A CN 110163092A CN 201910297454 A CN201910297454 A CN 201910297454A CN 110163092 A CN110163092 A CN 110163092A
Authority
CN
China
Prior art keywords
image
portrait
cutting
recognition
result
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
CN201910297454.2A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910297454.2A priority Critical patent/CN110163092A/en
Publication of CN110163092A publication Critical patent/CN110163092A/en
Priority to PCT/CN2019/122079 priority patent/WO2020207038A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • 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/30242Counting objects in image

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of demographic method based on recognition of face, device, equipment and storage mediums, this method comprises: obtaining video image from video flowing when receiving demographics instruction;The video image is subjected to picture cutting, obtains multiple cutting images, and extract the image LBP feature of multiple cutting images;By described image LBP feature input Identification of Images model trained in advance, described image LBP feature is identified by the Identification of Images model, exports recognition result;The number for counting the cutting image that recognition result is portrait, obtains the first number statistical result.The present invention is based on artificial intelligence, are counted using image processing techniques to the number in video, thus greatly improve the efficiency and accuracy of demographics.

Description

Demographic method, device, equipment and storage medium based on recognition of face
Technical field
The present invention relates to field of artificial intelligence more particularly to a kind of demographic methods based on recognition of face, dress It sets, equipment and storage medium.
Background technique
At present when needing to carry out demographics to regions such as meeting room, station, markets, generally requires and manually check people Number, or demographics are obtained indirectly as a result, leading to demographics inefficiency, and statistical result is not by other methods It is enough accurate.
Summary of the invention
The present invention provides a kind of demographic method based on recognition of face, device, equipment and storage medium, it is intended to improve The efficiency and accuracy of demographics.
To achieve the above object, the present invention provides a kind of demographic method based on recognition of face, which comprises
When receiving demographics instruction, video image is obtained from video flowing;
The video image is subjected to picture cutting, obtains multiple cutting images, and extract multiple cutting images Image LBP feature;
By described image LBP feature input Identification of Images model trained in advance, by the Identification of Images model to described Image LBP feature is identified, recognition result is exported;
The number for counting the cutting image that recognition result is portrait, obtains the first number statistical result.
Preferably, the Identification of Images model that the input of described image LBP feature is trained in advance, by the Identification of Images Before the step of model identifies described image LBP feature, exports recognition result further include:
The sample image for collecting preset quantity, sets portrait or non-portrait for the label of the sample image;
The sample image is compressed into after 128 × 128 pixels and carries out gray proces and random incomplete processing again, at acquisition Sample image after reason;
The sample LBP feature of sample image after the processing is extracted, sample LBP feature is obtained;
The sample LBP feature is inputted in the neural network created based on TensorFlow and is trained, described in acquisition The recognition result of Identification of Images model, the Identification of Images model output is portrait or non-portrait.
Preferably, the cutting image includes the first cutting image and the second cutting image, described by the video image Picture cutting is carried out, the step of obtaining multiple cutting images includes:
By the video image compression at the compressed video image of 512 × 512 pixels;
The compressed video image is subjected to picture cutting by 64 × 64 pixels, obtains multiple first cutting images;
The overlapping region of cutting image adjacent in the first cutting image is subjected to secondary picture by starting point of 64 pixels Cutting obtains the second cutting image.
Preferably, the step of image LBP feature for extracting multiple cutting images includes:
The cutting image is divided into multiple regions;
By the center gray value of each of each region pixel 8 neighbor pixels adjacent with the pixel Gray value be compared, obtain the LBP feature of the pixel;
LBP feature based on the pixel, obtains the histogram in each region;
Acquisition statistic histogram is normalized to the histogram in each region, is based on the statistic histogram Obtain the image LBP feature of the cutting image.
Preferably, the statistics recognition result is the number of the cutting image of portrait, obtains the first number statistical result After step further include:
Report interface that the first number statistical result is reported to server according to preset result.
Preferably, described to report interface that the first number statistical result is reported to server according to preset result Before step further include:
Judge in the first number statistical result whether to include abnormal portrait according to peak count method;
If not including the abnormal portrait in the first number statistical result, then follow the steps: according to preset result Report interface that the first number statistical result is reported to server;
If including the abnormal portrait in the first number statistical result, in the first number statistical result After the number of the abnormal portrait, the second demographics are obtained as a result, the second demographics result is reported to described Server.
Preferably, the Identification of Images model record recognition result is that the portrait of portrait in the cutting image of portrait is sat Mark, it is described to judge whether include the steps that abnormal portrait includes: in the first number statistical result according to peak count method
Obtain the number that the portrait coordinate occurs within a preset time;
If the number that the portrait coordinate occurs within a preset time is greater than or equal to frequency threshold value, described image is determined The corresponding portrait of coordinate is not abnormal portrait;
If the number that the portrait image coordinate occurs within a preset time is less than frequency threshold value, determine that described image is sat Marking corresponding portrait is abnormal portrait, then the corresponding portrait of described image coordinate is labeled as abnormal portrait.
To achieve the above object, the embodiment of the present invention also provides a kind of people counting device based on recognition of face, described People counting device based on recognition of face includes:
Module is obtained, for obtaining video image from video flowing when receiving demographics instruction;
Extraction module obtains multiple cutting images, and extract described more for the video image to be carried out picture cutting The image LBP feature of a cutting image;
Identification module is known for the Identification of Images model that the input of described image LBP feature is trained in advance by the portrait Other model identifies described image LBP feature, exports recognition result;
Statistical module obtains the first demographics for counting the number for the cutting image that recognition result is portrait As a result.
To achieve the above object, the embodiment of the present invention also provides a kind of people-counting equipment based on recognition of face, described People-counting equipment based on recognition of face includes processor, memory and storage being known based on face in the memory Other number statistics program realizes institute as above when the demographics program based on recognition of face is run by the processor The step of demographic method based on recognition of face stated.
To achieve the above object, the embodiment of the present invention also provides a kind of computer storage medium, and the computer storage is situated between The demographics program based on recognition of face is stored in matter, the demographics program based on recognition of face is transported by processor The step of demographic method based on recognition of face as described above is realized when row.
Compared with prior art, it a kind of demographic method based on recognition of face proposed by the present invention, device, equipment and deposits Storage media, this method comprises: obtaining video image from video flowing when receiving demographics instruction;By the video figure As carrying out picture cutting, multiple cutting images are obtained, and extract the image LBP feature of the multiple cutting image;By the figure As LBP feature input Identification of Images model trained in advance, described image LBP feature is known by the Identification of Images model Not, recognition result is exported;The number for counting the cutting image that recognition result is portrait, obtains the first number statistical result.This hair It is bright to be based on artificial intelligence, the number in video is counted using image processing techniques, thus greatly improves demographics Efficiency and accuracy.
Detailed description of the invention
Fig. 1 is the hardware structural diagram for the people-counting equipment based on recognition of face that various embodiments of the present invention are related to;
Fig. 2 is the flow diagram of the demographic method first embodiment the present invention is based on recognition of face;
Fig. 3 is the flow diagram of the demographic method second embodiment the present invention is based on recognition of face;
Fig. 4 is the functional block diagram of the people counting device first embodiment the present invention is based on recognition of face.
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 intended to limit the present invention.
The people-counting equipment based on recognition of face that the embodiment of the present invention relates generally to, which refers to, can be realized network connection Network access device, the people-counting equipment based on recognition of face can be server, cloud platform etc..
Referring to Fig.1, Fig. 1 is the hardware configuration for the people-counting equipment based on recognition of face that various embodiments of the present invention are related to Schematic diagram.In the embodiment of the present invention, the people-counting equipment based on recognition of face may include (such as the centre of processor 1001 Manage device Central Processing Unit, CPU), communication bus 1002, input port 1003, output port 1004, storage Device 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components;Input port 1003 is defeated for data Enter;Output port 1004 is exported for data, and memory 1005 can be high speed RAM memory, be also possible to stable storage Device (non-volatile memory), such as magnetic disk storage, memory 1005 optionally can also be independently of aforementioned processing The storage device of device 1001.It will be understood by those skilled in the art that hardware configuration shown in Fig. 1 is not constituted to of the invention It limits, may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
With continued reference to Fig. 1, the memory 1005 in Fig. 1 as a kind of readable storage medium storing program for executing may include operating system, net Network communication module, application program module and the demographics program based on recognition of face.In Fig. 1, network communication module master It is used to connect server, carries out data communication with server;And processor 1001 can be called and be stored in memory 1005 Demographics program based on recognition of face, and execute the demographics side provided in an embodiment of the present invention based on recognition of face Method.
The embodiment of the invention provides a kind of demographic methods based on recognition of face.
Referring to Fig. 2, Fig. 2 is the flow diagram of the demographic method first embodiment the present invention is based on recognition of face.
In the present embodiment, the demographic method based on recognition of face is applied to the demographics based on recognition of face Equipment, which comprises
Step S101 obtains video image when receiving demographics instruction from video flowing;
In the present embodiment, camera is installed in the demographics region for needing to carry out demographics in advance, is taken the photograph by described As head images the demographics region, acquisition obtains in real time and saves the video flowing.Such as in meeting room certain A camera, the information such as the indoor scene of shooting meeting, personnel are installed in a position, and save active conference room video flowing.
When receiving the demographics instruction that user is occurred by voice or touch control operation, then view is obtained from video flowing Frequency image.It is to be appreciated that the demographics instruction includes time point, when the time point can be current time, history Between and reservation future time.In general, the video flowing has timestamp, obtained and the time according to the timestamp The corresponding video image of point.
The video image is carried out picture cutting, obtains multiple cutting images, and extract the multiple cut by step S102 The image LBP feature of partial image;
In the present embodiment, needs to carry out secondary cutting to the video image, obtain the first cutting image and the second cutting Image.Specifically, the described the step of video image is carried out picture cutting, obtains multiple cutting images, includes:
Step S102-1a, by the video image compression at the compressed video image of 512 × 512 pixels;
The video image is compressed, the compressed video image of 512 × 512 pixels is obtained.It is to be appreciated that In other embodiments, the video image can be compressed by other pixels.
The compressed video image is carried out picture cutting by 64 × 64 pixels, obtains multiple first and cut by step S102-1b Partial image;
First time cutting is carried out to the compressed video image: the compressed video image is cut by 64 × 64 pixels Point, obtain multiple first cutting images.
Step S102-1c, by the overlapping region of cutting image adjacent in the first cutting image using 64 pixels as starting point Secondary picture cutting is carried out, the second cutting image is obtained.
Inevitably, overlapping region is had after image cutting, therefore again by cutting image adjacent in the first cutting image Overlapping region carries out secondary picture cutting by starting point of 64 pixels, obtains the second cutting image.
In the present embodiment, the cutting image includes the first cutting image and the second cutting image.
In the present embodiment, LBP (Local Binary Patterns, local binary patterns) is a kind of for describing image The operator of the feature of local grain has the characteristics that gray scale invariance.
Further, the step of image LBP feature for extracting multiple cutting images includes:
Step S102-2a: the cutting image is divided into multiple regions;
The cutting image is divided into the multiple regions of default size, such as is divided into 16 × 16 multiple regions.
Step S102-2b: by the center gray value of each of each region pixel it is adjacent with the pixel 8 The gray value of a neighbor pixel is compared, and obtains the LBP feature of the pixel;
Specifically, if the neighbor grayscale value is greater than the center gray value, the position of the neighbor pixel is marked It is denoted as 1;If the neighbor grayscale value is less than or equal to the center gray value, the position mark by the neighbor pixel is 0;Being compared in this way with 8 points in the neighborhood of 3*3 can produce 8 bits and (usually can be exchanged into decimal number, i.e., LBP feature, the LBP value are the integer between 1-256), thus to obtain the LBP feature of the pixel.
Step S102-2c: the LBP feature based on the pixel obtains the histogram in each region;
After the LBP feature for obtaining each pixel in the region, the LBP feature of each pixel is counted It can be obtained the histogram in each region.
Step S102-2d: being normalized acquisition statistic histogram to the histogram in each region, is based on institute State the image LBP feature that statistic histogram obtains the cutting image.
Generally, when expressing image texture using LBP, only focus on Uniform mode, and by other all modes return to In same class, the image after normalizing as a result, can more embody the texture of each representative region, while desalinate smooth region again Feature.In the present embodiment, acquisition statistic histogram is normalized to the histogram in each region, is based on the system Meter histogram obtains the image LBP feature of the cutting image.
Into one, in order to allow the LBP feature that there is rotational invariance, binary system is rotated, such as at the beginning The initial LBP feature arrived is 10010000, then the initial characteristics can be converted to as after being rotated clockwise The decimal value of 00001001 minimum value form, the minimum value form described in this way is minimum namely LBP is minimum.No matter described cut How partial image can rotate, and the LBP is minimum, it is possible thereby to guarantee that LBP has rotational invariance.
Step S103, by described image LBP feature input Identification of Images model trained in advance, by the Identification of Images mould Type identifies described image LBP feature, exports recognition result;
In the present embodiment, the step S103: the Identification of Images model that the input of described image LBP feature is trained in advance, Before the step of being identified by the Identification of Images model to described image LBP feature, exporting recognition result further include:
Step S103a collects the sample image of preset quantity, sets portrait or inhuman for the label of the sample image Picture;
The sample image includes portrait sample image and inhuman picture sample image, and the portrait sample image includes Face sample image and people's upper part of the body sample image.
In the present embodiment, 100,000 face sample images are collected, collect 50,000 people's upper part of the body sample images, Portrait is set by the label of 100,000 face sample images and 50,000 people's upper part of the body sample images.Collect 10,000 The non-portrait image, and non-portrait is set by the label of 10,000 non-portrait images.
It is to be appreciated that using people's upper part of the body image as training sample, can in the video image face quilt When blocking, demographics are carried out according to the feature of people's upper part of the body image, statistical result can be prevented inaccurate, lack number The generation of thing.Also, by non-portrait image also as training sample, then the Identification of Images model after can making training identifies Non- portrait keeps statistical result more accurate.
The sample image is compressed into after 128 × 128 pixels and carries out gray proces and random incompleteness again by step S103b Processing, sample image after being handled;
In the present embodiment, the sample image is compressed into 128 × 128 pixels first, obtains compression samples image.Then The compression samples image is subjected to gray proces by one of image inversion, logarithmic transformation method, obtains gray scale sample Image.The gray scale sample image is subjected to random incomplete processing using image repair method again, the sample that obtains that treated This image.
Step S103c extracts the sample LBP feature of sample image after the processing, obtains sample LBP feature;
Sample image after the processing is divided into multiple sample areas, by each of each sample areas sample picture The gray value of center of a sample's gray value of vegetarian refreshments 8 sample neighbor pixels adjacent with the sampled pixel point is compared, Obtain the sample LBP feature of the sampled pixel point;Based on the LBP feature of the sampled pixel point, each sample areas is obtained Sample histogram;The sample histogram of each sample areas is normalized and obtains statistical sample histogram, The sample image LBP feature of the sample image is obtained based on the sample statistics histogram.
The sample LBP feature is inputted in the neural network created based on TensorFlow and is instructed by step S103d Practice, obtains the Identification of Images model, the recognition result of the Identification of Images model output is portrait or non-portrait.
The TensorFlow is a kind of open source code machine learning frame, and TensorFlow is widely used in all kinds of The programming of machine learning algorithm is realized.Developer can be helped to construct model in extreme code using TensorFlow, and Should model make required product.
In the present embodiment, the sample LBP feature is inputted in the neural network created based on TensorFlow and is instructed Practice, after repetition training up to a million times, the sample LBP feature can accurately be divided according to its label for corresponding to sample image Class, thus to obtain the Identification of Images model, the recognition result of Identification of Images model output is portrait or non-portrait, namely The recognition result of the sample image of label behaviour picture in the sample image is exported as portrait, by label in the sample image Recognition result output for the sample image of non-portrait is non-portrait.
Step S104, statistics recognition result are the number of the cutting image of portrait, obtain the first number statistical result.
According to the recognition result that the Identification of Images model exports, statistics recognition result is the cutting image of portrait Number, using the number of the cutting image as the first number statistical result.
The present embodiment through the above scheme, when receiving demographics instruction, obtains video image from video flowing;It will The video image carries out picture cutting, obtains multiple cutting images, and the image LBP for extracting the multiple cutting image is special Sign;By described image LBP feature input Identification of Images model trained in advance, by the Identification of Images model to described image LBP feature is identified, recognition result is exported;The number for counting the cutting image that recognition result is portrait, obtains the first number Statistical result.It is based on artificial intelligence as a result, the number in video is counted using image processing techniques, is greatly improved The efficiency and accuracy of demographics.
As shown in figure 3, second embodiment of the invention proposes a kind of demographic method based on recognition of face, based on above-mentioned First embodiment shown in Fig. 2, the statistics recognition result are the number of the cutting image of portrait, obtain the first demographics knot After the step of fruit further include:
Step S106: report interface that the first number statistical result is reported to server according to preset result.
Specifically, it presets and reports interface, it is described to report interface for communicating with the server network.It is understood that Ground reports interface can also will be in the corresponding camera information of the first number statistical result, area information, temporal information etc. It reports to the server.
The step S106: report interface that the first number statistical result is reported to server according to preset result The step of before further include:
Judge in the first number statistical result whether to include abnormal portrait according to peak count method;
It is to be appreciated that since the video image in video flowing is real-time change, therefore obtained from the video flowing Video image may be not sufficiently stable, and may be walked about personnel, be caused first portrait to count due to postural change etc. As a result not accurate enough.
Specifically, the number that the portrait coordinate occurs within a preset time is obtained;
The video image is extracted from the video flowing by preset duration, the preset duration can be 100ms, The video image is carried out picture cutting, obtains multiple cutting images, and extract the multiple cutting image by 200ms etc. Image LBP feature;By described image LBP feature input Identification of Images model trained in advance, by the Identification of Images model pair Described image LBP feature is identified, and exports the portrait coordinate of portrait in the cutting image.
If the number that the portrait coordinate occurs within a preset time is greater than or equal to frequency threshold value, described image is determined The corresponding portrait of coordinate is not abnormal portrait;In the present embodiment, the preset time be can be 1 minute, and the frequency threshold value can Be 4 times, it is 10 inferior, if such as the portrait coordinate occurs in 1 minute number is 10 times, illustrate described image coordinate pair The portrait answered is not abnormal portrait.If the number that the portrait image coordinate occurs within a preset time is less than frequency threshold value, Determine that the corresponding portrait of described image coordinate is abnormal portrait, then the corresponding portrait of described image coordinate is labeled as abnormal people Picture.If not including the abnormal portrait in the first number statistical result, thens follow the steps: being reported and connect according to preset result The first number statistical result is reported to server by mouth;If in the first number statistical result including the abnormal people Picture after the number for then removing the abnormal portrait in the first number statistical result, obtains the second demographics as a result, will The second demographics result reports to the server.2 abnormal portraits if it exists, then subtract first statistical result The second demographics result is then obtained after going 2.
The present embodiment through the above scheme, when receiving demographics instruction, obtains video image from video flowing;It will The video image carries out picture cutting, obtains cutting multiple images, and the image LBP for extracting multiple cutting images is special Sign;By described image LBP feature input Identification of Images model trained in advance, by the Identification of Images model to described image LBP feature is identified, recognition result is exported;The number for counting the cutting image that recognition result is portrait, obtains the first number Statistical result;Report interface that the first number statistical result is reported to server according to preset result.It is based on people as a result, Work intelligence, counts the number in video using image processing techniques, greatly improves the efficiency of demographics and accurate Property.
In addition, the present embodiment also provides a kind of people counting device based on recognition of face.It is the present invention referring to Fig. 4, Fig. 4 The functional block diagram of people counting device first embodiment based on recognition of face.
People counting device provided by the invention based on recognition of face is a kind of virtual bench, is stored in shown in FIG. 1 In the memory 1005 of people-counting equipment based on recognition of face, to realize the institute of the demographics program based on recognition of face It is functional: for obtaining video image from video flowing when receiving demographics instruction;For by the video image into Row picture cutting obtains multiple cutting images, and extracts the image LBP feature of multiple cutting images;For by the figure As LBP feature input Identification of Images model trained in advance, described image LBP feature is known by the Identification of Images model Not, recognition result is exported;For counting the number for the cutting image that recognition result is portrait, the first demographics knot is obtained Fruit.
Specifically, the people counting device described in the present embodiment based on recognition of face includes:
Module 10 is obtained, for obtaining video image from video flowing when receiving demographics instruction;
Extraction module 20 obtains multiple cutting images, and extract multiple for the video image to be carried out picture cutting The image LBP feature of the cutting image;
Identification module 30, for the Identification of Images model that the input of described image LBP feature is trained in advance, by the portrait Identification model identifies described image LBP feature, exports recognition result;
Statistical module 40 obtains the first number system for counting the number for the cutting image that recognition result is portrait Count result.
Into one, the identification module is also used to:
The sample image for collecting preset quantity, sets portrait or non-portrait for the label of the sample image;
The sample image is compressed into after 128 × 128 pixels and carries out gray proces and random incomplete processing again, at acquisition Sample image after reason;
The sample LBP feature of sample image after the processing is extracted, sample LBP feature is obtained;
The sample LBP feature is inputted in the neural network created based on TensorFlow and is trained, described in acquisition The recognition result of Identification of Images model, the Identification of Images model output is portrait or non-portrait.
Into one, the extraction module is also used to:
By the video image compression at the compressed video image of 512 × 512 pixels;
The compressed video image is subjected to picture cutting by 64 × 64 pixels, obtains multiple first cutting images;
The overlapping region of cutting image adjacent in the first cutting image is subjected to secondary picture by starting point of 64 pixels Cutting obtains the second cutting image.
Into one, the extraction module is also used to:
The cutting image is divided into multiple regions;
By the center gray value of each of each region pixel 8 neighbor pixels adjacent with the pixel Gray value be compared, obtain the LBP feature of the pixel;
LBP feature based on the pixel, obtains the histogram in each region;
Acquisition statistic histogram is normalized to the histogram in each region, is based on the statistic histogram Obtain the image LBP feature of the cutting image.
Into one, the statistical module is also used to:
Report interface that the first number statistical result is reported to server according to preset result.
Into one, the statistical module is also used to:
Judge in the first number statistical result whether to include abnormal portrait according to peak count method;
If not including the abnormal portrait in the first number statistical result, then follow the steps: according to preset result Report interface that the first number statistical result is reported to server;
If including the abnormal portrait in the first number statistical result, in the first number statistical result After the number of the abnormal portrait, the second demographics are obtained as a result, the second demographics result is reported to described Server.
Into one, the statistical module is also used to:
Obtain the number that the portrait coordinate occurs within a preset time;
If the number that the portrait coordinate occurs within a preset time is greater than or equal to frequency threshold value, described image is determined The corresponding portrait of coordinate is not abnormal portrait;
If the number that the portrait image coordinate occurs within a preset time is less than frequency threshold value, determine that described image is sat Marking corresponding portrait is abnormal portrait, then the corresponding portrait of described image coordinate is labeled as abnormal portrait.
In addition, being stored in the computer storage medium based on people the present invention also provides a kind of computer storage medium The demographics program of face identification is realized as described above when the demographics program based on recognition of face is run by processor The step of demographic method based on recognition of face, details are not described herein.
Compared with prior art, it a kind of demographic method based on recognition of face proposed by the present invention, device, equipment and deposits Storage media, this method comprises: obtaining video image from video flowing when receiving demographics instruction;By the video figure As carrying out picture cutting, multiple cutting images are obtained, and extract the image LBP feature of multiple cutting images;By the figure As LBP feature input Identification of Images model trained in advance, described image LBP feature is known by the Identification of Images model Not, recognition result is exported;The number for counting the cutting image that recognition result is portrait, obtains the first number statistical result.This hair It is bright to be based on artificial intelligence, the number in video is counted using image processing techniques, thus greatly improves demographics Efficiency and accuracy.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device executes the present invention respectively Method described in a embodiment.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations Equivalent structure made by description of the invention and accompanying drawing content or process transformation, are applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of demographic method based on recognition of face, which is characterized in that the described method includes:
When receiving demographics instruction, video image is obtained from video flowing;
The video image is subjected to picture cutting, obtains multiple cutting images, and extract the image of the multiple cutting image Local binary patterns LBP feature;
By described image LBP feature input Identification of Images model trained in advance, by the Identification of Images model to described image LBP feature is identified, recognition result is exported;
The number for counting the cutting image that recognition result is portrait, obtains the first number statistical result.
2. the method according to claim 1, wherein described input training in advance for described image LBP feature The step of Identification of Images model identifies described image LBP feature by the Identification of Images model, exports recognition result it Before further include:
The sample image for collecting preset quantity, sets portrait or non-portrait for the label of the sample image;
The sample image is compressed into after 128 × 128 pixels and carries out gray proces and random incomplete processing again, after being handled Sample image;
The sample LBP feature of sample image after the processing is extracted, sample LBP feature is obtained;
The sample LBP feature is inputted in the neural network created based on TensorFlow and is trained, the portrait is obtained The recognition result of identification model, the Identification of Images model output is portrait or non-portrait.
3. the method according to claim 1, wherein the cutting image includes that the first cutting image and second is cut Partial image, described that the video image is carried out picture cutting, the step of obtaining multiple cutting images, includes:
By the video image compression at the compressed video image of 512 × 512 pixels;
The compressed video image is subjected to picture cutting by 64 × 64 pixels, obtains multiple first cutting images;
The overlapping region of cutting image adjacent in the first cutting image is subjected to secondary picture cutting by starting point of 64 pixels, Obtain the second cutting image.
4. the method according to claim 1, wherein the image LBP for extracting multiple cutting images is special The step of sign includes:
The cutting image is divided into multiple regions;
By the ash of the center gray value of each of each region pixel 8 neighbor pixel adjacent with the pixel Angle value is compared, and obtains the LBP feature of the pixel;
LBP feature based on the pixel, obtains the histogram in each region;
Acquisition statistic histogram is normalized to the histogram in each region, is obtained based on the statistic histogram The image LBP feature of the cutting image.
5. the method according to claim 1, wherein the statistics recognition result is of the cutting image of portrait After the step of number, the first number statistical result of acquisition further include:
Report interface that the first number statistical result is reported to server according to preset result.
6. according to the method described in claim 5, it is characterized in that, described report interface by described first according to preset result Before the step of demographics result reports to server further include:
Judge in the first number statistical result whether to include abnormal portrait according to peak count method;
If not including the abnormal portrait in the first number statistical result, thens follow the steps: being reported according to preset result The first number statistical result is reported to server by interface;
If including the abnormal portrait in the first number statistical result, institute is removed in the first number statistical result After the number for stating abnormal portrait, the second demographics are obtained as a result, the second demographics result is reported to the service Device.
7. method according to claim 1 to 6, which is characterized in that the Identification of Images model record identification knot Fruit is the portrait coordinate of portrait in the cutting image of portrait, described to judge first demographics according to peak count method As a result whether include the steps that abnormal portrait includes: in
Obtain the number that the portrait coordinate occurs within a preset time;
If the number that the portrait coordinate occurs within a preset time is greater than or equal to frequency threshold value, described image coordinate is determined Corresponding portrait is not abnormal portrait;
If the number that the portrait image coordinate occurs within a preset time is less than frequency threshold value, described image coordinate pair is determined The portrait answered is abnormal portrait, then the corresponding portrait of described image coordinate is labeled as abnormal portrait.
8. a kind of people counting device based on recognition of face, which is characterized in that the demographics dress based on recognition of face It sets and includes:
Module is obtained, for obtaining video image from video flowing when receiving demographics instruction;
Extraction module obtains multiple cutting images, and extract the multiple cut for the video image to be carried out picture cutting The image LBP feature of partial image;
Identification module, for the Identification of Images model that the input of described image LBP feature is trained in advance, by the Identification of Images mould Type identifies described image LBP feature, exports recognition result;
Statistical module obtains the first number statistical result for counting the number for the cutting image that recognition result is portrait.
9. a kind of people-counting equipment based on recognition of face, which is characterized in that the demographics based on recognition of face are set Standby includes processor, the demographics program based on recognition of face of memory and storage in the memory, the base When the demographics program of recognition of face is run by the processor, such as base of any of claims 1-7 is realized In the demographic method of recognition of face the step of.
10. a kind of computer storage medium, which is characterized in that be stored in the computer storage medium based on recognition of face Demographics program is realized when the demographics program based on recognition of face is run by processor as in claim 1-7 The step of demographic method described in any one based on recognition of face.
CN201910297454.2A 2019-04-12 2019-04-12 Demographic method, device, equipment and storage medium based on recognition of face Pending CN110163092A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910297454.2A CN110163092A (en) 2019-04-12 2019-04-12 Demographic method, device, equipment and storage medium based on recognition of face
PCT/CN2019/122079 WO2020207038A1 (en) 2019-04-12 2019-11-29 People counting method, apparatus, and device based on facial recognition, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910297454.2A CN110163092A (en) 2019-04-12 2019-04-12 Demographic method, device, equipment and storage medium based on recognition of face

Publications (1)

Publication Number Publication Date
CN110163092A true CN110163092A (en) 2019-08-23

Family

ID=67639302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910297454.2A Pending CN110163092A (en) 2019-04-12 2019-04-12 Demographic method, device, equipment and storage medium based on recognition of face

Country Status (2)

Country Link
CN (1) CN110163092A (en)
WO (1) WO2020207038A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199215A (en) * 2020-01-06 2020-05-26 郑红 People counting method and device based on face recognition
WO2020207038A1 (en) * 2019-04-12 2020-10-15 深圳壹账通智能科技有限公司 People counting method, apparatus, and device based on facial recognition, and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822111B (en) * 2021-01-19 2024-05-24 北京京东振世信息技术有限公司 Crowd detection model training method and device and crowd counting method and device
CN114462653B (en) * 2022-01-24 2022-09-30 广东天地和实业控股集团有限公司 O2O type campus self-service catering management method, system, equipment and medium
CN116128883A (en) * 2023-04-19 2023-05-16 尚特杰电力科技有限公司 Photovoltaic panel quantity counting method and device, electronic equipment and storage medium
CN117636425A (en) * 2023-11-23 2024-03-01 南京石三心网络科技有限公司 Face recognition system based on information technology
CN118379778B (en) * 2024-06-25 2024-08-23 贵州聚控云科技有限公司 Personnel information statistics method and system based on face recognition

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778512A (en) * 2016-11-25 2017-05-31 南京蓝泰交通设施有限责任公司 Face identification method under the conditions of a kind of unrestricted based on LBP and depth school
CN109359548A (en) * 2018-09-19 2019-02-19 深圳市商汤科技有限公司 Plurality of human faces identifies monitoring method and device, electronic equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX2012013865A (en) * 2012-11-29 2014-05-28 Vision Holdings Mexico S De R L De C V System and method for paying and counting passengers in transport means.
KR101500496B1 (en) * 2013-12-06 2015-03-10 주식회사 케이티 Apparatus for recognizing face and method thereof
CN105160313A (en) * 2014-09-15 2015-12-16 中国科学院重庆绿色智能技术研究院 Method and apparatus for crowd behavior analysis in video monitoring
CN108563997B (en) * 2018-03-16 2021-10-12 新智认知数据服务有限公司 Method and device for establishing face detection model and face recognition
CN108805140B (en) * 2018-05-23 2021-06-29 国政通科技股份有限公司 LBP-based rapid feature extraction method and face recognition system
CN109344765A (en) * 2018-09-28 2019-02-15 广州云从人工智能技术有限公司 A kind of intelligent analysis method entering shop personnel analysis for chain shops
CN110163092A (en) * 2019-04-12 2019-08-23 深圳壹账通智能科技有限公司 Demographic method, device, equipment and storage medium based on recognition of face

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778512A (en) * 2016-11-25 2017-05-31 南京蓝泰交通设施有限责任公司 Face identification method under the conditions of a kind of unrestricted based on LBP and depth school
CN109359548A (en) * 2018-09-19 2019-02-19 深圳市商汤科技有限公司 Plurality of human faces identifies monitoring method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020207038A1 (en) * 2019-04-12 2020-10-15 深圳壹账通智能科技有限公司 People counting method, apparatus, and device based on facial recognition, and storage medium
CN111199215A (en) * 2020-01-06 2020-05-26 郑红 People counting method and device based on face recognition

Also Published As

Publication number Publication date
WO2020207038A1 (en) 2020-10-15

Similar Documents

Publication Publication Date Title
CN110163092A (en) Demographic method, device, equipment and storage medium based on recognition of face
CN110826538B (en) Abnormal off-duty identification system for electric power business hall
CN110119673B (en) Non-inductive face attendance checking method, device, equipment and storage medium
CN110070101A (en) Floristic recognition methods and device, storage medium, computer equipment
CN112116582B (en) Method for detecting and identifying cigarettes in inventory or display scene
CN110807775A (en) Traditional Chinese medicine tongue image segmentation device and method based on artificial intelligence and storage medium
CN109559362B (en) Image subject face replacing method and device
CN110675395A (en) Intelligent on-line monitoring method for power transmission line
CN109815936A (en) A kind of target object analysis method and device, computer equipment and storage medium
CN111091106B (en) Image clustering method and device, storage medium and electronic device
CN112926472A (en) Video classification method, device and equipment
CN113505780A (en) Two-dimensional code-based intelligent detection maintenance method and equipment
CN110796039B (en) Face flaw detection method and device, electronic equipment and storage medium
CN114241012B (en) High-altitude parabolic determination method and device
CN116385918A (en) Personnel working state evaluation method and system based on intelligent recognition
CN106503747A (en) A kind of image recognition statistical analysis system
CN111353439A (en) Method, device, system and equipment for analyzing teaching behaviors
CN107368847B (en) Crop leaf disease identification method and system
CN113469135A (en) Method and device for determining object identity information, storage medium and electronic device
CN110414322B (en) Method, device, equipment and storage medium for extracting picture
CN111800428A (en) Real-time statistical method and system for digital conference participation
CN112580616A (en) Crowd quantity determination method, device, equipment and storage medium
CN117541442A (en) Teaching attendance management method, device, equipment and storage medium
CN116959113A (en) Gait recognition method and device
CN111797922A (en) Text image classification method and device

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190823

WD01 Invention patent application deemed withdrawn after publication