Git Product home page Git Product logo

anim-nerf's People

Contributors

janaldochen avatar woo1 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

anim-nerf's Issues

Can you explain hyper parameters?

Thanks for sharing this wonderful work!
As you mentioned in the paper,
"
We set the hyper-parameters as |N (𝑖)| = 4,
𝛿 = 0.2, πœ†1 = 0.001, πœ†2 = 0.01 and πœ†π‘‘ = 0.1. We use 512Γ—512
image in all experiments. For training the model, we adopt the
Adam optimizer [52], and it spends about 13 hours on 2 Nvidia
GeForce RTX 3090 24GB GPUs
"
can you specify what the parameter is in the config file?
|N (𝑖)| : batch_size
𝛿 : dis_threshold
πœ†1 : lambda_pose in opt.py
πœ†2 : lambda_pose_smooth in opt.py
πœ†π‘‘ : lambda_background

Is this right variables?

A question about camera parameters

How to estimate the camera intrinsics K ? In your paper, the camera intrinsics is estimated, but the people snapsshot dataset provide a camera file including camera intrinsics.

Support half body or not?

Thanks for your wonderful work!
I wonder if the input video only captures half of a body (e.g. upper torso), will Anim-NeRF reconstruct that part well?
For example, the image below.

ζˆͺ屏2022-03-07 δΈ‹εˆ4 24 01

continue training

Thank you for your great work
assuming i trained a model and now i want to continue the training process
so i run train.py file and changed the following :

train_resume = True
train_ckpt_path = "checkpoints/XXX/last.ckpt"

i saw there are two more params to set :
model_names_to_load = ?
pretrained_model_requires_grad = ?

what should be the value of them ?
there is any thing else i need to change?

thanks

Rename functions imported from TorchMetrics

Thanks for the great work! TorchMetrics has renamed ssim-> scale_invariant_signal_noise_ratio and psnr-> peak_signal_noise_ratio. The old names are being deprecated in v0.7 and will be removed in v0.8.

Lightning-AI/torchmetrics@8e9eb8e

Maybe the imports and usages can also be update to the new name?

from torchmetrics.functional import psnr, ssim

from torchmetrics.functional import psnr, ssim

Uploading mixamo mocap

Hi, in novel_pose.py you are using mocap information from mixamo file. Can you share that file and make it a configurable path?

running on custom video

Hi, thanks for sharing this wonderful work! In the currently released code, the people_snapshot dataset already has the associated smpl and camera parameters, which is easy to get started with. Could you further give some instruction on how to prepare these necessary inputs for a custom monocular video (assuming this video is similar to those in people_snapshot)? Something like a python -m tools.custom_video --data_root ${path_to_custom_video} along with a python -m tools.prepare_template_for_custom_video would be much appreciated.

Can I use my own data?

Hello, thank you for sharing your work.

I have a question about whether can I use my own video data to test on your model ?

Another question is how did you extract the colorized texture from 2D image and apply it on 3D obj ? My goal is about extract the texture from 2D image and apply it on 3D SMPL model. Could you give me some advice about that?

Thanks.

training error - AssertionError: Invalid type <class 'NoneType'> for key cam_IDs

Hi, Thanks for sharing this wonderful code!
When I try training with this command.
python train.py --cfg_file configs/people_snapshot/male-3-casual.yml
this error raises

Traceback (most recent call last):
File "train.py", line 425, in
cfg = get_cfg()
File "/Anim-NeRF/config.py", line 105, in get_cfg
cfg = get_default_config()
File "/Anim-NeRF/config.py", line 52, in get_default_config
cfg.train.cam_IDs = None
File "/Anim-NeRF/venv/lib/python3.7/site-packages/yacs/config.py", line 158, in setattr
type(value), name, _VALID_TYPES
File "/Anim-NeRF/venv/lib/python3.7/site-packages/yacs/config.py", line 521, in _assert_with_logging
assert cond, msg
AssertionError: Invalid type <class 'NoneType'> for key cam_IDs; valid types = {<class 'bool'>, <class 'float'>, <class 'tuple'>, <class 'int'>, <class 'list'>, <class 'str'>}

This error did not raised yesterday.
How can I fix it?

Error in prepare_template when setting up "custom video code"

Command:
!python -m tools.prepare_template --data_root data/custom --people_ID BAR_APose --model_type smpl --gender neutral --model_path smplx/models/

