facebookresearch / facebookresearch/segment-anything
pic should be Tensor or ndarray. Got <class 'numpy.ndarray'>
- Dominant language
- Jupyter Notebook
- Stars
- 54.9k
- Forks
- 6.4k
- PR merge metrics
- No merged PRs in 30d
Description
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 `, why `` is not `ndarray`?????

Contributor guide
Research direction
Reproduce the README.md workflow using cv2.imread and mask_generator.generate, then inspect the image type at the handoff where the TypeError occurs. Compare the reported type with the type accepted by generate; done means the cause is documented and the README workflow either succeeds or clearly states the required compatibility conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, opencv, python
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100