Skip to content

Add patch to allow using laura's unet - #1395

Merged
SylviaWhittle merged 1 commit into
mainfrom
SylviaWhittle/laura-unet-patch
Aug 18, 2026
Merged

Add patch to allow using laura's unet#1395
SylviaWhittle merged 1 commit into
mainfrom
SylviaWhittle/laura-unet-patch

Conversation

@SylviaWhittle

Copy link
Copy Markdown
Collaborator

Patch to allow an old unet model to run in our code.

TLDR:

  • The model was trained weird, and so expects (B, RGB(R), RGB(G), RGB(B), W, H) RGB data as opposed to what we are invariably working with (B, C(arbitrary channels, not RGB), W, H) since we work with height map data.

This simply tries running the model and if it crashes because of input shape mismatch it tries again after repeating the input data channel across the RGB channels.

It's a frantic patch just to get the model working on main for a paper.

Probably wants removing at some point in the future, it's messy.


Before submitting a Pull Request please check the following.

  • Existing tests pass.
  • Documentation has been updated and builds. Remember to update as required...
    • docs/usage/configuration.md
    • docs/usage/data_dictionary.md
    • docs/usage/advanced.md and new pages it should link to.
  • Pre-commit checks pass.
  • New functions/methods have typehints and docstrings.
  • New functions/methods have tests which check the intended behaviour is correct.

Optional

topostats/default_config.yaml

If adding options to topostats/default_config.yaml please ensure.

  • There is a comment adjacent to the option explaining what it is and the valid values.
  • A check is made in topostats/validation.py to ensure entries are valid.
  • Add the option to the relevant sub-parser in topostats/entry_point.py.

@SylviaWhittle

Copy link
Copy Markdown
Collaborator Author

Pushing this through given time pressure.

@SylviaWhittle
SylviaWhittle merged commit 41cfcc5 into main Aug 18, 2026
7 checks passed
@SylviaWhittle
SylviaWhittle deleted the SylviaWhittle/laura-unet-patch branch August 18, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant