BabitMF / bmf

Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
https://babitmf.github.io/
Apache License 2.0
730 stars 60 forks source link

运行demo:detect_trt_sample 报错:node id:0 Could not allocate frame #112

Open QQiangren opened 2 months ago

QQiangren commented 2 months ago

如题:按照人脸识别的demo,用的官方模型和视频。在bmf_runtime:latest镜像内运行该demo。 报错:[error] node id:0 Could not allocate frame,未生成trt_out.mp4

taoboyang commented 2 months ago

您好,使用的是镜像里默认自带的 BMF 在运行的么?

QQiangren commented 2 months ago

我用pip安装的BMF , pip install BabitMF

taoboyang commented 2 months ago

需要 check 一下是否使用到了 GPU 版本的 BMF pip install BabitMF-GPU,另外镜像里自带的 BMF 是 CPU 版本的,如果需要编译 GPU 的,可以参考文档 https://babitmf.github.io/docs/bmf/getting_started_yourself/install/#docker

QQiangren commented 2 months ago

我启动容器和编译bmf的方式就是按照官方的。如下:

docker run --gpus all -e NVIDIA_DRIVER_CAPABILITIES=all -it babitmf/bmf_runtime:latest bash export CMAKE_ARGS="-DBMF_ENABLE_CUDA=ON" ./build.sh

此外我有用到GPU,也通过pip安装了BabitMF-GPU 我的pip list: absl-py 2.1.0 addict 2.4.0 BabitMF 0.0.9 BabitMF-GPU 0.0.9 basicsr 1.4.2 cachetools 5.3.3 certifi 2022.12.7 charset-normalizer 2.1.1 cmake 3.25.0 coloredlogs 15.0.1 contourpy 1.1.1 cuda-python 12.2.0 cycler 0.12.1 Cython 3.0.0 facexlib 0.3.0 filelock 3.9.0 filterpy 1.4.5 flatbuffers 23.5.26 fonttools 4.51.0 future 1.0.0 gfpgan 1.3.8 google-auth 2.29.0 google-auth-oauthlib 1.0.0 graphsurgeon 0.4.6 grpcio 1.62.2 humanfriendly 10.0 idna 3.4 imageio 2.34.1 importlib_metadata 7.1.0 importlib_resources 6.4.0 Jinja2 3.1.2 kiwisolver 1.4.5 lazy_loader 0.4 lit 15.0.7 llvmlite 0.41.1 lmdb 1.4.1 Markdown 3.6 MarkupSafe 2.1.2 matplotlib 3.7.5 mpmath 1.3.0 networkx 3.0 numba 0.58.1 numpy 1.24.4 nvcv-python 0.3.x-beta oauthlib 3.2.2 onnx 1.14.0 onnx-graphsurgeon 0.3.12 onnxruntime 1.17.3 onnxruntime-gpu 1.15.1 opencv-python 4.8.0.74 packaging 23.1 Pillow 9.3.0 pip 24.0 platformdirs 4.2.1 protobuf 4.23.4 pyasn1 0.6.0 pyasn1_modules 0.4.0 pyparsing 3.1.2 python-dateutil 2.9.0.post0 PyWavelets 1.4.1 PyYAML 6.0.1 realesrgan 0.3.0 requests 2.28.1 requests-oauthlib 2.0.0 rsa 4.9 scikit-image 0.21.0 scipy 1.10.1 setuptools 45.2.0 six 1.16.0 stepic 0.5.0 sympy 1.12 tb-nightly 2.14.0a20230808 tensorboard-data-server 0.7.2 tensorrt 8.6.1 tensorrt-dispatch 8.6.1 tensorrt-lean 8.6.1 tifffile 2023.7.10 timeout-decorator 0.5.0 tomli 2.0.1 torch 2.0.1+cu118 torchaudio 2.0.2+cu118 torchvision 0.15.2+cu118 tqdm 4.66.2 triton 2.0.0 typing_extensions 4.7.1 urllib3 1.26.13 Werkzeug 3.0.2 wheel 0.34.2 wurlitzer 3.0.3 yapf 0.40.2 zipp 3.18.1

taoboyang commented 2 months ago

pip uninstall BabitMF pip uninstall BabitMF-GPU pip install BabitMF-GPU 之后执行试试

QQiangren commented 2 months ago

谢谢指导。执行之后仍然报错。 我重新启动一个新的容器。不用pip安装BabitMF和BabitMF-GPU,用镜像自带BabitMF。可以推理人脸识别demo并有结果输出

taoboyang commented 2 months ago

感谢您的反馈,我抽空模拟一下您的情况试一下,这个 issus 先保留吧