Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath2 committed Dec 29, 2024
1 parent e937cde commit 053481b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# NeRF.cpp
NeRF implementation with Siren layers in C++.

| <img src="./output/rgb.gif" alt="NeRF RGB Animation" style="display:inline-block"/> | <img src="./output/depth.gif" alt="NeRF Depth Map" style="display:inline-block"/> |
|:-------------:|:---------:|
| **RGB** | **Depth Map** |

<img src="./output/animation.gif" alt="NeRF Animation"/>

NeRF implementation with Siren layers in C++.
## Requirements
- CUDA
- LibTorch
Expand Down
Binary file removed output/animation.gif
Binary file not shown.
Binary file added output/depth.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output/rgb.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ constexpr int n_final_frames = 30;
//Render options
constexpr int batch_size = 1280000;
constexpr float start_distance = 2.0f;
constexpr float end_distance = 8.0f;
constexpr int n_samples = 96; //no. of samples along each Ray
constexpr float end_distance = 6.0f;
constexpr int n_samples = 128; //no. of samples along each Ray

int main(int argc, char *argv[]) {
// Parse command-line arguments
Expand Down Expand Up @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
std::uniform_int_distribution<int> dist(0, dataset.len - 1);

// Train the NeRF model
for (int i = 0; i < n_iters; i++) {
for (int i = 0; i <= n_iters; i++) {
// Sample a random image and its corresponding pose
int img_i = dist(rng);
auto target = dataset.images[img_i].to(device);
Expand Down

0 comments on commit 053481b

Please sign in to comment.