giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
845 stars 173 forks source link

Extend Padder and Inverter to greyscale images #489

Closed gtauzin closed 4 years ago

gtauzin commented 4 years ago

Types of changes

Description Extends images.Padder and images.Inverter to greyscale images.

Screenshots (if appropriate)

Any other comments?

Checklist

ulupo commented 4 years ago

Might be worth rebasing or pulling from upstream master to get the latest changes involving the use of check_collection here.

ulupo commented 4 years ago

@gtauzin accidentally "approved" this PR, I meant to just comment/request changes.

gtauzin commented 4 years ago

@gtauzin accidentally "approved" this PR, I meant to just comment/request changes.

Too late xD

gtauzin commented 4 years ago

@ulupo I see no check_collection being used in the images submodule so far. Do you want me to enable it?

ulupo commented 4 years ago

@gtauzin you're right: check_collection is not really used and it might take some work to use it throughout images, with the exception perhaps of ImageToPointCloud. What do you think?

gtauzin commented 4 years ago

@gtauzin you're right: check_collection is not really used and it might take some work to use it throughout images, with the exception perhaps of ImageToPointCloud. What do you think?

I would argue that if images are passed as lists, we need to make sure that they have the same number of dimensions and possibly the same number of pixels per dimensiosn for most of the transformers. Here I guess it's better no to allow check_collection (at least for now).

gtauzin commented 4 years ago

I have one thing to add after Umberto's comments: a test case with floats would be useful, so that we're sure it works :)

@wreise That's very true. Would you mind helping me with it?

wreise commented 4 years ago

@wreise That's very true. Would you mind helping me with it?

Done. Please let me know if that doesn't look good

gtauzin commented 4 years ago

@wreise LGTM, thanks :)

gtauzin commented 4 years ago

@ulupo Ready to be merged :)