Skip to content
New issue

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

Numpy version issue #25

Open
samholtzen opened this issue Sep 25, 2024 · 0 comments
Open

Numpy version issue #25

samholtzen opened this issue Sep 25, 2024 · 0 comments

Comments

@samholtzen
Copy link

Tried using cellSAM by running the following:

from cellSAM import segment_cellular_image, get_model
import numpy as np
import torch
from scipy.ndimage import binary_dilation
import matplotlib.pyplot as plt
import matplotlib.patches as patches
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

img = image[0,...,2]
print(img.dtype)
mask, embedding, bounding_boxes = segment_cellular_image(np.array(img), device=str(device))

plt.imshow(mask)

with the most recent version of Numpy and it gave me the error:

TypeError: expected np.ndarray (got numpy.ndarray)

When I rolled back the version to numpy==1.23.5, I was able to run the code block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant