Text prompts - segment-geospatial #195
-
Dear sir, #-------------------------------------------------------------------------------------- KeyError: ((1, 1, 3), '<f4') The above exception was the direct cause of the following exception: TypeError Traceback (most recent call last) File ~\anaconda3\envs\gdal_env\lib\site-packages\samgeo\text_sam.py:273, in LangSAM.predict(self, image, text_prompt, box_threshold, text_threshold, output, mask_multiplier, dtype, save_args, return_results, return_coords, **kwargs) File ~\anaconda3\envs\gdal_env\lib\site-packages\PIL\Image.py:2955, in fromarray(obj, mode) TypeError: Cannot handle this data type: (1, 1, 3), <f4 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
For now, samgeo only support images with RGB and 8-bit integer type. |
Beta Was this translation helpful? Give feedback.
-
Thank you, sir, for your assistance. So if I converted 32 bits RGB band of Sentinel-2 data to 8 bit then it will work? |
Beta Was this translation helpful? Give feedback.
For now, samgeo only support images with RGB and 8-bit integer type.