ChristianIngwersen / SportsPose

SportsPose - A Dynamic 3D sports pose dataset
37 stars 0 forks source link

data problem #3

Closed TDIT-haha closed 1 year ago

TDIT-haha commented 1 year ago

Hello, thank you very much for making this dataset public. I downloaded the data according to your requirements, but after decompressing the data, I found that only the videos have data, but there are no images in the data file. How did you obtain your images? Obtained from video frame extraction? But videos did not distinguish what pose state the video was in?

ChristianIngwersen commented 1 year ago

Hi, we use decord to extract frames from the video and then based on the timestamp we match it with the corresponding frame. Please have a look at our example notebook, where we show how to use it as a PyTorch dataset.

If you dont want to use our provided pytorch dataset, then have a look at our __getitem()__ to understand how it works :-)

https://github.com/ChristianIngwersen/SportsPose/blob/af60769d1485674dcfabdb853ddaf49f82987db7/src/sportspose/dataset.py#L1032

TDIT-haha commented 1 year ago

But I encountered an error while running this file(example_notebook.ipynb), ValueError: No valid frams found in dataset.Please check your settings.Therefore. I find selflen()=0, I cannot use it as a PyTorch dataset.May I ask what I should do?

ChristianIngwersen commented 1 year ago

@TDIT-haha Just to be sure - did you change the demo path datapath = "data/SportsPose" to your actual data path? And what is the structure of your SportsPose folder?

TDIT-haha commented 1 year ago

01 This is my directory structure, with datapath being the absolute path of SportsPose/SportsPose

ChristianIngwersen commented 1 year ago

@TDIT-haha I can't reproduce the error - the path should be datapath = "YOUR_ROOT_DIRECTORY/SportsPose/SportsPose" in your specific case.

TDIT-haha commented 1 year ago

Yes, I'm sure the path should be datapath = "YOUR_ROOT_DIRECTORY/SportsPose/SportsPose" in your specific case. Do I have a question? The data directory does not have any images, and I do not see any image preservation operations in the dataset. py file. If there are any image preservation operations, which section of the code is reflected?

ChristianIngwersen commented 1 year ago

Hi, we use decord to extract frames from the video and then based on the timestamp we match it with the corresponding frame. Please have a look at our example notebook, where we show how to use it as a PyTorch dataset.

If you dont want to use our provided pytorch dataset, then have a look at our __getitem()__ to understand how it works :-)

https://github.com/ChristianIngwersen/SportsPose/blob/af60769d1485674dcfabdb853ddaf49f82987db7/src/sportspose/dataset.py#L1032

To clarify here. We do not pre-extract the frames, so the folder should not contain any image data, just video data. We directly extract the frames from the video using the decord library. More specifically this is happening here: https://github.com/ChristianIngwersen/SportsPose/blob/af60769d1485674dcfabdb853ddaf49f82987db7/src/sportspose/dataset.py#L911

TDIT-haha commented 1 year ago

@ChristianIngwersen UserWarning:Warning!no measurement object are returned!Please check the input paths.Did you also encounter this running error? If so, how did you solve it?

ChristianIngwersen commented 1 year ago

Please provide the entire stacktrace and the code used. As mentioned I can't reproduce your error.

TDIT-haha commented 1 year ago

Hello, I have another question. May I ask which file do you read the key information for each folder? Is it calib.pkl

ChristianIngwersen commented 1 year ago

Hi, calib.pkl == camera calibration data *.npy == joint data *_timing.pkl == sync between video and joint data + relative path to the vids *.avi == Videos

TDIT-haha commented 1 year ago

But after I unpacked the package, I didn't have these two files(.npy and _timing.pkl),The extracted files I have downloaded include SportsPoseArchive.z01 \SportsPoseArchive.z02\SportsPoseArchive.zip

ChristianIngwersen commented 1 year ago

@TDIT-haha Ahh then this is the main cause of all your issues :-)

The files are stored in a split zip archive, so you'll need to download all of the files to the same folder and then just extract the .zip file. Then this process will automatically inflate the other split parts i.e. .z01 etc..

See more here: https://support.firmex.com/hc/en-us/articles/204579673-Downloads-with-multiple-parts-z01-and-z02-files-#1-download-all-the-parts-to-the-same-folder-on-your-computer-0-1

TDIT-haha commented 1 year ago

Thank you, it's finally possible