Skip to content

Commit 3f021cc

Browse files
authored
update notebooks and COLAB (DeepLabCut#2411)
1 parent 4c755bb commit 3f021cc

7 files changed

+53
-59
lines changed

examples/COLAB/COLAB_3miceDemo.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"- assemble animals and tracklets.\n",
2828
"- create quality check plots and video.\n",
2929
"\n",
30-
"### To create a full maDLC pipeline please see our full docs: https://deeplabcut.github.io/DeepLabCut/docs/intro.html \n",
30+
"### To create a full maDLC pipeline please see our full docs: https://deeplabcut.github.io/DeepLabCut/README.html\n",
3131
"- Of interest is a full how-to for maDLC: https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html\n",
3232
"- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/tutorial.html\n",
33-
"- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/master/examples/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb\n",
33+
"- 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",
3434
"\n",
3535
"### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n"
3636
]

examples/COLAB/COLAB_YOURDATA_TrainNetwork_VideoAnalysis.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"- create simple quality check plots\n",
2828
"- analyze novel videos!\n",
2929
"\n",
30-
"###This notebook assumes you already have a project folder with labeled data! \n",
30+
"### This notebook assumes you already have a project folder with labeled data! \n",
3131
"\n",
3232
"This notebook demonstrates the necessary steps to use DeepLabCut for your own project.\n",
3333
"\n",

examples/COLAB/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
{
2-
"nbformat": 4,
3-
"nbformat_minor": 0,
4-
"metadata": {
5-
"accelerator": "GPU",
6-
"colab": {
7-
"collapsed_sections": [],
8-
"include_colab_link": true,
9-
"name": "COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb",
10-
"provenance": []
11-
},
12-
"kernelspec": {
13-
"display_name": "Python 3",
14-
"name": "python3"
15-
}
16-
},
172
"cells": [
183
{
194
"cell_type": "markdown",
@@ -44,7 +29,7 @@
4429
"- assemble animals and tracklets\n",
4530
"- create quality check plots!\n",
4631
"\n",
47-
"###This notebook assumes you already have a DLC project folder with labeled data and you uploaded it to your own Google Drive.\n",
32+
"### This notebook assumes you already have a DLC project folder with labeled data and you uploaded it to your own Google Drive.\n",
4833
"\n",
4934
"This notebook demonstrates the necessary steps to use DeepLabCut for your own project.\n",
5035
"\n",
@@ -82,16 +67,16 @@
8267
},
8368
{
8469
"cell_type": "code",
70+
"execution_count": null,
8571
"metadata": {
8672
"id": "-MVvZ13_FMvP"
8773
},
74+
"outputs": [],
8875
"source": [
8976
"#a few colab specific things needed:\n",
9077
"!pip install --upgrade scikit-image\n",
9178
"!pip3 install pickle5"
92-
],
93-
"execution_count": null,
94-
"outputs": []
79+
]
9580
},
9681
{
9782
"cell_type": "markdown",
@@ -106,16 +91,16 @@
10691
"cell_type": "code",
10792
"execution_count": 2,
10893
"metadata": {
109-
"id": "oTwAcbq2-FZz",
11094
"colab": {
11195
"base_uri": "https://localhost:8080/"
11296
},
97+
"id": "oTwAcbq2-FZz",
11398
"outputId": "9cfd8dcf-a0a8-4801-ed1d-fbcd5ec056af"
11499
},
115100
"outputs": [
116101
{
117-
"output_type": "stream",
118102
"name": "stdout",
103+
"output_type": "stream",
119104
"text": [
120105
"DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)\n"
121106
]
@@ -501,5 +486,20 @@
501486
" filtered=True)"
502487
]
503488
}
504-
]
489+
],
490+
"metadata": {
491+
"accelerator": "GPU",
492+
"colab": {
493+
"collapsed_sections": [],
494+
"include_colab_link": true,
495+
"name": "COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb",
496+
"provenance": []
497+
},
498+
"kernelspec": {
499+
"display_name": "Python 3",
500+
"name": "python3"
501+
}
502+
},
503+
"nbformat": 4,
504+
"nbformat_minor": 0
505505
}

examples/COLAB/COLAB_transformer_reID.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"- use the transformer to do unsupervised ID tracking.\n",
2828
"- create quality check plots and video.\n",
2929
"\n",
30-
"### To create a full maDLC pipeline please see our full docs: https://deeplabcut.github.io/DeepLabCut/docs/intro.html \n",
30+
"### To create a full maDLC pipeline please see our full docs: https://deeplabcut.github.io/DeepLabCut/README.html\n",
3131
"- Of interest is a full how-to for maDLC: https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html\n",
3232
"- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/tutorial.html\n",
33-
"- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/master/examples/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb\n",
33+
"- 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",
3434
"\n",
3535
"### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n"
3636
]

examples/JUPYTER/Demo_labeledexample_Openfield.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@
528528
},
529529
"outputs": [],
530530
"source": [
531-
"%gui wx\n",
531+
"%gui qt6\n",
532532
"deeplabcut.refine_labels(path_config_file)"
533533
]
534534
},

examples/JUPYTER/Demo_napari.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"outputs": [],
193193
"source": [
194194
"# napari will pop up! Please go to plugin > deeplabcut to start:\n",
195-
"%gui qt5\n",
195+
"%gui qt6\n",
196196
"import napari\n",
197197
"napari.Viewer()"
198198
]
@@ -400,7 +400,7 @@
400400
"source": [
401401
"#now you can edit the \"machine-labeled file\" within napari; \n",
402402
"#just again drop the file and images into the workspace after you load the plugin\n",
403-
"%gui qt5\n",
403+
"%gui qt6\n",
404404
"import napari\n",
405405
"napari.Viewer()"
406406
]

examples/JUPYTER/Demo_yourowndata.ipynb

+23-29
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
},
6666
{
6767
"cell_type": "code",
68-
"execution_count": 0,
68+
"execution_count": null,
6969
"metadata": {
7070
"colab": {},
7171
"colab_type": "code",
@@ -129,7 +129,7 @@
129129
},
130130
{
131131
"cell_type": "code",
132-
"execution_count": 0,
132+
"execution_count": null,
133133
"metadata": {
134134
"colab": {},
135135
"colab_type": "code",
@@ -144,18 +144,6 @@
144144
"deeplabcut.extract_frames(path_config_file) "
145145
]
146146
},
147-
{
148-
"cell_type": "code",
149-
"execution_count": null,
150-
"metadata": {},
151-
"outputs": [],
152-
"source": [
153-
"#AND/OR:\n",
154-
"#SELECT RARE EVENTS MANUALLY:\n",
155-
"%gui wx\n",
156-
"deeplabcut.extract_frames(path_config_file,'manual')"
157-
]
158-
},
159147
{
160148
"cell_type": "markdown",
161149
"metadata": {
@@ -170,16 +158,22 @@
170158
},
171159
{
172160
"cell_type": "code",
173-
"execution_count": 0,
161+
"execution_count": null,
174162
"metadata": {
175163
"colab": {},
176164
"colab_type": "code",
177165
"id": "iyROSOiEoEJI"
178166
},
179167
"outputs": [],
180168
"source": [
181-
"%gui wx\n",
182-
"deeplabcut.label_frames(path_config_file)"
169+
"# napari will pop up!\n",
170+
"# Please go to plugin > deeplabcut to start\n",
171+
"# then, drag-and-drop the project configuration file into the viewer (the value of path_config_file)\n",
172+
"# finally, drop the folder containing the images (in 'labeled-data') in the viewer\n",
173+
"\n",
174+
"%gui qt6\n",
175+
"import napari\n",
176+
"napari.Viewer()"
183177
]
184178
},
185179
{
@@ -196,7 +190,7 @@
196190
},
197191
{
198192
"cell_type": "code",
199-
"execution_count": 0,
193+
"execution_count": null,
200194
"metadata": {
201195
"colab": {},
202196
"colab_type": "code",
@@ -237,7 +231,7 @@
237231
},
238232
{
239233
"cell_type": "code",
240-
"execution_count": 0,
234+
"execution_count": null,
241235
"metadata": {
242236
"colab": {},
243237
"colab_type": "code",
@@ -264,7 +258,7 @@
264258
},
265259
{
266260
"cell_type": "code",
267-
"execution_count": 0,
261+
"execution_count": null,
268262
"metadata": {
269263
"colab": {},
270264
"colab_type": "code",
@@ -289,7 +283,7 @@
289283
},
290284
{
291285
"cell_type": "code",
292-
"execution_count": 0,
286+
"execution_count": null,
293287
"metadata": {
294288
"colab": {},
295289
"colab_type": "code",
@@ -315,7 +309,7 @@
315309
},
316310
{
317311
"cell_type": "code",
318-
"execution_count": 0,
312+
"execution_count": null,
319313
"metadata": {
320314
"colab": {},
321315
"colab_type": "code",
@@ -351,7 +345,7 @@
351345
},
352346
{
353347
"cell_type": "code",
354-
"execution_count": 0,
348+
"execution_count": null,
355349
"metadata": {
356350
"colab": {},
357351
"colab_type": "code",
@@ -375,15 +369,15 @@
375369
},
376370
{
377371
"cell_type": "code",
378-
"execution_count": 0,
372+
"execution_count": null,
379373
"metadata": {
380374
"colab": {},
381375
"colab_type": "code",
382376
"id": "n_FpEXtyoEJy"
383377
},
384378
"outputs": [],
385379
"source": [
386-
"%gui wx\n",
380+
"%gui qt6\n",
387381
"deeplabcut.refine_labels(path_config_file)"
388382
]
389383
},
@@ -406,7 +400,7 @@
406400
},
407401
{
408402
"cell_type": "code",
409-
"execution_count": 0,
403+
"execution_count": null,
410404
"metadata": {
411405
"colab": {},
412406
"colab_type": "code",
@@ -432,7 +426,7 @@
432426
},
433427
{
434428
"cell_type": "code",
435-
"execution_count": 0,
429+
"execution_count": null,
436430
"metadata": {
437431
"colab": {},
438432
"colab_type": "code",
@@ -471,7 +465,7 @@
471465
},
472466
{
473467
"cell_type": "code",
474-
"execution_count": 0,
468+
"execution_count": null,
475469
"metadata": {
476470
"colab": {},
477471
"colab_type": "code",
@@ -495,7 +489,7 @@
495489
},
496490
{
497491
"cell_type": "code",
498-
"execution_count": 0,
492+
"execution_count": null,
499493
"metadata": {
500494
"colab": {},
501495
"colab_type": "code",

0 commit comments

Comments
 (0)