Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepLabCut video metadata is wrongly assigned for our test datasets #1046

Open
h-mayorquin opened this issue Aug 30, 2024 · 0 comments
Open
Assignees

Comments

@h-mayorquin
Copy link
Collaborator

Currently the corresponding video is determined in two steps. First, a stem is calculated here:

vidname, scorer = h5file.stem.split("DLC")

Then, the configuration file is used to find the videos in configuration that contain that stem:

for video_path, params in cfg["video_sets"].items():
if vidname in video_path:
video = video_path, params["crop"]
break

But, if we look at the test data that we had for a while the video set paths in the configuration look like this:

video_sets:
  /Data/openfield-Pranav-2018-08-20/videos/m1s1.mp4:
    crop: 0, 640, 0, 480
  /Data/openfield-Pranav-2018-08-20/videos/m1s2.mp4:
    crop: 0, 640, 0, 480
  /Data/openfield-Pranav-2018-08-20/videos/m2s1.mp4:
    crop: 0, 640, 0, 480
  /Data/openfield-Pranav-2018-08-20/videos/m3s1.mp4:
    crop: 0, 640, 0, 480
  /Data/openfield-Pranav-2018-08-20/videos/m3s2.mp4:
    crop: 0, 640, 0, 480
  /Data/openfield-Pranav-2018-08-20/videos/m4s1.mp4:
    crop: 0, 640, 0, 480
  /Data/openfield-Pranav-2018-08-20/videos/m5s1.mp4:
    crop: 0, 800, 0, 800
  /Data/openfield-Pranav-2018-08-20/videos/m6s1.mp4:
    crop: 0, 800, 0, 800
  /Data/openfield-Pranav-2018-08-20/videos/m6s2.mp4:
    crop: 0, 800, 0, 800
  /Data/openfield-Pranav-2018-08-20/videos/m7s1.mp4:
    crop: 0, 800, 0, 800
  /Data/openfield-Pranav-2018-08-20/videos/m7s2.mp4:
    crop: 0, 800, 0, 800
  /Data/openfield-Pranav-2018-08-20/videos/m7s3.mp4:
    crop: 0, 800, 0, 800
  /Data/openfield-Pranav-2018-08-20/videos/m8s1.mp4:
    crop: 0, 800, 0, 800

And the hdf5 file name looks like this:

m3v1mp4DLC_resnet50_openfieldAug20shuffle1_30000.h5

So the stem would be m3v1mp4 but that is not to be found among that list.

I just trained some data this afternoon myself and there is the same mismatch.

https://gin.g-node.org/CatalystNeuro/behavior_testing_data/pulls/13

Maybe this is an artifact of those limited dataset but we were already thinking on passing the video_file_path as an optional argument so I think this is yet another reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant