`ImagePayload.cache` should support more generic data type
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.
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?
PIL is a third-party python image library.
PILis a third-party python image library.
I see, thanks