forked from DeepLabCut/DeepLabCut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestscript_superanimal_adaptation.py
44 lines (40 loc) · 1.08 KB
/
testscript_superanimal_adaptation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# DeepLabCut Toolbox (deeplabcut.org)
# © A. & M.W. Mathis Labs
# https://github.com/DeepLabCut/DeepLabCut
#
# Please see AUTHORS for contributors.
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
#
# Licensed under GNU Lesser General Public License v3.0
#
"""
Test script for super animal adaptation
"""
import deeplabcut
import os
if __name__ == "__main__":
basepath = os.path.dirname(os.path.realpath(__file__))
videoname = "m3v1mp4"
video = os.path.join(
basepath, "openfield-Pranav-2018-10-30", "videos", videoname + ".mp4"
)
video = deeplabcut.ShortenVideo(
video,
start="00:00:00",
stop="00:00:01",
outsuffix="short",
)
print("adaptation training for superanimal_topviewmouse")
superanimal_name = "superanimal_topviewmouse"
videotype = ".mp4"
scale_list = [200, 300, 400]
deeplabcut.video_inference_superanimal(
[video],
superanimal_name,
videotype=".mp4",
video_adapt=True,
scale_list=scale_list,
pcutoff=0.1,
adapt_iterations=50,
)