biigle / magic-sam

:m: BIIGLE module for the Magic SAM image annotation instrument
GNU General Public License v3.0
0 stars 0 forks source link

Support grayscale images #13

Closed mzur closed 11 months ago

mzur commented 11 months ago

This error occurred:

Error while executing python command '/var/www/vendor/biigle/magic-sam/src/config/../resources/scripts/compute_embedding.py '/var/www/storage/magic_sam/sam_checkpoint.pth' 'vit_h' 'cuda' '/var/www/storage/framework/cache/files/de2b2953070979f88babb2fbc5af588987eb72180a6f319f1b4334c19787b3bd' '/tmp/3763840.npy'': ◀
    Traceback (most recent call last):
      File "/var/www/vendor/biigle/magic-sam/src/config/../resources/scripts/compute_embedding.py", line 28, in <module>
        raise ValueError(f'Only RGB images supported, was {image.mode}')
    ValueError: Only RGB images supported, was I

Convert grayscale images to RGB so they can be processed, too.