Train_network not loading ResNet initial weights in Colab

When running DLC in Colab while having already created the training sets in a previous Colab session, the train_network function does not download the resnet50 initial weights (no resnet_v1_50.ckpt file in /usr/local/lib/python3.7/dist-packages/deeplabcut/pose_estimation_tensorflow/models/pretrained) and throws an error as it is trying to access the missing .ckpt file.

When running create_training_dataset and train_network in the same Colab session, there is no issue, as the .ckpt file is downloaded when create_training_dataset is being executed.

I was under the impression that the train_network function was supposed to download the initial Resnet50 (or else) network weights if they weren’t already present in the local deeplabcut/…/pretrained folder. Is that incorrect? Is the only way to have this working is to always run create_training_dataset and train_network in the same Colab session?


Hello! The network weights are downloaded early during dataset creation, so you do need to create the training dataset online in Colab too. Have a look at our Colab example notebooks (for example, DeepLabCut/COLAB_YOURDATA_TrainNetwork_VideoAnalysis.ipynb at 87e18282c0ea354780cbf16ddfed85869a887664 · DeepLabCut/DeepLabCut · GitHub), they may be of help :slight_smile: