GithubHelp home page GithubHelp logo

peterljq / openmmd Goto Github PK

View Code? Open in Web Editor NEW
879.0 879.0 183.0 320.82 MB

OpenMMD is an OpenPose-based application that can convert real-person videos to the motion files (.vmd) which directly implement the 3D model (e.g. Miku, Anmicius) animated movies.

License: MIT License

Batchfile 0.29% Python 9.25% MATLAB 0.39% C++ 83.45% C 6.33% Objective-C 0.20% HCL 0.05% Shell 0.02% Rich Text Format 0.01%

openmmd's People

Contributors

erjanmx avatar peterljq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openmmd's Issues

unrecognized arguments: -s 1

Thanks for your great work! I've downloaded the fullpack and followed your instruction step by step. And I got (1) _openpose.avi, (2) _json(folder), and (3)_json_3d_20190515_152335_idx01(folder).
Then in the final step, when I run 3DToVmd.bat, it asked me to input the result folder path of the execution on 3d-pose-baseline-vmd. Isn't the path of option (2) above? When I input the (2) path, then I just hit 'enter key' for default for the rest of the settings, and I got a error message: pos2vmd_multi.py: error: unrecognized arguments: -s 1

Am I importing a wrong path?
And how to solve this problem?

Error on Turing GUP

The Code can run on the pascal GPU. But when it's on the Turing the [Open Pose] can't be open
代码跑在帕斯卡架构没问题,可以正常运行。但是运行在图灵上时 [Open Pose]窗口会在打开后无显示,并且在短时间后关闭。无法对视频进行解析。
Cuda version v10.0

About 3d-pose-baseline-vmd IndexError

while following the instruction and trying to run OpenposeTo3D.bat, after inserting the number of people, the program keeps throwing out IndexError, such as
File "src/openpose_3dpose_sandbox_vmd.py", line 74, in read_openpose_json
_tmp_data = data["people"][idx]["pose_keypoints_2d"]
IndexError: list index out of range
or
File "src/openpose_3dpose_sandbox_vmd.py", line 110, in read_openpose_json
_tmp_points[n][_data_idx] = _tmp_data[o]
IndexError: list index out of range

Any ideas? I'm really confused
I've try different tensorflow and cuda versions, the problem remains.

issues of running on mac os

macOS 系统10.14.4
按照安装说明进行的安装 都没有报错 直到最后开始运行 OpenposeVideo.bat的时候 提示command not found。。。

3d-pose-baseline-vmd 报错

experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\ls1024\bs64\np\maxnorm\batch_normalization\use_stacked_hourglass\predict_17
子目录或文件 experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\ls1024\bs64\np\maxnorm\batch_normalization\use_stacked_hourglass\predict_17\log 已经存在。
处理: experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\ls1024\bs64\np\maxnorm\batch_normalization\use_stacked_hourglass\predict_17\log 时出错。
INFO:main:start reading data
Traceback (most recent call last):
File "src/openpose_3dpose_sandbox_vmd.py", line 484, in
tf.app.run()
File "C:\Users\Andy\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "src/openpose_3dpose_sandbox_vmd.py", line 283, in main
smoothed = read_openpose_json(now_str, idx, subdir)
File "src/openpose_3dpose_sandbox_vmd.py", line 74, in read_openpose_json
_tmp_data = data["people"][idx]["pose_keypoints_2d"]
IndexError: list index out of range

Error: Video to write frames could not be opened as...

So i was trying to use OpenMMD.
I've installed all the necessary libraries.

But everytime i tried to process a video (even the "Real-person.gif" that it comes in the examples), it simply don't work :/

This is the error that it gives me (i'm using Python 3.7.8 and Anaconda3):
imagen

File too large

Hi is it possible to have the file downloadable with parts? Like a part 1 and part 2 file? The file is just too large to download. If this isn't the right place to ask, can you please redirect me? Because I can't find a comment section here. D:

Video format errors

Error:
Video to write frames could not be opened as C:\Users\flora\Desktop\OpenMMD. Please, check that:
1. The path ends in .avi.
2. The parent folder exists.
3. OpenCV is properly compiled with the FFmpeg codecs in order to save video.

The video tutorial on youtube uses .mp4 video but it says here to use .avi???

Quaternion transfrom

Hi,

1 bf = VmdBoneFrame()
2 bf.name = b'\x8f\xe3\x94\xbc\x90\x67' # '上半身'
3 direction = pos[8] - pos[7]
4 up = QVector3D.crossProduct(direction, (pos[14] - pos[11])).normalized()
5 upper_body_orientation = QQuaternion.fromDirection(direction, up)
6 initial = **QQuaternion.fromDirection(QVector3D(0, 1, 0), QVector3D(0, 0, 1))
7 bf.rotation = upper_body_orientation * initial.inverted()
8 frames.append(bf)
9 upper_body_rotation = bf.rotation

I use your function positions_to_frames, it works well when I use 3d points from kinectv2. but I can't understand why I need to multiply initial.inverted(), and where initial come from(in line 6 and line 7)?

half body covered

Hi,when im trying to run this program ,there are half body covered in some frame .thus the bone structure is deformed.what should i do to solve it

Error: CUDA Check Failed

Hello. So, I have a problem.

When I tried using the OpenPoseVideo.bat, when I tried to convert a video, one of the errors that I found was called.

Error:
Cuda check failed (35 vs. 0): CUDA driver version is insufficient for CUDA runtime version

Is there any way I can solve it?

issue about VMD-3d-pose-baseline-multi

I have an issue on last step
the error shows that

INFO:main:角度計算開始
INFO:main:センター計算開始
Traceback (most recent call last):
File "applications\pos2vmd_multi.py", line 2305, in
position_multi_file_to_vmd(position_file, vmd_file, smoothed_file, args.bone, depth_file, args.upright - 1, args.centerxy, args.centerz, args.xangle, args.mdecimation, args.idecimation, args.ddecimation, is_alignment, is_ik, args.heelpos)
File "applications\pos2vmd_multi.py", line 2189, in position_multi_file_to_vmd
position_list_to_vmd_multi(positions_multi, vmd_file, smoothed_file, bone_csv_file, depth_file, upright_idx, center_xy_scale, center_z_scale, xangle, mdecimation, idecimation, ddecimation, alignment, is_ik, heelpos)
File "applications\pos2vmd_multi.py", line 407, in position_list_to_vmd_multi
calc_center(smoothed_file, bone_csv_file, positions_multi, upright_idx, center_xy_scale, center_z_scale)
File "applications\pos2vmd_multi.py", line 1760, in calc_center
upright_ankle_scale = (bone_anke_y / upright_ankle_avg) * (center_xy_scale / 100)
ZeroDivisionError: float division by zero

Also, I found the result of 3d-pose-baseline-vmd is bad.

BTW, Openpose only can use 1.3.0 version.
Any possible to use Openpose1.4 or 1.5?

It's not working/Nothing popping up

I can't get the video to open. I input the openposevideo.bat then the video. I saw a tutorial where it would automatically pop up a window with your video in it but for me it just pops up a new line at the very end.
Here's the text.

C:\Users\16267\Desktop\OpenMMD 1.0>"C:\Users\16267\Desktop\OpenMMD 1.0\OpenposeVideo.bat"

C:\Users\16267\Desktop\OpenMMD 1.0>@echo off
'@echo' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\16267\Desktop\OpenMMD 1.0>rem ---

C:\Users\16267\Desktop\OpenMMD 1.0>rem ---

C:\Users\16267\Desktop\OpenMMD 1.0>rem ---

C:\Users\16267\Desktop\OpenMMD 1.0>cd /d C:\Users\16267\Desktop\OpenMMD 1.0\

C:\Users\16267\Desktop\OpenMMD 1.0>rem --- access the video

C:\Users\16267\Desktop\OpenMMD 1.0>echo Please input the path of video
Please input the path of video

C:\Users\16267\Desktop\OpenMMD 1.0>set INPUT_VIDEO=

C:\Users\16267\Desktop\OpenMMD 1.0>set /P INPUT_VIDEO=Γûáthe path of video:
Γûáthe path of video: "C:\Users\16267\Desktop\OpenMMD 1.0\Upwards.mp4"

C:\Users\16267\Desktop\OpenMMD 1.0>rem echo INPUT_VIDEO:"C:\Users\16267\Desktop\OpenMMD 1.0\Upwards.mp4"
1.0\Upwards.mp4"" was unexpected at this time.
C:\Users\16267\Desktop\OpenMMD 1.0>IF /I ""C:\Users\16267\Desktop\OpenMMD 1.0\Upwards.mp4"" EQU "" (
C:\Users\16267\Desktop\OpenMMD 1.0>

请教一下关于第三步的问题

作者你好,第一步是通过openpose估计2D的姿态,然后第二步是把2D的姿态估计成3D的姿态,这时已经有3维信息了,那么第三步的估计depth是出于什么考虑?有什么作用呢?

setp2: index out of range, 1.3.0, 50 files

尊敬的作者,您好!
open pose版本1.3.0, Json文件夹仅有50个文件 一样出错
运行到第二步 3d-pose-baseline-vmd,list index out of range

DEBUG:main:FLAGS.person_idx=1
INFO:main:start reading data
DEBUG:main:reading test_000000000000_keypoints.json
Traceback (most recent call last):
File "src/openpose_3dpose_sandbox_vmd.py", line 484, in
tf.app.run()
File "d:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "src/openpose_3dpose_sandbox_vmd.py", line 283, in main
smoothed = read_openpose_json(now_str, idx, subdir)
File "src/openpose_3dpose_sandbox_vmd.py", line 74, in read_openpose_json
_tmp_data = data["people"][idx]["pose_keypoints_2d"]
IndexError: list index out of range

How to use 3d pose to generate vmd file

Hi,
Thanks for you impressive work. I just want to know if I get 3d pose from kinect, How could I generate vmd file?
I can't find index of your code in file pose2vmd.py function positions_to_frames , like pos[14] - pos[11] . how could I know the index of the bone?

Download link Baidu Netdisk

Hello download link for Baidu Netdisk when it is will be fixed i assume we need it in order to make perfect/good animation from videos . can you please re upload it in Mega or google drive? so we can access to it and download it

I keep getting following error i dont know how to slove it

If you want the detailed information of GIF, input yes.
If no input and press Enter, the generation setting of GIF will be set to default.
warn If you input warn, then no GIF will be generated.
the detailed information[yes/no/warn]:
Traceback (most recent call last):
File "src/openpose_3dpose_sandbox_vmd.py", line 7, in
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
idk why or how to solve it

OpenposeVideo.bat not working properly

I know like nobody is gonna see this since this project is so old, but why not try. I have everything installed correctly and everything works except for the OpenposeVideo. When i try it in Annaconda and cmd it doesn't work. It will say it completed the process of processing the video. However, it doesn't open the video to process it and it leaves my _json folder empty. Any idea on how to fix this? And I also have my video in the OpenMMD folder.

About convert to vmd file

Thank you very much for sharing your wonderful project. I am doing fine until the last step. It gives me this error message: "usage: pos2vmd_multi.py [-h] [-t TARGET] [-b BONE] [-v VERBOSE] [-u UPRIGHT] [-c CENTERXY] [-z CENTERZ] [-x XANGLE] [-d DDECIMATION] [-m MDECIMATION] [-i IDECIMATION] [-a ALIGNMENT] [-k LEGIK] [-e HEELPOS]pos2vmd_multi.py: error: unrecognized arguments: -s 1". If I remove the s parameter in the last line of the bat file, it will execute and give me a vmd file but the result is not good. I was wondering if you could point out what possibly going wrong with my passing the s factor. Thanks!

this project need update

Hello i wonder if we can connect to who made this project and ask for update or also we try to update it together . i would like to support this project . but i dont know much about programming so will need guide . it is really nice project
is it possible to update it or the team who make it did drooped it from their plans?

Simple tutorial on BiliBili site

Hi, thanks for the project! I appreciate it so much that I made a simple tutorial on BiliBili hoping I could help spread it ( If you don't mind~ ). I'm wondering if you might want to have a look or maybe point out some flaws in the blog ( https://www.bilibili.com/read/cv2835857 ), and maybe also respond to some comments, if any.

Suggestion of program update tensorflow 2 changes

Tensorflow 2 introduced massive changes - which cause certain features in the current openmmd implementation to break

tf.app.flags (used in ../src/predict_3dpose.py) is now entirely deprecated.

Usage of

argparse is advised...

See also:
#43


Currently
tensorflow-1.6.0-cp36-cp36m-win_amd64.whl
and
opencv_python-3.4.10.37-cp36-cp36m-win_amd64.whl
(Might require virtual studio 2022 for installation)

were the key to making this run (Win11)

The two popular ways are:
A) Anaconda Prompt: https://www.youtube.com/watch?v=uZcR1iTPNPs
B) cmd virt env: https://www.youtube.com/watch?v=_JXd41qVfBY

About runing OpenposeTo3D appears AttributeError: module 'tensorflow' has no attribute 'app'

Hi!Friend
I used openpose 1.5 to get _josn because the original openpose does not work. I have installed 13 runtime libraries, and after getting _josn, what happens is shown in the figure
222

IN the Anaconda Prompt (intall) to running OpenposeTo3D.bat.
When "Not an internal or external command, nor a runnable program or batch file"appears,The CMD does not terminate the program automatically and bat continues to running until The“Traceback”
I want to make it work smoothly
Please help me!Thank you so much!

linux version?

it seems an amazing result, but I want to know is there any Linux version?

convert to vmd

尝试 deleting the '-s %SMOOTH_TIMES%'编译显示 unknown encoding!求教如何解决

Hi, do I need to change the default csv file?

I have a miku model, but after I import the generated vmd and fbx to the MMD software, I found
the miku move strangely(not the same movement in the input video). Do I need to change some parameter or change the bone csv file? Thanks!

Any support for Linux/Ubuntu

Hi @peterljq @erjanmx ,

Hope you are doing great !!!

I want to extend and try your git model in Linux/Ubuntu as I have gone through your model it support Window and Mac , so is their any way to work into Linux/Ubuntu.

Or can you please help us with similar model work in such environment.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.