Closed smigad closed 6 years ago
That's a good question. With this set of services I was mostly trying to get something workable. I'll update it when we come up with a common way to represent images (and/or 2d bounding boxes which will also be very common amoung computer vision services).
Images are "chunked" because grpc has a maximum message size. This message size is quite large, but I don't want to run into issues later. It also demonstrates to others how to send large binary data in parts using grpc.
I'm not sure if a canonical format is best. Different formats have different benefits that service authors may want to take advantage of. JPG has good compression but has artifacts (even if they are imperceptable to humans, they can impact some CV algorithms), PNG is lossless and can have transparency, EXR can have arbitary channels with 16/32 bit floats, etc.
I have also considered implementing a image conversion service, so that, so long as a a service defines what formats it understands, the network will be able to handle the conversion from others.
Looks like the ROS Image Message supports different encodings for laying out channels.
This could be worth exploring further when we have a type repository. So long as we provide utility functions to make it trivial to load and export common image formats to a canonical image encoding.
that's a much better idea! middle-agents should do that stuff. thanks!
I think I saw images are being chunked before being transmitted but since the files are being read in raw, they retain their default compression and the server is responsible for appropriately reading the image. Do you think it will be better if a certain compression type is agreed upon for universal image transfer on singnet (just like ros messages) and whatever type of image the client has, it will be sent to a server compressed to a common type.