Unable to use human-pretrained network ResNet-101 pre-trained on MPII

Your Operating system and DeepLabCut version

Windows 10 with an anaconda env

Please complete the following information about your system:

OS: Windows 10
DeepLabCut Version: 2.0.7
Browser: chrome

Describe the problem

Hi, I’m trying to train my network using this pretrained resnet 101 on mpii. I was wondering how exactly you were able to do that. After using curl to download:

mpii-single-resnet-101.data-00000-of-00001
mpii-single-resnet-101.index
mpii-single-resnet-101.meta

I then moved all three of these files to:
C:\Users\phcao\Miniconda3\envs\ecog\Lib\sitepackages\deeplabcut\pose_estimation_tensorflow\models\pretrained

Then, I figured the next step would be to edit:
init_weights

in the pose_cfg.yaml file and assign it to the path of the mpii-single-resnet-101 , specifically:

C:\Users\phcao\Miniconda3\envs\ecog\Lib\site-packages\deeplabcut\pose_estimation_tensorflow\models\pretrained\mpii-single-resnet-101

When I did this, and called

deeplabcut,train_network(config_path, shuffle=1, displayiters=1, sasveiters=1000)

I got the error:

Also trying to train my network using this pretrained resnet 101 on mpii. I was wonder how exactly you were able to do that. After using curl to download:

mpii-single-resnet-101.data-00000-of-00001
mpii-single-resnet-101.index
mpii-single-resnet-101.meta

I then moved all three of these files to:
C:\Users\phcao\Miniconda3\envs\ecog\Lib\sitepackages\deeplabcut\pose_estimation_tensorflow\models\pretrained

Then, I figured the next step would be to edit:
init_weights

in the pose_cfg.yaml file and assign it to the path of the mpii-single-resnet-101 , specifically:

C:\Users\phcao\Miniconda3\envs\ecog\Lib\site-packages\deeplabcut\pose_estimation_tensorflow\models\pretrained\mpii-single-resnet-101

When I did this, and called

deeplabcut,train_network(config_path, shuffle=1, displayiters=1, sasveiters=1000)

I got the error:

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key resnet_v1_50/block1/unit_1/bottleneck_v1/conv1/BatchNorm/beta not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, …, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

Can someone please explain what I’m doing wrong?

Perhaps you need to change the resnet type in the pose_cfg.yaml file (seem like it is ResNet 50)?

The newest version (DLC 2.0.8.) allows one to start with a pre-trained (on MPII pose dataset) human network in a DLC project! There is also a colab notebook for analysis in the cloud: https://github.com/AlexEMG/DeepLabCut/blob/master/examples/Human_Project_DEMO.ipynb