DeepLabCut使用篇(一):操作简述
文章目录
0x00 正式动手之前
- 激活deeplabcut的环境
- 进入anaconda工具中心
- 安装 Jupyter Notebook
0x01 开始训练
然后跟着我走!
export BROWSER=google-chrome
# 然后运行jupyter notebook
jupyter notebook
训练之前:
训练过程:
训练之后
多了测试集和训练集
0x02 如何使用
ipython
1. 导入工具包
import deeplabcut
2. 导入训练配置文件*.yaml
# Loading example data set
import os
# Note that parameters of this project can be seen at: *Reaching-Mackenzie-2018-08-30/config.yaml*
from pathlib import Path
path_config_file = os.path.join(os.getcwd(),'DeepLabCut/Test/examples/openfield-Pranav-2018-10-30/config.yaml')
deeplabcut.load_demo_data(path_config_file)
*检查是否标记成功
#Perhaps plot the labels to see how the frames were annotated:
deeplabcut.check_labels(path_config_file)
#Note: the training set was already created, so you don't need to do this and can directly proceed to train the network!
实时监控显卡运行情况
watch -n 10 nvidia-smi
# ^数字10代表每隔10s刷新一次数据
显卡跑起来了…在运行的过程中提示显存不够了…
训练完成,出现对应的训练模型
自己新建一个项目
1. 新建project
deeplabcut.create_new_project(`Name of the project',`Name of the experimenter', [`Full path of video 1',`Full path of video2',`Full path of video3'], working_directory=`Full path of the working directory',copy_videos=True/False)
(TIP: you can also place config_path
in front of deeplabcut.create_new_project
to create a variable that holds the path to the config.yaml file, i.e. config_path=deeplabcut.create_new_project(...)
)
然后就会自动在working directory
工作文件夹中创建新的文件夹,命名方式为:project名称+试验人员名称Name of the experimenter
+文档创建日期
详情见下一文章