Open throughthetrees opened 4 months ago
Thanks man!
I spent a week trying to figure this out. Thanks for the solution!
Thanks man~~
Still having issues
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"
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")