Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [run-all-tool-tests-command]
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_25.1
GALAXY_BRANCH: release_26.0
MAX_CHUNKS: 40
jobs:
setup:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
repository-list: ${{ needs.setup.outputs.repository-list }}
tool-list: ${{ needs.setup.outputs.tool-list }}
additional-planemo-options: --biocontainers --skip version_bumped
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: 'Tool linting output'
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
uses: SimenB/github-actions-cpu-cores@v3
id: cpu-cores
- name: Clean dotnet folder for space
run: rm -Rf /usr/share/dotnet
Expand All @@ -162,7 +162,7 @@ jobs:
galaxy-slots: ${{ steps.cpu-cores.outputs.count }}
# Limit each test to 15 minutes
test_timeout: 900
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
with:
name: 'Tool test output ${{ matrix.chunk }}'
path: upload
Expand All @@ -181,7 +181,7 @@ jobs:
# This job runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v7
- uses: actions/download-artifact@v8
with:
path: artifacts
- uses: actions/setup-python@v6
Expand All @@ -200,7 +200,7 @@ jobs:
mode: combine
html-report: true
markdown-report: true
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
with:
name: 'All tool test results'
path: upload
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- '*'
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_25.1
GALAXY_BRANCH: release_26.0
MAX_CHUNKS: 4
MAX_FILE_SIZE: 1M
concurrency:
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
repository-list: ${{ needs.setup.outputs.repository-list }}
tool-list: ${{ needs.setup.outputs.tool-list }}
additional-planemo-options: ${{ env.EXTRA_SKIP }}
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: 'Tool linting output'
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
run: pip install flake8 flake8-import-order
- name: Flake8
run: echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' flake8 --output-file pylint_report.txt --tee
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: 'Python linting output'
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' -n 1 ./.github/styler.R --dry off
git status
git diff --exit-code | tee rlint_report.txt
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: 'R linting output'
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
cat file_size_report.txt
exit 1
fi
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: 'File size report'
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
path: ~/.planemo
key: planemo_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
uses: SimenB/github-actions-cpu-cores@v3
id: cpu-cores
- name: Clean dotnet folder for space
run: rm -Rf /usr/share/dotnet
Expand All @@ -330,8 +330,8 @@ jobs:
chunk-count: ${{ needs.setup.outputs.chunk-count }}
galaxy-slots: ${{ steps.cpu-cores.outputs.count }}
# Limit each test to 15 minutes
test_timeout: 1800
- uses: actions/upload-artifact@v6
test_timeout: 900
- uses: actions/upload-artifact@v7
with:
name: 'Tool test output ${{ matrix.chunk }}'
path: upload
Expand All @@ -350,7 +350,7 @@ jobs:
matrix:
python-version: ['3.11']
steps:
- uses: actions/download-artifact@v7
- uses: actions/download-artifact@v8
with:
path: artifacts
- uses: actions/setup-python@v6
Expand All @@ -369,7 +369,7 @@ jobs:
mode: combine
html-report: true
markdown-report: true
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
with:
name: 'All tool test results'
path: upload
Expand All @@ -393,7 +393,6 @@ jobs:
needs: [setup, lint, combine_outputs]
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'bgruening' }}
runs-on: ubuntu-latest
environment: toolshed-deployment
strategy:
matrix:
python-version: ['3.11']
Expand Down Expand Up @@ -429,9 +428,8 @@ jobs:
deploy-report:
name: Report deploy status
needs: [deploy]
if: ${{ always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) }}
if: ${{ always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'bgruening' }}
runs-on: ubuntu-latest
environment: toolshed-deployment
steps:
# report to the PR if deployment failed
- name: Get PR object
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pr_without_tool_change.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ name: Fallback
# see https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
on:
pull_request:
paths:
- 'deprecated/**'
- 'docs/**'
- '.github/**'
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
determine-success:
name: Check workflow success
Expand Down
11 changes: 11 additions & 0 deletions tools/3dtrees_forestmamba/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 3dtrees_forestmamba
owner: bgruening
description: Forest instance segmentation with ForestMamba.
homepage_url: https://github.com/3dTrees-earth/3Dtrees_ForestMamba
long_description: |
Performs forest instance and semantic segmentation on LAZ/LAS point clouds using the
ForestMamba model.
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools/3dtrees_forestmamba
type: unrestricted
categories:
- "Geo Science"
101 changes: 101 additions & 0 deletions tools/3dtrees_forestmamba/forestmamba.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<tool id="3dtrees_forestmamba" name="3Dtrees: ForestMamba" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2">
<description>
Forest instance and semantic segmentation of point clouds using the ForestMamba model.
</description>
<macros>
<token name="@TOOL_VERSION@">1.0.0</token>
<token name="@VERSION_SUFFIX@">0</token>
</macros>
<requirements>
<container type="docker">ghcr.io/3dtrees-earth/3dtrees_forestmamba:@TOOL_VERSION@</container>
</requirements>
<command detect_errors="exit_code"><![CDATA[
mkdir -p output_dir work_dir &&
ln -s '$input' 'input.${input.ext}' &&
python -u /workspace/src/run.py
--dataset-path 'input.${input.ext}'
--output-dir output_dir
--work-dir work_dir
--repo-dir /workspace
--checkpoint /workspace/work_dirs/forestmamba_chm_radius16_qp300_2many_v6/v6_epoch_1500_fix.pth
--config-base /workspace/configs/ForAINetv2/forestmamba_chm_radius16_qp300_2many_v6.py
--preprocess-workers \${GALAXY_SLOTS:-1}
--chunk-size '$chunk_size'
--semantic-dim '$semantic_dim'
--instance-dim '$instance_dim'
--score-dim '$score_dim'
--bluepoint-iterations '$bluepoint_iterations'
#if $bluepoint_score_threshold:
--bluepoint-score-threshold '$bluepoint_score_threshold'
#end if
--bluepoint-second-pass-threshold '$bluepoint_second_pass_threshold'
--spatial-match-tolerance '$spatial_match_tolerance'
]]></command>
<environment_variables>
<environment_variable name="NUMBA_CACHE_DIR">\$_GALAXY_JOB_TMP_DIR</environment_variable>
<environment_variable name="WANDB_MODE">disabled</environment_variable>
</environment_variables>
<inputs>
<param name="input" type="data" format="laz,las" label="Input LAZ/LAS point cloud" help="Point cloud to segment with ForestMamba."/>
<param argument="--bluepoint-iterations" type="integer" min="0" max="5" value="0" label="Bluepoint iterations" help="0 keeps standard one-pass inference. 2 enables the dense-forest first/second bluepoint pass."/>
<param argument="--bluepoint-score-threshold" type="float" min="0" max="1" value="" optional="true" label="Bluepoint score threshold" help="Optional model score_th override for bluepoint rounds."/>
<param argument="--bluepoint-second-pass-threshold" type="float" min="0" max="1" value="0.01" label="Second pass threshold" help="Run the second bluepoint pass only when more than this fraction of first-pass points are non-ground with raw instance_pred == -1. Default 0.01 = 1%."/>
<param argument="--spatial-match-tolerance" type="float" min="0" value="0.01" label="Spatial match tolerance" help="Maximum coordinate distance used when matching bluepoint predictions back to the input points."/>
<param argument="--chunk-size" type="integer" min="1" value="1000000" label="LAZ write chunk size" help="Number of points processed per streamed LAZ read/write chunk."/>
<param argument="--semantic-dim" type="text" value="PredSemantic_FM" label="Semantic prediction dimension" help="Output extra dimension name for ForestMamba semantic predictions.">
<validator type="regex" message="Only letters, numbers, and underscores are allowed">^[A-Za-z0-9_]+$</validator>
</param>
<param argument="--instance-dim" type="text" value="PredInstance_FM" label="Instance prediction dimension" help="Output extra dimension name for ForestMamba instance predictions.">
<validator type="regex" message="Only letters, numbers, and underscores are allowed">^[A-Za-z0-9_]+$</validator>
</param>
<param argument="--score-dim" type="text" value="PredScore_FM" label="Score prediction dimension" help="Output extra dimension name for ForestMamba confidence scores.">
<validator type="regex" message="Only letters, numbers, and underscores are allowed">^[A-Za-z0-9_]+$</validator>
</param>
</inputs>
<outputs>
<data name="output" format="laz" from_work_dir="output_dir/input_forestmamba.laz" label="${tool.name} on ${on_string}: Segmented point cloud"/>
<data name="summary" format="json" from_work_dir="output_dir/summary.json" label="${tool.name}: summary"/>
</outputs>
<tests>
<!-- GitHub CI has no GPU, so this test is expected to fail there. -->
<test expect_failure="true">
<param name="input" value="mikro" ftype="laz"/>
<assert_stderr>
<has_text text="RuntimeError: No CUDA GPUs are available"/>
</assert_stderr>
</test>
</tests>
<help format="markdown">
## What it does

