# Classification with deeplearning : clean start vs continue training

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?

• Rule of the thumb: when in doubt start clean – mirror2image Nov 20 '19 at 6:41

## 1 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.