Adding additional data to a trained iteration

deeplabcut

#1

Hello,

I trained DLC and it works great on most of my images. However, there are certain conditions where the labels jump and miss their targets. I would like to augment the dataset to include more labeled data from the types of behavior/body configuration that it is currently struggling to correctly label.

Do I add the paths to the new videos to my config.yaml file and then use deeplabcut.extract_frames?

Thank you,


#2

hello,

Please see the page detailing the fucntions, which describes how to add new videos:

But also you might want to use the refinement tools to extract frames that are mis-labeled. I.e. you run analysis on the novel videos first, then you can automatically extract outliers and move the labels to the correct location. Please see the documentation and the preprint that details this here: https://www.biorxiv.org/content/early/2018/11/24/476531

Also, when you created the project this is the print statement: :wink:

print("\nA new project with name %s is created at %s and a configurable file (config.yaml) is stored there. Change the parameters in this file to adapt to your project’s needs.\n Once you have changed the configuration file, use the function ‘extract_frames’ to select frames for labeling.\n. [OPTIONAL] Use the function ’ add_new_videos ’ to add new videos to your project (at any stage)." %(project_name,str(wd)))


#3

Thank you! I will check it out. :slight_smile:


#4

One last thing that wasn’t clear to me. After extracting and labeling frames. When I create a new dataset will it continue from the last checkpoint or will it have to completely retrain? I’m sorry if this is in the documentation and I missed it.


#5

A few more points:

  • deeplabcut.extract_outlier_frames(‘config_path’,[‘videofile_path’]) will also add the video to the config file (so you don’t need to do this first). The only thing you need to do first is analyze the video
  • once you refined all the labels, you do merge and then create a training set and can start training
  • with immediate regard to your question: By default it will start from Image net weights (this is because, perhaps you also added a new body parts and then it would crash). You can, however, change the init_weight manually before you start training by linking it back to the weights from an earlier iteration. That way you can save a few minutes…