How to set different crop parameters (x1,x2,y1,y2) for each videos in a folder?

Hi all,
I couldn’t find an answer to the following question below:

In dlc. analyze_videos and dlc.extract_outlier_frames: How to set different crop parameters (x1,x2,y1,y2) in config.yaml for distinct videos in a folder?

###################################################
My config.yaml has:

video_sets:
/media/rodrigo/HD2-Data/Recordings/videos/CTR-R10/CTR-R10.mp4:
crop: 148, 409, 3, 349
/media/rodrigo/HD2-Data/Recordings/videos/CTR-R11/CTR-R11.mp4:
crop: 190, 4445, 3, 347

… and…

Cropping Parameters (for analysis and outlier frame detection)

cropping: true
#if cropping is true for analysis, then set the values here:
x1: 150
x2: 405
y1: 6
y2: 345

###################################################
thanx,
R.

The easiest way in this case will be to pass a quadruple per video to:

deeplabcut.analyze_videos(’/analysis/project/reaching-task/config.yaml’,[’/analysis/project/videos/reachingvideo1.avi’], shuffle=2,cropping=(x1,x2,y1,y2))

See code: https://github.com/AlexEMG/DeepLabCut/blob/master/deeplabcut/pose_estimation_tensorflow/predict_videos.py#L131

1 Like