open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
28.52k stars 9.28k forks source link

video_gpu_accel_demo.py - TypeError: "tasks" must be a tuple object or a sequence object #11644

Open devwasabi opened 2 months ago

devwasabi commented 2 months ago

Bug Description When I try inferencing a video by running video_gpuaccel_demo.py, I am getting type errors. I wanted to see if the inference time for the video would improve

Reproduction

  1. What command or script did you run?
python demo/video_gpuaccel_demo.py demo/demo.mp4 configs/rtmdet/rtmdet_l_8xb32-300e_coco.py checkpoints/rtmdet_l_8xb32-300e_coco_20220719_112030-5a0be7c4.pth --nvdecode --out result.mp4
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
    I have not done any modifications to the video_gpu_accel_demo.py file
  2. What dataset did you use?
    I used the demo video within the demo folder

    Environment

    
    sys.platform: win32
    Python: 3.8.19 (default, Mar 20 2024, 19:55:45) [MSC v.1916 64 bit (AMD64)]
    CUDA available: True
    MUSA available: False
    numpy_random_seed: 2147483648
    GPU 0: NVIDIA RTX A500 Laptop GPU
    CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4
    NVCC: Cuda compilation tools, release 12.4, V12.4.99
    MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30154 for x64
    GCC: n/a
    PyTorch: 2.2.2
    PyTorch compiling details: PyTorch built with:
    - C++ Version: 201703
    - MSVC 192930151
    - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
    - Intel(R) MKL-DNN v3.3.2 (Git Hash 2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)
    - OpenMP 2019
    - LAPACK is enabled (usually provided by MKL)
    - CPU capability usage: AVX2
    - CUDA Runtime 12.1
    - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
    - CuDNN 8.8.1  (built against CUDA 12.0)
    - Magma 2.5.4
    - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.8.1, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /wd4624 /wd4068 /wd4067 /wd4267 /wd4661 /wd4717 /wd4244 /wd4804 /wd4273, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.2.2, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,

TorchVision: 0.17.2 OpenCV: 4.7.0 MMEngine: 0.10.3 MMDetection: 3.3.0+0dede7a


**Error traceback**

Traceback (most recent call last): File "demo/video_gpuaccel_demo.py", line 144, in main() File "demo/video_gpuaccel_demo.py", line 114, in main for i, (frame_resize, frame_origin) in enumerate( File "C:\Users\bbdnet2520.conda\envs\openmmlab\lib\site-packages\mmengine\utils\progressbar.py", line 240, in track_iter_progress raise TypeError( TypeError: "tasks" must be a tuple object or a sequence object, but got <class 'ffmpegcv.ffmpeg_reader.FFmpegReaderNV'>

harrymagic098 commented 6 days ago

I encountered the same problem as you