-
Notifications
You must be signed in to change notification settings - Fork 118
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
How can I apply a smoothing to the video results? #33
Comments
Hello @linxiang4200 and if you are in blender, you have a smooth option on the graph editor that could help you with this problem. I noticed that depending on the footage, you get much less jitters. For example this video. I had much less jitter, take a look on the video bellow. blender_hXWWl67Fit.mp4I'm not sure but I feel that if you have a good contrast between the character on the footage and the background, the result will be better |
thanks your excellent advice,but I'm not good at blender. at last, I found another way ,use smoothNet, like this repo |
Hello @linxiang4200 , you mean that you were able use the code that start here? Its looks preety interesting, I'll try it out. thanks for pointing out |
@linxiang4200 I must say that your idea was great, with it, most of the results I've got were much better. Let me show a couple of tests I made. the 0.05 is the default output from 4d humans, and the 0.06 is with smoothnet 20230812.0.06.wip.compare.TWITTER.mp4blender_wCgdEwH52K.mp4blender_aEm7wjouvx.mp4 |
Hi, how did you fix from mmhuman3d.utils.demo_utils import smooth_process |
I used the track and after the track a executed that smooth code from cliff. But to kake it work i had to install mmcv 1.6 (i think) and download the source code from mmhuman3d, and the source of pytorch3d. You dont need to build pytorch but have the oytorch folder inside where you are goi g to run the code, but mmhuan3d source code there too |
Thank you. I tried it but didn't understand placing the source of pytorch3d and mmhuman3d in conda env without installing. |
you can place in the same folder that you will use the scriot to smooth things out. For example on my installation you'll find it this way. so when calling You can install it too, but I was having a hard time trying to install it. and here is the code I made to use on the smooth |
On the code Im' loading from pickle instead of joblib, because I made an addon for it in blender and didnt want to install joblib on blender as pickle comes in python by default |
Thank you! However I got error on smooth.py I googled on Stack Overflow and Github but couldn't find out solution. May I ask if you know any clue about this? (4D-Humans) D:\4D-Humans>pip list absl-py 1.4.0 |
@k-a-s-o-u Probably yout problem is because you are using my loading process that uses Pickle instead of joblib. You probably will ake it work exchaging for joblib import of the data For exmaple, I did this code to convert to pickle
probably you'll just have to use the |
@carlosedubarreto
|
@k-a-s-o-u I hope someone does a pull request adding smoothnet on this repo, but, maybe that wont happen. If you allow me to suggest, it would be great if you keep on trying, If you like the result youve saw and want it to be even better, you will only gain with that. And you have one big advantage, me But one thing I wont do ia make it "plug and play" that I do on the addons I make. I do that because, the addon I make is for people that dont want to understande the code and just use it, and because of that, I charge then (not all the time, but most of the time lately so if you want to learn, if you want to go further, you can count on me, seriously. Hope you understand and dont tkae what I said on the negative way, It should be a positive answer form my part 😀 |
@carlosedubarreto This is the result movie by the way I have one last question. File "D:\miniconda3\envs\4D-Humans\lib\site-packages\mmcv\utils\path.py", linene 23, in check_file_exist Anyway I've got so much thank you that you gave me such opportunity for seriously facing to the code for learning😄and your big help! |
hello @k-a-s-o-u I'm vary happy that you were able to make it work. Sorry for that error, I'm sure it was my fault. Let me explain. As I was having to integrate the cliff code with the other 4d human code, to know where the code was from, I changes the config folder name so I could know from where it was coming from. 😅 You could rename it to the original name, probably "configs" intead of "configs_cliff_base" And with that smooth it makes things better most of the time, but on some you will see that the tranlation will becamo messy, you can do this, enable it only for the pose data, and you'll be good to go. On my addon I made an option for people to apply the smooth on the pose, the translation or on both. By default, it will apply on both, but if the movement become strange, the user can apply only on the pose and it will work. Oh another thing, I'm planning to try another code to smooth the result, the darkpose that was suggested to me from pose2sim creator David Pagnon. If it works successfully, I'll put some info here. |
Hello @carlosedubarreto
I saw your add-on version of this. It's awesome work! I want to make it someday.
It sounds exciting! look forward to it! By the way I realized 4D-Humans' motion captured doll got strange armature direction are standing perpendicularly on body(left on picuture) as usually armature should be set along anatomy on picture the right model. |
this is a "normal" behavior of blender importing FBX. My honest opinion, dont bother with that. |
Hi @carlosedubarreto I'm trying to use your smoothing file but doing it at the end affects how it is visualized on the image. It messes up the keypoint projections. Is there a better way to get the smoothed output visualized on the image/video? |
@smandava98 , can you show some examples? |
Basically, my issue was that I could not visualize the smoothed 4D-Humans results on my video. I figured out the issue. I was using PHALP, not 4D-Humans (PHALP implemented 4D-Humans). They use 'camera' parameter to mean the 2d camera. I had to use 'camera_bbox' as that was the 3D camera parameter that they had when they created the pkl file. |
@smandava98 sorry, I didnt even remembered that I shared the code LOL. I think the best would be to visualize the result in blender, for example. Using smoothnet I had some problems when there is too much movement on the original data. The pose for the character goes elsewhere in parts of the animation. I actually dont know what to tell you, since my work was besically dealing with the result inside blender. I dont use the rendered video at all (I dont even look at the result) So in the end what I suggest is not watching the video result, but the import of the animation in 3d space, in blender for example. and to do that you can even get the free addon that I did called CEB 4d humans. Anyway, even smoothnet working, there is anther method for smoothing that you can use native tools in blender, I receiverd the tip from a user called giacomo spaconi, the idea was to bake the animation, to make the animation curves to be corrected in blender and then use the smooth tool that blender has for animation. This approach brought the best result for smoothhing the animation. I would suggest you to try it. |
@carlosedubarreto Thanks Carlos. I ended up fixing my issue (edited my comment above). Your code works great! |
@smandava98 Thats great, thanks a lot for letting me know |
@carlosedubarreto - sorry to ask you this , i have not much idea but is there any other software which could be easier ( blender seems to have a big learning curve) to quickly import the pckl file to get some animations going ? |
Hello @timtensor , the main problem I think is "converting" the pkl data to something usable on the 3d softwares. Actually blender could be the easiest, I say that because you can use an addon I did exactly for that. You can get it for free here: https://carlosedubarreto.gumroad.com/l/ceb4dhumans?layout=profile |
@carlosedubarreto thank you for the feedback, my idea was to do a 360 degree panning, camera view across the smpl files. I will see what could be done and how difficult would it be to get it running. |
@timtensor , 360 around the animation result, right? You might need to apply some smooth, because the result of 4d humans is very good, but has some jitters. |
@carlosedubarreto - thanks. For now I just want to have a quick demo even with thejitters . I will try to find the instructions if I can get it up and running . |
@timtensor , for the blender addon I suggested, only for windows, sorry |
I am having the same problem and trying to reproduce this issue. But what parameter does 0.05 stand for in PHALP? |
Wow, that is an old issue, I didnt remember most of it, actually ended up reading it all again. Probably the 0.05 is not actually a parameter in PHALP, it was the version of the addon I was working on. At that time it was on version 0.05. Now its in version 1.06, integrating not only 4D Humans, but also WHAM and SLAHMR (that is not 100% working) And about the smooth, if you want to try, I think the best would be to apply the smooth that an amazing user suggested me (I loved the idea so much that I added to the addon and added his name to the type of smooth :D Here is the method |
Hey Carlos, Thanks for your reply. While reproducing this issue, our videos involve multi-person tracking for NBA game recordings in a large dataset so Blender might not be a good option for me. Let me give you a quick look at the output we got from 4D: processed.mp4We also got an output pkl file every time we process a video. Here is what I thought: Applying our pkl file with your smooth.py script and get a processed pkl file. Then using the processed pkl to reconstruct a new video. Is there any foreseeable obstacle or do you have any other suggestions for our current situation? Thanks! |
Hello @jackgeng19 the smooth script that I share works well, but the smooth from blender is very superior. It can work with the smoothnet? Yes it can, but there will be moments that the motion wont be good. I mean, 4d humans is an amazing project, and it outputs great results (with jitter) But the real problem are the jitters. to have a great output, what I fould is that, the best tould be to select the importante frames from a chracter, and interpolate the in between. Or maybe use cascadeur to help on that jitter cleaning. (I didnt test yet the cascadeur path) So to make my answer shorter. |
Thank you for your great work! While running the video demo, I noticed some slight jitter in the movements of the model's limbs. Is this due to the lack of smoothing?
The text was updated successfully, but these errors were encountered: