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

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

Open
goncinious opened this issue Feb 16, 2024 · 1 comment · May be fixed by #354
Open

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

goncinious opened this issue Feb 16, 2024 · 1 comment · May be fixed by #354

Comments

@goncinious
Copy link

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.

@goncinious goncinious linked a pull request Feb 16, 2024 that will close this issue
@Arkkienkeli
Copy link
Member

Arkkienkeli commented Feb 16, 2024

Hi @goncinious, thank you for the interest in our work and the PR!

The documentation part you mention:

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

Meant that you can process different images, but I agree, it does not mention that a single pipeline should have fixed image size. We indeed need to clarify that.

I will return to you regarding the PR and fix documentation.

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 a pull request may close this issue.

2 participants