Waabi 面试真题解析:Speed Up NeRF(PyTorch、NeRF、体素特征卷积)

27次阅读
没有评论

Speed Up NeRF

Here we give you a vanilla NeRF implementation (~100 lines of code).

Your task: Make it faster! Goal is PSNR > 20 in 5 mins (original takes 2 hours).

You’ll need to understand the code, implement a PyTorch model, debug, and potentially do some parameter tuning.

Instructions:

  • Briefly go over the code, take care of the forward method in NerfModel.
  • Reimplement it in the forward method in FastNerfModel.

Some extra info:

  • Volume AABB is -1.5 to 1.5.
  • Suggested approach: use volume representation (CxDxHxW) plus a small MLP.
  • You are welcome to explore Hashtable, Triplane, or other ideas, but they might be trickier to do in an hour.

这道题要求你在给定的基础 NeRF 实现上做加速优化:先理解原始 <code>forward</code> 的输入输出和采样逻辑,再在 <code>FastNerfModel</code> 中重写更快的前向传播。图中给出的推荐方案是使用体素特征卷积体(feature volume,形状类似 <code>C×D×H×W</code>)结合一个小型 MLP,从而把连续 3D 坐标映射到密度和颜色预测。面试时重点不只是“能跑通”,还要兼顾实现正确性、数值稳定性、训练速度和最终 PSNR 表现;AABB 范围固定为 <code>-1.5</code> 到 <code>1.5</code>,因此通常会先把世界坐标归一化到体素网格,再用插值提取局部特征。

正文完
 0