aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.36k stars 643 forks source link

video output problem #297

Open White-Sun opened 3 years ago

White-Sun commented 3 years ago

i want to get a segmentation video by blendmask,work but it do not write video

q@shy-imrs: ~/AdelaiDet$ python3 demo/demo.py --config-file configs/BlendMask/R_101_dcni3_5x.yaml --video-input rgb_fr_desk.mp4 --output results/ --confidence-threshold 0.35 --opts MODEL.WEIGHTS blendmask_r101_dcni3_5x.pth [01/22 14:24:34 detectron2]: Arguments: Namespace(confidence_threshold=0.35, config_file='configs/BlendMask/R_101_dcni3_5x.yaml', input=None, opts=['MODEL.WEIGHTS', 'blendmask_r101_dcni3_5x.pth'], output='results/', video_input='rgbd_fr_desk.mp4', webcam=False) WARNING [01/22 14:24:34 d2.config.compat]: Config 'configs/BlendMask/R_101_dcni3_5x.yaml' has no VERSION. Assuming it to be compatible with latest v2. Could not find encoder for codec id 27: Encoder not found [ERROR:0] global /tmp/pip-req-build-qacpj5ci/opencv/modules/videoio/src/cap.cpp (561) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.4.0) /tmp/pip-req-build-qacpj5ci/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): results/rgbd_fr_desk.mkv in function 'icvExtractPattern'

0%| | 0/613 [00:00<?, ?it/s]/home/q/AdelaiDet/adet/modeling/fcos/fcos_outputs.py:460: UserWarning: This overload of nonzero is deprecated: nonzero() Consider using one of the following signatures instead: nonzero(*, bool as_tuple) (Triggered internally at /pytorch/torch/csrc/utils/python_arg_parser.cpp:882.) per_candidate_nonzeros = per_candidate_inds.nonzero() /home/q/.local/lib/python3.6/site-packages/torch/nn/functional.py:3063: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode)) 100%|█████████████████████████████████████████| 613/613 [01:29<00:00, 6.84it/s]

lijain commented 3 years ago

you change fourcc=cv2.VideoWriter_fourcc("x264") to fourcc=cv2.VideoWriter_fourcc('XVID'),the problem solved

paperpp commented 2 years ago

@White-Sun have you solved this problem?

paperpp commented 2 years ago

@lijain but it does not work