说明:

步骤:

  • 进入目录depthai-experiments/gen2-coronamask
  • 安装依赖

python3 -m pip install -r requirements.txt

  • 所需要的依赖

opencv-python==4.5.1.48
depthai==2.16.0.0

  • 使用相机运行程序

python3 main.py -cam

  • 使用视频运行程序

python3 main.py -vid ./input.mp4

oak深度相机入门教程-检测是否佩戴口罩_人工智能

  • main.py的用法

usage: main.py [-h] [-nd] [-cam] [-vid VIDEO]

optional arguments:
-h, --help show this help message and exit
-nd, --no-debug Prevent debug output
-cam, --camera Use DepthAI 4K RGB camera for inference (conflicts with -vid)
-vid VIDEO, --video VIDEO
Path to video file to be used for inference (conflicts with -cam)