如何使用DLC批量处理数据

 

import deeplabcut

 

 

if __name__ == '__main__':

 

 

    # 使用训练好的模型来进行预测;

    root = r'/home/user/user/fzh/DLC/DLC-PupilDetectModel/TN-Pupil-Detect-Nacl-2021-05-11'

    config_path = root+ '/config.yaml'

 

    aviDataPath = ['/home/user/user/fzh/DLC/Test/r/r4/Pupil_Crop_CHA 2021-04-06 17-48-56-0000-1.avi',

                   '/home/user/user/fzh/DLC/Test/r/r5/Pupil_Crop_CHA 2021-04-06 17-48-56-0000-1.avi',

                   '/home/user/user/fzh/DLC/Test/r/r6/Pupil_Crop_CHA 2021-04-06 17-48-56-0000-1.avi']

 

 

    deeplabcut.analyze_videos(config_path, aviDataPath,save_as_csv=True)

    deeplabcut.create_labeled_video(config_path, aviDataPath, keypoints_only=False)

 

    print('analyze_videos finished!')

    print('finished!')


 

posted @ 2021-05-28 15:32  bH1pJ  阅读(75)  评论(0编辑  收藏  举报