centreborelli / satnerf

Satellite Neural Radiance Fields
https://centreborelli.github.io/satnerf/
BSD 3-Clause "New" or "Revised" License
122 stars 23 forks source link

Evaluation results empty #6

Closed wagnva closed 2 years ago

wagnva commented 2 years ago

Hello,

I have trained a model using the sat-nerf model, with the provided dataset files for the location JAX_004. Unfortunately most of the files generated in the logs/val/ directory appear to be completely empty (except the dsm directory)

opts.json 
{
  "root_dir": "/mnt/Data-500GB-2/NeRF/dataset/root_dir/crops_rpcs_ba_v2/JAX_004",
  "img_dir": "/mnt/Data-500GB-2/NeRF/dataset/DFC2019/Track3-RGB-crops/JAX_004",
  "ckpts_dir": "/mnt/Data-500GB-2/NeRF/satnerf_output/ckpts",
  "logs_dir": "/mnt/Data-500GB-2/NeRF/satnerf_output/logs",
  "gt_dir": "/mnt/Data-500GB-2/NeRF/dataset/DFC2019/Track3-Truth",
  "cache_dir": "/mnt/Data-500GB-2/NeRF/dataset/cache_dir/crops_rpcs_ba_v2/JAX_004_ds1",
  "ckpt_path": null,
  "exp_name": "2022-08-18_16-58-55_JAX_004_ds1_sat_nerf",
  "data": "sat",
  "model": "sat-nerf",
  "gpu_id": 0,
  "lr": 0.0005,
  "batch_size": 1024,
  "img_downscale": 1.0,
  "max_train_steps": 300000,
  "save_every_n_epochs": 4,
  "fc_units": 512,
  "fc_layers": 8,
  "n_samples": 64,
  "n_importance": 0,
  "noise_std": 0.0,
  "chunk": 5120,
  "sc_lambda": 0.0,
  "ds_lambda": 0.0,
  "ds_drop": 0.25,
  "ds_noweights": false,
  "first_beta_epoch": 2,
  "t_embbeding_tau": 4,
  "t_embbeding_vocab": 30
 }

I afterwards ran the eval_satnerf.py script. But here again, most of the files are empty. The only files not empty are in the dsm, rdsm, and rdsm_diff folders. But if I understand it correctly, these are generated based on the data from the dfc2019 truth. I opened every other .tif in QGIS and every single one of them has an empty histogram, so it's seems to me they are just totally empty.

I again ran the eval_satnerf.py script, but this time for the pretrained model Jax_004/Sat-NeRF+DS+SC. This has resulted in the same empty files as with my own trained model.

How did you open the .tif files and asses them? Or are you aware of any errors that could occur when writing the files?

rogermm14 commented 2 years ago

Hello,

We use rasterio to open and write .tif files within python. I personally use the vpv viewer to visualize them in a comfortable way.

My first intuition is, maybe, it's a metadata issue. The dsm, rdsm and rdsm_diff files that you see as not empty are georeferenced using the DFC2019 GT data (you can check that with gdalinfo <filename.tif>), while the rest of tif are not georeferenced. I would suggest that you try opening them with rasterio in python and see if you run into any problems.

Just to make sure: what is the size of the tif files that you see as empty ?