Your Operating system and DeepLabCut version
Please state your operating system, env, and which version of DeepLabCut you are using.
Example: Ubuntu 16.04 LTS, with an Anaconda Env, & DeepLabCut1.x or 2.x.
Windows 10 GPU with Anaconda Env
DeepLabCut 2.1
Using the DLC program GUI, I am unable to apply cropping to frames using automatic extraction.
Thank you in advance! I am a very new user, but after looking at the frame_extraction script, it looks like I should be able to extract frames using the automatic (rather than manual) extraction, but maybe this is an incorrect assumption.
Following up on this issue, I now was able to track down the GUI code, and I see the part about self.crop_choice is commented out. Does this mean that I am not able to choose cropping from the GUI? Thank you!
"if self.method == "manual":
self.feedback_choice.Enable(False)
self.opencv_choice.Enable(False)
self.algo_choice.Enable(False)
self.cluster_step.Enable(False)
self.slider_width.Enable(False)
else:
self.feedback_choice.Enable(True)
self.opencv_choice.Enable(True)
self.algo_choice.Enable(True)
self.cluster_step.Enable(True)
self.slider_width.Enable(True)"
It is a bit of an issue for this particular step to do in the project manager GUI, as the crop box that pops up is not written in wxPython. It鈥檚 on an internal to/do this to rewrite that older cropping GUI, but setting the cropping in the config.yaml file should work.
You set the crop coordinates under each video path- is that were you modified it?
@MMathisLab thank you so much for your reply!
Because I wasn't sure of the exact cropping coordinates, my work around: I chose manual frame extraction under the extract frames tab, and then when the first frame popped up I selected the box I wanted; I then noticed that this changed in the config.yaml the parameter "Crop" under annotation dataset configuration (which would be under the video path in the config.yaml). Once I had this cropping parameter added in my config.yaml, after automatic extraction I did not see cropped videos.
Thank you again,
Rennie
@MMathisLab Also, I should add that when I referenced the same config.yaml file, and ran extract_frame with crop=True and automatic extraction, the frames cropped.
Thanks, Rennie
Thanks for clarification. Yes, so currently there is no way in the Project Manager GUI to set crop=True, but I鈥檒l leave this open in case others want to edit that script to make a proper GUI/ or we will get to it in the future. For now, pre-cropping with ffmpeg or using the terminal for frame extraction is the best way.
@MMathisLab, thanks so much for the confirmation and recommendation!
note, we could make the default crop=True in the PM GUI, such that when one uses it but has updated the config.yaml, it would still crop the frames, i.e. change this: https://github.com/AlexEMG/DeepLabCut/blob/5dea10302e1e6ca7e76f0fd20e3c2b3f9a7bd673/deeplabcut/gui/extract_frames.py#L176
to True vs. False
@AlexEMG thoughts?
@MMathisLab That seems like that could be very useful! That way if the cropping parameters were not changed in the config.yaml there would still be no cropping, so that would not be impacted.
This is related, so I will close this issue such that we can focus on this, which would solve both users requests: https://github.com/AlexEMG/DeepLabCut/issues/572