Skip to content

Training quick guide (for DLC1)

Mathis Lab edited this page Jan 17, 2019 · 3 revisions

** This is only for DeepLabCut1.0!**

After becoming familiar with the workflow, here is the list of commands to run in the terminal for training. You will need to adjust the myconfig.py file first (and you will need to adjust your folder names below accordingly):

(A) Place your videos in the folder DeepLabCut-master/Generating_a_Training_Set, then select and label frames:

  $ python3 Step1_SelectRandomFrames_fromVideos.py

(B) Then, in the folder Generating_a_Training_Set:

  $ python3 Step2_ConvertingLabels2DataFrame.py

(C) Check labels, and prepare to run:

  $ python3 Step3_CheckLabels.py  #go check the frames in the newly created folders, then if okay, run:
  $ python3 Step4_GenerateTrainingFileFromLabelledData.py

(D) Transfer the folders just created:

   $ cp -R YOURexperimentNameTheDate-trainset95shuffle1 ../pose-tensorflow/models/

   $ cp -R UnaugmentedDataSet_YOURexperimentNameTheDate/ ../pose-tensorflow/models/

(E) Download the pre-trained weights (if not already done):

  $ cd ../pose-tensorflow/models/pretrained
  $ ./download.sh

(F) Train:

  $ cd ../YOURexperimentNameTheDate-trainset95shuffle1/train #change this to your folder name!
  $ TF_CUDNN_USE_AUTOTUNE=0 CUDA_VISIBLE_DEVICES=0 python3 ../../../train.py 

Clone this wiki locally