# RockMapper
# 🚧**UNDER CONSTRUCTION**🚧
[)](https://pypi.org/project/rockmapper/)
[](https://github.com/PINGEcosystem/GhostVision/commits)
[](https://github.com/PINGEcosystem/GhostVision/commits)
[](https://github.com/PINGEcosystem/GhostVision/blob/main/LICENSE)
Interface for predicting and mapping benthic habitat (substrates) from any side-scan sonar mosaic.
## Overview
`RockMapper` is an open-source Python interface for automatically predicting and mapping substrate types from and side-scan sonar mosaic(s). `RockMapper` leverages SegFormer pre-trained models fine-tuned with [Segmentation Gym](https://github.com/Doodleverse/segmentation_gym) to automatically predict Paddlefish spawning habitat (manuscript forthcoming).
## Published Documentation
### Journal Article
Wolfenkoehler, Bodine, Long (*forthcoming...*)
## Installation
1. Install [`Miniforge`](https://conda-forge.org/download/).
2. Open the [`Miniforge`](https://conda-forge.org/download/) prompt.
3. Install `PINGInstaller`:
```
pip install --force-reinstall pinginstaller
```
4. Install `RockMapper`.
```
python -m pinginstaller rockmapper
```
## Usage
1. Copy the following script to some location on your computer:
```python
'''
Copyright (c) 2025 Cameron S. Bodine
'''
#########
# Imports
import os, sys
import time, datetime
start_time = time.time()
# Set ROCKMAPPER utils dir
USER_DIR = os.path.expanduser('~')
GV_UTILS_DIR = os.path.join(USER_DIR, '.rockmapper')
if not os.path.exists(GV_UTILS_DIR):
os.makedirs(GV_UTILS_DIR)
def gui():
'''
'''
#################
# NEED TO ADD GUI
# FOR DEVELOPMENT
#############################
# Update Parameters
seg_model = 'RockMapper_20250628_v1' # Don't update
inDir = r'Z:\scratch\202506_BrushyDeepKiamichi_Substrate\mosaics'
mosaicFileType = '.tif'
outDirTop = r'Z:\scratch'
projName = 'RockMapperTest'
mapRast = False
mapShp = True
epsg = 32615
windowSize_m = (18, 18)
window_stride = 9
minArea_percent = 0.75
threadCnt = 0.25
predBatchSize = 30
deleteIntData = True
################
# Run HabiMapper
modelDir = os.path.join(GV_UTILS_DIR, 'models')
# RockMapper
if seg_model == 'RockMapper_20250628_v1':
from rockmapper.rock_mapper import do_work
modelDir = os.path.join(modelDir, seg_model)
print('\n\nMapping habitat with ROCKMAPPER model...\n\n')
do_work(
inDir = inDir,
outDirTop = outDirTop,
projName = projName,
mapRast = mapRast,
mapShp = mapShp,
epsg = epsg,
windowSize_m = windowSize_m,
window_stride = window_stride,
minArea_percent = minArea_percent,
threadCnt = threadCnt,
mosaicFileType=mosaicFileType,
modelDir=modelDir,
predBatchSize=predBatchSize,
deleteIntData=deleteIntData
)
print("\n\nGrand Total Processing Time: ", datetime.timedelta(seconds = round(time.time() - start_time, ndigits=0)))
return
```
2. Open the file with [Visual Studio Code](https://code.visualstudio.com/).
3. Update the Parameters as necessary:
```python
# Update Parameters
seg_model = 'RockMapper_20250628_v1' # Don't update
inDir = r'Z:\scratch\202506_BrushyDeepKiamichi_Substrate\mosaics'
mosaicFileType = '.tif'
outDirTop = r'Z:\scratch'
projName = 'RockMapperTest'
mapRast = False
mapShp = True
epsg = 32616
windowSize_m = (18, 18)
window_stride = 9
minArea_percent = 0.75
threadCnt = 0.25
predBatchSize = 30
deleteIntData = True
```
4. Ensure the `rockmapper` environment is selected as the Interpreter [see this](https://stackoverflow.com/a/76289404).
5. Run the script in debug mode by pressing `F5`.
Raw data
{
"_id": null,
"home_page": null,
"name": "rockmapper",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13",
"maintainer_email": null,
"keywords": "pingmapper, sonar, ecology, remotesensing, sidescan, sidescan-sonar, aquatic, humminbird, lowrance, gis, oceanography, limnology",
"author": "Cameron Bodine, Wyatt Wolfenkoehler",
"author_email": "bodine.cs@gmail.email",
"download_url": "https://files.pythonhosted.org/packages/86/a7/d9c5e86ea7a286e4cfd2379c7081a83dade29874ed6bf2eb3b89af419fb1/rockmapper-1.0.0a2.tar.gz",
"platform": null,
"description": "# RockMapper\r\n\r\n# \u00f0\u0178\u0161\u00a7**UNDER CONSTRUCTION**\u00f0\u0178\u0161\u00a7\r\n\r\n[)](https://pypi.org/project/rockmapper/)\r\n[](https://github.com/PINGEcosystem/GhostVision/commits)\r\n[](https://github.com/PINGEcosystem/GhostVision/commits)\r\n[](https://github.com/PINGEcosystem/GhostVision/blob/main/LICENSE)\r\n\r\n\r\nInterface for predicting and mapping benthic habitat (substrates) from any side-scan sonar mosaic. \r\n\r\n## Overview\r\n\r\n`RockMapper` is an open-source Python interface for automatically predicting and mapping substrate types from and side-scan sonar mosaic(s). `RockMapper` leverages SegFormer pre-trained models fine-tuned with [Segmentation Gym](https://github.com/Doodleverse/segmentation_gym) to automatically predict Paddlefish spawning habitat (manuscript forthcoming).\r\n\r\n## Published Documentation\r\n\r\n### Journal Article\r\n\r\nWolfenkoehler, Bodine, Long (*forthcoming...*)\r\n\r\n## Installation\r\n\r\n1. Install [`Miniforge`](https://conda-forge.org/download/).\r\n2. Open the [`Miniforge`](https://conda-forge.org/download/) prompt.\r\n3. Install `PINGInstaller`:\r\n ```\r\n pip install --force-reinstall pinginstaller\r\n ```\r\n4. Install `RockMapper`.\r\n ```\r\n python -m pinginstaller rockmapper\r\n ```\r\n\r\n## Usage\r\n\r\n1. Copy the following script to some location on your computer:\r\n\r\n```python\r\n\r\n\r\n'''\r\nCopyright (c) 2025 Cameron S. Bodine\r\n'''\r\n\r\n#########\r\n# Imports\r\nimport os, sys\r\nimport time, datetime\r\n\r\nstart_time = time.time()\r\n\r\n# Set ROCKMAPPER utils dir\r\nUSER_DIR = os.path.expanduser('~')\r\nGV_UTILS_DIR = os.path.join(USER_DIR, '.rockmapper')\r\nif not os.path.exists(GV_UTILS_DIR):\r\n os.makedirs(GV_UTILS_DIR)\r\n\r\ndef gui():\r\n '''\r\n '''\r\n\r\n #################\r\n # NEED TO ADD GUI\r\n\r\n\r\n # FOR DEVELOPMENT\r\n #############################\r\n # Update Parameters\r\n seg_model = 'RockMapper_20250628_v1' # Don't update\r\n inDir = r'Z:\\scratch\\202506_BrushyDeepKiamichi_Substrate\\mosaics'\r\n mosaicFileType = '.tif'\r\n outDirTop = r'Z:\\scratch'\r\n projName = 'RockMapperTest'\r\n mapRast = False\r\n mapShp = True\r\n\r\n epsg = 32615\r\n\r\n windowSize_m = (18, 18)\r\n window_stride = 9\r\n minArea_percent = 0.75\r\n threadCnt = 0.25\r\n\r\n predBatchSize = 30\r\n\r\n deleteIntData = True\r\n\r\n\r\n ################\r\n # Run HabiMapper\r\n\r\n modelDir = os.path.join(GV_UTILS_DIR, 'models')\r\n\r\n # RockMapper\r\n if seg_model == 'RockMapper_20250628_v1':\r\n from rockmapper.rock_mapper import do_work\r\n\r\n modelDir = os.path.join(modelDir, seg_model)\r\n\r\n\r\n print('\\n\\nMapping habitat with ROCKMAPPER model...\\n\\n')\r\n do_work(\r\n inDir = inDir,\r\n outDirTop = outDirTop,\r\n projName = projName,\r\n mapRast = mapRast,\r\n mapShp = mapShp,\r\n epsg = epsg,\r\n windowSize_m = windowSize_m,\r\n window_stride = window_stride,\r\n minArea_percent = minArea_percent,\r\n threadCnt = threadCnt,\r\n mosaicFileType=mosaicFileType, \r\n modelDir=modelDir,\r\n predBatchSize=predBatchSize,\r\n deleteIntData=deleteIntData\r\n )\r\n\r\n\r\n\r\n\r\n\r\n print(\"\\n\\nGrand Total Processing Time: \", datetime.timedelta(seconds = round(time.time() - start_time, ndigits=0)))\r\n return\r\n```\r\n\r\n2. Open the file with [Visual Studio Code](https://code.visualstudio.com/).\r\n3. Update the Parameters as necessary:\r\n\r\n```python\r\n# Update Parameters\r\nseg_model = 'RockMapper_20250628_v1' # Don't update\r\ninDir = r'Z:\\scratch\\202506_BrushyDeepKiamichi_Substrate\\mosaics'\r\nmosaicFileType = '.tif'\r\noutDirTop = r'Z:\\scratch'\r\nprojName = 'RockMapperTest'\r\nmapRast = False\r\nmapShp = True\r\n\r\nepsg = 32616\r\n\r\nwindowSize_m = (18, 18)\r\nwindow_stride = 9\r\nminArea_percent = 0.75\r\nthreadCnt = 0.25\r\n\r\npredBatchSize = 30\r\n\r\ndeleteIntData = True\r\n```\r\n\r\n4. Ensure the `rockmapper` environment is selected as the Interpreter [see this](https://stackoverflow.com/a/76289404).\r\n5. Run the script in debug mode by pressing `F5`.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Interface for predicting and mapping benthic habitat (substrates) from any side-scan sonar mosaic.",
"version": "1.0.0a2",
"project_urls": {
"GitHub": "https://github.com/PINGEcosystem/RockMapper",
"Issues": "https://github.com/PINGEcosystem/RockMapper/issues"
},
"split_keywords": [
"pingmapper",
" sonar",
" ecology",
" remotesensing",
" sidescan",
" sidescan-sonar",
" aquatic",
" humminbird",
" lowrance",
" gis",
" oceanography",
" limnology"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0f6df5df6bb2339a92acd7d46cdc4c092db2b03e3a1066ecb8c32bee907494c5",
"md5": "77a44031050b7756a22d4e92c791e4d6",
"sha256": "e1239d5440b9dc5804bec3765adcd84050eb4abec9decf0aa2b5e0c5453793c6"
},
"downloads": -1,
"filename": "rockmapper-1.0.0a2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "77a44031050b7756a22d4e92c791e4d6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13",
"size": 12064,
"upload_time": "2025-10-24T11:28:57",
"upload_time_iso_8601": "2025-10-24T11:28:57.653892Z",
"url": "https://files.pythonhosted.org/packages/0f/6d/f5df6bb2339a92acd7d46cdc4c092db2b03e3a1066ecb8c32bee907494c5/rockmapper-1.0.0a2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "86a7d9c5e86ea7a286e4cfd2379c7081a83dade29874ed6bf2eb3b89af419fb1",
"md5": "955c472b38d4933f515d4afc7748589c",
"sha256": "c4109db4c0bb98b2e35e079dccfea5d3cfcf06fa0fc81974b78747ca4641b8f8"
},
"downloads": -1,
"filename": "rockmapper-1.0.0a2.tar.gz",
"has_sig": false,
"md5_digest": "955c472b38d4933f515d4afc7748589c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13",
"size": 11933,
"upload_time": "2025-10-24T11:28:58",
"upload_time_iso_8601": "2025-10-24T11:28:58.701273Z",
"url": "https://files.pythonhosted.org/packages/86/a7/d9c5e86ea7a286e4cfd2379c7081a83dade29874ed6bf2eb3b89af419fb1/rockmapper-1.0.0a2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-24 11:28:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PINGEcosystem",
"github_project": "RockMapper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "rockmapper"
}