Azure / ObjectDetectionUsingCntk

Fast R-CNN Object Detection on Azure using CNTK
128 stars 61 forks source link

How to retrain a trained model with new images ? #16

Open pamio opened 7 years ago

pamio commented 7 years ago

I have initial set of images that the model was trained on. Now, I want to ensure that the same trained model trains with new images without having to train it again on the images already trained.

ex. from your grocery data folder,

What I think can be done:

  1. Put the new images in a new folder
  2. Annotate them
  3. Take the existing trained model and use these images to train the trained model by changing the path of the folder in training script
  4. Copy the new images back to grocery folder.
  5. Host the model

Am I missing anything ? or is there a better way ?

Thanks

PatrickBue commented 7 years ago

To keep things simple I would recommend full retraining of the DNN, ie putting the new images to the positives folder. Changing the code to allow what you described would not be trivial, and you run the risk that the model 'forgets' what it learned from the previous training set.

pamio commented 7 years ago

So one would keep the already trained model as the base model to train on ? Just like what you have in the repo, there's a base model to download and then the training starts on the new images on the downloaded model. Is that right ? How does it take care of the increase/decrease in the number of classes to train ? I want to develop a system around CNTK that takes image inputs and trains automatically as in when one uploads new images. While I understand the process to upload new images and start the training tasks, what I dont understand is how to establish a seamless process to ensure the model trains automatically with CNTK. Any ideas will be highly appreciated. Thanks