본문 바로가기

인공지능 공부

Running DynaBOA Step by step

https://github.com/syguan96/DynaBOA

 

GitHub - syguan96/DynaBOA: [T-PAMI 2022] Out-of-Domain Human Mesh Reconstruction via Dynamic Bilevel Online Adaptation

[T-PAMI 2022] Out-of-Domain Human Mesh Reconstruction via Dynamic Bilevel Online Adaptation - GitHub - syguan96/DynaBOA: [T-PAMI 2022] Out-of-Domain Human Mesh Reconstruction via Dynamic Bilevel On...

github.com

 

Let's run the DynaBOA on the youtube video.

 

1. Prepare video. I downloaded single dancer's video with mp4 format.

 

2. Prepare Data

 By following the github page, I create newVideo folder and put the mp4 file.

3. Set the config.py file. I changed InternetData_Root to the new directory.

 

4. process vid2img.py. It generate images of frame of the video.

5. Check the generated image

 

6. Detect 2d keypoints. I used the alphapose to detect 2d keypoints.

 

 6-1. activate alphapose env

 6-2. Detect keypoints by followingcommand. check the directory.

  python scripts/demo_inference.py --indir ../DynaBOA/newVideo/images/dance --outdir ../DynaBOA/newVideo/alphaposeResult/ --cfg configs/coco/resnet/256x192_res152_lr1e-3_1x-duc.yaml --checkpoint pretrained_models/fast_421_res152_256x192.pth --save_video --save_img --flip --min_box_area 300

 6-3. Check the results.

 

7. process Data.

 

 7-1. rename .json file to seq01.json

 7-2. run the following command

python process_data.py --dataset internet

 7-3. check the npz file

 

 

8. Run DynaBOA.

 This process is not simple... let's do this process step by step.

 

 8-1. Running the bash run_on_internet.sh

  -> it makes following error

8-2. change config.py as follow:

InternetData_Root was changed.

 8-3. make seq01 folder to the images folder as follows

 8-4. copy the whole images to the seq01 folder.

 

 8-5 run!

bash run_on_internet.sh

8-6 check the results

9. Let's generate a movie clip.

 

ffmpeg -framerate 25 -i Pred_%d.png -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4

 

Enjoy!!