Skip to content

Two-Shots-Are-Enough/Camera_visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Camera Viewer Guide

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

1. Setup

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.txt

2. Running the Viewer

After setting up, you can launch the viewer using:

python app.py

3. Preparing Camera Poses (npy Files)

  1. Convert Camera Matrices to .npy
    To use the viewer, camera poses must be converted into .npy files compatible with the quick/c2w format. Use the npy2.py script for this.

    # Run the conversion script (adjust paths as needed)
    python npy2.py
    • The script uses the pose_bounded.npy file provided by MipNeRF360.
    • It saves .npy files named after each image into the directory inputs/quick/poses.
    • You can filter poses by index to generate training or test views selectively.

4. Set Up Input Data for Viewer

  1. Training and Test Views

    • Place camera poses for training and test views into inputs/quick/poses.
    • Add training view images into inputs/quick/images.
  2. Visualization

    • When running the viewer, only the cameras corresponding to training images will be highlighted in red.
  3. 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
    
    

Troubleshooting

If the script fails, ensure:

  • npy files are placed in the same directory as the cloned repository.
  • Adjust paths in npy2.py as needed.

About

CGMaker with sparse 3DGS | Camera View Visualizer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages