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

ImagePayload.cache should support more generic data type #868

Open
hepengfe opened this issue Jul 8, 2022 · 3 comments
Open

ImagePayload.cache should support more generic data type #868

hepengfe opened this issue Jul 8, 2022 · 3 comments
Labels
topic:cv topic: data Issue about data loader modules and data processing related topic: ontology All issues related to ontologies in core, top and base_ontology

Comments

@hepengfe
Copy link
Collaborator

hepengfe commented Jul 8, 2022

Is your feature request related to a problem? Please describe.
Currently ImagePayload.cache is expected to be numpy.Ndarray but sometimes we read image into a library-specific objects that can be handy for the library-specific post-processing.

Describe the solution you'd like
We should support more generic data types rather than numpy array only.

For example, some image data objects from PIL library.

Also, note that this library supports lazy loading internally while initializing an image object by PIL.Image.open(image_path)

Describe alternatives you've considered
No.

Additional context
No.

@hepengfe hepengfe added topic: data Issue about data loader modules and data processing related topic: ontology All issues related to ontologies in core, top and base_ontology topic:cv labels Jul 8, 2022
@hunterhector
Copy link
Member

Instead of supporting data types one by one, we should probably allow arbitrary "cache" objects, as long as we have the correct methods associated with it. Basically, that means it should support the operations of ImageAnnotation.

Btw, what do you mean by PIL, is PIR?

@hepengfe
Copy link
Collaborator Author

hepengfe commented Jul 8, 2022

PIL is a third-party python image library.

@hepengfe hepengfe changed the title ImagePayload.cache should support more data type Payload.cache should support more generic data type Jul 8, 2022
@hepengfe hepengfe changed the title Payload.cache should support more generic data type ImagePayload.cache should support more generic data type Jul 8, 2022
@hunterhector
Copy link
Member

PIL is a third-party python image library.

I see, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:cv topic: data Issue about data loader modules and data processing related topic: ontology All issues related to ontologies in core, top and base_ontology
Projects
None yet
Development

No branches or pull requests

3 participants