Compare commits

...

4 Commits

Author SHA1 Message Date
Sóstenes Apollo 1f66c28d4a
Merge fb1f559c4d into 7f95b69bc5 2024-08-23 19:55:11 +02:00
Vic P. 7f95b69bc5
Add TODO to README.md 2024-08-24 00:45:14 +07:00
Sóstenes Apollo fb1f559c4d
Update README.md
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2024-08-13 18:56:09 +02:00
Sostenes Apollo de20c0044a Using docker 2024-08-13 13:25:25 -03:00
2 changed files with 66 additions and 0 deletions

42
Dockerfile 100644
View File

@ -0,0 +1,42 @@
# Use NVIDIA CUDA base image
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3.10-tk \
python3-pip \
git \
ffmpeg \
libsm6 \
libxext6 \
libgl1-mesa-glx \
wget \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Clone the repository
RUN git clone https://github.com/hacksider/Deep-Live-Cam.git .
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Install ONNX Runtime GPU
RUN pip3 uninstall -y onnxruntime onnxruntime-gpu && \
pip3 install --no-cache-dir onnxruntime-gpu==1.16.3
# Download required models
RUN mkdir -p models && \
wget -O models/GFPGANv1.4.pth https://huggingface.co/hacksider/deep-live-cam/resolve/main/GFPGANv1.4.pth && \
wget -O models/inswapper_128_fp16.onnx https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx
# Set the entrypoint
ENTRYPOINT ["python3", "run.py", "--execution-provider", "cuda"]
# Default command (can be overridden)
CMD ["--help"]

View File

@ -8,6 +8,21 @@ The developers of this software are aware of its possible unethical applications
Users of this software are expected to use this software responsibly while abiding by local laws. If the face of a real person is being used, users are required to get consent from the concerned person and clearly mention that it is a deepfake when posting content online. Developers of this software will not be responsible for actions of end-users.
### Run using Docker:
```
# Build
docker build -t deep-live-cam .
# Run
docker run --gpus all \
-v ./input:/app/input \
-v ./output:/app/output \
deep-live-cam \
-s input/face.jpg # Source image for face swapping
-t input/video.mp4 # Target video to apply face swap
-o output # Output directory for results
```
## How do I install it?
@ -176,6 +191,15 @@ Looking for a CLI mode? Using the -s/--source argument will make the run program
## Want the Next Update Now?
If you want the latest and greatest build, or want to see some new great features, go to our [experimental branch](https://github.com/hacksider/Deep-Live-Cam/tree/experimental) and experience what the contributors have given.
## TODO
- [ ] Support multiple faces feature
- [ ] Develop a version for web app/service
- [ ] UI/UX enhancements for desktop app
- [ ] Speed up model loading
- [ ] Speed up real-time face swapping
*Note: This is an open-source project, and were working on it in our free time. Therefore, features, replies, bug fixes, etc., might be delayed. We hope you understand. Thanks.*
## Credits
- [ffmpeg](https://ffmpeg.org/): for making video related operations easy