This guide explains how to set up and use the Camera Viewer to visualize camera positions in 3D.

Run the following commands in your terminal to set up the environment and install dependencies:
# Clone the repository
git clone https://github.com/xt4d/CameraViewer.git
cd CameraViewer
# Create a virtual environment and activate it
python -m venv env
source env/bin/activate # For macOS/Linux
# On Windows: .\env\Scripts\activate
# Install dependencies
pip install -r requirements.txtAfter setting up, you can launch the viewer using:
python app.py-
Convert Camera Matrices to
.npy
To use the viewer, camera poses must be converted into.npyfiles compatible with thequick/c2wformat. Use thenpy2.pyscript for this.# Run the conversion script (adjust paths as needed) python npy2.py- The script uses the
pose_bounded.npyfile provided by MipNeRF360. - It saves
.npyfiles named after each image into the directoryinputs/quick/poses. - You can filter poses by index to generate training or test views selectively.
- The script uses the
-
Training and Test Views
- Place camera poses for training and test views into
inputs/quick/poses. - Add training view images into
inputs/quick/images.
- Place camera poses for training and test views into
-
Visualization
- When running the viewer, only the cameras corresponding to training images will be highlighted in red.
-
Example folder structure:
inputs/ └── quick/ ├── images/ │ ├── _DSC9203.JPG │ ├── _DSC9205.JPG │ └── _DSC9208.JPG ├── poses/ ├── _DSC9094.npy ├── _DSC9144.npy ├── _DSC9198.npy ├── _DSC9203.npy ├── _DSC9205.npy ├── _DSC9208.npy └── _DSC9211.npy
If the script fails, ensure:
npyfiles are placed in the same directory as the cloned repository.- Adjust paths in
npy2.pyas needed.