README.md 1.55 KB
Newer Older
Ruilong Li's avatar
readme  
Ruilong Li committed
1
2
# nerfacc

3
This is a **tiny** tootlbox  for **accelerating** NeRF training & rendering using PyTorch CUDA extensions. Plug-and-play for most of the NeRFs!
Ruilong Li's avatar
readme  
Ruilong Li committed
4
5
6
7
8
9
10
11
12

## Instant-NGP example

```
python examples/trainval.py
```

## Performance Reference

Ruilong Li's avatar
Ruilong Li committed
13
Tested with the default settings on the Lego test set.
Ruilong Li's avatar
readme  
Ruilong Li committed
14

Ruilong Li's avatar
Ruilong Li committed
15
16
| Model | Split | PSNR | Train Time | Test Speed | GPU | Train Memory |
| - | - | - | - | - | - | - |
Ruilong Li's avatar
readme  
Ruilong Li committed
17
| instant-ngp (paper)            | trainval?            | 36.39  |  -   | -    | 3090    |
Ruilong Li's avatar
Ruilong Li committed
18
19
20
21
22
23
| instant-ngp (code)             | train (35k steps)    | 36.08  |  308 sec  | 55.32 fps  | TITAN RTX  |  1734MB |
| torch-ngp (`-O`)               | train (30K steps)    | 34.15  |  310 sec  | 7.8 fps    | V100 |
| ours                           | train (30K steps)    | 34.40  |  296 sec  | 6.2 fps    | TITAN RTX  |
| ours                           | trainval (30K steps) | 35.42  |  291 sec  | 6.4 fps    | TITAN RTX  |
| ours (2**16 samples w preload) | trainval (35K steps) | 36.18  |  385 sec  | 8.3 fps    | TITAN RTX  |
| ours (2**16 samples w preload) | train (35K steps) | 35.03  |  383 sec  | 8.0 fps    | TITAN RTX  |
Ruilong Li's avatar
Ruilong Li committed
24
25
26
27
28
29

## Tips:

1. sample rays over all images per iteration (`batch_over_images=True`) is better: `PSNR 33.31 -> 33.75`.
2. make use of scheduler (`MultiStepLR(optimizer, milestones=[20000, 30000], gamma=0.1)`) to adjust learning rate gives: `PSNR 33.75 -> 34.40`.
3. increasing chunk size (`chunk: 8192 -> 81920`) during inference gives speedup: `FPS 4.x -> 6.2`
Ruilong Li's avatar
Ruilong Li committed
30
4. random bkgd color (`color_bkgd_aug="random"`) for the `Lego` scene actually hurts: `PNSR 35.42 -> 34.38`
Ruilong Li's avatar
Ruilong Li committed
31