MODNet Demo运行

配置

System

Windows 10

Installation

  1. Python 3
  2. PyCharm
  3. miniConda

Set Up the Envirionment

  1. [Configure a Conda virtual environment in PyCharm]
  1. 下载项目代码压缩包,解压缩获得项目文件夹 MODNet-master
0.png
  1. 在PyCharm中打开项目文件
    [图片上传中...(0.png-576d27-1614118948274-0)]

    File -> Open -> (选择刚刚保存的项目文件夹 MODNet-master)-> OK

按照demo README里的命令运行

以下命令均可以在PyCharm内置的Terminal内运行(把命令代码复制粘贴进去,敲回车,注意换掉需要替换的部分,如 YOUR_VIDEO_PATH

1.png
2.png
  1. 配置环境,安装dependencies

    pip install -r demo/video_matting/custom/requirements.txt
    
  2. (等dependencies安装的过程可以用电脑前置相机录个几秒的demo录像,存放路径为: YOUR_VIDEO_PATH

  3. Execute the main code:

    python -m demo.video_matting.custom.run --video YOUR_VIDEO_PATH
    

    where YOUR_VIDEO_PATH is the specific path of your video.
    There are some optional arguments:

    • --result-type (default=fg) : fg - save the alpha matte; fg - save the foreground
    • --fps (default=30) : fps of the result vide
  4. 完成啦

你可能感兴趣的:(MODNet Demo运行)