facebookresearch / segment-anything

The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Apache License 2.0
47.87k stars 5.66k forks source link

pic should be Tensor or ndarray. Got <class 'numpy.ndarray'> #767

Open chouliuzuo opened 5 months ago

chouliuzuo commented 5 months ago

I followed the ReadMe.md step by step, but the image read by cv2.imread cannot work in mask_generator.generate It raised a TypeError: pic should be Tensor or ndarray. Got <class 'numpy.ndarray'>, why <class 'numpy.ndarray'> is not ndarray????? 1719379085725