Answers.Body: <p>If the task involves only apples, orange and peaches, you should use method 1. As the number of classes is small, the network cannot generalize well to all classes. As a side note, you should start with the pretrained weights of YOLO v3 as some classes of YOLO v3 may be fruits, which can help your model converge faster. </p>
  
  <p>If the number of classes is large, for example a hundred different fruits, you should use method 2.2 . The model should be able to generalize to all fruits and can converage faster as many fruits look the same. This is the case of transfer learning. In original YOLO v3 training, image net weights for dark net is used for the backbone network. It accelerates the training of YOLO v3.</p>
  
  <p>For 2.1, it will not work as gradient descent will not consider the trained weight. The trained weights will be over written by the weights for peaches. </p>
  
  <p>For a recommended method, it depends on your class size. If the model will continue to add more classes, you should perhaps use 2.2 but only start using 2.2 when you have a considerable amount of classes. Hope I can help you.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-20T06:30:07.483Z
Answers.LastActivityDate: 2019-11-20T06:30:07.483Z
Answers.UserDisplayName: Clement
Body: <p>I trained some weights to identify apples and oranges (using YOLOv3). </p>
  
  <p>If I want to be able to identify peaches, which approach is usually recommended:</p>
  
  <ol>
  <li>Start clean and train the 3 classes. </li>
  <li>Train the peaches over the already-trained weights (with apples and oranges)
  
  <ol>
  <li>Only train with peaches images</li>
  <li>Use all available training data (including apples and oranges)</li>
  </ol></li>
  </ol>
  
  <p><strong>This is what I have found:</strong></p>
  
  <ul>
  <li>If I start clean, it will take longer until I can get a good result, but the detection is usually better.</li>
  <li>Every time I add a new class (using <code>2.2</code>), the detection get worse for the already learned objects, but it takes less time until I can get a good result (however I suspect that apples and oranges become over-fitted?). </li>
  <li>I haven't tested <code>2.1</code>, as I think that it won't be able to re-adjust the weights for the apples and the oranges.</li>
  </ul>
  
  <p>Is the above expected? What is the recommended course of action?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-20T06:41:50.137Z
Comments.Text: Rule of the thumb: when in doubt start clean
Comments.UserDisplayName: mirror2image
Tags: <deep-learning><classification><weights>
Title: Classification with deeplearning : clean start vs continue training
UserDisplayName: lepe
ThreadText: # Classification with deeplearning : clean start vs continue training
  
  (Asked by: username_0 on 2019-11-20)
  
  I trained some weights to identify apples and oranges (using YOLOv3).
  
  If I want to be able to identify peaches, which approach is usually recommended:
  
  1. Start clean and train the 3 classes.
  2. Train the peaches over the already-trained weights (with apples and oranges)
     1. Only train with peaches images
     2. Use all available training data (including apples and oranges)
  
  **This is what I have found:**
  
  * If I start clean, it will take longer until I can get a good result, but the detection is usually better.
  * Every time I add a new class (using `2.2`), the detection get worse for the already learned objects, but it takes less time until I can get a good result (however I suspect that apples and oranges become over-fitted?).
  * I haven't tested `2.1`, as I think that it won't be able to re-adjust the weights for the apples and the oranges.
  
  Is the above expected? What is the recommended course of action?
  
  **Tags:** deep-learning, classification, weights
  
  > **Comments:**
  > **username_1**: Rule of the thumb: when in doubt start clean  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-11-20. Score: 2 | Accepted answer
  
  If the task involves only apples, orange and peaches, you should use method 1. As the number of classes is small, the network cannot generalize well to all classes. As a side note, you should start with the pretrained weights of YOLO v3 as some classes of YOLO v3 may be fruits, which can help your model converge faster.
  
  If the number of classes is large, for example a hundred different fruits, you should use method 2.2 . The model should be able to generalize to all fruits and can converage faster as many fruits look the same. This is the case of transfer learning. In original YOLO v3 training, image net weights for dark net is used for the backbone network. It accelerates the training of YOLO v3.
  
  For 2.1, it will not work as gradient descent will not consider the trained weight. The trained weights will be over written by the weights for peaches.
  
  For a recommended method, it depends on your class size. If the model will continue to add more classes, you should perhaps use 2.2 but only start using 2.2 when you have a considerable amount of classes. Hope I can help you.
  
  
  ---
  
  