diff --git a/deeplabcut/pose_cfg.yaml b/deeplabcut/pose_cfg.yaml index 2a6872e06..6210556f0 100644 --- a/deeplabcut/pose_cfg.yaml +++ b/deeplabcut/pose_cfg.yaml @@ -47,7 +47,7 @@ bottomheight: 400 -# Type of the CNN to use, currently resnet_101 and resnet_50 +# Type of the CNN to use, currently resnet_152, resnet_101 and resnet_50 # are supported net_type: resnet_50 diff --git a/deeplabcut/pose_estimation_tensorflow/models/pretrained/download.sh b/deeplabcut/pose_estimation_tensorflow/models/pretrained/download.sh index 0d5f31ae1..520da2fe5 100644 --- a/deeplabcut/pose_estimation_tensorflow/models/pretrained/download.sh +++ b/deeplabcut/pose_estimation_tensorflow/models/pretrained/download.sh @@ -3,3 +3,4 @@ curl http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz | tar xvz curl http://download.tensorflow.org/models/resnet_v1_101_2016_08_28.tar.gz | tar xvz +curl http://download.tensorflow.org/models/resnet_v1_152_2016_08_28.tar.gz | tar xvz \ No newline at end of file diff --git a/deeplabcut/pose_estimation_tensorflow/models/pretrained/pretrained_model_urls.yaml b/deeplabcut/pose_estimation_tensorflow/models/pretrained/pretrained_model_urls.yaml index a76f10e05..94d7a23e0 100644 --- a/deeplabcut/pose_estimation_tensorflow/models/pretrained/pretrained_model_urls.yaml +++ b/deeplabcut/pose_estimation_tensorflow/models/pretrained/pretrained_model_urls.yaml @@ -1,2 +1,3 @@ resnet_50: http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz resnet_101: http://download.tensorflow.org/models/resnet_v1_101_2016_08_28.tar.gz +resnet_152: http://download.tensorflow.org/models/resnet_v1_152_2016_08_28.tar.gz \ No newline at end of file diff --git a/deeplabcut/pose_estimation_tensorflow/nnet/pose_net.py b/deeplabcut/pose_estimation_tensorflow/nnet/pose_net.py index d90c0e7fd..9186952f4 100644 --- a/deeplabcut/pose_estimation_tensorflow/nnet/pose_net.py +++ b/deeplabcut/pose_estimation_tensorflow/nnet/pose_net.py @@ -12,7 +12,8 @@ net_funcs = {'resnet_50': resnet_v1.resnet_v1_50, - 'resnet_101': resnet_v1.resnet_v1_101} + 'resnet_101': resnet_v1.resnet_v1_101, + 'resnet_152': resnet_v1.resnet_v1_152} def prediction_layer(cfg, input, name, num_outputs): diff --git a/deeplabcut/utils/auxfun_models.py b/deeplabcut/utils/auxfun_models.py index e9f1167b8..277d67ad6 100644 --- a/deeplabcut/utils/auxfun_models.py +++ b/deeplabcut/utils/auxfun_models.py @@ -14,8 +14,10 @@ def Check4weights(modeltype,parent_path,num_shuffles): model_path = parent_path / 'pose_estimation_tensorflow/models/pretrained/resnet_v1_50.ckpt' elif 'resnet_101' == modeltype: model_path = parent_path / 'pose_estimation_tensorflow/models/pretrained/resnet_v1_101.ckpt' + elif 'resnet_152' == modeltype: + model_path = parent_path / 'pose_estimation_tensorflow/models/pretrained/resnet_v1_152.ckpt' else: - print("Currently only ResNet 50 or 101 supported, please change 'resnet' entry in config.yaml!") + print("Currently only ResNet 50, 101 or 152 supported, please change 'resnet' entry in config.yaml!") num_shuffles=-1 #thus the loop below is empty... model_path=parent_path diff --git a/docs/functionDetails.md b/docs/functionDetails.md index 801b1afbb..29b97d69d 100644 --- a/docs/functionDetails.md +++ b/docs/functionDetails.md @@ -156,7 +156,7 @@ Specifically, the user can edit the **pose_cfg.yaml** within the **train** subdi configuration files contain meta information with regard to the parameters of the feature detectors. Key parameters are listed in Box 2. -At this step, the ImageNet pre-trained ResNet-50 and ResNet-101 weights will be downloaded. If they do not download (you will see this downloading in the terminal, then you may not have permission to do so (something we have seen with some Windows users - see the **[WIKI troubleshooting for more help!](https://github.com/AlexEMG/DeepLabCut/wiki/Troubleshooting-Tips)**). If you are labeling adult human data, you may also want to use a human-pretrained network. A ResNet-101 pre-trained on MPII is available. Download it and move to the pretrained folder (this will be in your site-packages, under ``../pose-tensorflow/models/pretrained``). Download with the following commands in the terminal: +At this step, the ImageNet pre-trained ResNet-50, ResNet-101 and ResNet-152 weights will be downloaded. If they do not download (you will see this downloading in the terminal, then you may not have permission to do so (something we have seen with some Windows users - see the **[WIKI troubleshooting for more help!](https://github.com/AlexEMG/DeepLabCut/wiki/Troubleshooting-Tips)**). If you are labeling adult human data, you may also want to use a human-pretrained network. A ResNet-101 pre-trained on MPII is available. Download it and move to the pretrained folder (this will be in your site-packages, under ``../pose-tensorflow/models/pretrained``). Download with the following commands in the terminal: ``` curl -L -O https://datasets.d2.mpi-inf.mpg.de/deepercut-models-tensorflow/mpii-single-resnet-101.data-00000-of-00001 curl -L -O https://datasets.d2.mpi-inf.mpg.de/deepercut-models-tensorflow/mpii-single-resnet-101.meta