4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

Added documentation for equirectangular input (#1561)

* added documentation for equirectangular

* fixed typo and mentioned 3fps is empirical
This commit is contained in:
Rohan Mathur 2023-03-07 15:28:21 -08:00 committed by GitHub
parent c0c714c831
commit 9dc7fc2e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View File

@ -290,3 +290,35 @@ ns-process-data metashape --data {data directory} --xml {xml file} --output-dir
```bash
ns-train nerfacto --data {output directory}
```
## Equirectangular data
Equirectangular data is data that has been taken by a 360 camera such as Insta360. Both equirectangular image sets and videos can be processed by nerfstudio.
### Images
For a set of equirectangular images, process the data using the following command:
```bash
ns-process-data images --camera-type equirectangular --images-per-equirect {8, or 14} --data {data directory} --output-dir {output directory}
```
The images-per-equirect argument is the number of images that will be sampled from each equirectangular image. We have found that 8 images per equirectangular image is sufficient for most use cases so it defaults to that. However, if you find that there isn't enough detail in the nerf or that colmap is having trouble aligning the images, you can try increasing the number of images per equirectangular image to 14.
### Videos
For videos we reccomend taking a video with the camera held on top of your head. This will result in any unwanted capturer to just be in the bottom of each frame image and therefore can be cropped out.
For a video, process the data using the following command:
```bash
ns-process-data video --camera-type equirectangular --images-per-equirect {8, or 14} --num-frames-target {num equirectangular frames to sample from} --percent-crop {top bottom left right} --data {data directory} --output-dir {output directory}
```
See the equirectangular images section above for a description of the `--images-per-equirect` argument.
The `num-frames-target` argument is optional but it is recomended to set it to 3*(seconds of video) frames. For example, if you have a 30 second video, you would use `--num-frames-target 90` (3*30=90). This number was chosen from a bit of experimentation and seems to work well for most videos. It is by no means a hard rule and you can experiment with different values.
The `percent-crop` argument is optional but often very helpful. This is because equirectangular videos taken by 360 cameras tend to have a portion of the bottom of the image that is the person who was holding the camera over their head.
<img src="imgs/equirect_crop.jpg">
This obscene mesh of human is obviously not helpful in training a nerf so we can remove it by cropping the bottom 20% of the image. This can be done by using the `--percent-crop 0 20 0 0` argument.

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB