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

cam_param is absent in HumanData.SUPPORTED_KEYS. #18

Closed
YongtaoGe opened this issue Dec 8, 2021 · 7 comments
Closed

cam_param is absent in HumanData.SUPPORTED_KEYS. #18

YongtaoGe opened this issue Dec 8, 2021 · 7 comments
Assignees

Comments

@YongtaoGe
Copy link
Contributor

YongtaoGe commented Dec 8, 2021

I want to convert Human36M dataset and I use the following script

python tools/convert_datasets.py --datasets h36m_p1 --root_path ../data/datasets/ --output_path ../data/processed_datasets

Then I get the error "cam_param is absent in HumanData.SUPPORTED_KEYS."

@YongtaoGe
Copy link
Contributor Author

YongtaoGe commented Dec 8, 2021

The unpreprocess_data is arranged as following structure:

└── data
    └── datasets
        └── h36m
            ├── annot
            ├── S1
               ├──Poses_D2_Positions_S1.tgz
               ├──Poses_D3_Positions_mono_S1.tgz
               ├──Poses_D3_Positions_mono_universal_S1.tgz
               ├──Poses_D3_Positions_S1.tgz
               ├──Videos_S1.tgz

How can I get the following structure data of processed h36m mentioned in https://github.com/open-mmlab/mmhuman3d/blob/main/docs/preprocess_dataset.md#human36m

mmhuman3d
├── mmhuman3d
├── docs
├── tests
├── tools
├── configs
└── data
    └── datasets
        └── h36m
            ├── annot
            ├── S1
            |   ├── images
            |   |    |── S1_Directions_1.54138969
            |   |    |  ├── S1_Directions_1.54138969_00001.jpg
            |   |    |  ├── S1_Directions_1.54138969_00002.jpg
            |   |    |  └── ...
            |   |    └── ...
            |   ├── ...
            |   ├── MyPoseFeatures
            |   ├── MySegmentsMat
            |   └── Videos
            ├── S5
            ├── S6
            ├── S7
            ├── S8
            ├── S9
            ├── S11
            └── metadata.xml

@caizhongang
Copy link
Collaborator

Hello @YongtaoGe , for Human3.6M, you may download the original data from this link and arrange it into the structure as shown above.

Alternatively, you may download the preprocessed files directly, and the details can be found in data preparation.

@YongtaoGe
Copy link
Contributor Author

@caizhongang, I want to get the images with downsampled frame rate (10 FPS) which are not provided in this repository. So I still need to run the preprocessing script, is it right?

@pangyyyyy
Copy link
Collaborator

pangyyyyy commented Dec 8, 2021

Hi @YongtaoGe,

Thanks for pointing it out, we will update our documentation in the future for better clarity.

For now:

To get the contents under "MyPoseFeatures", extract the following files that you have:
tar zvxf Poses_D2_Positions_S1.tgz
tar zvxf Poses_D2_Positions_S1.tgz

To get "MySegmentsMat", download them as well (the h36m website calls them "Segments BBoxes MAT") and unpack them

To get the contents under "Videos",
tar zvxf Videos_S1.tgz

You seem to be missing metadata.xml which you can get from the h36m website or here.

To get the images:
please modify the DATASET_CONFIG for h36m_p1 in tools/convert_datasets.py to this:

    h36m_p1=dict(
        type='H36mConverter',
        modes=['train', 'valid'],
        protocol=1,
        extract_img=True,  # this is to specify you want to extract images from videos
        # mosh_dir='data/datasets/h36m_mosh', # comment this out if you do not have mosh
        prefix='h36m')

Rerun the same command as before and you should get the "images" folder:

mmhuman3d
├── mmhuman3d
├── docs
├── tests
├── tools
├── configs
└── data
    └── datasets
        └── h36m
            ├── annot
            ├── S1
            |   ├── images
            |   |    |── S1_Directions_1.54138969
            |   |    |  ├── S1_Directions_1.54138969_00001.jpg
            |   |    |  ├── S1_Directions_1.54138969_00002.jpg
            |   |    |  └── ...
            |   |    └── ...
            |   ├── MyPoseFeatures
            |        |── D2Positions
            |        └── D3_Positions_Mono
            |   ├── MySegmentsMat
            |        └── ground_truth_bs
            |   └── Videos
            |        |── Directions 1.54138969.mp4
            |        |── Directions 1.55011271.mp4
            |        └── ...
            ├── S5
            ├── S6
            ├── S7
            ├── S8
            ├── S9
            ├── S11
            └── metadata.xml

@YongtaoGe
Copy link
Contributor Author

@pangyyyyy Thank you very much! I will have a try.

@YongtaoGe
Copy link
Contributor Author

YongtaoGe commented Dec 8, 2021

@pangyyyyy There seems a bug in this line.

cv2.imwrite(image_abs_path)

@YongtaoGe YongtaoGe reopened this Dec 8, 2021
@leng-yue
Copy link
Contributor

Did you solve this problem? I can still see the cam_param is absent in HumanData.SUPPORTED_KEYS. in the newest version.

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

No branches or pull requests

5 participants