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

TypeError: "img" must be a numpy array or a str or a pathlib.Path object #14

Open
Lixia1221 opened this issue Nov 20, 2020 · 0 comments

Comments

@Lixia1221
Copy link

(open-mmlab) fsr@serverA2:~/FoveaBox$ python demo/webcam_demo.py configs/foveabox/fovea_r50_fpn_4gpu_2x.py checkpoints/fovea_r50_fpn_4x4_2x_coco_20200203-2df792b1.pth
[ WARN:0] global /tmp/pip-req-build-cg56sov1/opencv/modules/videoio/src/cap_v4l.cpp (893) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
Press "Esc", "q" or "Q" to exit.
Traceback (most recent call last):
File "demo/webcam_demo.py", line 44, in
main()
File "demo/webcam_demo.py", line 33, in main
result = inference_detector(model, img)
File "/home/fsr/FoveaBox/mmdet/apis/inference.py", line 67, in inference_detector
return _inference_single(model, imgs, img_transform, device)
File "/home/fsr/FoveaBox/mmdet/apis/inference.py", line 91, in _inference_single
img = mmcv.imread(img)
File "/home/fsr/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/image/io.py", line 98, in imread
raise TypeError('"img" must be a numpy array or a str or '
TypeError: "img" must be a numpy array or a str or a pathlib.Path object

What should I do

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

1 participant