This tool runs ForestMamba on one LAS/LAZ point cloud and writes a segmented
LAZ output with ForestMamba prediction dimensions.

## Parameters

- **Input LAZ/LAS point cloud**: the point cloud to segment.
- **Bluepoint iterations**: `0` runs the normal one-pass prediction. `2` enables
the dense-forest bluepoint flow: first pass, then an optional second pass on
points that remained unassigned.
- **Bluepoint score threshold**: optional model confidence threshold override
for bluepoint runs. Leave empty to use the model/config default.
- **Second pass threshold**: fraction of first-pass non-ground points with raw
`instance_pred == -1` required before the second bluepoint pass runs. The
default `0.01` means more than 1%.

## Outputs

- Segmented LAZ with `PredSemantic_FM`, `PredInstance_FM`, and `PredScore_FM`
by default.
- JSON summary of the wrapper run.

Valid ForestMamba instance IDs are preserved. Raw negative instance IDs are
written as `0` in the final LAZ.
</help>
<creator>
<organization name="3Dtrees-Team, University of Freiburg" url="https://github.com/3dTrees-earth"/>
</creator>
<citations>
<citation type="doi">10.48550/arXiv.2606.01549</citation>
</citations>
</tool>
Binary file added tools/3dtrees_forestmamba/test-data/mikro
Binary file not shown.
Loading
Loading