Could you please work on something for us..
@YiwenShaoStephen realized that there is a big opportunity for improvement in the image_with_mask format, in terms of the size on disk.
Can you please define (in data_types.py, with a validation function) a format 'compressed_image_with_mask' which will use uint8 (from 0 to 255) for the image; and for the mask, will use uint8 if the largest object-id in the image is less than 256, and otherwise uint16?
We'll need functions to convert from image_with_mask to compressed_image_with_mask and vice versa (don't do it in-place; make the function have a return value; you can put these in data_manipulation.py).
The reason we're doing it as a separate compressed format and not a modification of the image_with_mask format is because we want to handle images with >256 objects efficiently, which means having variable types in the mask array, and we don't want the rest of the code to have to deal with different cases.
@desh2608
Could you please work on something for us.. @YiwenShaoStephen realized that there is a big opportunity for improvement in the image_with_mask format, in terms of the size on disk.
Can you please define (in data_types.py, with a validation function) a format 'compressed_image_with_mask' which will use uint8 (from 0 to 255) for the image; and for the mask, will use uint8 if the largest object-id in the image is less than 256, and otherwise uint16?
We'll need functions to convert from image_with_mask to compressed_image_with_mask and vice versa (don't do it in-place; make the function have a return value; you can put these in data_manipulation.py).
The reason we're doing it as a separate compressed format and not a modification of the image_with_mask format is because we want to handle images with >256 objects efficiently, which means having variable types in the mask array, and we don't want the rest of the code to have to deal with different cases.