CN105824886B - Fast food recognition methods based on markov random file - Google Patents
Fast food recognition methods based on markov random file Download PDFInfo
- Publication number
- CN105824886B CN105824886B CN201610136517.2A CN201610136517A CN105824886B CN 105824886 B CN105824886 B CN 105824886B CN 201610136517 A CN201610136517 A CN 201610136517A CN 105824886 B CN105824886 B CN 105824886B
- Authority
- CN
- China
- Prior art keywords
- image
- food
- queried
- class
- feature descriptor
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
- G06F16/5838—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/29—Graphical models, e.g. Bayesian networks
- G06F18/295—Markov models or related models, e.g. semi-Markov models; Markov random fields; Networks embedding Markov models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/68—Food, e.g. fruit or vegetables
Abstract
The fast food recognition methods based on markov random file that the invention discloses a kind of, mainly solve the problems, such as that deprivation of food characteristic point, shape indefinite form cause food identification difficult in food image identification, its realization process is: (1) establishing searching database, and the feature descriptor in retrieval image is extracted, construct index file;(2) feature descriptor for being queried image is extracted;(3) Likelihood Score for being queried image in the food label class in search library is found out according to feature descriptor;(4) basis is queried conditional probability of the image between the tag class in the Likelihood Score and the person's of being queried menu in the label group food in searching database, construct Markov energy theorem, energy theorem is minimized, the food label class for being queried image is obtained.The present invention quick and precisely can be identified and be classified to food image, it is easy to be expanded to bigger searching database and be queried image set, can be used for cultivating the diet style of health.
Description
Technical field
The invention belongs to Image Information Processing field, specifically a kind of food recognition methods can be used for solving food
Image analysis and identification food qualification category problem.
Background technique
Concern with people to healthy diet, for those want the people for improving oneself eating habit, with a letter
Single easy method is very important to record diet information.Up to the present, 24 hours whole day diet records or use
The method of common record " diet history " come assess individual eating habit.However, the method for self-report is usually inaccurate
True, especially in Overweight people, some people usually conceal the caloric intake of oneself.If the nutritional information of diet can lead to excessively
Cross food image detected automatically, can free user from manual record information.
In the recent period, in " life log (life-log) " research field, people to obtain, processing people's daily life information
Interest is more and more denseer.People record their life: upload pictures by various modes, upload GPS data etc., even,
Some people can share oneself " life log " on the internet.Up to the present, most of research about " life log "
It focuses in the universal multimedia processing based on " life log " data.In these researchs, use when people are always at table
Camera shoots food photo.With food photo ever-increasing in internet, they are dedicated to collecting, handle all available
The data arrived, establish index, the abstract of " life log ", and can retrieve " life log " data of magnanimity.But identification figure
Food and remarkable as in, because of " life log " too numerous and jumbled, redundancy.
Food automatic identification is a kind of substitute of manual record method, if there is according to image automatic identification food
Method, people can easily identify the diet trend of oneself, and not have to the photo that browsing pictures library lookup is shot recently.However
Research in terms of food identification is seldom.In current research method, existing some recognizers are to general objectives object
The identification of body achieves good effect, and some of them has been used based on local feature, such as SIFT descriptor, some are used
Based on global characteristics, such as color histogram and GIST characteristic point;Yang et al. will utilize two kinds of baseline algorithms, color histogram
Food identification field is introduced into the PFID data base of bag of SIFT feature.Felzenszwalb et al. proposition makes
The technology of indefinite shape is indicated with trigonometric ratio polygon.Leordeanu et al. proposes a kind of pairs of using what is interacted
Simple descriptor identify target class method for distinguishing.A recent work[8]learns a mean shape of the
Object class based on the thin plate spline parameterization. is firstly, these methods need
Detect significant characteristic point, such as edge, profile, key point and terrestrial reference.But since food image shortage is above-mentioned intentionally
The characteristic point of justice, secondly as really the shape of food is often amorphous, so being difficult that judgement is gone to eat in aforementioned manners
The similitude of object shape cannot accurately classify to food.
Summary of the invention
It is an object of the invention to be directed to above-mentioned existing technical problem, propose a kind of based on the fast of markov random file
Food recognition methods, to be asked by Likelihood Score of the query image in food label class and the other prior probability of tag class
Markov energy equation of the query image in food label class, and keep its energy the smallest by optimization energy equation determination
Food label classification.
To achieve the goals above, technical solution of the present invention includes the following:
(1) searching database is established according to the food image of different food species, from the retrieval image in searching database
DdMiddle extraction DdN kind feature descriptorAnd it stores it in index file, DdD-th of retrieval image of expression, d=1,
2,…,Nd, NdIndicate retrieval total number of images, k=1,2 ... N, N indicate the sum of the feature descriptor used;
(2) it sets i-th and is queried image si, and extract siKth kind feature descriptorI=1,2 ..., Ns, NsTable
Show and is queried total number of images;
(3) it according to retrieval image and the feature descriptor for being queried image, calculates i-th and is queried image siAt j-th
Tag class cjLikelihood Score P (s in foodi|cj), j=1,2 ..., Nc, NcIndicate the food label classification in searching database
Sum;
(4) building is queried food image set SP={ si| i=1,2 ..., NsFood label in searching database
Class set c={ cj| j=1,2 ..., NcIn Markov MRF energy equation J (c) formula,, and by minimize Ma Er
Section husband MRF energy J (c) is obtained i-th and is queried image siThe food label class c of identificationv, v=1,2 ... Nc:
(4.1) m-th of tag class c in the person's of being queried menu is calculatedmFood is in n-th of tag class cnFood Conditions
Under probability of occurrence P (cm|cn) n, m=1,2 ..., Np, n ≠ m, NpFood label classification is total in the expression person's of being queried menu
Number;
(4.2) n-th of tag class c in the person's of being queried menu is soughtnFood is in m-th of tag class cmFood is under Conditions
Probability of occurrence P (cn|cm);
(4.3) conditional probability { P (c in the person's of being queried menu between any two food label class is computed repeatedlym|cn),P
(cn|cm) | m, n=1,2 ..., Np};
(4.4) basis, which is queried in image collection SP, is queried Likelihood Score { P (s of the image in food label classi|
cj) | i=1,2 ..., Ns, j=1,2 ..., NcAnd the person's of being queried menu in conditional probability between any two food label class
{P(cm|cn),P(cn|cm) | m, n=1,2 ..., Np, it asks and is queried image collection SP={ si| i=1,2 ..., NsIn label
Group food set c={ cj| j=1,2 ... NcIn Markov MRF energy equation J (c);
(4.5) Markov MRF energy equation J (c) is minimized using Iterative conditional modes algorithm ICM, finds out i-th of quilt
Query image siFood label class cv;It reuses Iterative conditional modes algorithm ICM and minimizes Markov MRF energy equation J
(c) it finds out the food label class that other being queried in food image set SP are queried image, completes to being queried food figure
Image set closes the identification that image is queried in SP.
The present invention has the advantage that
1) present invention describes image due to using global characteristics descriptor, avoids because food shapes indefinite form can not
The problem of judging its similitude.Image is stored in the form of global characteristics descriptor, has saved memory space.
2) present invention is queried image using the global characteristics descriptor of retrieval food image to explain, can be easily
It expands to and bigger is queried food image collection and tally set.
3) present invention is by utilizing Iterative conditional modes algorithm to the numerical statistic and analysis for being queried food image collection
ICM optimizes the energy equation of Markov random field (MRF), improves computational efficiency.
Detailed description of the invention
Fig. 1 is realization general flow chart of the invention;
Fig. 2 is the sub-process figure that the directionality descriptor CEDD at color and edge is extracted in the present invention;
Fig. 3 is Iterative conditional modes algorithm flow chart used in the present invention;
Fig. 4 is to be queried image obtained in the person's of being queried breakfast used in emulation experiment of the present invention;
Fig. 5 is the part retrieval image in the searching database of emulation experiment of the present invention.
Specific embodiment
Referring to Fig.1, steps are as follows for realization of the invention:
Step 1, searching database is established according to the food image of different food species, from the retrieval figure in searching database
As DdMiddle extraction DdN kind feature descriptorIndex file is constructed, wherein DdD-th of retrieval image of expression, d=1,2 ...,
Nd, NdIndicate retrieval total number of images, k=1,2 ... N, N indicate the sum of the feature descriptor used.
Main characteristics of image descriptor to be used in the present inventionSide including color and edge in compact descriptor
Directionality histogram descriptor BTDH, fuzzy color and the Texture similarity descriptor of tropism descriptor CEDD, brightness and texture
FCTH and color layout descriptors CLD, edge histogram descriptor in Multimedia Content Description Interface MPEG-7 visual standards
EHD, Scalable Color Descriptor SCD, the extraction step of these types of characteristics of image descriptor are as follows:
(1.1) extraction of color and the directionality descriptor CEDD feature at edge:
With reference to Fig. 2, this step is implemented as follows:
Retrieval image is first divided into several piecemeals by (1.1a), then each piecemeal is divided into 4 sub-blocks;
(1.1b) extracts texture information to each sub-block: in YIQ color space, i.e. brightness-tone-saturation degree space,
The gray value for calculating each pixel finds out the average gray value of the pixel of each sub-block;Again by each sub-block by 5 number filters
The filtering of wave device, obtains edge histogram;Texture information classification is judged according to edge histogram, obtains a 6-bin histogram;
(1.1c) extracts colouring information to each sub-block: each sub-block is transformed into HSV color space, i.e. channel color
Tune-saturation degree-brightness and color space, and calculate the average value in each channel of HSV color space;Pass through 10-bins blur filter
After Filtration Filtration, 10 colors are obtained according to the value of channel tone H, then after filtering by 24-bins blur filter, root
According to the regional determination of saturation degree S and brightness V, is classified again to channel tone H, obtain the histogram of a 24-bin;By 24-
The histogram of bin is added separately in texture classification belonging to the sub-block, obtains the histogram of a 144-bin;
(1.1d) repeats above-mentioned (1.1b)-(1.1.c) step to all piecemeals of retrieval image, is entirely retrieved
The histogram of image, then histogram is normalized, obtain the color of retrieval image and the directionality descriptor at edge
CEDD;
(1.2) the directionality histogram descriptor BTDH of brightness and texture is extracted:
Retrieval image is first divided into several piecemeals by (1.2a), then each piecemeal is divided into 4 sub-blocks;
(1.2b) extracts texture information to each sub-block: each image subblock obtains three textures through Harr wavelet transformation
Element, through Fuzzy Correlation system by the partition into 8-bin Texture similarity;
(1.2c) extracts colouring information to each sub-block: each sub-block is transformed into HSV color space, i.e. channel color
Tune-saturation degree-brightness and color space;After 24-bin blur filter Filtration Filtration, one is obtained according to the value of brightness V
The histogram of 24-bin is added separately in texture classification belonging to the sub-block by 24-bin histogram, obtains the histogram of sub-block
Figure;
(1.2d) repeats above-mentioned (1.2b)-(1.2c) step to all piecemeals of retrieval image, is entirely retrieved
The histogram of image, then histogram is normalized, obtain the brightness of retrieval image and the directionality histogram of texture
Descriptor BTDH;
(1.3) fuzzy color and Texture similarity descriptor FCTH are extracted:
Retrieval image is first divided into several piecemeals by (1.3a), then each piecemeal is divided into 4 sub-blocks;
(1.3b) extracts texture information to each sub-block: each image subblock obtains three textures through Harr wavelet transformation
Element, through Fuzzy Correlation system by the partition into 8-bin Texture similarity;
(1.3c) extracts colouring information to each sub-block: each sub-block is transformed into hsv color space;Each sub-block
Channel tone H, saturation degree S and brightness V pass through 10-bin Fuzzy Correlation system, obtain the histogram of 10-bin;Pass through 24-bin
Three tones H1, H2, the H3 that original each channel tone H is divided into the depth different by Fuzzy Correlation system again, brightness V
It is changed into two fuzzy intervals, obtains the histogram of a 24-bin, then the histogram of 24-bin is added separately to the sub-block
In affiliated Texture similarity, the histogram of sub-block is obtained;
(1.3d) executes above-mentioned (1.3b)-(1.3c) step to all piecemeals of image, obtains the histogram of whole image,
Histogram is normalized, the fuzzy color and Texture similarity descriptor FCTH of retrieval image are obtained;
(1.4) edge histogram descriptor EDH is extracted:
Retrieval image is first divided into several piecemeals by (1.4a), then each piecemeal is divided into 4 sub-blocks;
(1.4b) extracts marginal information to each sub-block: in YIQ color space, the gray value of each pixel is calculated,
Find out the average gray value of the pixel of each sub-block;Each sub-block obtains edge histogram using 5 digital filters filters
Figure, judges that texture information classification obtains the histogram of a 5-bin according to edge histogram;
(1.4c) executes above-mentioned (1.4b) step to all piecemeals of image, the histogram of whole image is obtained, by histogram
Figure normalization, obtains the edge histogram descriptor EDH of retrieval image.
(1.5) color layout descriptors CLD is extracted:
(1.5a) maps an image to YCbCr color space, i.e. Luma-Blue concentration excursion amount-red-color concentration offset
Space, and divide the image into 64 piecemeals;
(1.5b) extracts colouring information to each piecemeal: calculating each color component of all pixels in each piecemeal
Average value;Two-dimension discrete cosine transform DCT is carried out to color component average value each in piecemeal, obtains a series of the two of each component
Tie up discrete cosine transform coefficient;Word scanning and quantization to the two-dimension discrete cosine transform DCT coefficient progress of each component, take
The low frequency component of respective two-dimension discrete cosine transform DCT out, this three groups of low frequency components constitute the color cloth of retrieval image block
Office descriptor CLD;
(1.5c) repeats above-mentioned (1.5b) step to all retrieval image blocks, obtains the color layout for entirely retrieving image
Descriptor CLD;
(1.6) Scalable Color Descriptor SCD is extracted:
Retrieval image is first divided into several piecemeals by (1.6a), then each piecemeal is divided into 4 sub-blocks;
(1.6b) extracts colouring information to each sub-block: each sub-block is transformed into hsv color space;By hsv color
Space uniform is quantified as 256bins (histogram), then by each histogram value non-uniform quantizing be 11bit, by Haar transform
Coding obtains the Scalable Color Descriptor SCD of sub-block.
(1.6c) repeats above-mentioned (1.6b) step to all retrieval image blocks, obtains the scalable face for entirely retrieving image
Color descriptor SCD;
(1.7) it repeats to carry out feature descriptor extraction to each of searching database retrieval image;
(1.8) by said extracted to the feature descriptor of retrieval image store, constitute index file.
Step 2, the feature descriptor for being queried image is extracted
It sets i-th and is queried image si, and extract siKth kind feature descriptorI=1,2 ..., Ns, NsIt indicates
It is queried total number of images;
The feature descriptor class for the retrieval image that the feature descriptor for being queried image and step 1 that this step is extracted extract
It is not identical, i.e., the directionality of directionality descriptor CEDD, brightness and texture including color and edge in compact descriptor
Histogram descriptor BTDH, fuzzy color and Texture similarity descriptor FCTH and Multimedia Content Description Interface MPEG-7 vision
Color layout descriptors CLD, edge histogram descriptor EHD, Scalable Color Descriptor SCD in standard.
Extracting method is identical as the extracting method of step 1, in which:
It is queried for example above-mentioned (1.1) step of directionality descriptor CEDD extraction process of the color and edge of image;
For example above-mentioned (1.2) step of directionality histogram descriptor BTDH extraction process of brightness and texture;
Fuzzy color and for example above-mentioned (1.3) step of Texture similarity descriptor FCTH extraction process;
For example above-mentioned (1.4) step of color layout descriptors CLD extraction process;
For example above-mentioned (1.5) step of edge histogram descriptor EHD extraction process;
For example above-mentioned (1.6) step of Scalable Color Descriptor SCD extraction process.
Step 3, it according to retrieval image and the feature descriptor for being queried image, calculates i-th and is queried image siIn jth
A tag class cjLikelihood Score P (s in foodi|cj), j=1,2 ..., Nc, NcIndicate the food label class in searching database
Other sum.
(3.1) according to retrieval image DdFeature descriptorBe queried image siFeature descriptorCalculate two
The characteristic distance of kth kind feature descriptor between person
With the characteristic distance of the feature descriptor between image in the present inventionThe phase for indicating retrieval image and being queried image
Like property, and use Tanimoto coefficientTo indicate the characteristic distance of the feature descriptor between imageTanimoto
Coefficient is smaller, and similarity is smaller;
WhereinIndicate i-th of query image siIn kth kind feature descriptor,Indicate d-th of retrieval image DdIn
Kth kind feature descriptor,It is feature descriptorTransposition,It is feature descriptorTransposition,It indicatesWithBetween Tanimoto coefficient;
(3.2) it computes repeatedly the retrieval image in searching database and is queried image s for i-thiKth kind feature description
The characteristic distance of symbol, and according to the retrieval image in characteristic distance descending arrangement searching database, selected characteristic distance, which is lower than, to be set
Fixed distance threshold hkRetrieval image, constitute image setDistance threshold hkSetting and the size of searching database have
It closes;
(3.3) image set according to obtained in above-mentioned steps (3.2)Calculating is queried image siIn tag class cjFood
In kth kind feature descriptor likelihood probability
Wherein D indicates retrieval food image collection, and c is the set of food label class in searching database,It indicates
Image setMiddle tag class cjThe quantity of food, n (cj, D) and indicate tag class c in retrieval food image collection DjThe quantity of food;
(3.4) it computes repeatedly i-th and is queried image siIn j-th of tag class cjOther feature descriptors in food
Likelihood probability
(3.5) image s is queried according to i-thiIn j-th of tag class cjThe likelihood of N number of feature descriptor in food is general
RateIt asks i-th and is queried image siIn j-th of tag class cjLikelihood Score P (s in foodi|
cj):
Wherein wkIt indicates to be queried image s i-thiKth kind feature descriptor likelihood probability standard deviation, calculate public
Formula is as follows:
WhereinIt indicates to be queried image s i-thiKth kind feature descriptor in tag class c={ cj| j=1,
2,…NcIn likelihood probability average value, calculation formula is as follows:
(3.6) it computes repeatedly and is queried each of image collection SP and is queried image in each food label class
Likelihood Score { P (si|cj) | i=1,2 ..., Ns, j=1,2 ..., Nc}。
Step 4, building is queried food image set SP={ si| i=1,2 ..., NsFood in searching database
Tag class set c={ cj| j=1,2 ..., NcIn Markov MRF energy equation J (c) formula, and by minimize horse
Er Kefu MRF energy J (c) is obtained i-th and is queried image siThe food label class c of identificationv, v=1,2 ... Nc。
Basis is queried Likelihood Score of the image in the food label class in searching database and is queried in the present invention
Conditional probability in person's menu between food label class constructs Markov MRF energy theorem, and food identification problem is converted into
Markov MRF energy equation J (c) the formula minimum problems for being queried image set in retrieval food label class set are sought,
Steps are as follows:
(4.1) m-th of tag class c in the person's of being queried menu is soughtmFood is in n-th of tag class cnFood is under Conditions
Probability of occurrence P (cm|cn):
P(cm|cn)=n (cm,Mm,n)/n(cn,Gn) <6>
Wherein n (cn,Gn) indicate GnMiddle tag class cnThe quantity of food, GnIndicate c in menunThe set of group food image;n
(cm,Mm,n) indicate Mm,nMiddle tag class cmThe quantity of food, Mm,nIndicate the tag class c on menumFood and tag class cnFood
The case where occurring simultaneously, m, n=1,2 ..., Np, NpIndicate the food label class sum in the person's of being queried menu;
(4.2) n-th of tag class c in the person's of being queried menu is soughtnFood is in m-th of tag class cmFood is under Conditions
Probability of occurrence P (cn|cm):
P(cn|cm)=n (cn,Mm,n)/n(cm,Gm) <7>
Wherein n (cm,Gm) indicate GmMiddle tag class cmThe quantity of food, GmIndicate c in menumThe set of group food image;n
(cn,Mm,n) indicate Mm,nMiddle tag class cnThe quantity of food;
(4.3) conditional probability { P (c in the person's of being queried menu between any two food label class is computed repeatedlym|cn),P
(cn|cm) | m, n=1,2 ..., Np};
(4.4) basis, which is queried in image collection SP, is queried Likelihood Score { P (s of the image in food label classi|
cj) | i=1,2 ..., Ns, j=1,2 ..., NcAnd the person's of being queried menu in conditional probability between any two food label class
{P(cm|cn),P(cn|cm) | m, n=1,2 ..., Np, seek the Ma Er for being queried image collection SP in food label class set c
Section husband MRF energy equation J (c):
Wherein A={ (cm,cn) | m, n=1,2 ..., NpIndicate the person's of being queried menu in food label class pair collection, λ
For smoothing constant, wiIt indicates to be queried image s i-thiLikelihood Score standard deviation, calculation formula is as follows:
(4.5) Markov MRF energy equation J (c) is minimized using Iterative conditional modes algorithm ICM, as shown in figure 3,
It obtains i-th and is queried image siFood label class cv, steps are as follows:
(4.5a) initializes P (si|cj),P(cm|cn), cycle-index Q=0 is set;
(4.5b) choose be different from currently being queried image be queried image, calculate Markov MRF according to formula<8>
Energy J (c, si)={ J (cj,si) | j=1,2 ..., Nc};
(4.5c) is from Markov MRF energy J (c, si) in selection energy it is the smallest, obtain corresponding food label class cv,
It is queried image s as i-thiFood qualification category;
(4.5d) enables Q=Q+1, if Q < Ns, return to step (4.5b), otherwise, stop circulation, obtain and be queried food figure
Image set closes the food label class for being queried image in SP, completes to being queried the knowledge for being queried image in food image set SP
Not.
Effect of the invention can be further illustrated by following experiment.
1. experimental subjects
Experimental subjects is the breakfast food image of the person's of being queried some day shown in Fig. 4, breakfast in the person of being queried one week
Menu is as shown in table 1:
Breakfast menu of 1 person of being queried of table
2. experimental procedure
(2.1) searching database such as Fig. 5 is established, the feature descriptor of retrieval image is extracted, constructs index file;
(2.2) input it is shown in Fig. 4 is queried image, extract feature descriptor from being queried in image, and calculate its with
Retrieve the characteristic distance of the feature descriptor of image;
(2.3) to find out likelihood of the feature descriptor for being queried food image in food label class according to formula<2>general
Shown in rate result table 2;
Table 2
(2.4) according to formula<3>, what is inputted is queried Likelihood Score of the food image in label group food, according to
Secondary is P (s1|c),P(s2|c),P(s3| it is c), as follows:
P(s1| c)={ 0.2185,0.0700,0.1700,0.2684,0.0757,0.1974 }
P(s2| c)={ 0.1131,0.4716,0.0725,0.1497,0.1374,0.0556 }
P(s3| c)={ 0.0362,0.1757,0.0598,0.1415,0.5332,0.0536 }
(2.5) it according to table 1, formula<6>and formula<7>, obtains between the tag class in the person's of being queried breakfast menu sheet 1
Conditional probability P (cm|cn), P (cn|cm), such as table 3
Table 3
(2.6) Markov MRF energy theorem is minimized using Iterative conditional modes algorithm ICM, obtains following data:
J(c,s1)={ 2.2902,5.9449,2.3388,5.7490,5.9392,2.3113 }
J(c,s2)={ 6.3207,1.5185,4.1906,6.2006,6.8626,4.2074 }
J(c,s3)={ 6.3977,6.8243,4.2033,6.2088,1.4569,4.2095 }
The data wherein blackened are the minimum value in this group of data.
3. experimental result:
From the Markov MRF energy-minimum in step (2.6), the tag class of corresponding input picture are obtained are as follows:
Steamed stuffed bun, egg, milk are complied fully with Fig. 4 of input food species for being queried image.
Claims (5)
1. the fast food recognition methods based on markov random file, comprising:
(1) searching database is established according to the food image of different food species, from the retrieval image D in searching databasedIn mention
Take DdN kind feature descriptorAnd it stores it in index file, DdD-th of retrieval image of expression, d=1,2 ...,
Nd, NdIndicate retrieval total number of images, k=1,2 ... N, N indicate the sum of the feature descriptor used;
(2) it sets i-th and is queried image si, and extract siKth kind feature descriptor fi k, i=1,2 ..., Ns, NsIndicate quilt
Query image sum;
(3) it according to retrieval image and the feature descriptor for being queried image, calculates i-th and is queried image siIn j-th of tag class
cjLikelihood Score P (s in foodi|cj), j=1,2 ..., Nc, NcIndicate the sum of the food label classification in searching database;
(4) building is queried food image set SP={ si| i=1,2 ..., NsFood label class set in searching database
Close c={ cj| j=1,2 ..., NcIn Markov MRF energy equation J (c) formula, pass through minimize Markov MRF energy
It measures J (c), obtains i-th and be queried image siThe food label class c of identificationv, v=1,2 ... Nc:
(4.1) m-th of tag class c in the person's of being queried menu is calculatedmFood is in n-th of tag class cnFood is under Conditions
Probability of occurrence P (cm|cn) n, m=1,2 ..., Np, n ≠ m, NpIndicate the sum of food label classification in the person's of being queried menu;
(4.2) n-th of tag class c in the person's of being queried menu is soughtnFood is in m-th of tag class cmFood going out under Conditions
Existing probability P (cn|cm);
(4.3) conditional probability { P (c in the person's of being queried menu between any two food label class is computed repeatedlym|cn),P(cn|
cm) | m, n=1,2 ..., Np};
(4.4) basis, which is queried in image collection SP, is queried Likelihood Score { P (s of the image in food label classi|cj)|i
=1,2 ..., Ns, j=1,2 ..., NcAnd the person's of being queried menu in conditional probability { P (c between any two food label classm
|cn),P(cn|cm) | m, n=1,2 ..., Np, it asks and is queried image collection SP={ si| i=1,2 ..., NsIn label group food
Set c={ cj| j=1,2 ... NcIn Markov MRF energy equation J (c);
(4.5) Markov MRF energy equation J (c) is minimized using Iterative conditional modes algorithm ICM, finds out i-th and is queried
Image siFood label class cv;It reuses Iterative conditional modes algorithm ICM and minimizes Markov MRF energy equation J (c)
It finds out the food label class that other being queried in food image set SP are queried image, completes to being queried food image collection
Close the identification that image is queried in SP.
2. food recognition methods according to claim 1, wherein step (1) is from the retrieval image D in searching databasedIn
Extract N kind feature descriptorIndex file is established, is carried out in accordance with the following steps:
(1.1) image D will be retrieveddIt is divided into several piecemeals, then each piecemeal is divided into 4 sub-blocks, and line is carried out to each sub-block
Reason, color and edge processing, obtain the histogram of piecemeal;It repeats to carry out texture, color and edge processing to all piecemeals, obtain
Retrieve image DdHistogram, and to retrieval image DdHistogram be normalized to obtain retrieval image DdN kind feature retouch
State symbol;
(1.2) it repeats to carry out feature descriptor extraction to each of searching database retrieval image, and stores, constitute index
File.
3. food recognition methods according to claim 1 is queried image s wherein extracting in the step (2)iFeature
Descriptor is will to be queried image siBe divided into several piecemeals, then each piecemeal be divided into 4 sub-blocks, and to each sub-block into
Row texture, color and edge processing obtain the histogram of piecemeal;It repeats to carry out texture, color and edge processing to all piecemeals,
It obtains being queried image siHistogram, then to being queried image siHistogram be normalized to obtain and be queried image siN
Kind feature descriptor.
4. according to the method described in claim 1, wherein being described according to retrieval image with the feature for being queried image in step (3)
Symbol calculates i-th and is queried image siIn j-th of tag class cjLikelihood Score P (s in foodi|cj), as follows into
Row:
(3.1) according to retrieval image DdFeature descriptorBe queried image siFeature descriptionfi k, calculate the two
Between kth kind feature descriptor characteristic distance Ti,d k;
Wherein fi kIndicate i-th of query image siIn kth kind feature descriptor,Indicate d-th of retrieval image DdIn kth
Kind feature descriptor, (fi k)TIt is feature descriptor fi kTransposition,It is feature descriptorTransposition;
(3.2) it computes repeatedly the retrieval image in searching database and is queried image s for i-thiKth kind feature descriptor
Characteristic distance, and according to the retrieval image in characteristic distance descending arrangement searching database, selected characteristic distance is lower than setting threshold
Value hkRetrieval image, constitute image set
(3.3) basis in retrieval image set and is queried image siKth kind feature descriptor characteristic distance lower than setting threshold
Value hkRetrieval image setCalculating is queried image siIn tag class cjThe likelihood probability of kth kind feature descriptor in food
P(fi k|cj);
Wherein D indicates retrieval food image collection, and c is the set of food label class in searching database,Indicate retrieval
Image setMiddle tag class cjThe quantity of food, n (cj, D) and indicate tag class c in retrieval food image collection DjThe quantity of food;
(3.4) it computes repeatedly i-th and is queried image siIn j-th of tag class cjThe likelihood of other feature descriptors in food
Probability { P (fi k|cj) | k=1,2 ..., N };
(3.5) image s is queried according to i-thiIn j-th of tag class cjLikelihood probability { the P of N number of feature descriptor in food
(fi k|cj) | k=1,2 ..., N }, it asks by i-th of query image siIn j-th of tag class cjLikelihood Score P (s in foodi|
cj):
Wherein wkIt indicates to be queried image s i-thiKth kind feature descriptor likelihood probability standard deviation, calculation formula is such as
Under:
WhereinIt indicates to be queried image s i-thiKth kind feature descriptor in tag class c={ cj| j=1,2 ...
NcIn likelihood probability average value, calculation formula is as follows:
(3.6) it computes repeatedly and is queried each of image collection SP and is queried image in each food label class seemingly
Right score { P (si|cj) i=1,2 ..., Ns, j=1,2 ..., Nc}。
5. food recognition methods according to claim 1 wherein utilizes Iterative conditional modes algorithm ICM in step (4.5)
It minimizes Markov MRF energy equation J (c), obtains i-th and be queried image siFood label class cv, steps are as follows:
(4.5a) initializes P (si|cj),P(cm|cn), cycle-index Q=0 is set;
(4.5b) choose be different from currently being queried image be queried image, calculate Markov MRF energy according to formula (8)
J(c,si)={ J (cj,si) | j=1,2 ..., Nc};
(4.5c) is from Markov MRF energy J (c, si) in selection energy it is the smallest, obtain corresponding food label class cv, as
It is queried image s i-thiFood qualification category;
(4.5d) enables Q=Q+1, if Q < Ns, (4.5b) step is returned to, otherwise stops circulation, obtains and be queried food image set
The food label class for being queried image in SP completes the identification to image in food image set SP is queried.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610136517.2A CN105824886B (en) | 2016-03-10 | 2016-03-10 | Fast food recognition methods based on markov random file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610136517.2A CN105824886B (en) | 2016-03-10 | 2016-03-10 | Fast food recognition methods based on markov random file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105824886A CN105824886A (en) | 2016-08-03 |
CN105824886B true CN105824886B (en) | 2019-03-26 |
Family
ID=56987620
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610136517.2A Active CN105824886B (en) | 2016-03-10 | 2016-03-10 | Fast food recognition methods based on markov random file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105824886B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107991939A (en) * | 2017-12-27 | 2018-05-04 | 广东美的厨房电器制造有限公司 | Cooking control method and culinary art control device, storage medium and cooking equipment |
CN108256476A (en) * | 2018-01-17 | 2018-07-06 | 百度在线网络技术(北京)有限公司 | For identifying the method and apparatus of fruits and vegetables |
CN111666961B (en) * | 2019-03-07 | 2023-02-17 | 佛山市顺德区美的电热电器制造有限公司 | Intelligent household appliance, method and device for identifying food material type of intelligent household appliance and electronic equipment |
WO2020237480A1 (en) * | 2019-05-27 | 2020-12-03 | 西门子股份公司 | Control method and device based on image recognition |
CN110363237B (en) * | 2019-07-01 | 2021-09-07 | 河南理工大学 | Coal caving port operation decision method based on hidden Markov random field model |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7139409B2 (en) * | 2000-09-06 | 2006-11-21 | Siemens Corporate Research, Inc. | Real-time crowd density estimation from video |
CN100580703C (en) * | 2007-05-17 | 2010-01-13 | 西北工业大学 | Supervision-free Markov random field image segmentation method |
TWI391876B (en) * | 2009-02-16 | 2013-04-01 | Inst Information Industry | Method and system for foreground detection using multi-modality fusion graph cut and computer program product |
CN103150718B (en) * | 2011-12-06 | 2016-02-10 | 中国科学院电子学研究所 | Based on the method for detecting change of remote sensing image of Change vector Analysis and classification and predicting |
US9225959B2 (en) * | 2012-01-10 | 2015-12-29 | Samsung Electronics Co., Ltd. | Method and apparatus for recovering depth value of depth image |
CN103309961B (en) * | 2013-05-30 | 2015-07-15 | 北京智海创讯信息技术有限公司 | Webpage content extraction method based on Markov random field |
-
2016
- 2016-03-10 CN CN201610136517.2A patent/CN105824886B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105824886A (en) | 2016-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105824886B (en) | Fast food recognition methods based on markov random file | |
Farinella et al. | Retrieval and classification of food images | |
Zhao et al. | Plant identification using leaf shapes—A pattern counting approach | |
US7379627B2 (en) | Integrated solution to digital image similarity searching | |
Zhao et al. | Learning mid-level filters for person re-identification | |
Zeng et al. | Image retrieval using spatiograms of colors quantized by gaussian mixture models | |
He et al. | Analysis of food images: Features and classification | |
Kagaya et al. | Highly accurate food/non-food image classification based on a deep convolutional neural network | |
Pan et al. | Deepfood: Automatic multi-class classification of food ingredients using deep learning | |
Oliva et al. | Scene-centered description from spatial envelope properties | |
Hartmann et al. | Recent developments in large-scale tie-point matching | |
Pattanaik et al. | Beginners to content-based image retrieval | |
US10115004B2 (en) | Methods and software for hallucinating facial features by prioritizing reconstruction errors | |
Ali et al. | Content based image retrieval using feature extraction with machine learning | |
Singh et al. | Design & performance analysis of content based image retrieval system based on image classification usingvarious feature sets | |
Zheng et al. | Superpixel-based image recognition for food images | |
Raja et al. | Classification of indoor/outdoor scene | |
Naaz et al. | Enhanced content based image retrieval using machine learning techniques | |
Raja et al. | Robust indoor/outdoor scene classification | |
Prakash et al. | Combining novel features for content based image retrieval | |
Ahsani et al. | Food Image Retrieval with Gray Level Co-Occurrence Matrix Texture Feature and CIE L* a* b* Color Moments Feature | |
Tripathi et al. | A new technique for CBIR with contrast enhancement using multi-feature and multi class SVM classification | |
CN107092875B (en) | Novel scene recognition method | |
Alattab et al. | Efficient method of visual feature extraction for facial image detection and retrieval | |
Luszczkiewicz-Piatek et al. | Effective color image retrieval based on the Gaussian mixture model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |