Skip to content

Commit

Permalink
ResNet-152 added
Browse files Browse the repository at this point in the history
  • Loading branch information
sebo313 committed Jun 15, 2019
1 parent 798437d commit e1c9149
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deeplabcut/pose_cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion deeplabcut/pose_estimation_tensorflow/nnet/pose_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 3 additions & 1 deletion deeplabcut/utils/auxfun_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/functionDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1c9149

Please sign in to comment.