MuhammadImranliaqat commited on
Commit
7ea1d78
β€’
1 Parent(s): cf8173d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +0 -118
README.md CHANGED
@@ -4,121 +4,3 @@ app_file: app.py
4
  sdk: gradio
5
  sdk_version: 3.33.1
6
  ---
7
- # Refacer: One-Click Deepfake Multi-Face Swap Tool
8
-
9
- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/xaviviro/refacer/blob/master/notebooks/Refacer_colab.ipynb)
10
-
11
- πŸ‘‰ [Watch demo on Youtube](https://youtu.be/mXk1Ox7B244)
12
-
13
- Refacer, a simple tool that allows you to create deepfakes with multiple faces with just one click! This project was inspired by [Roop](https://github.com/s0md3v/roop) and is powered by the excellent [Insightface](https://github.com/deepinsight/insightface). Refacer requires no training - just one photo and you're ready to go.
14
-
15
- :warning: Please, before using the code from this repository, make sure to read the [disclaimer](https://github.com/xaviviro/refacer/tree/main#disclaimer).
16
-
17
- ## Demonstration
18
-
19
- ![demonstration](demo.gif)
20
-
21
- [![Watch the video](https://img.youtube.com/vi/mXk1Ox7B244/maxresdefault.jpg)](https://youtu.be/mXk1Ox7B244)
22
-
23
-
24
- ## System Compatibility
25
-
26
- Refacer has been thoroughly tested on the following operating systems:
27
-
28
- | Operating System | CPU Support | GPU Support |
29
- | ---------------- | ----------- | ----------- |
30
- | MacOSX | βœ… | :warning: |
31
- | Windows | βœ… | βœ… |
32
- | Linux | βœ… | βœ… |
33
-
34
- The application is compatible with both CPU and GPU (Nvidia CUDA) environments, and MacOSX(CoreML)
35
-
36
- :warning: Please note, we do not recommend using `onnxruntime-silicon` on MacOSX due to an apparent issue with memory management. If you manage to compile `onnxruntime` for Silicon, the program is prepared to use CoreML.
37
-
38
- ## Prerequisites
39
-
40
- Ensure that you have `ffmpeg` installed and correctly configured. There are many guides available on the internet to help with this. Here are a few (note: I did not create these guides):
41
-
42
- - [How to Install FFmpeg](https://www.hostinger.com/tutorials/how-to-install-ffmpeg)
43
-
44
-
45
- ## Installation
46
-
47
- Refacer has been tested and is known to work with Python 3.10.9, but it is likely to work with other Python versions as well. It is recommended to use a virtual environment for setting up and running the project to avoid potential conflicts with other Python packages you may have installed.
48
-
49
- Follow these steps to install Refacer:
50
-
51
- 1. Clone the repository:
52
- ```bash
53
- git clone https://github.com/xaviviro/refacer.git
54
- cd refacer
55
- ```
56
-
57
- 2. Download the Insightface model:
58
- You can manually download the model created by Insightface from this [link](https://huggingface.co/deepinsight/inswapper/resolve/main/inswapper_128.onnx) and add it to the project folder. Alternatively, if you have `wget` installed, you can use the following command:
59
- ```bash
60
- wget --content-disposition https://huggingface.co/deepinsight/inswapper/resolve/main/inswapper_128.onnx
61
- ```
62
-
63
- 3. Install dependencies:
64
-
65
- * For CPU (compatible with Windows, MacOSX, and Linux):
66
- ```bash
67
- pip install -r requirements.txt
68
- ```
69
-
70
- * For GPU (compatible with Windows and Linux only, requires a NVIDIA GPU with CUDA and its libraries):
71
- ```bash
72
- pip install -r requirements-GPU.txt
73
- ```
74
-
75
- * For CoreML (compatible with MacOSX, requires Silicon architecture):
76
- ```bash
77
- pip install -r requirements-COREML.txt
78
- ```
79
-
80
- For more information on installing the CUDA necessary to use `onnxruntime-gpu`, please refer directly to the official [ONNX Runtime repository](https://github.com/microsoft/onnxruntime/).
81
-
82
- For more details on using the Insightface model, you can refer to their [example](https://github.com/deepinsight/insightface/tree/master/examples/in_swapper).
83
-
84
-
85
- ## Usage
86
-
87
- Once you have successfully installed Refacer and its dependencies, you can run the application using the following command:
88
-
89
- ```bash
90
- python app.py
91
- ```
92
-
93
- Then, open your web browser and navigate to the following address:
94
-
95
- ```
96
- http://127.0.0.1:7680
97
- ```
98
-
99
-
100
- ## Questions?
101
-
102
- If you have any questions or issues, feel free to [open an issue](https://github.com/xaviviro/refacer/issues/new) or submit a pull request.
103
-
104
-
105
- ## Recognition Module
106
-
107
- The `recognition` folder in this repository is derived from Insightface's GitHub repository. You can find the original source code here: [Insightface Recognition Source Code](https://github.com/deepinsight/insightface/tree/master/web-demos/src_recognition)
108
-
109
- This module is used for recognizing and handling face data within the Refacer application, enabling its powerful deepfake capabilities. We are grateful to Insightface for their work and for making their code available.
110
-
111
-
112
- ## Disclaimer
113
-
114
- > :warning: This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
115
-
116
- > :warning: This software is intended for educational and research purposes only. It is not intended for use in any malicious activities. The author of this software does not condone or support the use of this software for any harmful actions, including but not limited to identity theft, invasion of privacy, or defamation. Any use of this software for such purposes is strictly prohibited.
117
-
118
- > :warning: You may only use this software with images for which you have the right to use and the necessary permissions. Any use of images without the proper rights and permissions is strictly prohibited.
119
-
120
- > :warning: The author of this software is not responsible for any misuse of the software or for any violation of rights and privacy resulting from such misuse.
121
-
122
- > :warning: To prevent misuse, the software contains an integrated protective mechanism that prevents it from working with illegal or similar types of media.
123
-
124
- > :warning: By using this software, you agree to abide by all applicable laws, to respect the rights and privacy of others, and to use the software responsibly and ethically.
 
4
  sdk: gradio
5
  sdk_version: 3.33.1
6
  ---