We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tried to run automatic_mask_generator.ipynb with a tiny (123 224 3) GTiff image uploaded to colab. sam.generate produces an error.
image = '/content/mini.tif' sam.generate(image, output="masks.tif", foreground=True, unique=True) --------------------------------------------------------------------------- error Traceback (most recent call last) [<ipython-input-44-625ba53ba81a>](https://localhost:8080/#) in <cell line: 1>() ----> 1 sam.generate(image, output="masks.tif", foreground=True, unique=True) [/usr/local/lib/python3.10/dist-packages/samgeo/samgeo.py](https://localhost:8080/#) in generate(self, source, output, foreground, batch, erosion_kernel, mask_multiplier, unique, **kwargs) 197 198 image = cv2.imread(source) --> 199 image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) 200 elif isinstance(source, np.ndarray): 201 image = source error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
test image: https://www.dropbox.com/scl/fi/8f8c6j9b7h6vk0b62qmx1/mini.tif?rlkey=swfjtay3s5rzw2k0chizgdcm7&dl=0
The text was updated successfully, but these errors were encountered:
It only supports 8-bit integer type. Your image is floating type.
Sorry, something went wrong.
I confirm it works with the same image as INT1U. Thanks.
No branches or pull requests
Environment Information
Description
Tried to run automatic_mask_generator.ipynb with a tiny (123 224 3) GTiff image uploaded to colab.
sam.generate produces an error.
What I Did
test image: https://www.dropbox.com/scl/fi/8f8c6j9b7h6vk0b62qmx1/mini.tif?rlkey=swfjtay3s5rzw2k0chizgdcm7&dl=0
The text was updated successfully, but these errors were encountered: