{"id":13737816,"url":"https://github.com/prs-eth/bayes-forest-structure","last_synced_at":"2025-04-10T07:32:11.661Z","repository":{"id":118084151,"uuid":"431914219","full_name":"prs-eth/bayes-forest-structure","owner":"prs-eth","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-28T08:37:15.000Z","size":200,"stargazers_count":18,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-04T03:11:12.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prs-eth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-11-25T16:41:45.000Z","updated_at":"2024-02-01T23:10:12.000Z","dependencies_parsed_at":"2024-04-16T22:03:13.610Z","dependency_job_id":null,"html_url":"https://github.com/prs-eth/bayes-forest-structure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prs-eth%2Fbayes-forest-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prs-eth%2Fbayes-forest-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prs-eth%2Fbayes-forest-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prs-eth%2Fbayes-forest-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prs-eth","download_url":"https://codeload.github.com/prs-eth/bayes-forest-structure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223430255,"owners_count":17143625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:02:02.016Z","updated_at":"2024-11-06T23:10:45.945Z","avatar_url":"https://github.com/prs-eth.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# bayes-forest-structure\n\nCode accompanying our paper \"Country-wide Retrieval of Forest Structure From Optical and SAR Satellite Imagery With Bayesian Deep Learning\" [[link to paper]](https://www.sciencedirect.com/science/article/pii/S0924271622003045)\n\n![](highlevel.png)\n\n## Code organization\n* `./config` configuration files for data preprocessing, training and testing\n* `./src` main project code\n    * `./src/scripts` helper scripts for preprocessing, evaluation etc.\n\n## Getting started\n### Prerequisites\n* `python \u003e= 3.8`\n* `numpy \u003e= 1.19`\n* `pytorch \u003e= 1.9`\n* `scikit-image \u003e= 0.18`\n* `rasterio \u003e= 1.1.5`\n* `gdal \u003e= 3.0`\n* `fiona \u003e= 1.8.13`\n* `latextable`\n\n### Inference\nTo apply our model to your data, preprocess the SAR data using the `/src/scripts/preprocess_s1.py` script and then reproject it to the Sentinel-2 tile. Then use `/src/scripts/predict_tile.py` to process the tile, passing the locations to the optical and SAR files as arguments. Make sure to also pass the paths of the `config.yaml` file (containing network configurations and statistics for data normalization) and of all five network checkpoints via the respective command line args. The files can be downloaded from [here](https://drive.google.com/drive/folders/1yUQOjBcbplg6I_9HmFp1vW8pdf4vOzxJ?usp=sharing). The output tiles will be written to the location passed as `--out_dir`.\n\n### Training\nFor improved efficiency during training, the preprocessed and reprojected Sentinel images as well as the ground truth should be pickled first using the `/src/scripts/prepare_dataset.py` script. For training the `/src/train.py` script (along with the `/config/resnext.yaml` config file) is used.\n\n## Citation\n```\n@article{becker2023country,\n  title={Country-wide retrieval of forest structure from optical and SAR satellite imagery with deep ensembles},\n  author={Becker, Alexander and Russo, Stefania and Puliti, Stefano and Lang, Nico and Schindler, Konrad and Wegner, Jan Dirk},\n  journal={ISPRS Journal of Photogrammetry and Remote Sensing},\n  volume={195},\n  pages={269--286},\n  year={2023},\n  publisher={Elsevier}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprs-eth%2Fbayes-forest-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprs-eth%2Fbayes-forest-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprs-eth%2Fbayes-forest-structure/lists"}