{"id":13562164,"url":"https://github.com/Constannnnnt/Video_FaceSwap","last_synced_at":"2025-04-03T18:32:48.420Z","repository":{"id":85785143,"uuid":"137652218","full_name":"Constannnnnt/Video_FaceSwap","owner":"Constannnnnt","description":"Given a user profile, a video clip and an actor(actress) profile in the video, Swap the actor's face with the user's face","archived":false,"fork":false,"pushed_at":"2018-07-02T10:28:13.000Z","size":17,"stargazers_count":15,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-01T13:25:32.023Z","etag":null,"topics":["face-detection","face-landmarks","face-recognition","face-swap","image-processing","video-processing"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Constannnnnt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-17T12:07:02.000Z","updated_at":"2024-07-23T16:39:15.000Z","dependencies_parsed_at":"2023-07-23T00:16:16.463Z","dependency_job_id":null,"html_url":"https://github.com/Constannnnnt/Video_FaceSwap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Constannnnnt%2FVideo_FaceSwap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Constannnnnt%2FVideo_FaceSwap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Constannnnnt%2FVideo_FaceSwap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Constannnnnt%2FVideo_FaceSwap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Constannnnnt","download_url":"https://codeload.github.com/Constannnnnt/Video_FaceSwap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223010476,"owners_count":17072993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["face-detection","face-landmarks","face-recognition","face-swap","image-processing","video-processing"],"created_at":"2024-08-01T13:01:05.274Z","updated_at":"2024-11-04T14:30:50.483Z","avatar_url":"https://github.com/Constannnnnt.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Video FaceSwap\n\nGiven a video clip, a user profile and an actor(actress) profile in the video, Swap the actor's face with the user's face. In a word, just replace the face of an actor with the input image for fun.\n\n## Prerequisite\n\nInstall the prerequisites before using this module\n\n1. Install *Cmake*\n2. Install GCC(version\u003e=4.8)\n3. Install ffmpeg\n4. ```shell\n    pip3.5 install -r requirements.txt\n    ```\n\n**Note**: You will also need the *facial landmark detector*. The trained model can be downloaded from the [source](http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2). Then, you can place it in the same directory where `main.py` is placed.\n\n## Usage\n\n```python3\npython main.py $video_address $user_face_address $selected_actor_address $temp_address $output_video\n```\nE.g. `python main.py ./data/videos/video.mp4 ./data/images/user.jpeg ./data/images/actor.jpeg ./output/ ./output/output.mp4`\n\n## Issue\n\n1. To accelerate the program, *multiprocessing* is used, but it will comsume all your memory. If you are not interested in the computation time, you can comment this part out in `faceswap.py` and use sequential procedures.\n\n    ```python\n    cores = multiprocessing.cpu_count()\n    pool = multiprocessing.Pool(processes=cores)\n    pool.map(faceswapper, actors)\n    pool.close()\n    pool.join()\n    ```\n\n## Credits\n\nThanks to [face_recognition](https://github.com/ageitgey/face_recognition) by [Adam Geitgey](https://github.com/ageitgey) and [faceswap](https://github.com/matthewearl/faceswap) by [Matthew Earl](https://github.com/matthewearl).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConstannnnnt%2FVideo_FaceSwap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FConstannnnnt%2FVideo_FaceSwap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConstannnnnt%2FVideo_FaceSwap/lists"}