"vscode:/vscode.git/clone" did not exist on "4f4e0e4162ac7af77ccac330dad23c1e7772b9f0"
README.md 1.14 KB
Newer Older
1
2
3

# Preprocessing LRS3

Pingchuan Ma's avatar
Pingchuan Ma committed
4
We provide a pre-processing pipeline to detect and crop full-face images in this repository.
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

## Prerequisites

Install all dependency-packages.

```Shell
pip install -r requirements.txt
```

Install [RetinaFace](./tools) tracker.

## Preprocessing

### Step 1. Pre-process the LRS3 dataset.
Please run the following script to pre-process the LRS3 dataset:

```Shell
python main.py \
    --data-dir=[data_dir] \
    --dataset=[dataset] \
    --root=[root] \
    --folder=[folder] \
    --groups=[num_groups] \
    --job-index=[job_index]
```

- `[data_dir]` and `[landmarks_dir]` are the directories for original dataset and corresponding landmarks.

- `[root]` is the directory for saved cropped-face dataset.

- `[folder]` can be set to  `train` or `test`.

- `[num_groups]` and `[job-index]` are used to split the dataset into multiple threads, where `[job-index]` is an integer in [0, `[num_groups]`).

### Step 2. Merge the label list.
After completing Step 2, run the following script to merge all labels.

```Shell
python merge.py \
    --dataset=[dataset] \
    --root=[root] \
    --folder=[folder] \
    --groups=[num_groups] \
```