coco-annotator icon indicating copy to clipboard operation
coco-annotator copied to clipboard

Trouble with 16 bit geryscale image

Open KP-Xie opened this issue 2 years ago • 1 comments

Hi. I cannot open 16 bit geryscale image. They are in .png format. Any suggestions?

KP-Xie avatar May 12 '23 14:05 KP-Xie

1 explication could be your greyscale images are not RGB (a classical situation with greyscale images). on Linux, check file format using "file image.png", it should return something like that "PNG image data, 800 x 600, 8-bit/color RGB, non-interlaced"

Maybe you could try to convert your images to RGB format. You can try converting a single image like this (on linux using ImageMagick) : convert image.png -define png:color-type=2 result.png or convert input.png -type TrueColor png24:output.png

To modify a complete directory (careful, it's an inplace operation, backup your grayscale images before) mogrify -define png:format=png24 -type TrueColor *.png

Note that if training a generic model, then you may have the same problem if you want to use grayscale images. You can annotate your images converted to RGB and train with greyscale also, but be sure your model can handle them.

SixK avatar May 16 '23 10:05 SixK