danbider / lightning-pose

Accelerated pose estimation and tracking using semi-supervised convolutional networks.
MIT License
223 stars 32 forks source link

ignore hidden "_labeled" folders in dlc to lp conversion #157

Closed hummuscience closed 1 month ago

hummuscience commented 1 month ago

The conversion script was failing as it was detecting folders in the "labeled_frames" folder that did not contain any frame data.

Examples of such folders are hidden folders, such as .DS_Store folders that MacOS generates. The other examples are folders created by DeepLabCut when running the check_labels function (folders where labels are plotted on top of the frames).

This is a simple fix to filter out the potential problematic folders.

There is maybe a better/safer approach by generating a list of videos (from the videos folder or the config.yaml file) and then looking for folders in the labeled_videos folder that are exact matches of the basenames.

themattinthehatt commented 1 month ago

@hummuscience thanks so much for this PR! I'll take a look at this tomorrow and get back to you :pray: