hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
34.92k stars 4.93k forks source link

Two Face Feature and Face Controls, #389

Closed iVideoGameBoss closed 3 weeks ago

iVideoGameBoss commented 3 weeks ago

Two Face Feature and Face Controls

sourcery-ai[bot] commented 3 weeks ago

Reviewer's Guide by Sourcery

This pull request introduces a new feature that allows working with two faces in the source image and replacing two target faces on webcam, video, or image. The implementation includes significant changes to the UI, face swapping logic, and adds new controls for face placement. The main changes involve modifying the face detection and swapping process to handle two faces, updating the UI to include new options for controlling face placement, and adjusting the webcam preview functionality to support the new two-face feature.

File-Level Changes

Files Changes
modules/ui.py Added new UI elements for controlling two-face swapping, including checkboxes for 'Show both faces', 'Flip left/right faces', and 'Detect face from right'
modules/processors/frame/face_swapper.py Modified the face swapping logic in the process_frame function to handle two faces and implement the new face placement controls
modules/ui.py Updated the webcam_preview function to support the new two-face feature
modules/face_analyser.py Added new functions get_one_face_left and get_one_face_right to detect faces from the left and right sides of an image
README.md Updated README.md with information about the new two-face feature and face placement controls
modules/core.py Added new command-line arguments for the two-face feature and face placement controls
modules/globals.py Added new global variables to support the two-face feature
CONTRIBUTING.md Created a new CONTRIBUTING.md file with guidelines for contributors

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
hacksider commented 3 weeks ago

This is actually awesome! Can you push this on the experimental? @iVideoGameBoss :)

iVideoGameBoss commented 3 weeks ago

This is actually awesome! Can you push this on the experimental? @iVideoGameBoss :)

Sure I will submit a new pull request in a bit from a new fork.