CN105824886A - Rapid food recognition method based on Markov random field - Google Patents

Rapid food recognition method based on Markov random field Download PDF

Info

Publication number
CN105824886A
CN105824886A CN201610136517.2A CN201610136517A CN105824886A CN 105824886 A CN105824886 A CN 105824886A CN 201610136517 A CN201610136517 A CN 201610136517A CN 105824886 A CN105824886 A CN 105824886A
Authority
CN
China
Prior art keywords
food
image
queried
label class
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610136517.2A
Other languages
Chinese (zh)
Other versions
CN105824886B (en
Inventor
孙伟
潘蓉
赵春宇
陈许蒙
郭宝龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN201610136517.2A priority Critical patent/CN105824886B/en
Publication of CN105824886A publication Critical patent/CN105824886A/en
Application granted granted Critical
Publication of CN105824886B publication Critical patent/CN105824886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/29Graphical models, e.g. Bayesian networks
    • G06F18/295Markov models or related models, e.g. semi-Markov models; Markov random fields; Networks embedding Markov models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/68Food, e.g. fruit or vegetables

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Library & Information Science (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a rapid food recognition method based on a Markov random field, and mainly solves the problem that food is difficult to recognize due to the conditions that the food lacks of feature points and the shapes of the food are not fixed in food image recognition. The realization process of the rapid food recognition method comprises the following steps: (1) establishing a retrieval database, extracting feature descriptors in retrieval images, and constructing index files; (2) extracting feature descriptors of queried images; (3) calculating out the likelihood score of the queried images in food label types of the retrieval base according to the feature descriptors; (4) according to the likelihood score of the queried images in the label type food in the retrieval database and according to the condition probability between labels in menus of queried people, constructing a Markov energy formula and a smallest energy formula so as to obtain the food label type of the queried images. According to the rapid food recognition method disclosed by the invention, rapid and accurate recognition and classification can be performed on the food images, the food images can be easily expanded to a larger retrieval database and a queried image set, and the rapid food recognition method can be used for cultivating a healthy diet manner.

Description

Fast food based on markov random file recognition methods
Technical field
The invention belongs to Image Information Processing field, a kind of food recognition methods, can be used for solving food image analysis and identifying food qualification category problem.
Background technology
Along with people's concern to healthy diet, for those people wanting to improve oneself dietary habit, record diet information by a simple method and be very important.Up to the present, 24 hours whole day diet records still use the method for common record " diet history " to assess individual dietary habit.But, the method for self-report is the most inaccurate, and particularly in Overweight people, some people generally conceals the energy intake of oneself.If the nutritional information of diet can be crossed and automatically be detected by food image, user can be freed from manual record information.
In the recent period, in " life daily record (life-log) " research field, people are more and more denseer to the interest obtaining, processing people's daily life information.People record their life by various modes: upload pictures, upload gps data etc., and even, some people can share oneself " life daily record " on the internet.Up to the present, major part focuses in universal multimedia based on " life daily record " data process about the research of " life daily record ".In these are studied, when people are always at table, use photographing unit shooting food photo.Along with food photo ever-increasing in the Internet, they are devoted to collect, process the data that all available arrives, and set up the index of " life daily record ", summary, and can retrieve " life daily record " data of magnanimity.But the food in identification image is remarkable, because " life daily record " the most numerous and the most jumbled, redundancy.
Food identifies it is the succedaneum of a kind of manual record method automatically, if there being the method according to image automatic identification food, people just can easily differentiate the diet trend of oneself, and the photo shot recently without browsing pictures library lookup.But research in terms of food identification is little.In current research method, some existing recognizers achieve good effect to the identification of general objectives object, and some of which employs based on local feature, such as SIFT descriptor, some employs based on global characteristics, such as color histogram and GIST characteristic point;Yang et al. will utilize two kinds of baseline algorithm, and the PFID data base of color histogram and bagofSIFT feature is incorporated into food identification field.Felzenszwalb et al. proposes the technology using trigonometric ratio polygon to represent indefinite shape.Leordeanu et al. proposes and a kind of utilizes the paired simple descriptor of interaction to identify target class method for distinguishing.First, these methods need to detect significant characteristic point, such as edge, profile, key point and terrestrial reference to Arecentwork [8] learnsameanshapeoftheobjectclassbasedonthethinplatesplin eparameterization..But, owing to food image lacks above-mentioned significant characteristic point, secondly as the shape of real food is the most unformed, so being difficult to remove to judge the similarity of food shapes in aforementioned manners, it is impossible to accurately food is classified.
Summary of the invention
Present invention aims to above-mentioned existing technical problem, the recognition methods of a kind of fast food based on markov random file is proposed, with by query image the Likelihood Score of food label apoplexy due to endogenous wind and the prior probability of label classification ask query image at the Markov energy equation of food label apoplexy due to endogenous wind, and by optimize energy equation determine can be minimum food label classification.
To achieve these goals, technical scheme includes the following:
(1) searching database is set up according to the food image of different food species, the retrieval image D from searching databasedMiddle extraction DdN kind feature descriptorAnd store it in index file, DdRepresent the d retrieval image, d=1,2 ..., Nd, NdRepresent and retrieve total number of images, k=1,2 ... N, N represent the sum of the feature descriptor of use;
(2) set i-th and be queried image si, and extract siKth kind feature descriptorI=1,2 ..., Ns, NsRepresent and be queried total number of images;
(3) according to retrieval image and the feature descriptor being queried image, calculate i-th and be queried image siIn jth label class cjLikelihood Score P (s in foodi|cj), j=1,2 ..., Nc, NcThe sum of the food label classification in expression searching database;
(4) structure is queried food image set SP={si| i=1,2 ..., NsFood label class set c={c in searching databasej| j=1,2 ..., NcMarkov MRF energy equation J (c) formula in },, and by minimizing Markov MRF energy J (c), show that i-th is queried image siFood label class c identifiedv, v=1,2 ... Nc:
(4.1) m-th label class c in the person's of being queried menu is calculatedmFood is in the n-th label class cnProbability of occurrence P (c under food Conditionsm|cn) n, m=1,2 ..., Np, n ≠ m, NpRepresent the sum of food label classification in the person's of being queried menu;
(4.2) the n-th label class c in the person's of being queried menu is soughtnFood is in m-th label class cmProbability of occurrence P (c under food Conditionsn|cm);
(4.3) conditional probability { P (c between any two food label class in the double counting person of being queried menum|cn),P(cn|cm) | m, n=1,2 ..., Np};
(4.4) it is queried the image Likelihood Score { P (s at food label apoplexy due to endogenous wind according to be queried in image collection SPi|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, ask and be queried image collection SP={si| i=1,2 ..., NsAt label group food set c={cj| j=1,2 ... NcMarkov MRF energy equation J (c) in };
(4.5) utilize Iterative conditional modes algorithm ICM to minimize Markov MRF energy equation J (c), obtain i-th and be queried image siFood label class cv;Reuse Iterative conditional modes algorithm ICM to minimize Markov MRF energy equation J (c) and obtain other that be queried in food image set SP and be queried the food label class of image, complete being queried the identification being queried image in food image set SP.
Present invention have the advantage that
1) due to the fact that use global characteristics descriptor is to describe image, it is to avoid the problem that its similarity cannot be judged because of food shapes indefinite form.Image is stored with the form of global characteristics descriptor, has saved memory space.
2) present invention uses the global characteristics descriptor of retrieval food image to explain and be queried image, can be readily extended to bigger be queried food image collection and tally set.
3) present invention passes through, to numerical statistic and the analysis being queried food image collection, to utilize Iterative conditional modes algorithm ICM to optimize the energy equation of Markov random field (MRF), improve computational efficiency.
Accompanying drawing explanation
Fig. 1 be the present invention realize general flow chart;
Fig. 2 is the sub-process figure of the directivity descriptor CEDD extracting color and edge in the present invention;
Fig. 3 is the Iterative conditional modes algorithm flow chart used in the present invention;
Fig. 4 be obtaining from the person's of being queried breakfast of being used of emulation experiment of the present invention be queried image;
Fig. 5 is the part retrieval image in the searching database of emulation experiment of the present invention.
Detailed description of the invention
With reference to Fig. 1, the present invention to realize step as follows:
Step 1, sets up searching database according to the food image of different food species, the retrieval image D from searching databasedMiddle extraction DdN kind feature descriptorIndex building file, wherein DdRepresent the d retrieval image, d=1,2 ..., Nd, NdRepresent and retrieve total number of images, k=1,2 ... N, N represent the sum of the feature descriptor of use.
The main characteristics of image descriptor used in the present inventionIncluding the color layout descriptors CLD in directivity rectangular histogram descriptor BTDH, fuzzy color and the Texture similarity descriptor FCTH of directivity descriptor CEDD, brightness and texture at the color in compact descriptor and edge and Multimedia Content Description Interface MPEG-7 visual standards, edge histogram descriptor EHD, Scalable Color Descriptor SCD, the extraction step of these several characteristics of image descriptors is as follows:
(1.1) extraction of the directivity descriptor CEDD feature at color and edge:
Reference Fig. 2, being implemented as follows of this step:
(1.1a) first retrieval image is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks;
(1.1b) each sub-block is extracted texture information: in YIQ color space, i.e. brightness-tone-saturation space, calculates the gray value of each pixel, obtains the average gray value of the pixel of each sub-block;Again by each sub-block through 5 digital filters filter, obtain edge histogram;Judge texture information classification according to edge histogram, obtain a 6-bin rectangular histogram;
(1.1c) each sub-block is extracted colouring information: each sub-block is transformed into HSV color space, i.e. channel hue-saturation-brightness color space, and calculates the meansigma methods of each passage of HSV color space;After 10-bins blur filter Filtration Filtration, according to 10 colors that are worth to of channel tone H, then by 24-bins blur filter filter after, according to saturation S and the regional determination of brightness V, channel tone H is classified again, obtains the rectangular histogram of a 24-bin;The rectangular histogram of 24-bin is added separately in the texture classification belonging to this sub-block, obtains the rectangular histogram of a 144-bin;
(1.1d) all piecemeals of retrieval image are repeated above-mentioned (1.1b)-(1.1.c) step, obtain the rectangular histogram of whole retrieval image, again rectangular histogram is normalized, obtains retrieving color and the directivity descriptor CEDD at edge of image;
(1.2) the directivity rectangular histogram descriptor BTDH of brightness and texture extracts:
(1.2a) first retrieval image is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks;
(1.2b) each sub-block is extracted texture information: each image subblock obtains three texel through Harr wavelet transformation, through Fuzzy Correlation system by this partition to 8-bin Texture similarity;
(1.2c) each sub-block is extracted colouring information: each sub-block is transformed into HSV color space, i.e. channel hue-saturation-brightness color space;After 24-bin blur filter Filtration Filtration, it is worth to a 24-bin rectangular histogram according to brightness V, the rectangular histogram of 24-bin is added separately in the texture classification belonging to this sub-block, obtains the rectangular histogram of sub-block;
(1.2d) all piecemeals of retrieval image are repeated above-mentioned (1.2b)-(1.2c) step, obtain the rectangular histogram of whole retrieval image, again rectangular histogram is normalized, obtains retrieving brightness and the directivity rectangular histogram descriptor BTDH of texture of image;
(1.3) fuzzy color and Texture similarity descriptor FCTH extract:
(1.3a) first retrieval image is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks;
(1.3b) each sub-block is extracted texture information: each image subblock obtains three texel through Harr wavelet transformation, through Fuzzy Correlation system by this partition to 8-bin Texture similarity;
(1.3c) each sub-block is extracted colouring information: each sub-block is transformed into hsv color space;Channel tone H, saturation S and the brightness V of each sub-block, through 10-bin Fuzzy Correlation system, obtain the rectangular histogram of 10-bin;By 24-bin Fuzzy Correlation system, original each channel tone H is divided into three tone H1 that the depth is different again, H2, H3, brightness V is changed into two fuzzy intervals, draw the rectangular histogram of a 24-bin, again the rectangular histogram of 24-bin is added separately in the Texture similarity belonging to this sub-block, obtains the rectangular histogram of sub-block;
(1.3d) all piecemeals of image are performed above-mentioned (1.3b)-(1.3c) step, obtain the rectangular histogram of whole image, by rectangular histogram normalization, obtain retrieving fuzzy color and the Texture similarity descriptor FCTH of image;
(1.4) edge histogram descriptor EDH extracts:
(1.4a) first retrieval image is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks;
(1.4b) each sub-block is extracted marginal information: in YIQ color space, calculate the gray value of each pixel, obtain the average gray value of the pixel of each sub-block;Each sub-block through 5 digital filters filter, obtains edge histogram again, judges that texture information classification obtains the rectangular histogram of a 5-bin according to edge histogram;
(1.4c) all piecemeals of image are performed above-mentioned (1.4b) step, obtain the rectangular histogram of whole image, by rectangular histogram normalization, obtain retrieving the edge histogram descriptor EDH of image.
(1.5) color layout descriptors CLD extracts:
(1.5a) map an image to YCbCr color space, i.e. Luma-Blue concentration excursion amount-red-color concentration side-play amount space, and divide the image into 64 piecemeals;
(1.5b) each piecemeal is extracted colouring information: calculate the meansigma methods of each color component of all pixels in each piecemeal;Each color component meansigma methods in piecemeal is carried out two-dimension discrete cosine transform DCT, obtains a series of two-dimension discrete cosine transform DCT coefficient of each component;The word scanning carrying out the two-dimension discrete cosine transform DCT coefficient of each component and quantization, take out the low frequency component of respective two-dimension discrete cosine transform DCT, and these three groups of low frequency components constitute the color layout descriptors CLD of retrieval image block;
(1.5c) all retrieval image blocks are repeated above-mentioned (1.5b) step, obtain the color layout descriptors CLD of whole retrieval image;
(1.6) Scalable Color Descriptor SCD extracts:
(1.6a) first retrieval image is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks;
(1.6b) each sub-block is extracted colouring information: each sub-block is transformed into hsv color space;Hsv color space uniform is quantified as 256bins (rectangular histogram), then is 11bit by each histogram value non-uniform quantizing, obtain the Scalable Color Descriptor SCD of sub-block through Haar transform coding.
(1.6c) all retrieval image blocks are repeated above-mentioned (1.6b) step, obtain the Scalable Color Descriptor SCD of whole retrieval image;
(1.7) repeat each the retrieval image in searching database is carried out feature descriptor extraction;
(1.8) by said extracted to retrieval image feature descriptor store, constitute index file.
Step 2, extracts the feature descriptor being queried image
Set i-th and be queried image si, and extract siKth kind feature descriptorI=1,2 ..., Ns, NsRepresent and be queried total number of images;
The feature descriptor classification retrieving image that the feature descriptor being queried image that this step is extracted extracts with step 1 is identical, i.e. includes the color layout descriptors CLD in directivity rectangular histogram descriptor BTDH, fuzzy color and the Texture similarity descriptor FCTH of directivity descriptor CEDD, brightness and the texture at the color in compact descriptor and edge and Multimedia Content Description Interface MPEG-7 visual standards, edge histogram descriptor EHD, Scalable Color Descriptor SCD.
Extracting method is identical with the extracting method of step 1, wherein:
The directivity descriptor CEDD of the color and edge that are queried image extracts process the most above-mentioned (1.1) step;
The directivity rectangular histogram descriptor BTDH of brightness and texture extracts process the most above-mentioned (1.2) step;
Fuzzy color and Texture similarity descriptor FCTH extract process the most above-mentioned (1.3) step;
Color layout descriptors CLD extracts process the most above-mentioned (1.4) step;
Edge histogram descriptor EHD extracts process the most above-mentioned (1.5) step;
Scalable Color Descriptor SCD extracts process the most above-mentioned (1.6) step.
Step 3, according to retrieval image and the feature descriptor being queried image, calculates i-th and is queried image siIn jth label class cjLikelihood Score P (s in foodi|cj), j=1,2 ..., Nc, NcThe sum of the food label classification in expression searching database.
(3.1) according to retrieval image DdFeature descriptorBe queried image siFeature descriptorThe characteristic distance of calculating kth kind feature descriptor between the two
With the characteristic distance of the feature descriptor between image in the present inventionThe similarity representing retrieval image and be queried image, and use Tanimoto coefficientRepresent the characteristic distance of feature descriptor between imageTanimoto coefficient is the least, and similarity is the least;
T i , d k = t ( f i k , f d k ) = ( f i k ) T f d k ( f i k ) T f i k + ( f d k ) T f d k - ( f i k ) T f d k - - - < 1 >
WhereinRepresent i-th query image siIn kth kind feature descriptor,Represent the d retrieval image DdIn kth kind feature descriptor,It it is feature descriptorTransposition,It it is feature descriptorTransposition,RepresentWithBetween Tanimoto coefficient;
(3.2) the retrieval image in double counting searching database and i-th are queried image siThe characteristic distance of kth kind feature descriptor, and according to the retrieval image in characteristic distance descending searching database, selected characteristic distance is less than the distance threshold h setkRetrieval image, pie graph image setThis distance threshold hkSetting relevant with the size of searching database;
(3.3) according to the image set obtained in above-mentioned steps (3.2)Calculating is queried image siIn label class cjThe likelihood probability of the kth kind feature descriptor in food
P ( f i k | c j ) = n ( c j , N i k ) / n ( c j , D ) - - - < 2 >
Wherein D represents retrieval food image collection, and c is the set of food label class in searching database,Represent image setMiddle label class cjThe quantity of food, n (cj, D) and represent label class c in retrieval food image collection DjThe quantity of food;
(3.4) double counting i-th is queried image siIn jth label class cjThe likelihood probability of other feature descriptors in food
(3.5) it is queried image s according to i-thiIn jth label class cjThe likelihood probability of the N number of feature descriptor in foodI-th is asked to be queried image siIn jth label class cjLikelihood Score P (s in foodi|cj):
P ( s i | c j ) = 1 N &Sigma; k = 1 N w k P ( f i k | c j ) , - - - < 3 >
Wherein wkRepresent that i-th is queried image siThe standard deviation of likelihood probability of kth kind feature descriptor, computing formula is as follows:
w k = 1 N c &Sigma; j = 1 N c ( P ( f i k | c j ) - P ( f i k | c ) &OverBar; ) , - - - < 4 >
WhereinRepresent that i-th is queried image siKth kind feature descriptor in label class c={cj| j=1,2 ... NcThe meansigma methods of the likelihood probability in }, computing formula is as follows:
P ( f i k | c ) &OverBar; = 1 N c &Sigma; j = 1 N c P ( f i k | c j ) ; - - - < 5 >
(3.6) each during double counting is queried image collection SP is queried the image Likelihood Score { P (s at each food label apoplexy due to endogenous windi|cj) | i=1,2 ..., Ns, j=1,2 ..., Nc}。
Step 4, builds and is queried food image set SP={si| i=1,2 ..., NsFood label class set c={c in searching databasej| j=1,2 ..., NcMarkov MRF energy equation J (c) formula in }, and by minimizing Markov MRF energy J (c), show that i-th is queried image siFood label class c identifiedv, v=1,2 ... Nc
According to the conditional probability being queried in the Likelihood Score of image food label apoplexy due to endogenous wind in searching database and the person's of being queried menu between food label class in the present invention, build Markov MRF energy theorem, food identification problem being converted into and seeks Markov MRF energy equation J (c) the formula minimum problems being queried image set in retrieval food label class set, its step is as follows:
(4.1) m-th label class c in the person's of being queried menu is soughtmFood is in the n-th label class cnProbability of occurrence P (c under food Conditionsm|cn):
P(cm|cn)=n (cm,Mm,n)/n(cn,Gn)<6>
Wherein n (cn,Gn) represent GnMiddle label class cnThe quantity of food, GnRepresent c in menunThe set of group food image;n(cm,Mm,n) represent Mm,nMiddle label class cmThe quantity of food, Mm,nRepresent label class c on menumFood and label class cnThe situation that food occurs simultaneously, m, n=1,2 ..., Np, NpRepresent the food label class sum in the person's of being queried menu;
(4.2) the n-th label class c in the person's of being queried menu is soughtnFood is in m-th label class cmProbability of occurrence P (c under food Conditionsn|cm):
P(cn|cm)=n (cn,Mm,n)/n(cm,Gm)<7>
Wherein n (cm,Gm) represent GmMiddle label class cmThe quantity of food, GmRepresent c in menumThe set of group food image;n(cn,Mm,n) represent Mm,nMiddle label class cnThe quantity of food;
(4.3) conditional probability { P (c between any two food label class in the double counting person of being queried menum|cn),P(cn|cm) | m, n=1,2 ..., Np};
(4.4) it is queried the image Likelihood Score { P (s at food label apoplexy due to endogenous wind according to be queried in image collection SPi|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, seek Markov MRF energy equation J (c) being queried image collection SP in food label class set c:
J ( c ) = &Sigma; s i &Element; S P &lsqb; 1 - w i P ( s i , c j ) &rsqb; + &lambda; &Sigma; ( c m , c n ) &Element; A &lsqb; 1 - ( P ( c m | c n ) + P ( c n | c m ) ) / 2 &rsqb; - - - < 8 >
Wherein A={ (cm,cn) | m, n=1,2 ..., NpRepresenting the collection of food label class pair in the person's of being queried menu, λ is smoothing constant, wiRepresent that i-th is queried image siThe standard deviation of Likelihood Score, computing formula is as follows:
w i = 1 N c &Sigma; j = 1 N c ( P ( s i | c j ) - 1 N c &Sigma; j = 1 N c P ( s i | c j ) ) - - - < 9 >
(4.5) Iterative conditional modes algorithm ICM is utilized to minimize Markov MRF energy equation J (c), as it is shown on figure 3, obtain i-th to be queried image siFood label class cv, step is as follows:
(4.5a) P (s is initializedi|cj),P(cm|cn), cycle-index Q=0 is set;
(4.5b) choose be different from currently be queried image be queried image, calculate Markov MRF energy J (c, s according to formula<8>i)={ J (cj,si) | j=1,2 ..., Nc};
(4.5c) from Markov MRF energy J (c, siSelect energy minimum in), obtain food label class c of correspondencev, it is i-th and is queried image siFood qualification category;
(4.5d) Q=Q+1 is made, if Q is < Ns, return to step (4.5b), otherwise, stop circulation, draw the food label class being queried image being queried in food image set SP, complete being queried the identification being queried image in food image set SP.
The effect of the present invention can be further illustrated by following experiment.
1. experimental subject
Experimental subject is the breakfast food image of the person of the being queried some day shown in Fig. 4, and the person's of being queried breakfast menu in a week is as shown in table 1:
Breakfast menu of table 1 person of being queried
2. experimental procedure
(2.1) set up searching database such as Fig. 5, extract the feature descriptor of retrieval image, index building file;
(2.2) it is queried image shown in input Fig. 4, from being queried image extraction feature descriptor, and calculates the characteristic distance of feature descriptor of itself and retrieval image;
(2.3) feature descriptor being queried food image is obtained shown in the likelihood probability result table 2 of food label apoplexy due to endogenous wind according to formula<2>;
Table 2
(2.4) according to formula<3>, obtain input is queried food image Likelihood Score in label group food, is P (s successively1|c),P(s2|c),P(s3| 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) according to table 1, formula<6>and formula<7>, obtain the conditional probability P (c between the label class in the person's of being queried breakfast menu sheet 1m|cn), P (cn|cm), such as table 3
Table 3
(2.6) use Iterative conditional modes algorithm ICM to minimize Markov MRF energy theorem, obtain 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 darkened are the minima in these group data.
3. experimental result:
Markov MRF energy-minimum from step (2.6), the label class obtaining corresponding input picture is: steamed bun, egg, milk, and the food species being queried image with Fig. 4 of input complies fully with.

Claims (6)

1. fast food based on markov random file recognition methods, including:
(1) searching database is set up according to the food image of different food species, the retrieval image D from searching databasedMiddle extraction DdN kind feature descriptorAnd store it in index file, DdRepresent the d retrieval image, d=1,2 ..., Nd, NdRepresent and retrieve total number of images, k=1,2 ... N, N represent the sum of the feature descriptor of use;
(2) set i-th and be queried image si, and extract siKth kind feature descriptor fi k, i=1,2 ..., Ns, NsRepresent and be queried total number of images;
(3) according to retrieval image and the feature descriptor being queried image, calculate i-th and be queried image siIn jth label class cjLikelihood Score P (s in foodi|cj), j=1,2 ..., Nc, NcThe sum of the food label classification in expression searching database;
(4) structure is queried food image set SP={si| i=1,2 ..., NsFood label class set c={c in searching databasej| j=1,2 ..., NcMarkov MRF energy equation J (c) formula in },, and by minimizing Markov MRF energy J (c), show that i-th is queried image siFood label class c identifiedv, v=1,2 ... Nc:
(4.1) m-th label class c in the person's of being queried menu is calculatedmFood is in the n-th label class cnProbability of occurrence P (c under food Conditionsm|cn) n, m=1,2 ..., Np, n ≠ m, NpRepresent the sum of food label classification in the person's of being queried menu;
(4.2) the n-th label class c in the person's of being queried menu is soughtnFood is in m-th label class cmProbability of occurrence P (c under food Conditionsn|cm);
(4.3) conditional probability { P (c between any two food label class in the double counting person of being queried menum|cn),P(cn|cm) | m, n=1,2 ..., Np};
(4.4) it is queried the image Likelihood Score { P (s at food label apoplexy due to endogenous wind according to be queried in image collection SPi|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, ask and be queried image collection SP={si| i=1,2 ..., NsAt label group food set c={cj| j=1,2 ... NcMarkov MRF energy equation J (c) in };
(4.5) utilize Iterative conditional modes algorithm ICM to minimize Markov MRF energy equation J (c), obtain i-th and be queried image siFood label class cv;Reuse Iterative conditional modes algorithm ICM to minimize Markov MRF energy equation J (c) and obtain other that be queried in food image set SP and be queried the food label class of image, complete being queried the identification being queried image in food image set SP.
Food recognition methods the most according to claim 1, the wherein step (1) retrieval image D from searching databasedMiddle extraction N kind feature descriptorSet up index file, carry out in accordance with the following steps:
(1.1) will retrieval image DdIt is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks, and each sub-block is carried out texture, color and edge treated, obtain the rectangular histogram of piecemeal;Repeat all piecemeals are carried out texture, color and edge treated, obtain retrieving image DdRectangular histogram, and to this retrieval image DdRectangular histogram be normalized obtain retrieve image DdN kind feature descriptor;
(1.2) repeat each the retrieval image in searching database is carried out feature descriptor extraction, and store, constitute index file.
Food recognition methods the most according to claim 1, extracts in wherein said step (2) and is queried image siFeature descriptor, be will to be queried image siIt is divided into some piecemeals, more each piecemeal is divided into 4 sub-blocks, and each sub-block is carried out texture, color and edge treated, obtain the rectangular histogram of piecemeal;Repeat all piecemeals are carried out texture, color and edge treated, obtain being queried image siRectangular histogram, then to being queried image siRectangular histogram be normalized and obtain being queried image siN kind feature descriptor.
Method the most according to claim 1, wherein according to retrieval image and the feature descriptor being queried image in step (3), calculates i-th and is queried image siIn jth label class cjLikelihood Score P (s in foodi|cj), carry out as follows:
(3.1) according to retrieval image DdFeature descriptorBe queried image siFeature descriptor fi k, the characteristic distance T of calculating kth kind feature descriptor between the twoi,d k
T i , d k = t ( f i k , f d k ) = ( f i k ) T f d k ( f i k ) T f i k + ( f d k ) T f d k - ( f i k ) T f d k - - - < 1 >
Wherein fi kRepresent i-th query image siIn kth kind feature descriptor,Represent the d retrieval image DdIn kth kind feature descriptor, (fi k)TIt is feature descriptor fi kTransposition,It it is feature descriptorTransposition;
(3.2) the retrieval image in double counting searching database and i-th are queried image siThe characteristic distance of kth kind feature descriptor, and according to the retrieval image in characteristic distance descending searching database, selected characteristic distance is less than setting threshold value hkRetrieval image, pie graph image set
(3.3) basis and is queried image s in retrieval image setiKth kind feature descriptor characteristic distance less than set threshold value hkRetrieval image setCalculating is queried image siIn label class cjLikelihood probability P (the f of the kth kind feature descriptor in foodi k|cj);
P ( f i k | c j ) = n ( c j , N i k ) / n ( c j , D ) - - - < 2 >
Wherein D represents retrieval food image collection, and c is the set of food label class in searching database,Represent retrieval image setMiddle label class cjThe quantity of food, n (cj, D) and represent label class c in retrieval food image collection DjThe quantity of food;
(3.4) double counting i-th is queried image siIn jth label class cjLikelihood probability { P (the f of other feature descriptors in foodi k|cj) | k=1,2 ..., N};
(3.5) it is queried image s according to i-thiIn jth label class cjLikelihood probability { P (the f of the N number of feature descriptor in foodi k|cj) | k=1,2 ..., N}, asks by i-th query image siIn jth label class cjLikelihood Score P (s in foodi|cj):
P ( s i | c j ) = 1 N &Sigma; k = 1 N w k P ( f i k | c j ) - - - < 3 >
Wherein wkRepresent that i-th is queried image siThe standard deviation of likelihood probability of kth kind feature descriptor, computing formula is as follows:
w k = 1 N c &Sigma; j = 1 N c ( P ( f i k | c j ) - P ( f i k | c ) &OverBar; ) - - - < 4 >
WhereinRepresent that i-th is queried image siKth kind feature descriptor in label class c={cj| j=1,2 ... NcThe meansigma methods of the likelihood probability in }, computing formula is as follows:
P ( f i k | c ) &OverBar; = 1 N c &Sigma; j = 1 N c P ( f i k | c j ) - - - < 5 >
(3.6) each during double counting is queried image collection SP is queried the image Likelihood Score { P (s at each food label apoplexy due to endogenous windi|cj) | i=1,2 ..., Ns, j=1,2 ..., Nc}。
Food recognition methods the most according to claim 1, wherein builds in step (4) and is queried food image set SP={si| i=1,2 ..., NsFood label class set c={c in searching databasej| j=1,2 ..., NcMarkov MRF energy equation J (c) formula in }, is carried out as follows:
(4.1) m-th label class c in the person's of being queried menu is soughtmFood is in the n-th label class cnProbability of occurrence P (c under food Conditionsm|cn):
P(cm|cn)=n (cm,Mm,n)/n(cn,Gn)<6>
Wherein n (cn,Gn) represent GnMiddle label class cnThe quantity of food, GnRepresent c in menunThe set of group food image;n(cm,Mm,n) represent Mm,nMiddle label class cmThe quantity of food, Mm,nRepresent label class c on menumFood and label class cnThe situation that food occurs simultaneously, m, n=1,2 ..., Np
(4.2) the n-th label class c in the person's of being queried menu is soughtnFood is in m-th label class cmProbability of occurrence P (c under food Conditionsn|cm):
P(cn|cm)=n (cn,Mm,n)/n(cm,Gm)<7>
Wherein n (cm,Gm) represent GmMiddle label class cmThe quantity of food, GmRepresent c in menumThe set of group food image;n(cn,Mm,n) represent Mm,nMiddle label class cnThe quantity of food, Mm,nRepresent label class c on menumFood and label class cnThe situation that food occurs simultaneously, m, n=1,2 ..., Np
(4.3) conditional probability { P (c between any two food label class in the double counting person of being queried menum|cn),P(cn|cm) | m, n=1,2 ..., Np};
(4.4) it is queried the image Likelihood Score { P (s at food label apoplexy due to endogenous wind according to be queried in image collection SPi|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, seek Markov MRF energy equation J (c) being queried image collection SP in food label class set c:
J ( c ) = &Sigma; s i &Element; S P &lsqb; 1 - w i P ( s i , c j ) &rsqb; + &lambda; &Sigma; ( c m , c n ) &Element; A &lsqb; 1 - ( P ( c m | c n ) + P ( c n | c m ) ) / 2 &rsqb; - - - < 8 >
Wherein, A={ (cm,cn) | m, n=1,2 ..., NpRepresenting the collection of food label classification pair in the person's of being queried menu, λ is smoothing constant, wiRepresent that i-th is queried image siThe standard deviation of Likelihood Score, computing formula is as follows:
w i = 1 N c &Sigma; j = 1 N c ( P ( s i | c j ) - 1 N c &Sigma; j = 1 N c P ( s i | c j ) ) - - - < 9 >
Food recognition methods the most according to claim 1, wherein utilizes Iterative conditional modes algorithm ICM to minimize Markov MRF energy equation J (c), obtains i-th and be queried image s in step (4)iFood label class cv, step is as follows:
(4.5a) P (s is initializedi|cj),P(cm|cn), cycle-index Q=0 is set;
(4.5b) choose be different from currently be queried image be queried image, calculate Markov MRF energy J (c, s according to formula (8)i)={ J (cj,si) | j=1,2 ..., Nc};
(4.5c) from Markov MRF energy J (c, siSelect energy minimum in), obtain food label class c of correspondencev, it is i-th and is queried image siFood qualification category;
(4.5d) Q=Q+1 is made, if Q is < Ns, return to (4.5b) step, otherwise stop circulation, draw the food label class being queried image being queried in food image set SP, complete being queried the identification of image in food image set SP.
CN201610136517.2A 2016-03-10 2016-03-10 Fast food recognition methods based on markov random file Active CN105824886B (en)

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 true CN105824886A (en) 2016-08-03
CN105824886B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
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
CN110363237A (en) * 2019-07-01 2019-10-22 河南理工大学 A kind of coal discharge outlet operation decision-making technique based on Hidden Markov random field models
CN111666961A (en) * 2019-03-07 2020-09-15 佛山市顺德区美的电热电器制造有限公司 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
CN113841156B (en) * 2019-05-27 2024-06-28 西门子股份公司 Control method and device based on image recognition

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020122570A1 (en) * 2000-09-06 2002-09-05 Nikos Paragios Real-time crowd density estimation from video
CN101286227A (en) * 2007-05-17 2008-10-15 西北工业大学 Supervision-free Markov random field image segmentation method
US20100208987A1 (en) * 2009-02-16 2010-08-19 Institute For Information Industry Method and system for foreground detection using multi-modality fusion graph cut
CN103150718A (en) * 2011-12-06 2013-06-12 中国科学院电子学研究所 Remote sensing image change detection method based on change vector analysis and after-classification comparison
US20130176391A1 (en) * 2012-01-10 2013-07-11 Samsung Electronics Co., Ltd. Method and apparatus for recovering depth value of depth image
CN103309961A (en) * 2013-05-30 2013-09-18 北京智海创讯信息技术有限公司 Webpage content extraction method based on Markov random field

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020122570A1 (en) * 2000-09-06 2002-09-05 Nikos Paragios Real-time crowd density estimation from video
CN101286227A (en) * 2007-05-17 2008-10-15 西北工业大学 Supervision-free Markov random field image segmentation method
US20100208987A1 (en) * 2009-02-16 2010-08-19 Institute For Information Industry Method and system for foreground detection using multi-modality fusion graph cut
CN103150718A (en) * 2011-12-06 2013-06-12 中国科学院电子学研究所 Remote sensing image change detection method based on change vector analysis and after-classification comparison
US20130176391A1 (en) * 2012-01-10 2013-07-11 Samsung Electronics Co., Ltd. Method and apparatus for recovering depth value of depth image
CN103309961A (en) * 2013-05-30 2013-09-18 北京智海创讯信息技术有限公司 Webpage content extraction method based on Markov random field

Cited By (9)

* Cited by examiner, † Cited by third party
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
CN111666961A (en) * 2019-03-07 2020-09-15 佛山市顺德区美的电热电器制造有限公司 Intelligent household appliance, method and device for identifying food material type of intelligent household appliance and electronic equipment
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
CN113841156A (en) * 2019-05-27 2021-12-24 西门子股份公司 Control method and device based on image recognition
CN113841156B (en) * 2019-05-27 2024-06-28 西门子股份公司 Control method and device based on image recognition
CN110363237A (en) * 2019-07-01 2019-10-22 河南理工大学 A kind of coal discharge outlet operation decision-making technique based on Hidden Markov random field models
CN110363237B (en) * 2019-07-01 2021-09-07 河南理工大学 Coal caving port operation decision method based on hidden Markov random field model

Also Published As

Publication number Publication date
CN105824886B (en) 2019-03-26

Similar Documents

Publication Publication Date Title
Zhao et al. Plant identification using leaf shapes—A pattern counting approach
Cimpoi et al. Describing textures in the wild
CN105824886A (en) Rapid food recognition method based on Markov random field
Oliva et al. Scene-centered description from spatial envelope properties
CN106126585B (en) The unmanned plane image search method combined based on quality grading with perceived hash characteristics
Yang et al. An improved Bag-of-Words framework for remote sensing image retrieval in large-scale image databases
Celikkale et al. Visual attention-driven spatial pooling for image memorability
CN103955462A (en) Image marking method based on multi-view and semi-supervised learning mechanism
Kekre et al. CBIR feature vector dimension reduction with eigenvectors of covariance matrix using row, column and diagonal mean sequences
CN108985346A (en) Fusion low layer pictures feature and showing for CNN feature survey image search method
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
CN110717057A (en) Digital pathology full-section image retrieval method
Raja et al. Classification of indoor/outdoor scene
CN110796650A (en) Image quality evaluation method and device, electronic equipment and storage medium
Yang et al. A comparative study of several feature extraction methods for person re-identification
JP6151908B2 (en) Learning device, identification device, and program thereof
Prakash et al. Combining novel features for content based image retrieval
Harini et al. Image retrieval system based on feature extraction and relevance feedback
Vimina et al. Image retrieval using colour and texture features of regions of interest
Ahsani et al. Food Image Retrieval with Gray Level Co-Occurrence Matrix Texture Feature and CIE L* a* b* Color Moments Feature
Al-Jubouri et al. Applying Gaussian mixture model on discrete cosine features for image segmentation and classification
Tripathi et al. A new technique for CBIR with contrast enhancement using multi-feature and multi class SVM classification
Sarin et al. Holistic feature extraction for automatic image annotation
Suresh et al. A novel scheme for extracting shape and texture features using CBIR approach

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