0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Deep-Live-Camの使い方(備忘録用)

Posted at

趣旨

DeepFakeをライブで実践する方法をメモレベルで残しておきます。Macのスペックが低くて解像度など微妙でしたけど、よいMacを使えばかなりいい感じになると思います。備忘録用なので詳細は説明しません。でもコマンドを順番に打っていけばとりあえずは動くと思います。

ライブラリのインストール

一気にインストールできると思いますけど、僕は何がインストールされるのかみてみたかったので一つずつ実践しました。詳細はGitHubを見ればよいと思います。仮想環境は事前に用意してからインストールしましょう。

git clone https://github.com/hacksider/Deep-Live-Cam.git
pip uninstall onnxruntime onnxruntime-silicon
pip install --upgrade pip
pip install onnxruntime-coreml==1.13.1
pip install torch
pip install tensorflow
pip install customtkinter
brew install python-tk
pip install opencv-python
pip install opencv-contrib-python
pip install Pillow
pip install insightface
python run.py --execution-provider coreml

自分がどのディレクトリに置いたのか忘れそうなので一応仮想環境の中に入る時のPathも部分的にここに残しておきます。ライブラリがインストールされた仮想環境でrun.pyがあるディレクトリにてファイルを引数と共に起動するとカメラが起動します。

source deepfakeenv/bin/activate
cd /Users/user/deepfake
python run.py --execution-provider coreml

自分の顔と扮したい顔の両方を画像で登録すればあとはライブで自分の顔が動いていても他人に扮装することができます。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?