Skip to content

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

Description

@throughthetrees

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")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions