Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
# For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
|
| 3 |
+
# Doc / guide: https://huggingface.co/docs/hub/datasets-cards
|
| 4 |
+
{}
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Dataset Card for DLC Speed Benchmarking ZIP
|
| 8 |
+
|
| 9 |
+
This supports the dlc-live benchmarking [zip](https://github.com/DeepLabCut/DeepLabCut-live/blob/427c12609307ef685e4193c91026567308820cbe/dlclive/benchmark.py#L40) formally hosted on our Harvard Rowland server.
|
| 10 |
+
All information can be found in our publication:
|
| 11 |
+
|
| 12 |
+
Real-time, low-latency closed-loop feedback using markerless posture tracking
|
| 13 |
+
Gary A Kane, Gonçalo Lopes, Jonny L Saunders, Alexander Mathis, Mackenzie W Mathis
|
| 14 |
+
https://elifesciences.org/articles/61909
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
### Direct Use
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
"""
|
| 22 |
+
DeepLabCut Toolbox (deeplabcut.org)
|
| 23 |
+
© A. & M. Mathis Labs
|
| 24 |
+
|
| 25 |
+
Licensed under GNU Lesser General Public License v3.0
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
# Script for running the official benchmark from Kane et al, 2020.
|
| 29 |
+
# Please share your results at https://github.com/DeepLabCut/DLC-inferencespeed-benchmark
|
| 30 |
+
|
| 31 |
+
import os, pathlib
|
| 32 |
+
import glob
|
| 33 |
+
|
| 34 |
+
from dlclive import benchmark_videos, download_benchmarking_data
|
| 35 |
+
|
| 36 |
+
datafolder = os.path.join(
|
| 37 |
+
pathlib.Path(__file__).parent.absolute(), "Data-DLC-live-benchmark"
|
| 38 |
+
)
|
| 39 |
+
|
| 40 |
+
if not os.path.isdir(datafolder): # only download if data doesn't exist!
|
| 41 |
+
# Downloading data.... this takes a while (see terminal)
|
| 42 |
+
download_benchmarking_data(datafolder)
|
| 43 |
+
|
| 44 |
+
n_frames = 10000 # change to 10000 for testing on a GPU!
|
| 45 |
+
pixels = [2500, 10000, 40000, 160000, 320000, 640000]
|
| 46 |
+
|
| 47 |
+
dog_models = glob.glob(datafolder + "/dog/*[!avi]")
|
| 48 |
+
dog_video = glob.glob(datafolder + "/dog/*.avi")[0]
|
| 49 |
+
mouse_models = glob.glob(datafolder + "/mouse_lick/*[!avi]")
|
| 50 |
+
mouse_video = glob.glob(datafolder + "/mouse_lick/*.avi")[0]
|
| 51 |
+
|
| 52 |
+
this_dir = os.path.dirname(os.path.realpath(__file__))
|
| 53 |
+
# storing results in /benchmarking/results: (for your PR)
|
| 54 |
+
out_dir = os.path.normpath(this_dir + "/results")
|
| 55 |
+
|
| 56 |
+
if not os.path.isdir(out_dir):
|
| 57 |
+
os.mkdir(out_dir)
|
| 58 |
+
|
| 59 |
+
for m in dog_models:
|
| 60 |
+
benchmark_videos(m, dog_video, output=out_dir, n_frames=n_frames, pixels=pixels)
|
| 61 |
+
|
| 62 |
+
for m in mouse_models:
|
| 63 |
+
benchmark_videos(m, mouse_video, output=out_dir, n_frames=n_frames, pixels=pixels)
|
| 64 |
+
```
|