FoveaBox icon indicating copy to clipboard operation
FoveaBox copied to clipboard

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

Open Lixia1221 opened this issue 3 years ago • 0 comments

(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

Lixia1221 avatar Nov 20 '20 08:11 Lixia1221