Answers.Body: <p>You could use <a href="http://cs231n.github.io/transfer-learning/" rel="nofollow noreferrer">transfer learning</a>. Find some state of the art neural net (something newer than VGG) already trained for image classification. Then remove the last layer and add a new one, training it while keeping the remaining old weights fixed. A simple softmax at the end would work.This is the simplest approach.</p>
  
  <p>Because you're mostly only training the last layer, you won't need as much data.</p>
  
  <p>I think <a href="https://arxiv.org/pdf/1503.03832.pdf" rel="nofollow noreferrer">FaceNet</a> will perform poorly because it uses different features and you would need to retrain all its layers.</p>
  
  <p>If you have too little data for some classes, maybe you should use an <a href="https://en.wikipedia.org/wiki/Autoencoder" rel="nofollow noreferrer">autoencoder</a> as a features extractor. Then you could classify an image by comparing its feature vector to those for each breed, for example with <a href="https://en.wikipedia.org/wiki/Cosine_similarity" rel="nofollow noreferrer">cosine similarity</a>. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T20:32:31.510Z
Answers.LastActivityDate: 2019-04-16T22:24:41.920Z
Answers.LastEditDate: 2019-04-16T22:24:41.920Z
Answers.UserDisplayName: user2674414
Body: <p>Lets say we have a data-set of all cats and we have to identify the cat breed based on given test image. As, the two different cat breeds have visual similarity can we use existing networks (VGG, ImageNet, GoogleNet) to solve this problem?</p>
  
  <ol>
  <li>Should faceNet be applied here? As, the problem is similar to face detection where face characteristics of two different people are same yet it can correctly recognize a person.</li>
  <li>What if with visual similarity in data-set we have only few example of each class? Like for a problem (random) we have good amount of data but for each class we have only few examples.</li>
  </ol>
  
  <p>Is there any model that can be applied here?</p>
  
Tags: <neural-networks><convolutional-neural-networks><image-recognition>
Title: Image prediction model when data-set classes have visual similarity
UserDisplayName: quintin
ThreadText: # Image prediction model when data-set classes have visual similarity
  
  (Asked by: username_0 on 2018-11-17)
  
  Lets say we have a data-set of all cats and we have to identify the cat breed based on given test image. As, the two different cat breeds have visual similarity can we use existing networks (VGG, ImageNet, GoogleNet) to solve this problem?
  
  1. Should faceNet be applied here? As, the problem is similar to face detection where face characteristics of two different people are same yet it can correctly recognize a person.
  2. What if with visual similarity in data-set we have only few example of each class? Like for a problem (random) we have good amount of data but for each class we have only few examples.
  
  Is there any model that can be applied here?
  
  **Tags:** neural-networks, convolutional-neural-networks, image-recognition
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-17. Score: 1
  
  You could use [transfer learning](http://cs231n.github.io/transfer-learning/). Find some state of the art neural net (something newer than VGG) already trained for image classification. Then remove the last layer and add a new one, training it while keeping the remaining old weights fixed. A simple softmax at the end would work.This is the simplest approach.
  
  Because you're mostly only training the last layer, you won't need as much data.
  
  I think [FaceNet](https://arxiv.org/pdf/1503.03832.pdf) will perform poorly because it uses different features and you would need to retrain all its layers.
  
  If you have too little data for some classes, maybe you should use an [autoencoder](https://en.wikipedia.org/wiki/Autoencoder) as a features extractor. Then you could classify an image by comparing its feature vector to those for each breed, for example with [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity).
  
  
  ---
  
  