Remove diecord formating make this normal text # DeepAscension/DeepFaceLab ShenNong Deepfake Guide

📢 **Getting Started**

Before we begin, let's make sure you have everything you need. Follow these steps to get set up:

**Step 1: Download Required Software**
- Download Python from the official website: https://www.python.org/downloads/
- Download DeepAscension from this Discord link: 
https://discord.com/channels/1006313128381911151/1008224194884026459/1227030035735773245

**Step 2: Download Additional Tools**
- Download Quick Face Cut following the install guide here:
https://discord.com/channels/1006313128381911151/1008224194884026459/1234949913322852432

🖼️ **Faceset Creation Guide**

Now that you have everything ready, let's dive into creating your faceset!

**> Step 1: Install Python and Required Libraries**
- Open the command prompt (cmd) on your computer.
- Run the following command in to install the required library: `pip install video2image`

**> Step 2: Gather and Prepare Material**
- Collect videos of the person you want to create a faceset for. (Get as much variety of angles,lighting, color lighting if you can, and expressions of the person so that your faceset is at least 20k+ images) 
- Place all the videos into a single folder on your computer.

**> Step 3: Extract Frames from Videos**
- Open the command prompt (cmd) again.
- Run the following command, replacing `/path/to/video/directory` with the actual path to your video folder and `/path/to/output/folder` with the desired output folder path: 
`video2image -i /path/to/video/directory -o /path/to/output/folder`
- Wait for the process to finish extracting frames from your videos.           

**> Step 4: Run Quick Face Cut and Sort Images**
- Open Quick Face Cut, which you downloaded earlier.
- Set the GPU to 0 or 1 (depending on your GPU) or CPU (for AMD GPUs). If using CPU, set the number of cores in the top right.
- Set the input and output paths for Quick Face Cut.
- Click the last button to start the process.
- Once the process is complete, go to the fourth tab in Quick Face Cut.
- Set the extracted folder, and click the first button to sort the images by similarity.
- Remove any unwanted or irrelevant images.
- Move all the remaining images to the `workspace/data_src/aligned` folder in DeepAscension.

### 🎭 Faceset Xseg Step (Including AMD DML Guide)

### AMD DML Guide

**> Step 1: Switch to AMD Mode**
- If using an AMD GPU, run `rg switch.bat` first.
- Select `DML`, but do **not** select `RG`.
- This switches the system to AMD mode.

### Faceset Xseg Step

**> Step 2: Apply Whole Face Mask**
- Run `4.3)--- data_src whole_face mask - apply.bat` in DeepFaceLab ShenNong.

**> Step 3: Prepare for Xseg Training**
- Rename or move the `data_dst` folder if it contains data.
- Replace the default xseg folder with "Shennong 256x Mask Created By Lau9" from:
  - https://discord.com/channels/1006313128381911151/1070781954800242888/1228825279045304330

**> Step 4: Train Xseg Model**
- Run `4.2)--- train Xseg.bat` for about 40 minutes.

**> Step 5: Manually Xseg Faces**
- Run `4.1)--- data_src mask - edit.bat`.
- Manually xseg poorly processed faces. (DM me your detailed manual obstruction xseg’d images following criteria if you want to contribute to Obstruction DST.)

**> Step 6: Retrain Xseg Model (if needed)**
- If you manually xseg’d faces, repeat Step 4 for 20 minutes or until results are satisfactory.

**> Step 7: Apply Xseg**
- Apply the xseg model using `4.3)--- data_src trained mask - apply.bat`.

**> Step 8: Faceset Pack**
- Pack faceset with `2.5)--- data_src util faceset pack.bat`.

🚀 **DeepFaceLab Training Guide**
- After completing the Faceset Xseg Step and AMD mode setup, follow the guide at:
  - https://discord.com/channels/1006313128381911151/1069808268878282833/1070448823417180221
- Keep the faceset unpacked for about 3% performance uplift.

👏 **Share Your DFM Live Community**
- Share your facesets and models in the Share Your DFM Live Community. Posting your work helps others learn and fosters collaboration within our community.