Rolling up to Tensorflow 2+

Rolling Up to TensorFlow 2+
Screen Shot 2020-12-04 at 5.04.34 PM.png

Update! TF2.x support is released as pip install deeplabcutcore! Simply build your project using DLC (i.e. create_project & label), then import deeplabcutcore to create a TF2 training set and train, evaluate, and perform video analysis! Happy hacking ….

Until now, the GPUs from NVIDIA all supported TF 1 and 2, making the necessity to force users to move to TF 2 not necessary (arguably, the worst part of installing DLC is tensorflow+GPU support).

However, with the 3000 series this changes, and users will want to move to TF2. So, we are going about this in a two step process, allowing users some choices.

Currently we have two repositories that have network training, evaluation, and analysis code from DLC— deeplabcut and deeplabcut-core. dlc-core is the headless version, i.e. this assumes you have a project and labeled data and you want to train, evaluate, and analyze videos (basically, no GUIs).

core is its own package on pypi: pip install deeplabcutcore (https://pypi.org/project/deeplabcutcore/) . Because this is the code that perhaps more advanced users are tapping into, we feel this is a good candidate for first rolling up to TF2+, and it seems our Twitter poll agrees:

Step One: Therefore, we will roll deeplabcut-core to support TF2 by the end of the year as the stable release for deeplabcut-core; this means, you can have TF2 installed (just simply run pip install tensorflow==2.3 for example), and deeplabcut for labeling, but then use deeplabcutcore for creating a training dataset, training, evaluation, video analysis. You can have these in the same environment, or separate ones, this is your choice.

If you already want to use this code, it’s available (and tested) here. Note, currently this is up to date with 2.1.8.2; but any other version that you created your project with is fine (in normal “single animal” DLC mode with 2.1.9 is great, just not maDLC beta).

In short, you just need to have a project and labeled data to re-train or start with, tensorflow 2.x models.

If you want to test it out, simply upload your project folder to google drive, then launch this notebook! No local changes are required for you to use TF2+ in Colab! (click the blue icon to launch)

Feedback welcomed on your performance experience with TF2!

 

Open in Colab

 



Step Two: Move DLC-core into the main repo in 2021!



For the #teamDLC,
Mackenzie