Skip to content

DeepProfiler produces incorrect crops if provided with images of different sizes #355

@goncinious

Description

@goncinious

In profiling mode, if provided with images of different sizes than the specified in the config (in config["dataset"]["images"][{"width", "height"}]), DP will silently generate incorrect crops.

I think the issue comes from get_cropping_regions(), where the config-specified image size is used to normalise the bounding indices. Note that there's no exception raised when the input image mismatches the specified shape.

I also think the docs are slightly confusing, as it's mentioned:

The size of images is, in principle, flexible and DeepProfiler can work with different resolutions and image dimensions.

Please correct me if I'm wrong, but I think this is the only reason making DeepProfiler incompatible with images of variable size (for profiling) and could easily be solved by reading the image dimensions dynamically. I opened a PR to implement just that - #354.

It'd be great if you could also update the docs to clarify how DeepProfiler handles images of variable size in training vs. profile mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions