McJackTang / MMPD_rPPG_dataset

MMPD: Multi-Domain Mobile Video Physiology Dataset(EMBC2023 Oral)
https://doi.org/10.48550/arXiv.2302.03840
MIT License
113 stars 13 forks source link

How to restore .mat formatted data to the original .avi or .mp4 video files? #18

Open Harry2345 opened 1 day ago

Harry2345 commented 1 day ago

Thank you very much for providing the dataset. How can I restore .mat formatted data to the original .avi or .mp4 video files?

McJackTang commented 22 hours ago

If you already downloaded MMPD dataset with agreement, you can easily read it by the following code:

import scipy.io as sio
f = sio.loadmat('p1_0.mat')
print(f.keys())

Then you can get the video (shape: [t, w, h, c]) and write it as avi or mp4 file. Please note that incorrect encode method may damage the quality of the dataset if you want to change it back to video.

Harry2345 commented 21 hours ago

If you already downloaded MMPD dataset with agreement, you can easily read it by the following code:

import scipy.io as sio
f = sio.loadmat('p1_0.mat')
print(f.keys())

Then you can get the video (shape: [t, w, h, c]) and write it as avi or mp4 file. Please note that incorrect encode method may damage the quality of the dataset if you want to change it back to video.

What encoding should I use for the MMPD dataset to ensure no loss?

McJackTang commented 18 hours ago

Could you share your motivation to get the mp4/avi so that we could offer better suggestions?

If you already downloaded MMPD dataset with agreement, you can easily read it by the following code:

import scipy.io as sio
f = sio.loadmat('p1_0.mat')
print(f.keys())

Then you can get the video (shape: [t, w, h, c]) and write it as avi or mp4 file. Please note that incorrect encode method may damage the quality of the dataset if you want to change it back to video.

What encoding should I use for the MMPD dataset to ensure no loss?