Answers.Body: <p>Here is an illustration of the entire process without any equation so you can get the big picture.</p>
  
  <p>Features are extracted from the image. Let's take the example of very common features like SIFT. For many key points (or even each pixel) of the image, a 128-dimensional SIFT feature is computed. If processing numerous images the number of features becomes very big.</p>
  
  <p>A way of having a more compact representation of the set of images is to use the Bag-of-Words (or Bag-of-Visual-Words) technique. The idea is to find k words (i.e., k SIFT features) from which every single image will be represented. We call this set of k words, the dictionary.</p>
  
  <p>Then, each SIFT feature will be assigned to the nearest word (i.e., nearest SIFT feature with respect to the Euclidean distance for instance) of the dictionary. You can see this as a dictionary in which the words "go", "going", and "gone" would all be represented by the word "go").</p>
  
  <p>In the end, each image is represented by only k values (counts for the number of words/features assigned to each word of the dictionary). This is an histogram, and you can normalize it to get a single vector of proportions representing the image.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-10T22:21:49.313Z
Answers.LastActivityDate: 2017-01-10T22:21:49.313Z
Answers.UserDisplayName: Eskapp
Body: <p>Any good example for Bag-of-Words (BoW) model in image retrieving?
  I want a simple example to understand the whole process of BoW.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-07T21:11:12.807Z
Comments.Text: For a tutorial on how to implement a bag of words model, you can look at http://cs.nyu.edu/~fergus/teaching/vision_2012/9_BoW.pdf.
  For a coding example, you can refer to this matlab tutorial https://www.mathworks.com/help/vision/ug/image-classification-with-bag-of-visual-words.html
Comments.UserDisplayName: ksh
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-10T06:54:02.307Z
Comments.Text: We don't recommend resources here.Kindly,please go [through](http://ai.stackexchange.com/help/on-topic)
Comments.UserDisplayName: quintumnia
Tags: <machine-learning><classification>
Title: Bag-of-Words (BoW) model in image detection
UserDisplayName: Hana90
ThreadText: # Bag-of-Words (BoW) model in image detection
  
  (Asked by: username_0 on 2017-01-07)
  
  Any good example for Bag-of-Words (BoW) model in image retrieving?
  I want a simple example to understand the whole process of BoW.
  
  **Tags:** machine-learning, classification
  
  > **Comments:**
  > **username_1**: For a tutorial on how to implement a bag of words model, you can look at http://cs.nyu.edu/~fergus/teaching/vision_2012/9_BoW.pdf. For a coding example, you can refer to this matlab tutorial https://www.mathworks.com/help/vision/ug/image-classification-with-bag-of-visual-words.html  
  > **username_2**: We don't recommend resources here.Kindly,please go [through](http://ai.stackexchange.com/help/on-topic)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2017-01-10. Score: 2
  
  Here is an illustration of the entire process without any equation so you can get the big picture.
  
  Features are extracted from the image. Let's take the example of very common features like SIFT. For many key points (or even each pixel) of the image, a 128-dimensional SIFT feature is computed. If processing numerous images the number of features becomes very big.
  
  A way of having a more compact representation of the set of images is to use the Bag-of-Words (or Bag-of-Visual-Words) technique. The idea is to find k words (i.e., k SIFT features) from which every single image will be represented. We call this set of k words, the dictionary.
  
  Then, each SIFT feature will be assigned to the nearest word (i.e., nearest SIFT feature with respect to the Euclidean distance for instance) of the dictionary. You can see this as a dictionary in which the words "go", "going", and "gone" would all be represented by the word "go").
  
  In the end, each image is represented by only k values (counts for the number of words/features assigned to each word of the dictionary). This is an histogram, and you can normalize it to get a single vector of proportions representing the image.
  
  
  ---
  
  