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
42 changes: 34 additions & 8 deletions examples/COLAB/COLAB_DEMO_SuperAnimal.ipynb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"metadata": {
"id": "3G1Nx3YLOVaZ"
},
"source": [
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_DEMO_SuperAnimal.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
Expand All @@ -16,7 +17,32 @@
"id": "23v-XAUNQIPY"
},
"source": [
"# First, go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\""
"# **DeepLabCut Model Zoo: SuperAnimal models\n",
"\n",
"![alt text](https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1616492373700-PGOAC72IOB6AUE47VTJX/ke17ZwdGBToddI8pDm48kB8JrdUaZR-OSkKLqWQPp_YUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8N_N4V1vUb5AoIIIbLZhVYwL8IeDg6_3B-BRuF4nNrNcQkVuAT7tdErd0wQFEGFSnBqyW03PFN2MN6T6ry5cmXqqA9xITfsbVGDrg_goIDasRCalqV8R3606BuxERAtDaQ/modelzoo.png?format=1000w)\n",
"\n",
"http://modelzoo.deeplabcut.org\n",
"\n",
"You can use this notebook to analyze videos with pretrained networks from our model zoo - NO local installation of DeepLabCut is needed!\n",
"\n",
"- **What you need:** a video of your favorite dog, cat, human, etc: check the list of currently available models here: http://modelzoo.deeplabcut.org\n",
"\n",
"- **What to do:** (1) in the top right corner, click \"CONNECT\". Then, just hit run (play icon) on each cell below and follow the instructions!\n",
"\n",
"## **Please consider giving back and labeling a little data to help make each network even better!**\n",
"\n",
"We have a WebApp, so no need to install anything, just a few clicks! We'd really appreciate your help!\n",
" \n",
"https://contrib.deeplabcut.org/\n",
"\n",
"\n",
"- **Note, if you performance is less that you would like:** firstly check the labeled_video parameters (i.e. \"pcutoff\" in the config.yaml file that will set the video plotting) - see the end of this notebook. You can also use the model in your own projects locally. Please be sure to cite the papers for the model, and http://modelzoo.deeplabcut.org (paper forthcoming!)\n",
"\n",
"\n",
"\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"
]
},
{
Expand All @@ -36,12 +62,12 @@
"id": "TguLMTJpQx1_"
},
"source": [
"## PLEASE, click \"restart runtime\" from the output above before proceeding! "
"## PLEASE, click \"restart runtime\" from the output above before proceeding!"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"id": "4BejjXKFO2Zg"
},
Expand All @@ -67,13 +93,13 @@
"video_path = os.path.abspath(filepath)\n",
"\n",
"# If this cell fails (e.g., when using Safari in place of Google Chrome),\n",
"# manually upload your video via the Files menu to the left \n",
"# manually upload your video via the Files menu to the left\n",
"# and define `video_path` yourself with right click > copy path on the video."
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"id": "ge589yC4v9yX"
},
Expand Down Expand Up @@ -135,4 +161,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
32 changes: 17 additions & 15 deletions examples/COLAB/COLAB_DLC_ModelZoo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "view-in-github"
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_DLC_ModelZoo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/MMathisLab/DeepLabCut/blob/main/examples/COLAB/COLAB_DLC_ModelZoo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
Expand All @@ -16,19 +16,21 @@
"id": "RK255E7YoEIt"
},
"source": [
"# **DeepLabCut Model Zoo!**\n",
"# **DeepLabCut Model Zoo: (mainly) user-contributed models**\n",
"\n",
"🚨 **WARNING** -- this is using the old version from 2020-2023. Please see the SuperAnimal notebook for more features\n",
"\n",
"![alt text](https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1616492373700-PGOAC72IOB6AUE47VTJX/ke17ZwdGBToddI8pDm48kB8JrdUaZR-OSkKLqWQPp_YUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8N_N4V1vUb5AoIIIbLZhVYwL8IeDg6_3B-BRuF4nNrNcQkVuAT7tdErd0wQFEGFSnBqyW03PFN2MN6T6ry5cmXqqA9xITfsbVGDrg_goIDasRCalqV8R3606BuxERAtDaQ/modelzoo.png?format=1000w)\n",
"\n",
"http://modelzoo.deeplabcut.org\n",
"\n",
"You can use this notebook to analyze videos with pretrained networks from our model zoo - NO local installation of DeepLabCut is needed! \n",
"You can use this notebook to analyze videos with pretrained networks from our model zoo - NO local installation of DeepLabCut is needed!\n",
"\n",
"- **What you need:** a video of your favorite dog, cat, human, etc: check the list of currently available models here: http://modelzoo.deeplabcut.org\n",
"\n",
"- **What to do:** (1) in the top right corner, click \"CONNECT\". Then, just hit run (play icon) on each cell below and follow the instructions!\n",
"\n",
"## **Please consider giving back and labeling a little data to help make each network even better!** \n",
"## **Please consider giving back and labeling a little data to help make each network even better!**\n",
"\n",
"We have a WebApp, so no need to install anything, just a few clicks! We'd really appreciate your help!\n",
" \n",
Expand Down Expand Up @@ -64,7 +66,7 @@
"id": "zYm6DljQB0Y7"
},
"source": [
"###proTip: be sure to click \"restart runtime button\" if it appears above ^ "
"###proTip: be sure to click \"restart runtime button\" if it appears above ^"
]
},
{
Expand All @@ -73,7 +75,7 @@
"id": "ZT4PwGSbYQEO"
},
"source": [
"## Now let's set the backend & import the DeepLabCut package \n",
"## Now let's set the backend & import the DeepLabCut package\n",
"#### (if colab is buggy/throws an error, just rerun this cell):"
]
},
Expand Down Expand Up @@ -114,7 +116,7 @@
"video_path = os.path.abspath(filepath)\n",
"\n",
"# If this cell fails (e.g., when using Safari in place of Google Chrome),\n",
"# manually upload your video via the Files menu to the left \n",
"# manually upload your video via the Files menu to the left\n",
"# and define `video_path` yourself with right click > copy path on the video."
]
},
Expand Down Expand Up @@ -168,7 +170,7 @@
"id": "JQxko-t3uMVO"
},
"source": [
"## Attention on this step !! \n",
"## Attention on this step !!\n",
"- Please note that for optimal performance your videos should contain frames that are around ~300-600 pixels (on one edge). If you have a larger video (like from an iPhone, first downsize by running this please! :)\n",
"\n",
"- Thus, if you're using an iPhone, or such, you'll need to downsample the video first by running the code below**\n",
Expand Down Expand Up @@ -223,7 +225,7 @@
"id": "WS-KxhBMvEBj"
},
"source": [
"Now, you can move this project from Colab (i.e. download it to your GoogleDrive), and use it like a normal standard project! \n",
"Now, you can move this project from Colab (i.e. download it to your GoogleDrive), and use it like a normal standard project!\n",
"\n",
"You can analyze more videos, extract outliers, refine then, and/or then add new key points + label new frames, and retrain if desired. We hope this gives you a good launching point for your work!\n",
"\n",
Expand All @@ -237,7 +239,7 @@
"id": "KPOqiLmo6d7t"
},
"source": [
"## More advanced options: \n",
"## More advanced options:\n",
"\n",
"- If you would now like to customize the video/plots - i.e., color, dot size, threshold for the point to be plotted (pcutoff), please simply edit the \"config.yaml\" file by updating the values below:"
]
Expand Down Expand Up @@ -285,10 +287,10 @@
],
"metadata": {
"colab": {
"include_colab_link": true,
"name": "Copy of COLAB_DLC_ModelZoo.ipynb",
"provenance": [],
"toc_visible": true
"toc_visible": true,
"include_colab_link": true
},
"gpuClass": "standard",
"kernelspec": {
Expand All @@ -311,4 +313,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}