{"id":47705413,"url":"https://github.com/cuicaihao/split_raster","last_synced_at":"2026-04-02T17:55:01.249Z","repository":{"id":57470178,"uuid":"385531467","full_name":"cuicaihao/split_raster","owner":"cuicaihao","description":"Split Raster is an open-source and highly versatile Python package designed to easily break down large images into smaller, more manageable tiles. While the package is particularly useful for deep learning and computer vision tasks, it can be applied to a wide range of applications.","archived":false,"fork":false,"pushed_at":"2026-03-29T09:00:32.000Z","size":72776,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T10:59:03.849Z","etag":null,"topics":["computer-vision","deep-learning","image-recognition","image-segmentation","image-splitting","remote-sensing"],"latest_commit_sha":null,"homepage":"https://cuicaihao.github.io/split_raster/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuicaihao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-07-13T08:24:56.000Z","updated_at":"2026-03-29T08:57:20.000Z","dependencies_parsed_at":"2025-03-23T10:34:55.088Z","dependency_job_id":null,"html_url":"https://github.com/cuicaihao/split_raster","commit_stats":{"total_commits":52,"total_committers":3,"mean_commits":"17.333333333333332","dds":"0.46153846153846156","last_synced_commit":"cada6b34ededa4742d81b443eb0c5ba35dd3bc2f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/cuicaihao/split_raster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuicaihao%2Fsplit_raster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuicaihao%2Fsplit_raster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuicaihao%2Fsplit_raster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuicaihao%2Fsplit_raster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuicaihao","download_url":"https://codeload.github.com/cuicaihao/split_raster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuicaihao%2Fsplit_raster/sbom","scorecard":{"id":312427,"data":{"date":"2025-08-11","repo":{"name":"github.com/cuicaihao/split_raster","commit":"d6eea3504e83523bc9f269c01203ecf076e482af"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-CD.yml:1","Warn: no topLevel permission defined: .github/workflows/python-CI.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: branch 'master' does not require approvers","Warn: codeowners review is not required on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Warn: PRs are not required to make changes on branch 'master'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:134: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:136: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CD.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CD.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CI.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CI.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CI.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-CI.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/cuicaihao/split_raster/python-CI.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:47","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:48","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:52","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:75","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:76","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:77","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:80","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:89","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:90","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:141","Warn: pipCommand not pinned by hash: .github/workflows/python-CD.yml:142","Warn: pipCommand not pinned by hash: .github/workflows/python-CI.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/python-CI.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/python-CI.yml:45","Warn: pipCommand not pinned by hash: .github/workflows/python-CI.yml:46","Warn: pipCommand not pinned by hash: .github/workflows/python-CI.yml:47","Warn: pipCommand not pinned by hash: .github/workflows/python-CI.yml:50","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   3 out of  23 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":8,"reason":"SAST tool is not run on all commits -- score normalized to 8","details":["Warn: 11 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-33p9-3p43-82vq","Warn: Project is vulnerable to: GHSA-7cx3-6m66-7c5m","Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2017-74"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T23:25:02.109Z","repository_id":57470178,"created_at":"2025-08-17T23:25:02.109Z","updated_at":"2025-08-17T23:25:02.109Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["computer-vision","deep-learning","image-recognition","image-segmentation","image-splitting","remote-sensing"],"created_at":"2026-04-02T17:54:57.540Z","updated_at":"2026-04-02T17:55:01.236Z","avatar_url":"https://github.com/cuicaihao.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Split Raster\n\n[![image](https://img.shields.io/pypi/pyversions/splitraster)](https://python.org/pypi/splitraster)\n[![image](https://img.shields.io/pypi/v/splitraster?color=g)](https://python.org/pypi/splitraster)\n[![SplitRaster Developmnet Build Install and Test](https://github.com/cuicaihao/split_raster/actions/workflows/python-CI.yml/badge.svg?branch=develop)](https://github.com/cuicaihao/split_raster/actions/workflows/python-CI.yml)\n[![SplitRaster Package Release and Publish](https://github.com/cuicaihao/split_raster/actions/workflows/python-CD.yml/badge.svg)](https://github.com/cuicaihao/split_raster/actions/workflows/python-CD.yml)\n[![DMonth](https://pepy.tech/badge/splitraster/month)](https://pepy.tech/project/splitraster)\n[![DTotal](https://pepy.tech/badge/splitraster?)](https://pepy.tech/project/splitraster)\n[![image](https://img.shields.io/github/license/cuicaihao/split_raster?color=blue)](https://python.org/pypi/splitraster)\n\n- Document: [splitraster](https://cuicaihao.github.io/split_raster/)\n- Pypi: [splitraster](https://pypi.org/project/splitraster/)\n\n## Introduction\n\nSplit Raster is an open-source and highly versatile Python package designed to easily break down large images into smaller, more manageable tiles. While the package is particularly useful for deep learning and computer vision tasks, it can be applied to a wide range of applications.\n\nInitially developed by the author to provide optimal support for deep learning and computer vision tasks, Split Raster was specifically designed for image segmentation tasks on satellite images as well as remote sensing methods. By generating tiled output image samples from an input raster dataset, Split Raster enables more efficient and effective analysis of large images. The package also includes a random sampling function that generates a fixed number of tiles for early experimentation.\n\nFor example, let's say you have a set of RGB and GT images, each with dimensions of 1000-by-1000 pixels. Utilizing Split Raster, you can easily generate 16 tiles, each with dimensions of 256x256 pixels and automatic padding on the edges. The package also allows for customization of tile size and overlap to better suit individual project needs. Furthermore, Split Raster handles the padding and naming of output images automatically, saving time and effort (e.g., 0001.png, 0002.png, ..., 9999.png).\n\n![Sample Image](docs/img/split_raster_sample.png)\n\n## Tutorial to generate the above sample image\n\nOpen the notebook [Standard Image Tiling](notebooks/01_Standard_Image_Tiling.ipynb).\n\nThis tutorial will show you how to use the package to split a large image into small tiles. So you can use the small tiles for your deep learning and computer vision tasks.\n\n[`pytorch`](https://pytorch.org/) is used in this tutorial. You can also use `tensorflow` or other deep learning frameworks.\n\n## Install the packages\n\n### Requirements\n\n- **Python \u003e= 3.10**\n- **Core Dependencies:**\n  - `numpy \u003e= 1.25.0`\n  - `tqdm \u003e= 4.64.0`\n  - `scikit-image \u003e= 0.21.0`\n\n### Installation\n\n```bash\nuv pip install splitraster\n```\n\nor via pip:\n\n```bash\npip install splitraster\n```\n\nFor GIS and GeoTIFF support (requires GDAL):\n\n```bash\nuv pip install \"splitraster[geo]\"\n```\n\nor via pip:\n\n```bash\npip install \"splitraster[geo]\"\n```\n\n## Try Sample code\n\nThe sample image can be found in the `tests/data` directory of the GitHub repo.\n\n```python\nfrom splitraster import io\n\ninput_image_path = \"./tests/data/raw/RGB.png\"\ngt_image_path = \"./tests/data/raw/GT.png\"\n\nsave_path = \"./tests/data/processed/RGB\"\nsave_path_gt = \"./tests/data/processed/GT\"\n\ncrop_size = 256\nrepetition_rate = 0.5\noverwrite = False\n\nn = io.split_image(input_image_path, save_path, crop_size,\n                   repetition_rate=repetition_rate, overwrite=overwrite)\nprint(f\"{n} tiles sample of {input_image_path} are added at {save_path}\")\n\n\nn = io.split_image(gt_image_path, save_path_gt, crop_size,\n                   repetition_rate=repetition_rate, overwrite=overwrite)\nprint(f\"{n} tiles sample of {gt_image_path} are added at {save_path_gt}\")\n```\n\nPossible results:\n\n```bash\nSuccessfully installed splitraster-0.*.*\n❯ pytest tests/ -v\nInput Image File Shape (H, W, D):(1000, 1000, 3)\ncrop_size=256, stride=128\nPadding Image File Shape (H, W, D):(1024, 1024, 3)\nThere are 49 files in the ./tests/data/processed/RGB\nNew image name will start with 50\nGenerating: 100%|█████████████████████████████████████████████████████████████| 49/49 [00:00\u003c00:00, 50.65img/s]\n49 tiles sample of ./tests/data/raw/RGB.png are added at ./tests/data/processed/RGB\nInput Image File Shape (H, W, D):(1000, 1000)\ncrop_size=256, stride=128\nPadding Image File Shape (H, W, D):(1024, 1024)\nThere are 49 files in the ./tests/data/processed/GT\nNew image name will start with 50\nGenerating: 100%|████████████████████████████████████████████████████████████| 49/49 [00:00\u003c00:00, 139.72img/s]\n49 tiles sample of ./tests/data/raw/GT.png are added at ./tests/data/processed/GT\n```\n\nCheck Notebook for Details: [Standard Image Tiling](notebooks/01_Standard_Image_Tiling.ipynb)\n\n## GIS TIFF Image\n\nYou can also work with Remote Sensing (GeoTIFF) Satellite images such as Multispectral Images which have more bands or channels. All the codes will be the same, but with a small difference. Replace the `io` with the `geo` module.\n\nThis feature also needs you to install the `gdal` package with the following command in your python environment.\n\nThis package is not in the required packages due to many users may not use this function.\n\nHowever, if you do, please consider create the conda environment as follows for your application.\n\n```bash\nconda create -n split_raster_py310 python=3.10 -y\nconda activate split_raster_py310\nconda install gdal -y\nconda install ipykernel -y\npip install --upgrade pip\npip install splitraster\n```\n\nOn a Mac, you can install these using Homebrew:\n\n```bash\nbrew install gdal\n```\n\nthen, you can install the Python GDAL package:\n\n```bash\npip install GDAL\n```\n\nPlease note that installing GDAL can be complex due to its system dependencies. If you encounter issues, you may need to consult the GDAL documentation or seek help from the community.\n\nSample Code:\n\n```Python\nfrom splitraster import geo\ninput_image_path = \"./tests/data/raw/Input.tif\"\ngt_image_path = \"./tests/data/raw/GT.tif\"\n\nsave_path = \"./tests/data/processed/Input\"\ncrop_size = 256\nrepetition_rate = 0.5\noverwrite = False\n\nn = geo.split_image(input_image_path, save_path, crop_size,\n                   repetition_rate=repetition_rate, overwrite=overwrite)\nprint(f\"{n} tiles sample of {input_image_path} are added at {save_path}\")\n```\n\nCheck Notebook for Details: [Tutorial_II](notebooks/Tutorial_II.ipynb)\n\n## Random Sampling Code\n\nThe basic implementation is still the same as the above. Just replace the 'split_image' method to 'rand_crop_image'.\n\n```python\nfrom splitraster import io\ninput_image_path = \"./tests/data/raw/RGB.png\"\ngt_image_path = \"./tests/data/raw/GT.png\"\n\ninput_save_path = \"./tests/data/processed/Rand/RGB\"\ngt_save_path = \"./tests/data/processed/Rand/GT\"\n\nn = io.random_crop_image(input_image_path, input_save_path,  gt_image_path, gt_save_path, crop_size=256, crop_number=20, img_ext='.png', label_ext='.png', overwrite=True)\n\nprint(f\"{n} sample paris of {input_image_path, gt_image_path} are added at {input_save_path, gt_save_path}.\")\n```\n\n```python\nfrom splitraster import geo\ninput_tif_image_path = \"./tests/data/raw/TIF/RGB5k.tif\"\ngt_tif_image_path = \"./tests/data/raw/TIF/GT5k.tif\"\n\ninput_save_image_path = \"./tests/data/processed/Rand/RGB_TIF\"\ngt_save_image_path = \"./tests/data/processed/Rand/GT_TIF\"\n\nn = geo.random_crop_image(input_tif_image_path, input_save_image_path,  gt_tif_image_path, gt_save_image_path, crop_size=500, crop_number=20, overwrite=True)\n\nprint(f\"{n} sample paris of {input_tif_image_path, gt_tif_image_path} are added at {input_save_image_path, gt_save_image_path}.\")\n```\n\n## Contribution Guidelines\n\nIf you run into issues or have questions, please [open an issue](https://github.com/cuicaihao/split_raster/issues) or [submit a pull request](https://github.com/cuicaihao/split_raster/pulls).\n\nIf you are interested in contributing to `splitraster`, please see our [contributing guidelines](docs/CONTRIBUTING.md).IBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuicaihao%2Fsplit_raster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuicaihao%2Fsplit_raster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuicaihao%2Fsplit_raster/lists"}