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

In 331_fine_tune_SAM_mito.ipynb, the class SAMDataset(Dataset) needs to be adjusted to have 3 bands to go into the processor #81

Open
throughthetrees opened this issue Mar 5, 2024 · 5 comments

Comments

@throughthetrees
Copy link

The demo no longer works.

Change this line in the class SAMDataset(Dataset)

# prepare image and prompt for the model inputs = self.processor(image, input_boxes=[[prompt]], return_tensors="pt")

to

# prepare image and prompt for the model inputs = self.processor(np.stack((image,)*3, axis=-1), input_boxes=[[prompt]], return_tensors="pt")

@ZoreAnuj
Copy link

Thanks man!

@VaishnaviMudaliar
Copy link

I spent a week trying to figure this out. Thanks for the solution!

@RoyAn2386
Copy link

Thanks man~~

@ajaidevanath
Copy link

Still having issues

@ajaidevanath
Copy link

ERROR:"setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part"

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

5 participants