Closed mihirkalakamb029 closed 4 months ago
Link to the video_demo.py: https://github.com/open-mmlab/mmdetection/blob/v2.28.0/demo/video_demo.py
Thank you.
Add the following lines at the beginning of video_demo.py
:
from libs.api.inference import inference_one_image
from libs.utils.visualizer import visualize_lanes
Change the following lines: https://github.com/open-mmlab/mmdetection/blob/v2.28.0/demo/video_demo.py#L47-L48 to
frame, preds = inference_one_image(model, frame)
frame = visualize_lanes(frame, preds)
Hello, I'm new to
mmdet
and I was trying to test the results giving video input, but I encountered a TypeError as mentioned in the title. The command I used ispython demo/video_demo.py demo/demo.mp4 configs/clrernet/culane/clrernet_culane_dla34_ema.py clrernet_culane_dla34_ema.pth --out result.mp4
. It would be helpful if you could help me to debug this error.Note: I used the
video_demo.py
from the official mmdetection repo.Traceback (most recent call last): File "/home/sandlogic/anaconda3/envs/clrernet/lib/python3.8/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg return obj_cls(**args) TypeError: init() got an unexpected keyword argument 'pipelines'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "demo/video_demo.py", line 63, in
main()
File "demo/video_demo.py", line 49, in main
result = inference_detector(model, frame)
File "/home/sandlogic/anaconda3/envs/clrernet/lib/python3.8/site-packages/mmdet/apis/inference.py", line 127, in inference_detector
test_pipeline = Compose(cfg.data.test.pipeline)
File "/home/sandlogic/anaconda3/envs/clrernet/lib/python3.8/site-packages/mmdet/datasets/pipelines/compose.py", line 23, in init
transform = build_from_cfg(transform, PIPELINES)
File "/home/sandlogic/anaconda3/envs/clrernet/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
TypeError: LoadImageFromWebcam: init() got an unexpected keyword argument 'pipelines'