Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 3mice and reid colab installations
  • Loading branch information
maximpavliv committed Sep 9, 2025
commit 1f3b1d91ea599583487f901a34feac9a8fe9530b
42 changes: 3 additions & 39 deletions examples/COLAB/COLAB_3miceDemo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,42 +32,7 @@
"- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/tutorial.html\n",
"- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb\n",
"\n",
"### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n",
"\n",
"As the COLAB environments were updated to CUDA 12.X and Python 3.11, we need to install DeepLabCut and TensorFlow in a distinct way to get TensorFlow to connect to the GPU."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "HoNN2_0Z9rr_"
},
"outputs": [],
"source": [
"# Install TensorFlow, tensorpack and tf_slim versions compatible with DeepLabCut\n",
"!pip install \"tensorflow==2.12.1\" \"tensorpack>=0.11\" \"tf_slim>=1.1.0\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Downgrade PyTorch to a version using CUDA 11.8 and cudnn 8\n",
"# This will also install the required CUDA libraries, for both PyTorch and TensorFlow\n",
"!pip install torch==2.3.1 torchvision --index-url https://download.pytorch.org/whl/cu118"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install the latest version of DeepLabCut\n",
"!pip install \"git+https://github.com/DeepLabCut/DeepLabCut.git\""
"### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\""
]
},
{
Expand All @@ -76,9 +41,8 @@
"metadata": {},
"outputs": [],
"source": [
"# As described in https://www.tensorflow.org/install/pip#step-by-step_instructions, \n",
"# create symbolic links to NVIDIA shared libraries:\n",
"!ln -svf /usr/local/lib/python3.11/dist-packages/nvidia/*/lib/*.so* /usr/local/lib/python3.11/dist-packages/tensorflow"
"# Install DeepLabCut 2.X (LTS)\n",
"!pip install \"deeplabcut[tf]\""
]
},
{
Expand Down
40 changes: 3 additions & 37 deletions examples/COLAB/COLAB_transformer_reID.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,40 +32,7 @@
"- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/tutorial.html\n",
"- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb\n",
"\n",
"### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n",
"\n",
"As the COLAB environments were updated to CUDA 12.X and Python 3.11, we need to install DeepLabCut and TensorFlow in a distinct way to get TensorFlow to connect to the GPU."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install TensorFlow, tensorpack and tf_slim versions compatible with DeepLabCut\n",
"!pip install \"tensorflow==2.12.1\" \"tensorpack>=0.11\" \"tf_slim>=1.1.0\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Downgrade PyTorch to a version using CUDA 11.8 and cudnn 8\n",
"# This will also install the required CUDA libraries, for both PyTorch and TensorFlow\n",
"!pip install torch==2.3.1 torchvision --index-url https://download.pytorch.org/whl/cu118"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install the latest version of DeepLabCut\n",
"!pip install \"git+https://github.com/DeepLabCut/DeepLabCut.git\""
"### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\""
]
},
{
Expand All @@ -74,9 +41,8 @@
"metadata": {},
"outputs": [],
"source": [
"# As described in https://www.tensorflow.org/install/pip#step-by-step_instructions, \n",
"# create symbolic links to NVIDIA shared libraries:\n",
"!ln -svf /usr/local/lib/python3.11/dist-packages/nvidia/*/lib/*.so* /usr/local/lib/python3.11/dist-packages/tensorflow"
"# Install DeepLabCut 2.X (LTS)\n",
"!pip install \"deeplabcut[tf]\""
]
},
{
Expand Down