memo for deeplabcut

DeepLabCut is an efficient method for pose estimation based on deeplearing. And Google Colaboratory is free to try deeplearning with WEB. If they are connected, you can use DeepLabCut for free. But sometimes failed because environment is broken by system upgrade on Colaboratory.

DeepLabCut trainging failed on Colaboratory (2023/12/17)

DeepLabCut(2.3.8) is required tensorflow(<2.13) which CUDA version is 11.8. Google Colaboratory default CUDA version is 12.1 (2023/12/17), so cannot run training with GPU.

Following steps need to training with GPU on Colaboratory. (Run on code segment each commands.)

Connect with a GPU session.

Install CUDA 11.8

 !apt update && apt install cuda-11-8

Install DeepLabCut

 !pip install -U deeplabcut[tf]

Check GPU connection

 import tensorflow as tf

If it succeeded, return follows;

[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

Use DeepLabCut as usual

Load deeplabcut.

 import deeplabcut

Start training.


If it succeeded, GPU memory grows on resource monitor, and start training.