← 输入框|github.com|刷新
Skip to content

filter.gauss implementation scales poorly with image size/dimensions #278

Open

Description

Activity

  1. hinerm commented on Oct 29, 2024

    @hinerm
    MemberAuthor

    Note that you can easily reproduce this in Fiji with a script like:

    #@ OpEnvironment ops
    #@ Img (label = "Input image:", autofill = false) img
    #@ Float (label="Sigma:", style="format:0.00", min=0.0, value=8.00) sigma
    #@output Img result
    
    # convert input ImgPlus to float32
    img = ops.op("convert.float32").input(img).apply()
    
    # apply gaussian blur
    img_g = ops.op("filter.gauss").input(img, sigma).apply()
    
    # subtract input ImgPlus from gaussian blurred image
    result  = ops.op("math.subtract").input(img, img_g).apply()

    and this sample data. It hits OOM if you run on the full image (352MB image, with 16GB of memory allocated in Fiji's memory and threads). If you split the channels first, it does not OOM.

  2. changed the title [-]filter.gauss implementation scales poorly[/-] [+]filter.gauss implementation scales poorly with image size/dimensions[/+] on Oct 29, 2024
  3. gselzer commented on Oct 30, 2024

    @gselzer
    Member

    I've yet to run this code, but I'd be interested to know where the OOM is happening - SciJava Ops more or less wraps gaussian convolutions from imglib2-algorithm, so this issue might best be moved upstream.

    Alternatively, maybe we should be wrapping different/better algorithms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions