data_preparation.md
February 3, 2026 · View on GitHub
Download COLMAP Results
For COLMAP, we recommend to directly use our generated results:
- Google Drive: https://drive.google.com/file/d/1Uz1pSTIpkagTml2jzkkzJ_rglS_z34p7/view?usp=sharing
- Baidu Netdisk: https://pan.baidu.com/s/1zX34zftxj07dCM1x5bzmbA?pwd=1t6r
Suppose that you have downloaded and unzip the COLMAP results to ./data folder like
├── data
│ ├── colmap_results
│ │ ├── matrix_city_aerial
│ │ │ ├── train
│ │ │ │ ├── sparse
│ │ │ │ │ ├── 0
│ │ │ │ │ │ ├── cameras.bin
│ │ │ │ │ │ ├── points3D.bin
│ │ │ │ │ │ ├── images.bin
│ │ │ ├── test
│ │ │ │ ├── sparse
│ │ │ │ │ ├── 0
│ │ │ │ │ │ ├── cameras.bin
│ │ │ │ │ │ ├── images.bin
│ │ │ │ │ │ ├── points3D.bin
│ │ ├── matrix_city_street
│ │ │ ├── train
│ │ │ ├── val
│ │ ├── building
│ │ │ ├── train
│ │ │ ├── val
│ │ ├── residence
│ │ │ ├── train
│ │ │ ├── val
│ │ ├── rubble
│ │ │ ├── train
│ │ │ ├── val
│ │ ├── sciart
│ │ │ ├── train
│ │ │ ├── val
Prepare for Tanks and Temple style geometry evaluation
To evaluate surface reconstruction accuracy, please first down load the ground truth point cloud (.ply) and crop volume file (.json) to the ./data. The transform.txt is used to coarsely align target points to gt points. The links are:
- Google Drive: https://drive.google.com/file/d/18L9AEJS2SNva7JgL2-DmqhoNtfDPSSY5/view?usp=sharing
- Baidu Netdisk: https://pan.baidu.com/s/1WBJkj42AOsgrNb7YBmcbGg?pwd=in4i
Note that Mill19 and UrbanScene3D doesn't provide ground-truth point cloud, thus they are not included. In ./scripts/gt_generate.sh, we provide the script about how we downsample the ground truth point cloud and generate the crop volume. If you need to process the custom dataset, please refer to the script.
Prepare GauU-Scene dataset
For GauU-Scene dataset, please follow instruction here to download. The data includes RGB images and COLMAP results.
Prepare MatrixCity dataset
-
Download small_city version of aerial data of MatricCity and save to
data/matrix_city/aerial. -
Unzip the data to
inputfolder for each block in train and test set. You can takescripts/untar_matrixcity_train.shandscripts/untar_matrixcity_test.shas reference. -
Run following command to prepare data with generated COLMAP results.
bash scripts/data_proc_mc.sh -
[Optional] Run following command to prepare data from scratch (The COLMAP step make take a long time for over 5000 images ).
bash scripts/data_proc_mc_scratch.sh -
The process above also applies to the street view of MatrixCity's small_city version. The mentioned scripts also contains the required steps for street view data preparation.
Prepare Mill19 & UrbanScene3D datasets
-
Download data of Mill19 and UrbanScene3D according to instruction from MegaNeRF. Save the data to
data/mill19anddata/urban_scene_3drespectively. It is worth noticing that the used UrbanScene3D-V1 should be downloaded from here. -
Run following command to prepare data of Mill19 with generated COLMAP results.
bash scripts/data_proc_mill19.sh -
[Optional] Run following command to prepare data of Mill19 from scratch (The COLMAP step make take a long time for large amount of images ).
bash scripts/data_proc_mill19_scratch.sh -
Run following command to prepare data of UrbanScene3D with generated COLMAP results.
bash scripts/data_proc_us3d.sh -
[Optional] Run following command to prepare data of UrbanScene3D from scratch (The COLMAP step make take a long time for large amount of images ).
bash scripts/data_proc_us3d_scratch.sh
Data Preprocessing
The desried dataset folder structure is:
├── data
│ ├── your_scene
│ │ ├── images
│ │ ├── sparse
│ │ │ ├── 0
│ │ │ │ ├── cameras.bin
│ │ │ │ ├── points3D.bin
│ │ │ │ ├── images.bin
│ ├── geometry_gt
│ │ ├── your_scene
│ │ │ ├── your_gt_pcd.ply
│ │ │ ├── your_gt_pcd.json
│ │ │ ├── transform.txt [optional]
Firstly, downsample the images to desired size:
python utils/image_downsample.py data/your_scene/images --factor $DOWNSAMPLE_RATIO
The $DOWNSAMPLE_RATIO is 3.4175 for GauU-Scene, 1.2 for aerial view of MatrixCity, 1.0 for street view of MatrixCity (no downsample), and 4.0 for Mill19 and UrbanScene3D.
Secondly, prepare MoGe-2 for depth regularization:
The depth and mask can be generated with:
python utils/estimate_mask_dataset_depths.py data/your_scene -d $DOWNSAMPLE_RATIO
And generate multi-view information:
python utils/multi_view_filter.py data/your_scene --split_mode {expirement(default) | reconstruction}
Thirdly, prepare pointmap ply file.
# 1. Segment all images into K clusters
# --split_mode:
# expirement (default) → split a ratio of images as validation set
# reconstruction → use all images for reconstruction
# -k: number of segments (clusters)
# -r: validation split ratio (default: 0.1)
#
python pointmap/scene_images_segment.py data/your_scene_path \
--split_mode {expirement(default) | reconstruction} \
-k 4 -r 0.1 \
# 2. Generate PointMap in parallel (multi-GPU)
# -g: GPU IDs (space-separated, quoted)
# -k: number of segments (must match Step 1)
# -b: base directory of the scene data
# -c: configuration file (choose one preset):
# gauuscene / matrixcity / mill19
#
bash pointmap/run_para.sh \
-g "0 1 2 3" -k 4 \
-b data/your_scene_path \
-c ./configs/{gauuscene|matrixcity|mill19}.yaml
# 3. Merge all outputs into a single PLY file
mkdir add_ply
python pointmap/merge_all.py \
--base_dir data/your_scene_path \
--output add_ply/your_add_name.ply