Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 0 additions & 18 deletions deeplabcut/gui/tabs/analyze_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ def _generate_layout_other_options(self, layout):

tmp_layout.addWidget(self.save_as_csv)

self.save_as_nwb = QtWidgets.QCheckBox("Save result(s) as nwb")
self.save_as_nwb.setCheckState(Qt.Unchecked)
self.save_as_nwb.stateChanged.connect(self.update_nwb_choice)

tmp_layout.addWidget(self.save_as_csv)

# Filter predictions
self.filter_predictions = QtWidgets.QCheckBox("Filter predictions")
self.filter_predictions.setCheckState(Qt.Unchecked)
Expand Down Expand Up @@ -223,10 +217,6 @@ def update_csv_choice(self, state):
s = "ENABLED" if Qt.CheckState(state) == Qt.Checked else "DISABLED"
self.root.logger.info(f"Save results as CSV {s}")

def update_nwb_choice(self, state):
s = "ENABLED" if Qt.CheckState(state) == Qt.Checked else "DISABLED"
self.root.logger.info(f"Save results as NWB {s}")

def update_filter_choice(self, state):
s = "ENABLED" if Qt.CheckState(state) == Qt.Checked else "DISABLED"
self.root.logger.info(f"Filtering predictions {s}")
Expand Down Expand Up @@ -331,7 +321,6 @@ def run_enabled(self):

videos = list(self.files)
save_as_csv = self.save_as_csv.isChecked()
save_as_nwb = self.save_as_nwb.isChecked()
filter_data = self.filter_predictions.isChecked()
videotype = self.video_selection_widget.videotype_widget.currentText()
try:
Expand Down Expand Up @@ -382,10 +371,3 @@ def run_enabled(self):
videos,
listofvideos=True,
)

if save_as_nwb:
deeplabcut.analyze_videos_converth5_to_nwb(
config,
videos,
listofvideos=True,
)
50 changes: 45 additions & 5 deletions examples/COLAB/COLAB_3miceDemo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"- 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"
"### 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."
]
},
{
Expand All @@ -43,11 +45,49 @@
},
"outputs": [],
"source": [
"# Installs a CUDA version compatible with tensorflow on COLAB\n",
"!apt update && apt install cuda-11-8\n",
"# 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\""
]
},
{
"cell_type": "code",
"execution_count": null,
"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"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Important - Restart the Runtime for the updated packages to be imported!\n",
"\n",
"# Install the latest DeepLabCut version:\n",
"!pip install \"deeplabcut[tf]\""
"PLEASE, click \"restart runtime\" from the output above before proceeding!"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions examples/COLAB/COLAB_DEMO_SuperAnimal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"\n",
"## **Let's get going: install DeepLabCut into COLAB:**\n",
"\n",
"*Also, be sure you are connected to a GPU: go to menu, click Runtime > Change Runtime Type > select \"GPU\"*\n"
"*Also, be sure you are connected to a GPU: go to menu, click Runtime > Change Runtime Type > 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.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "03ylSyQ4O9Ee"
},
"metadata": {},
"outputs": [],
"source": [
"!pip install deeplabcut==3.0.0rc5"
Expand Down
32 changes: 28 additions & 4 deletions examples/COLAB/COLAB_DEMO_mouse_openfield.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,30 @@
"id": "txoddlM8hLKm"
},
"source": [
"## First, go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\""
"## First, 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"
]
},
{
Expand All @@ -51,8 +74,9 @@
"metadata": {},
"outputs": [],
"source": [
"# Installs a CUDA version compatible with tensorflow on COLAB\n",
"!apt update && apt install cuda-11-8"
"# 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"
]
},
{
Expand Down Expand Up @@ -91,7 +115,7 @@
"source": [
"# Install the latest DeepLabCut version (this will take a few minutes to install all the dependencies!)\n",
"%cd /content/cloned-DLC-repo/\n",
"!pip install \".[tf]\""
"!pip install \".\""
]
},
{
Expand Down
53 changes: 42 additions & 11 deletions examples/COLAB/COLAB_DLC_ModelZoo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,60 @@
"\n",
"## **Let's get going: install DeepLabCut into COLAB:**\n",
"\n",
"*Also, be sure you are connected to a GPU: go to menu, click Runtime > Change Runtime Type > select \"GPU\"*"
"*Also, be sure you are connected to a GPU: go to menu, click Runtime > Change Runtime Type > 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": "q23BzhA6CXxu"
},
"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": [
"#click the play icon (this will take a few minutes to install all the dependencies!)\n",
"!apt update && apt install cuda-11-8\n",
"!pip install deeplabcut[tf,modelzoo]"
"# 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#egg=deeplabcut[modelzoo]\""
]
},
{
"cell_type": "code",
"execution_count": null,
"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"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "zYm6DljQB0Y7"
},
"metadata": {},
"source": [
"###proTip: be sure to click \"restart runtime button\" if it appears above ^"
"### Important - Restart the Runtime for the updated packages to be imported!\n",
"\n",
"PLEASE, click \"restart runtime\" from the output above before proceeding!"
]
},
{
Expand Down
47 changes: 38 additions & 9 deletions examples/COLAB/COLAB_YOURDATA_TrainNetwork_VideoAnalysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,51 @@
"id": "txoddlM8hLKm"
},
"source": [
"## First, go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n"
"## First, 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": {
"colab": {},
"colab_type": "code",
"id": "q23BzhA6CXxu"
},
"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\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#(this will take a few minutes to install all the dependences!)\n",
"!apt update && apt install cuda-11-8\n",
"!pip install \"deeplabcut[tf]\""
"# 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"
]
},
{
Expand Down
47 changes: 31 additions & 16 deletions examples/COLAB/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,51 @@
"id": "txoddlM8hLKm"
},
"source": [
"## First, go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n"
"## First, 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": "q23BzhA6CXxu"
},
"metadata": {},
"outputs": [],
"source": [
"#(this will take a few minutes to install all the dependences!)\n",
"!apt update && apt install cuda-11-8\n",
"!pip install \"deeplabcut[tf]\"\n",
"%reload_ext numpy\n",
"%reload_ext scipy\n",
"%reload_ext matplotlib\n",
"%reload_ext mpl_toolkits"
"# 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": {
"id": "-MVvZ13_FMvP"
},
"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\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#a few colab specific things needed:\n",
"!pip install --upgrade scikit-image"
"# 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"
]
},
{
Expand Down
Loading