Is there an existing issue for this?
Operating System
Windows 11
DeepLabCut version
DLC 3.0.0rc13
What engine are you using?
pytorch
DeepLabCut mode
single animal
Device type
GeForce 5060 RTX
Bug description 🐛
There are several issues with how the code handles video cropping.
First, the handling of crop coordinates is fragmented:
extract_frames pulls video-specific coordinates from video_sets in config.yaml, ignoring the cropping: true/false global flag.
analyze_videos (via checkcropping in predict_videos.py) ignores video_sets and enforces the global x1, x2, y1, y2 coordinates beneath the global flag.
extract_outlier_frames attempts to use video_sets, but only if the global cropping boolean is set to true.
Second, the global flag and the global coordinates are misleading because they make it seem like this cropping flag itself is for a single coordinate cropping option used for all videos.
Third, there is no standalone way in the GUI to define crop coordinates for a new video added to an existing project. The select_cropping_area widget is only used for the "Extract Frames" tab. If a user just wants to analyze a new video and extract outliers, they cannot visually crop it without unnecessarily extracting frames first.
Fourth, because the "Extract Outlier Frames" GUI tab has no cropping toggle, the global flag is used. If it's false, extract_outlier_frames.py assigns coords=None and passes it to attempt_to_add_video(). This wrapper calls add_new_videos(), which grabs full-frame dimensions and updates the cfg["video_sets"] dictionary. This erases any video-specific cropping coordinates the user had previously saved and used to extract frames, etc.
Steps To Reproduce
No response
Relevant log output
Anything else?
No response
Code of Conduct
Is there an existing issue for this?
Operating System
Windows 11
DeepLabCut version
DLC 3.0.0rc13
What engine are you using?
pytorch
DeepLabCut mode
single animal
Device type
GeForce 5060 RTX
Bug description 🐛
There are several issues with how the code handles video cropping.
First, the handling of crop coordinates is fragmented:
extract_framespulls video-specific coordinates fromvideo_setsinconfig.yaml, ignoring thecropping: true/falseglobal flag.analyze_videos(viacheckcroppinginpredict_videos.py) ignoresvideo_setsand enforces the globalx1, x2, y1, y2coordinates beneath the global flag.extract_outlier_framesattempts to use video_sets, but only if the global cropping boolean is set totrue.Second, the global flag and the global coordinates are misleading because they make it seem like this cropping flag itself is for a single coordinate cropping option used for all videos.
Third, there is no standalone way in the GUI to define crop coordinates for a new video added to an existing project. The
select_cropping_areawidget is only used for the "Extract Frames" tab. If a user just wants to analyze a new video and extract outliers, they cannot visually crop it without unnecessarily extracting frames first.Fourth, because the "Extract Outlier Frames" GUI tab has no cropping toggle, the global flag is used. If it's false,
extract_outlier_frames.pyassignscoords=Noneand passes it toattempt_to_add_video(). This wrapper callsadd_new_videos(), which grabs full-frame dimensions and updates thecfg["video_sets"]dictionary. This erases any video-specific cropping coordinates the user had previously saved and used to extract frames, etc.Steps To Reproduce
No response
Relevant log output
Anything else?
No response
Code of Conduct