akanazawa / hmr

Project page for End-to-end Recovery of Human Shape and Pose
Other
1.54k stars 395 forks source link

Is there a python3 version someone implemented? #135

Open OOF-dura opened 4 years ago

OOF-dura commented 4 years ago

Thanks for your great work! I just want to know is there a python3 version someone implemented?

Thanks in advance!

akanazawa commented 4 years ago

I would also love to know! I know there are couple of efforts @russoale If you are working on this please respond here or email me and I can add the link to your repo in the README!

Thanks,

A

russoale commented 4 years ago

Sorry for the late response. Indeed you can find a python3 version but implemented with tensorflow 2 https://github.com/russoale/hmr2.0

jszgz commented 3 years ago

Hello, do you know how to use mpi_inf_3dhp_to_tfrecords.py to convert mpi_inf_3dhp dataset? I failed because the code use jpg as input but the dataset I downloaded is consisting of videos. Do I need to use ffmpeg and write code to convert avi to jpg?

russoale commented 3 years ago

Hi @jszgz,

i just ffmpeg via bach script.

#!/bin/bash

for sub in S*; do
        for seq in $sub/*; do
                for vid_in in $seq/*.avi; do
                        vid_name=$(basename $vid_in);
                        printf "start converting video %s\n" $vid_name
                        vid_out="$sub/imageFrames/${vid_name%.*}";
                        printf "in: %s out: %s\n" $vid_in $vid_out;
                        mkdir -p "$vid_out";
                        ffmpeg -hide_banner -loglevel error -stats -i "$vid_in" -qscale:v 1 "$vid_out/frame_%06d.jpg";
                done
        done
done
jszgz commented 3 years ago

Hi @russoale , I think what the code expect is like : join(datset_root, 'S%d' % sub_id ,'Seq%d' % seq_id, 'imageFrames', 'video_%d' % cam_id, 'frame_%06d.jpg') It is different from your output path structure, and your code use same output name, different videos will rewrite previous jpgs? I don't know what does cam_id means in the author's code, cam_ids = [0, 1, 2, 4, 5, 6, 7, 8], but I found video_0.avi video_1.avi video_2.avi video_3.avi ·······video_13.avi,there are 14 videos. What's more, my dataset deirectory structure is different from yours: --datset_root ----S1 ------Seq1 --------ChairMasks -------------- video_0.avi -------------- video1.avi -------------- video.avi -------------- video_13.avi --------FGmasks -------------- video_0.avi -------------- video1.avi -------------- video.avi -------------- video_13.avi --------imageSequence -------------- video_0.avi -------------- video1.avi -------------- video.avi -------------- video_13.avi --------annot.mat --------camera.calibration ------Seq2 --------same as Seq1 ----S2 ----S

And do you know how to recompute human3.6m dataset since the precoomputed link is not available now?