Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(preprocess): add tiling CLI support #207

Merged
merged 29 commits into from
Jan 24, 2025

Conversation

hollandjg
Copy link
Collaborator

@hollandjg hollandjg commented Dec 19, 2024

  • Add new preprocessing function which uses the tiling option
  • Add "LopezTiling" as a PREPROCESSING option in the workflow.

@hollandjg hollandjg marked this pull request as ready for review December 19, 2024 20:11
Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! A few things to consider:

  • Add support for tiling by tile size
  • Extend user-facing documentation about the tiling workflow (histogram equalization, binarization, ice-labeling)
  • Move tiling workflow parameters to a configuration file
  • Use - as separator for cli long options

IFTPipeline.jl/src/cli.jl Outdated Show resolved Hide resolved
IFTPipeline.jl/src/cli.jl Outdated Show resolved Hide resolved
IFTPipeline.jl/src/cli.jl Outdated Show resolved Hide resolved
IFTPipeline.jl/src/preprocess.jl Outdated Show resolved Hide resolved
IFTPipeline.jl/src/preprocess.jl Show resolved Hide resolved
@info "Set structuring elements"
# This isn't tunable in the underlying code right now,
# so just use the defaults
structuring_elements = IceFloeTracker.structuring_elements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this would need to be flexible as well. @danielmwatkins, what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we know that the size and characteristics of the segmentation results are going to be affected by the shapes and sizes of the structuring elements. What might be necessary eventually, since there are so many options, is for my initial work on the calibration to identify the parameters that the results are really sensitive to so that those are the ones accessible from the command line.

IFTPipeline.jl/src/preprocess.jl Outdated Show resolved Hide resolved
IFTPipeline.jl/src/preprocess.jl Outdated Show resolved Hide resolved
workflow/rose-suite.conf Show resolved Hide resolved
@@ -493,6 +680,10 @@ function main()
help = "Preprocess truecolor/falsecolor images"
action = :command

"preprocess_tiling_single"
help = "Preprocess truecolor/falsecolor images with tile-based histogram equalization"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tiling workflow does more than histogram equalization. It also does binarization and ice-water discrimination (ice labeling).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's implied by the "preprocess". I think that the difference between the tiling and the non-tiling preprocessing is the tiling alone. Is that correct? If so, it makes sense that that's all that's included in the string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tiling is indeed a significant aspect of the workflow, but there are other important operations beyond histogram equalization within the tiled workflows. To better reflect the full scope of the processing, it would be clearer to either mention these additional operations or reword the line to exclude 'histogram equalization'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this cover it?

"preprocess_single"  
help = "Label ice in a single set of truecolor & falsecolor images"  
...
"preprocess_tiling_single"  
help = "Label ice in a single set of truecolor & falsecolor images, using histogram equalization"  

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking something more like "Label ice in a single set of truecolor & falsecolor images using tiled-based processing".

Copy link
Collaborator Author

@hollandjg hollandjg Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks. Updated. What do you think?

@hollandjg hollandjg requested a review from cpaniaguam January 13, 2025 20:05
Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Reacting so it doesn't show as awaiting review from me]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpaniaguam I think you're looking at an earlier commit. Here's the current one.

@hollandjg hollandjg requested a review from cpaniaguam January 17, 2025 20:57
cpaniaguam
cpaniaguam previously approved these changes Jan 17, 2025
Copy link
Member

@cpaniaguam cpaniaguam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm [with comments]

required = false


# Gamma parameters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Gamma parameters
# Gamma adjusting parameters

IFTPipeline.jl/src/preprocess.jl Show resolved Hide resolved
IFTPipeline.jl/src/preprocess.jl Show resolved Hide resolved
Base automatically changed from add-long-tracker-support to main January 24, 2025 18:07
@hollandjg hollandjg dismissed cpaniaguam’s stale review January 24, 2025 18:07

The base branch was changed.

@hollandjg hollandjg merged commit ac928cd into main Jan 24, 2025
9 checks passed
@hollandjg hollandjg deleted the add-tiling-preprocessing-support branch January 24, 2025 19:22
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.

3 participants