Compare commits

...

11 Commits

Author SHA1 Message Date
killerlux 12af7fdd17
Merge dd622d8837 into 12fda0a3ed 2025-06-19 11:07:49 +01:00
KRSHH 12fda0a3ed
fix formatting 2025-06-17 18:42:36 +05:30
KRSHH d963430854
Add techlinked link 2025-06-17 18:42:10 +05:30
KRSHH 5855d15c09
Removed outdated links 2025-06-17 18:35:24 +05:30
KRSHH fcc73d0add
Update Download Button 2025-06-16 14:37:41 +05:30
KRSHH 8d4a386a27
Upgrade prebuilt to 2.1 2025-06-15 22:19:49 +05:30
Chittimalla Krish b98c5234d8
Revert 8bdc14a 2025-06-15 20:08:43 +05:30
Chittimalla Krish 8bdc14a789
Update prebuilt version 2025-06-15 17:50:38 +05:30
Kenneth Estanislao f121083bc8
Update README.md
RTX 50xx support
2025-06-15 02:22:00 +08:00
Aymen Kouskoussi dd622d8837 Add security policy, pull request template, and new issue templates (feature request, question) 2025-05-03 09:20:13 +02:00
Aymen Kouskoussi 02ecc245bd Fix: Improve Linux CPU execution and webcam handling. Update README. 2025-05-03 09:16:41 +02:00
8 changed files with 128 additions and 20 deletions

View File

@ -0,0 +1,17 @@
---
name: Feature Request
description: Suggest an idea for this project
labels: enhancement
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -0,0 +1,11 @@
---
name: Question
about: Ask a question or request support
labels: question
---
**Your question**
Please describe your question or what you need help with.
**Context**
Add any other context or details that might help us answer your question.

View File

@ -0,0 +1,22 @@
# Pull Request Template
Thank you for your contribution!
Please fill out the following checklist and provide all relevant information to help us review your pull request.
## Description
Please include a summary of the change and which issue is fixed (if any). Also describe your motivation and context.
Fixes #(issue)
## Checklist
- [ ] My code follows the project style and guidelines
- [ ] I have performed a self-review of my code
- [ ] I have tested the changes and they work as expected
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)
- [ ] I have added necessary documentation (if appropriate)
## Additional Information
Please add any other information or screenshots that may help the reviewers.

11
.github/SECURITY.md vendored 100644
View File

@ -0,0 +1,11 @@
# Security Policy
## Reporting a Vulnerability
If you discover a security vulnerability, please report it by emailing the project maintainers at [your-email@example.com].
- Do **not** create a public issue for security vulnerabilities.
- Provide as much information as possible to help us understand and address the issue quickly.
- We will acknowledge your report within 3 business days and strive to resolve all security issues promptly.
Thank you for helping keep this project and its users safe!

View File

@ -30,11 +30,11 @@ By using this software, you agree to these terms and commit to using it in a man
Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online. We are not responsible for end-user actions. Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online. We are not responsible for end-user actions.
## Exclusive v2.0 Quick Start - Pre-built (Windows) ## Exclusive v2.1 Quick Start - Pre-built (Windows/Mac Silicon)
<a href="https://deeplivecam.net/index.php/quickstart"> <img src="media/Download.png" width="285" height="77" /> <a href="https://deeplivecam.net/index.php/quickstart"> <img src="media/Download.png" width="285" height="77" />
##### This is the fastest build you can get if you have a discrete NVIDIA or AMD GPU. ##### This is the fastest build you can get if you have a discrete NVIDIA or AMD GPU or Mac Silicon, And you'll receive special priority support.
###### These Pre-builts are perfect for non-technical users or those who don't have time to, or can't manually install all the requirements. Just a heads-up: this is an open-source project, so you can also install it manually. This will be 60 days ahead on the open source version. ###### These Pre-builts are perfect for non-technical users or those who don't have time to, or can't manually install all the requirements. Just a heads-up: this is an open-source project, so you can also install it manually. This will be 60 days ahead on the open source version.
@ -148,6 +148,31 @@ source venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
``` ```
**For Linux (Debian/Ubuntu based):**
```bash
# Install system dependencies (if needed)
sudo apt-get update
sudo apt-get install python3-venv python3-pip ffmpeg git
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
# (Important: Ensure you have CPU-only versions if not using GPU)
pip uninstall -y torch torchvision torchaudio onnxruntime*
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
# Install webcam utilities (optional but helpful for troubleshooting)
sudo apt-get install v4l-utils
# Ensure your user is in the 'video' group for webcam access
# (You might need to log out and log back in after adding)
sudo adduser $USER video
groups
```
**For macOS:** **For macOS:**
Apple Silicon (M1/M2/M3) requires specific setup: Apple Silicon (M1/M2/M3) requires specific setup:
@ -181,7 +206,7 @@ source venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
``` ```
**Run:** If you don't have a GPU, you can run Deep-Live-Cam using `python run.py`. Note that initial execution will download models (~300MB). **Run:** If you don't have a GPU, you can run Deep-Live-Cam using `python run.py` or `python run.py --execution-provider cpu`. Note that initial execution will download models (~300MB). Performance will be very low (potentially < 1 FPS) without a compatible GPU.
### GPU Acceleration ### GPU Acceleration
@ -196,7 +221,7 @@ pip install -r requirements.txt
```bash ```bash
pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip uninstall onnxruntime onnxruntime-gpu pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.16.3 pip install onnxruntime-gpu==1.21.0
``` ```
3. Usage: 3. Usage:
@ -304,19 +329,6 @@ python run.py --execution-provider openvino
- Use a screen capture tool like OBS to stream. - Use a screen capture tool like OBS to stream.
- To change the face, select a new source image. - To change the face, select a new source image.
## Tips and Tricks
Check out these helpful guides to get the most out of Deep-Live-Cam:
- [Unlocking the Secrets to the Perfect Deepfake Image](https://deeplivecam.net/index.php/blog/tips-and-tricks/unlocking-the-secrets-to-the-perfect-deepfake-image) - Learn how to create the best deepfake with full head coverage
- [Video Call with DeepLiveCam](https://deeplivecam.net/index.php/blog/tips-and-tricks/video-call-with-deeplivecam) - Make your meetings livelier by using DeepLiveCam with OBS and meeting software
- [Have a Special Guest!](https://deeplivecam.net/index.php/blog/tips-and-tricks/have-a-special-guest) - Tutorial on how to use face mapping to add special guests to your stream
- [Watch Deepfake Movies in Realtime](https://deeplivecam.net/index.php/blog/tips-and-tricks/watch-deepfake-movies-in-realtime) - See yourself star in any video without processing the video
- [Better Quality without Sacrificing Speed](https://deeplivecam.net/index.php/blog/tips-and-tricks/better-quality-without-sacrificing-speed) - Tips for achieving better results without impacting performance
- [Instant Vtuber!](https://deeplivecam.net/index.php/blog/tips-and-tricks/instant-vtuber) - Create a new persona/vtuber easily using Metahuman Creator
Visit our [official blog](https://deeplivecam.net/index.php/blog/tips-and-tricks) for more tips and tutorials.
## Command Line Arguments (Unmaintained) ## Command Line Arguments (Unmaintained)
``` ```
@ -360,6 +372,8 @@ Looking for a CLI mode? Using the -s/--source argument will make the run program
- [*"This real-time webcam deepfake tool raises alarms about the future of identity theft"*](https://www.diyphotography.net/this-real-time-webcam-deepfake-tool-raises-alarms-about-the-future-of-identity-theft/) - DIYPhotography - [*"This real-time webcam deepfake tool raises alarms about the future of identity theft"*](https://www.diyphotography.net/this-real-time-webcam-deepfake-tool-raises-alarms-about-the-future-of-identity-theft/) - DIYPhotography
- [*"That's Crazy, Oh God. That's Fucking Freaky Dude... That's So Wild Dude"*](https://www.youtube.com/watch?time_continue=1074&v=py4Tc-Y8BcY) - SomeOrdinaryGamers - [*"That's Crazy, Oh God. That's Fucking Freaky Dude... That's So Wild Dude"*](https://www.youtube.com/watch?time_continue=1074&v=py4Tc-Y8BcY) - SomeOrdinaryGamers
- [*"Alright look look look, now look chat, we can do any face we want to look like chat"*](https://www.youtube.com/live/mFsCe7AIxq8?feature=shared&t=2686) - IShowSpeed - [*"Alright look look look, now look chat, we can do any face we want to look like chat"*](https://www.youtube.com/live/mFsCe7AIxq8?feature=shared&t=2686) - IShowSpeed
- [*"They do a pretty good job matching poses, expression and even the lighting"*](https://www.youtube.com/watch?v=wnCghLjqv3s&t=551s) - TechLinked (LTT)
## Credits ## Credits

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -4,7 +4,11 @@ import sys
if any(arg.startswith('--execution-provider') for arg in sys.argv): if any(arg.startswith('--execution-provider') for arg in sys.argv):
os.environ['OMP_NUM_THREADS'] = '1' os.environ['OMP_NUM_THREADS'] = '1'
# reduce tensorflow log level # reduce tensorflow log level
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
# disable GPU for tensorflow when using CPU provider
if '--execution-provider' in sys.argv and 'cpu' in sys.argv[sys.argv.index('--execution-provider') + 1]:
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
import warnings import warnings
from typing import List from typing import List
import platform import platform
@ -81,6 +85,13 @@ def parse_args() -> None:
modules.globals.execution_threads = args.execution_threads modules.globals.execution_threads = args.execution_threads
modules.globals.lang = args.lang modules.globals.lang = args.lang
# If using CPU provider, ensure we're not using any GPU features
if 'cpu' in args.execution_provider:
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
if torch.cuda.is_available():
torch.cuda.empty_cache()
torch.cuda.set_device('cpu')
#for ENHANCER tumbler: #for ENHANCER tumbler:
if 'face_enhancer' in args.frame_processor: if 'face_enhancer' in args.frame_processor:
modules.globals.fp_ui['face_enhancer'] = True modules.globals.fp_ui['face_enhancer'] = True

View File

@ -42,15 +42,31 @@ class VideoCapturer:
for dev_id, backend in capture_methods: for dev_id, backend in capture_methods:
try: try:
print(f"Trying device {dev_id} with backend {backend}")
self.cap = cv2.VideoCapture(dev_id, backend) self.cap = cv2.VideoCapture(dev_id, backend)
if self.cap.isOpened(): if self.cap.isOpened():
print(f"Successfully opened device {dev_id} with backend {backend}")
break break
self.cap.release() self.cap.release()
except Exception: except Exception as e:
print(f"Failed to open device {dev_id} with backend {backend}: {str(e)}")
continue continue
else: else:
# Unix-like systems (Linux/Mac) capture method # Unix-like systems (Linux/Mac) capture method
self.cap = cv2.VideoCapture(self.device_index) # Try device 0 first, then the specified device index if different
capture_methods = [(0, cv2.CAP_V4L2), (self.device_index, cv2.CAP_V4L2)] if self.device_index != 0 else [(0, cv2.CAP_V4L2)]
for dev_id, backend in capture_methods:
try:
print(f"Trying device {dev_id} with backend {backend}")
self.cap = cv2.VideoCapture(dev_id, backend)
if self.cap.isOpened():
print(f"Successfully opened device {dev_id} with backend {backend}")
break
self.cap.release()
except Exception as e:
print(f"Failed to open device {dev_id} with backend {backend}: {str(e)}")
continue
if not self.cap or not self.cap.isOpened(): if not self.cap or not self.cap.isOpened():
raise RuntimeError("Failed to open camera") raise RuntimeError("Failed to open camera")
@ -60,6 +76,12 @@ class VideoCapturer:
self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height) self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
self.cap.set(cv2.CAP_PROP_FPS, fps) self.cap.set(cv2.CAP_PROP_FPS, fps)
# Print actual camera settings
actual_width = self.cap.get(cv2.CAP_PROP_FRAME_WIDTH)
actual_height = self.cap.get(cv2.CAP_PROP_FRAME_HEIGHT)
actual_fps = self.cap.get(cv2.CAP_PROP_FPS)
print(f"Camera initialized with: {actual_width}x{actual_height} @ {actual_fps}fps")
self.is_running = True self.is_running = True
return True return True