Result:
0% 0/256 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/drive/MyDrive/ColabNotebooks/NeRF/Anim-NeRF/tools/prepare_template.py", line 86, in
distances_chunk = body_mesh.nearest.signed_distance(points_chunk)
File "/usr/local/lib/python3.7/dist-packages/trimesh/proximity.py", line 307, in signed_distance
return signed_distance(self._mesh, points)
File "/usr/local/lib/python3.7/dist-packages/trimesh/proximity.py", line 231, in signed_distance
closest, distance, triangle_id = closest_point(mesh, points)
File "/usr/local/lib/python3.7/dist-packages/trimesh/proximity.py", line 138, in closest_point
candidates = nearby_faces(mesh, points)
File "/usr/local/lib/python3.7/dist-packages/trimesh/proximity.py", line 43, in nearby_faces
rtree = mesh.triangles_tree
File "/usr/local/lib/python3.7/dist-packages/trimesh/caching.py", line 103, in get_cached
value = function(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/trimesh/base.py", line 811, in triangles_tree
tree = triangles.bounds_tree(self.triangles)
File "/usr/local/lib/python3.7/dist-packages/trimesh/triangles.py", line 338, in bounds_tree
tree = util.bounds_tree(triangle_bounds)
File "/usr/local/lib/python3.7/dist-packages/trimesh/util.py", line 1597, in bounds_tree
import rtree
ModuleNotFoundError: No module named 'rtree'

About Visualization

I used these command of Visualization:
python novel_view.py --ckpt_path checkpoints/male-3-casual/last.ckpt
python extract_mesh.py --ckpt_path checkpoints/male-3-casual/last.ckpt
python novel_view.py --ckpt_path checkpoints/male-3-casual/last.ckpt --betas_2th -2.0
python novel_view.py --ckpt_path checkpoints/male-3-casual/last.ckpt --betas_2th 3.0
python novel_pose.py --ckpt_path checkpoints/male-3-casual/last.ckpt
Both got the same error report. And they can't work.

The error report both like :

(Anim-NeRF) near@near:~/Github/Anim-NeRF$ python novel_view.py --ckpt_path checkpoints/female-3-casual/last.ckpt --betas_2th -2.0
WARNING: You are using a SMPL model, with only 10 shape coefficients.
Setting up [LPIPS] perceptual loss: trunk [alex], v[0.1], spatial [off]
Loading model from: /home/near/miniconda3/envs/Anim-NeRF/lib/python3.8/site-packages/lpips/weights/v0.1/alex.pth
Traceback (most recent call last):
File "novel_view.py", line 146, in
system = AnimNeRFSystem.load_from_checkpoint(args.ckpt_path).to(device)
File "/home/near/miniconda3/envs/Anim-NeRF/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 156, in load_from_checkpoint
model = cls._load_model_state(checkpoint, strict=strict, **kwargs)
File "/home/near/miniconda3/envs/Anim-NeRF/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 204, in _load_model_state
keys = model.load_state_dict(checkpoint["state_dict"], strict=strict)
File "/home/near/miniconda3/envs/Anim-NeRF/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1667, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for AnimNeRFSystem:
Missing key(s) in state_dict: "evaluator.lpips.scaling_layer.shift", "evaluator.lpips.scaling_layer.scale", "evaluator.lpips.net.slice1.0.weight", "evaluator.lpips.net.slice1.0.bias", "evaluator.lpips.net.slice2.3.weight", "evaluator.lpips.net.slice2.3.bias", "evaluator.lpips.net.slice3.6.weight", "evaluator.lpips.net.slice3.6.bias", "evaluator.lpips.net.slice4.8.weight", "evaluator.lpips.net.slice4.8.bias", "evaluator.lpips.net.slice5.10.weight", "evaluator.lpips.net.slice5.10.bias", "evaluator.lpips.lin0.model.1.weight", "evaluator.lpips.lin1.model.1.weight", "evaluator.lpips.lin2.model.1.weight", "evaluator.lpips.lin3.model.1.weight", "evaluator.lpips.lin4.model.1.weight", "evaluator.lpips.lins.0.model.1.weight", "evaluator.lpips.lins.1.model.1.weight", "evaluator.lpips.lins.2.model.1.weight", "evaluator.lpips.lins.3.model.1.weight", "evaluator.lpips.lins.4.model.1.weight".

Could you please give me some advice to solve this problem ?
Thanks a lot !

How to generate textured 3D models?

Thank you for your great work. I have a question whether the code can generate a textured 3D model. I ran your code and did not generate a textured 3D model.

pose refinement or no?

I noticed that the pose smooth loss is commented out. Does it mean there is no pose refinement? Or adding pose refinement performs worse? Thanks!

# frame_idx_ = torch.clamp(frame_idx+1, 0, self.hparams.num_frames)

novel pose synthesis on IPER or customized testing video

Dear Jianchuan,

thanks for this great work and updating the code for training on customized video.

I wondered if you could also provide some script to test on novel pose synthesis on IPER or customized testing video.
Or, could you give some general guidance to perform novel pose synthesis on a customized testing video?

Thanks!

How to extract smpl params from fbx?

Thanks for your great work!
For novel pose synthesis, I note that all pose cases obtained from mixamo, which provides 'fbx' animation files. How do you parse smpl params (result.pkl) from the fbx file? or you directly extract smpl params from accroding videos via VIBE?

Getting error running inference

Installed all requirements.
Downloaded the pre-trained model and put into /checkpoints from Google Drive.
Downloaded the people-snapshot dataset (male-3-casual), unzipped and put into /data from Google Drive.
Run extract mesh inference as follows
!python extract_mesh.py --ckpt_path checkpoints/male-3-casual/last.ckpt

Got error:

Traceback (most recent call last):
File "extract_mesh.py", line 103, in
system = AnimNeRFSystem.load_from_checkpoint(args.ckpt_path).to(device)
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/core/saving.py", line 156, in load_from_checkpoint
model = cls._load_model_state(checkpoint, strict=strict, kwargs)
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/core/saving.py", line 198, in _load_model_state
model = cls(
_cls_kwargs)
File "/content/drive/MyDrive/ColabNotebooks/NeRF/Anim-NeRF/train.py", line 125, in init
query_inside=self.hparams.query_inside,
File "/content/drive/MyDrive/ColabNotebooks/NeRF/Anim-NeRF/models/anim_nerf.py", line 79, in init
self.body_model = create(model_path, model_type, gender=gender)
File "/content/drive/MyDrive/ColabNotebooks/NeRF/Anim-NeRF/smplx/body_models.py", line 2457, in create
raise ValueError(f'Unknown model type {model_type}, exiting!')
ValueError: Unknown model type models, exiting!

About loading pre-trained model

Hi. First, I'm very happy for your work. Thanks for sharing a nice work.

By the way, I'm not familiar with pytorch-lighting package but there is a problem with loading your pre-trained checkpoint checkpoints/male-3-casual/last.ckpt in this line:

system = AnimNeRFSystem.load_from_checkpoint(args.ckpt_path).to(device)

The error is like this:

Error(s) in loading state_dict for AnimNeRFSystem:
	Missing key(s) in state_dict: "evaluator.lpips.scaling_layer.shift", "evaluator.lpips.scaling_layer.scale", "evaluator.lpips.net.slice1.0.weight", "evaluator.lpips.net.slice1.0.bias", "evaluator.lpips.net.slice2.3.weight", "evaluator.lpips.net.slice2.3.bias", "evaluator.lpips.net.slice3.6.weight", "evaluator.lpips.net.slice3.6.bias", "evaluator.lpips.net.slice4.8.weight", "evaluator.lpips.net.slice4.8.bias", "evaluator.lpips.net.slice5.10.weight", "evaluator.lpips.net.slice5.10.bias", "evaluator.lpips.lin0.model.1.weight", "evaluator.lpips.lin1.model.1.weight", "evaluator.lpips.lin2.model.1.weight", "evaluator.lpips.lin3.model.1.weight", "evaluator.lpips.lin4.model.1.weight", "evaluator.lpips.lins.0.model.1.weight", "evaluator.lpips.lins.1.model.1.weight", "evaluator.lpips.lins.2.model.1.weight", "evaluator.lpips.lins.3.model.1.weight", "evaluator.lpips.lins.4.model.1.weight".

I'm not sure but maybe you did intend to load only a certain part of class AnimeNeRFSystem (i.e. self.models), however the pytorch-lighting load_from_checkpoint fucntion couldn't load appropriately the weights and bias from checkpoint file.

I just changed the strict=True parameter of load_from_checkpoint function to load pre-trained model, and now the question:

Is this a right direction for executing code?

If right, could you change your source code?

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.