Jeff-sjtu / HybrIK

Official code of "HybrIK: A Hybrid Analytical-Neural Inverse Kinematics Solution for 3D Human Pose and Shape Estimation", CVPR 2021
MIT License
1.16k stars 141 forks source link

fbx animation failed #135

Open thenighthunter0 opened 1 year ago

thenighthunter0 commented 1 year ago

thanks for your code. I run the demo_video.py without pytorch3d visualization. when I use blender to load res.pk image I dont know what happen.

Ethan-cpp commented 1 year ago

how do you do it, could you share your demo_video.py,Thank you!

Shirley-0708 commented 8 months ago

@thenighthunter0 The same. Did you fix it?

Ulf3000 commented 7 months ago

same .. animation is missing. just imports the character and bones

pk file is 3MB.

visualization . mp4 files are working , they show the bones and the 3d figure. but pk is empty ?

any specific version of blender to use ? 3.6 . 3.2 ?

i converted the mp4 to under 10 MB

https://github.com/Jeff-sjtu/HybrIK/assets/10765339/8fade077-1bb5-4101-94c2-c1277b9c7753

Ulf3000 commented 7 months ago

ok im attaching the console output here , maybe we can find the problem together.

(hybrik) C:\Program Files No Install\3D TOOLS\HybrIK>python scripts/demo_video.py --video-name examples/dance.mp4 --out-dir res_dance --save-pk --save-img C:\Users\Admin\miniconda3\envs\hybrik\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs: C:\Users\Admin\miniconda3\envs\hybrik\lib\site-packages\numpy.libs\libopenblas.FB5AE2TYXYH2IJRDKGDGQ3XBKLKTF43H.gfortran-win_amd64.dll C:\Users\Admin\miniconda3\envs\hybrik\lib\site-packages\numpy.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll warnings.warn("loaded more than 1 DLL from .libs:" C:\Users\Admin\miniconda3\envs\hybrik\lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( C:\Users\Admin\miniconda3\envs\hybrik\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=FasterRCNN_ResNet50_FPN_Weights.COCO_V1. You can also use weights=FasterRCNN_ResNet50_FPN_Weights.DEFAULT to get the most up-to-date weights. warnings.warn(msg) Loading model from ./pretrained_models/hybrik_hrnet.pth...

Extract Image...

Failed to load OpenH264 library: openh264-1.8.0-win64.dll Please check environment and/or download library: https://github.com/cisco/openh264/releases [libopenh264 @ 0000017390af2480] Incorrect library version loaded Could not open codec 'libopenh264': Unspecified error [libopenh264 @ 0000017390af2900] Incorrect library version loaded Could not open codec 'libopenh264': Unspecified error ffmpeg version N-104488-ga13646639f-20211109 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210610 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20211109 libavutil 57. 7.100 / 57. 7.100 libavcodec 59. 12.100 / 59. 12.100 libavformat 59. 8.100 / 59. 8.100 libavdevice 59. 0.101 / 59. 0.101 libavfilter 8. 16.101 / 8. 16.101 libswscale 6. 1.100 / 6. 1.100 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'examples/dance.mp4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: isommp41mp42 creation_time : 2021-06-15T07:09:04.000000Z Duration: 00:00:39.94, start: 0.000000, bitrate: 2427 kb/s Stream #0:00x1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 1946 kb/s, 29.98 fps, 30 tbr, 16k tbn (default) Metadata: creation_time : 2021-06-15T07:09:04.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 310 kb/s (default) Metadata: creation_time : 2021-06-15T07:09:04.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> png (native)) Press [q] to stop, [?] for help Output #0, image2, to 'res_dance/raw_images/dance-%06d.png': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: isommp41mp42 encoder : Lavf59.8.100 Stream #0:0(und): Video: png, rgb24(pc, gbr/unknown/unknown, progressive), 1280x720, q=2-31, 200 kb/s, 30 fps, 30 tbn (default) Metadata: creation_time : 2021-06-15T07:09:04.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : Lavc59.12.100 png frame= 1198 fps=467 q=-0.0 Lsize=N/A time=00:00:39.93 bitrate=N/A speed=15.6x video:350017kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown 100%|███████████████████████████████████████████████████████| 1198/1198 [00:00<00:00, 91934.58it/s]

Run Model...

100%|██████████████████████████████████████████████████████████| 1198/1198 [10:21<00:00, 1.93it/s] pred_uvd pred_xyz_17 pred_xyz_29 pred_xyz_24_struct pred_scores pred_camera pred_betas pred_thetas pred_phi pred_cam_root transl transl_camsys bbox height width img_path

(hybrik) C:\Program Files No Install\3D TOOLS\HybrIK>


As you can see the detection and 3d generation has worked perfectly fine , there are no obvious errors.

The problem must be somewhere in the pickle export or import . How big is the .pk file supposed to be for the example video ? Mine is 3MB

Ulf3000 commented 7 months ago

Ok the pickle generation seems to work fine!!!!!

The blender addon is the problem :

Comment out line 59 (the one which assigns material) ..

https://github.com/Jeff-sjtu/HybrIK/assets/10765339/005e85a9-ef6e-4aab-a7fb-76af492ef2dd

OHHH MAN THIS IS SO GOOD ! Thanx alot !!!!

yang1hu commented 1 month ago

SO

hello ! would you tell me which version of blender you use ! i have a problem with blender 4.1.thank you very much