{"id":37320103,"url":"https://github.com/csiro/sandybeachmapping_dl","last_synced_at":"2026-01-16T03:17:07.333Z","repository":{"id":304621144,"uuid":"1015790316","full_name":"csiro/sandybeachmapping_dl","owner":"csiro","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-14T23:46:52.000Z","size":1571,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T10:32:04.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T03:40:40.000Z","updated_at":"2025-07-14T23:46:56.000Z","dependencies_parsed_at":"2025-07-14T10:07:10.269Z","dependency_job_id":"7e786ef0-7bda-4f04-9790-0868b56b8688","html_url":"https://github.com/csiro/sandybeachmapping_dl","commit_stats":null,"previous_names":["csiro/sandybeachmapping_dl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/csiro/sandybeachmapping_dl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fsandybeachmapping_dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fsandybeachmapping_dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fsandybeachmapping_dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fsandybeachmapping_dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csiro","download_url":"https://codeload.github.com/csiro/sandybeachmapping_dl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fsandybeachmapping_dl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-16T03:17:06.591Z","updated_at":"2026-01-16T03:17:07.316Z","avatar_url":"https://github.com/csiro.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mapping Sandy Beaches using Deep Learning\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/graphicalabs.jpg\" alt=\"Graphical Abstract\" width=\"800\"\u003e\n\u003c/p\u003e\n\nMapping Australian sandy beaches using image segmentation deep learning method based on U-Net architecture.\n\n## Installation\n```\ngit clone https://bitbucket.csiro.au/scm/~yon012/sandybeachmapping_dl.git\npip install -r requirements.txt\n```\n\n## Quick Start\n\nDownload data: See [Spatial processing and downloading of data](#spatial-processing-and-downloading-of-data)\n\nRun deep learning pipeline:\n\n0. Setup configs: `config/config.yaml`\n1. Run training: `$ python -m sandybeachmapping_dl.main`\n2. Run evaluation: `$ python -m sandybeachmapping_dl.main --config-name='config_eval.yaml'`\n\n\n## Usage\n\n### Data folder layout and filename convention\n- Folder: `\u003cdata_dir\u003e`\n- Filename convention: `\u003cIMAGE_SOURCE\u003e_\u003cAUS_STATE\u003e_\u003cIMAGE_TYPE\u003e_FID.tif`\n  - `\u003cIMAGE_SOURCE\u003e`: Image source, e.g., from Bing\n  - `\u003cAUS_STATE\u003e`: Australian state\n  - `\u003cIMAGE_TYPE\u003e`: Either `image`, `mask`, or `maskpred`\n\n### Spatial processing and downloading of data\n{R} scripts to tile and download images for input into {python} ML code, and then convert ML raster output to polygon vectors are found in the folder `coast_tiling_extraction`. The extraction scripts can be run for each Australian State (e.g. VIC).\n\n0. *Not used* `download_and_Tile_beach_images.R` tile the region of a OSM beach into n x m tiles covering the entire  OSM beach id polygon.\n1. `tile_beach_images.R` define 512 x 512 image tiles along the coastline of a Australian state (e.g. VIC). The tiles overlap, but tiles with more than 5 overlaps are removed (rs \u003e thr).\n2. `download_tile_images.R` download the aerial images for each 512 x 512 tile in previous step.\n3. `mask_tile_images.R` rasterise the binary \"mask\" of the OSM beach polygons for each image tile in the previous step.\n   - *Not used* `mask_tile_images_BeachCliffsSea.R` make a classified mask to include a cliff and beach mask.\n4. `polygonise_ml_output_maskpred.R` convert the ML output rasters to polygon vectors, to compare to OSM beaches.\n\n### Output files from main script\n- Select test set to evaluate in configs: `test_imageset`\n  - `mask`: Test images with masks\n  - `mask+nomask`: Test images with masks and images without masks\n  - `all`: All images, including from training, validation and testing. Outputs will be in `\u003cmaskpred_subdir\u003e_all`.\n- `\u003coutput_dir\u003e/\u003cmaskpred_subdir\u003e/`: GeoTiff of predicted masks\n- `\u003coutput_dir\u003e/\u003cmaskpred_subdir\u003e_polygons.shp.zip`: Shapefile of predicted masks\n- In `\u003cmodelout_dir\u003e/`:\n  - `model.pth`: Trained model\n  - `loss_metric.pkl`: Loss metrics\n\n\n## Authors\nSuk Yee Yong (sukyee.yong@csiro.au)  \nJulian O'Grady (julian.ogrady@csiro.au)\n\n## About\nThis project is being developed as part of Scientific Computing Collaboration Project 2024H1 for [ERRFP 1343: Machine Learning Methods to Identify Australian Beaches from a Citizen Science derived training data](https://confluence.csiro.au/display/SCinternal/ERRFP-1343).\n\n## Acknowledgements\nDataset of [OpenStreetMap](https://www.openstreetmap.org/) (OSM) beaches is created using overpass API.  \nOpen source packages used: [PyTorch](https://github.com/pytorch/pytorch), [SMP](https://github.com/qubvel/segmentation_models.pytorch), [terra](https://github.com/rspatial/terra)\n\n## Citation\nIf you find this repository useful, please cite the [paper](https://doi.org/10.3390/rs16183534):\n```bibtex\n@article{yong2024sandybeachmappingdl,\n  author = {Yong, Suk Yee and O'Grady, Julian and Gregory, Rebecca and Lynton, Dylan},\n  doi = {10.3390/rs16183534},\n  issn = {2072-4292},\n  journal = {Remote Sensing},\n  number = {18},\n  title = {Regional-Scale Image Segmentation of Sandy Beaches in Southeastern Australia},\n  url = {https://www.mdpi.com/2072-4292/16/18/3534},\n  volume = {16},\n  article-number = {3534},\n  year = {2024},\n}\n```\n\n## License\n[CSIRO Open Source Software Licence Agreement (variation of the BSD / MIT License)](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsiro%2Fsandybeachmapping_dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsiro%2Fsandybeachmapping_dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsiro%2Fsandybeachmapping_dl/lists"}