qiuyu96 / CoDeF

[CVPR 2024 Highlight] Official PyTorch implementation of CoDeF: Content Deformation Fields for Temporally Consistent Video Processing
https://qiuyu96.github.io/CoDeF/
Other
4.83k stars 386 forks source link

A minor question about code #40

Open ltm920716 opened 1 year ago

ltm920716 commented 1 year ago

Hi, I don't understand the meaning of this line of code. Can you help explain it?Thanks!

https://github.com/qiuyu96/CoDeF/blob/2407bfae638bcbdf4de9030a188b766e78cdd0fb/train.py#L202

by the way,is there any way that could print the model network of tinycudann? E.g. I want to see what happened In ‘implicit_video.encoder (tcnn.Network)’

yhyu13 commented 1 year ago

Need explanations, too

henry123-boy commented 1 year ago

Hi, thank you guys for following our work! For the question above, here is the response:

  1. the input of hash table is required to be ranged in [0, 1], therefore, the normalization is necessary.
  2. for each frame, the image coordinate are normalized into [0,1] already. But as it mentioned in our paper, the Canonical Field is usually larger than the normal frame in the video (which contains more information).
  3. Therefore the range of canonical image may lies in [-0.3, 1.3] (this is set manually, we found it works for the most cases). So the normalized coord = (coord - (-0.3))/( 1.3- (-0.3) ) Hope the response above could help you! Welcome for any questions, if you thought the explanation is unclear.
ltm920716 commented 1 year ago

Hi @henry123-boy , thanks for your reply, so what if making consistent with the actual canonical image setting size,like here https://github.com/qiuyu96/CoDeF/blob/2407bfae638bcbdf4de9030a188b766e78cdd0fb/datasets/video_dataset.py#L58