Skip to content

Conversation

@lanxinger
Copy link
Contributor

Summary

  • Added max-resolution autodetect in the dataset loader that reads resolution from COLMAP camera metadata or Nerfstudio transforms*.json, with a fallback to reading the first image if needed
  • Wired detection into the UI so the "Max image resolution" slider dynamically adjusts its upper bound based on the dataset
  • --max-resolution CLI parser now accepts "max" to use the detected dataset resolution

Changes

  • New ProcessMessage::DetectedMaxImageResolution { max_resolution } message for loader → UI communication
  • Resolution detection in colmap.rs and nerfstudio.rs format parsers
  • Settings popup uses detected max to set slider bounds
  • Training startup resolves the "max" sentinel to detected value (falls back to 1920 with warning)

Test plan

  • Load a COLMAP dataset and verify slider max matches dataset resolution
  • Load a Nerfstudio dataset and verify slider max matches dataset resolution
  • Test --max-resolution max CLI flag
  • Verify fallback behavior when resolution can't be detected

lanxinger and others added 4 commits December 15, 2025 17:54
Added max-resolution autodetect in the dataset loader and wired it into the UI so the “Max image resolution” slider isn’t capped at 2048 anymore.

Loader now emits ProcessMessage::DetectedMaxImageResolution { max_resolution } (from COLMAP camera metadata / Nerfstudio transforms*.json, with a fallback to reading the first image if needed), and the settings popup uses that to set the slider’s upper bound.

--max-resolution parser now accepts "max" (stored as u32::MAX) in crates/brush-dataset/src/config.rs.

Training startup resolves that sentinel to the detected dataset max (or falls back to 1920 with a warning) in crates/brush-process/src/train_stream.rs.
@ArthurBrussee
Copy link
Owner

ArthurBrussee commented Dec 15, 2025

Thank you, I think I get the idea but sadly don't think this is quite how to do it haha. max_resolution should just be optional, rather than trying to figureo out what the max size is 😅

So:

  • max_resolution becomes a Option
  • The CLI and UI set it default to Some(1920) (for now anyway... Im just a bit scared of people plunking in 20MP DSLR photos and crashing)
  • You can use a clap value_parser to parse max as None.
  • In LoadImage accept max resolution as optional and only do the resizing if its set.

@lanxinger
Copy link
Contributor Author

Actually it’s not changing the defaults. All it is doing is detecting the max image resolution and adjusting the slider scale so the input image dimensions is the max value you can select vs the current limit and having to type in a number manually and slider maxing out 2K

For the CLI I agree that maybe just having a max setting is not the right approach. I guess it’s better to determine this via a simple python script and then just pass the parameter (which I am already doing in my case)

@ArthurBrussee
Copy link
Owner

Yeah I think for the UI if max_resolution is an Option, it could have a checkbox on top of it like other optional settings. The slider could be upped a bit from 2K, but, super high resolutions still don't work super well in Brush, which is why the limit is there.

@lanxinger lanxinger closed this by deleting the head repository Dec 16, 2025
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.

2 participants