List of tools and scripts developped while prepping a Gaussian-splatting version of EO-NeRF
- Create a conda environment
conda create -n eogs python=3.10
conda activate eogs- Install pytorch and torchvision
pip install torch torchvision- Install packages in
requirements.txt
pip install -r requirements.txt- Install 3DGS CUDA kernels
pip install src/gaussiansplatting/submodules/diff-gaussian-rasterization
pip install src/gaussiansplatting/submodules/simple-knnDownload the dataset from the GitHub Release page: dataset_v01
Extract the dataset in the data folder (unzip -q data.zip -d data). The structure should look like this:
EOGS/
├── data/
│ ├── images/
│ │ ├── JAX_004/
│ │ │ ├── JAX_004_006_RGB.tif
│ │ │ ├── JAX_004_007_RGB.json
│ │ │ ...
| │ ├── JAX_068/
| │ ...
│ ├── rpcs/
│ │ ├── JAX_004/
│ │ │ ├── JAX_004_006_RGB.json
│ │ │ ├── JAX_004_007_RGB.json
│ │ │ ...
│ │ │ ├── test.txt
│ │ │ └── train.txt
| │ ├── JAX_068/
| │ ...
│ ├── truth/
│ │ ├── JAX_004/
│ │ │ ├── JAX_004_CLS.tif
│ │ │ ├── JAX_004_DSM.txt (optional)
│ │ │ └── JAX_004_DSM.tif
| │ ├── JAX_068/
| │ ...
│ ├── README.md/
Copy the dataset DFC2019 and root_dir in a datasets folder. Then run the following commands to create the affine approximations of the camera models:
python scripts/dataset_creation/to_affine.py --scene_name JAX_004
python scripts/dataset_creation/to_affine.py --scene_name JAX_068
python scripts/dataset_creation/to_affine.py --scene_name JAX_214
python scripts/dataset_creation/to_affine.py --scene_name JAX_260
python scripts/dataset_creation/to_affine.py --scene_name IARPA_001
python scripts/dataset_creation/to_affine.py --scene_name IARPA_002
python scripts/dataset_creation/to_affine.py --scene_name IARPA_003Run the following command to reproduce the results of Table 1 in the paper (be aware that different initial random seeds in src/gaussiansplatting/utils/general_utils.py/safe_state will lead to potentially different results):
bash train.sh reproduceMainTip
if No module named 'torch' when install: submodules/diff-gaussian-rasterization, pip install --upgrade setuptools wheel packaging
Tip
if KeyError: 'centerofscene_ECEF while running the code: regenerate the camera models (see dataset creation)
Tip
When using uv: if No module named 'torch' when install: submodules/diff-gaussian-rasterization, --no-build-isolation (recommended by the latest uv version)