diff --git a/README.md b/README.md index d5d98ec..adcb6e3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # NeRF.cpp +NeRF implementation with Siren layers in C++. +| NeRF RGB Animation | NeRF Depth Map | +|:-------------:|:---------:| +| **RGB** | **Depth Map** | -NeRF Animation -NeRF implementation with Siren layers in C++. ## Requirements - CUDA - LibTorch diff --git a/output/animation.gif b/output/animation.gif deleted file mode 100644 index 0781719..0000000 Binary files a/output/animation.gif and /dev/null differ diff --git a/output/depth.gif b/output/depth.gif new file mode 100644 index 0000000..27028a3 Binary files /dev/null and b/output/depth.gif differ diff --git a/output/rgb.gif b/output/rgb.gif new file mode 100644 index 0000000..6500255 Binary files /dev/null and b/output/rgb.gif differ diff --git a/src/main.cpp b/src/main.cpp index 84ece3d..3cd636f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { std::uniform_int_distribution 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);