Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anxiangsir committed Jan 12, 2021
1 parent 760d6de commit 757e9ec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
26 changes: 11 additions & 15 deletions recognition/partial_fc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Partial FC is a distributed deep learning training framework for face recognitio

## Contents
[Partial FC](https://arxiv.org/abs/2010.05222)
- [Largest Face Recognition Dataset: **Glint360k**](#Glint360k)
- [Distributed Training Performance](#Performance)
- [Largest Face Recognition Dataset: **Glint360k**](#Glint360K)
- [Docker](#Docker)
- [Performance On Million Identities](#Benchmark)
- [FAQ](#FAQ)
- [Citation](#Citation)

Expand All @@ -18,7 +19,7 @@ which contains **`17091657`** images of **`360232`** individuals.
By employing the Patial FC training strategy, baseline models trained on Glint360K can easily achieve state-of-the-art performance.
Detailed evaluation results on the large-scale test set (e.g. IFRT, IJB-C and Megaface) are as follows:

#### Evaluation on IFRT
### 1. Evaluation on IFRT
**`r`** denotes the sampling rate of negative class centers.
| Backbone | Dataset | African | Caucasian | Indian | Asian | ALL |
| ------------ | ----------- | ----- | ----- | ------ | ----- | ----- |
Expand All @@ -27,19 +28,19 @@ Detailed evaluation results on the large-scale test set (e.g. IFRT, IJB-C and Me
| R100 | **Glint360k**(r=1.0) | 89.50 | 94.23 | 93.54 | **65.07** | **88.67** |
| R100 | **Glint360k**(r=0.1) | **90.45** | **94.60** | **93.96** | 63.91 | 88.23 |

#### Evaluation on IJB-C and Megaface
### 2. Evaluation on IJB-C and Megaface
We employ ResNet100 as the backbone and CosFace (m=0.4) as the loss function.
TAR@FAR=1e-4 is reported on the IJB-C datasets, and TAR@FAR=1e-6 is reported on the Megaface dataset.
|Test Dataset | IJB-C | Megaface_Id | Megaface_Ver |
| :--- | :---: | :---: | :---: |
| MS1MV2 | 96.4 | 98.3 | 98.6 |
|**Glint360k** | **97.3** | **99.1** | **99.1** |

#### License
### 3. License

The Glint360K dataset (and the models trained with this dataset) are available for non-commercial research purposes only.

#### Download
### 4. Download
- [x] [**Baidu Drive**](https://pan.baidu.com/s/1GsYqTTt7_Dn8BfxxsLFN0w) (code:o3az)
- [x] **Magnet URI**: `magnet:?xt=urn:btih:E5F46EE502B9E76DA8CC3A0E4F7C17E4000C7B1E&dn=glint360k`

Expand All @@ -62,7 +63,7 @@ cat glint360k_* | tar -xzvf -
```
Use [unpack_glint360k.py](./unpack_glint360k.py) to unpack.

#### Pretrain models
### 5. Pretrain models
- [x] [**Baidu Drive**](https://pan.baidu.com/s/1sd9ZRsV2c_dWHW84kz1P1Q) (code:befi)
- [x] [**Google Drive**](https://drive.google.com/drive/folders/1WLjDzEs1wC1K1jxDHNJ7dhEmQ3rOOILl?usp=sharing)

Expand All @@ -73,7 +74,7 @@ Use [unpack_glint360k.py](./unpack_glint360k.py) to unpack.
| pytorch | [R50](https://drive.google.com/drive/folders/16hjOGRJpwsJCRjIBbO13z3SrSgvPTaMV?usp=sharing) |1.0|97.0|-|
| pytorch | [R100](https://drive.google.com/drive/folders/19EHffHN0Yn8DjYm5ofrgVOf_xfkrVgqc?usp=sharing) |1.0|97.4|-|

## Docker For Partial-FC
## Docker
Make sure you have installed the NVIDIA driver and Docker engine for your Linux distribution Note that you do not need to
install the CUDA Toolkit and other independence on the host system, but the NVIDIA driver needs to be installed.
Because the CUDA version used in the image is 10.1,
Expand All @@ -97,7 +98,7 @@ sudo docker run -it -v /train_tmp:/train_tmp --net=host --privileged --gpus 8 --
`/train_tmp` is where you put your training set (if you have enough RAM memory,
you can turn it into `tmpfs` first).

## Training Speed Benchmark
## Benchmark
### 1. Train Glint360K Using MXNET

| Backbone | GPU | FP16 | BatchSize / it | Throughput img / sec |
Expand All @@ -112,7 +113,7 @@ you can turn it into `tmpfs` first).
| R50 | 8 * Tesla V100-SXM2-32GB | True | 128 | 6112 |


## Performance On Million Identities
### 2. Performance On Million Identities
We neglect the influence of IO. All experiments use mixed-precision training, and the backbone is ResNet50.
#### 1 Million Identities On 8 RTX2080Ti

Expand All @@ -127,11 +128,6 @@ We neglect the influence of IO. All experiments use mixed-precision training, an
| Model Parallel | 64 | 2048 | 9684 | 4483 | GPU |
| **Partial FC(Ours)** | **64** | **4096** | **6722** | **12600** | GPU |

## TODO
- [ ] Mixed precision training (pytorch)
- [ ] Pipeline Parallel (pytorch)
- [ ] Docker (include mxnet and pytorch)
- [ ] A Wonderful Documents

## FAQ
#### Glint360K's Face Alignment Settings?
Expand Down
24 changes: 13 additions & 11 deletions recognition/partial_fc/mxnet/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## [中文版本请点击这里](./README_CN.md)

## Train
#### Requirements
### 1.Requirements
python==3.6
cuda==10.1
cudnn==765
Expand All @@ -11,10 +11,7 @@ pip install easydict mxboard opencv-python tqdm
[openmpi](mxnet/setup-utils/install-mpi.sh)==4.0.0
[horovod](mxnet/setup-utils/install-horovod.sh)==0.19.2

#### Failures due to SSH issues
The host where horovodrun is executed must be able to SSH to all other hosts without any prompts.

#### Run with horovodrun
### 2.Run with horovodrun
Typically one GPU will be allocated per process, so if a server has 8 GPUs, you will run 8 processes.
In horovodrun, the number of processes is specified with the -np flag.

Expand All @@ -28,15 +25,20 @@ To run on two machine with 16 GPUs:
horovodrun -np 16 -H ip1:8,ip2:8 bash config.sh
```

#### Run with mpi
### 3.Run with mpi
```shell script
bash run.sh
```

### Failures due to SSH issues
The host where horovodrun is executed must be able to SSH to all other hosts without any prompts.




## Troubleshooting

### Horovod installed successfully?
### 1. Horovod installed successfully?

Run `horovodrun --check` to check the installation of horovod.
```shell script
Expand All @@ -59,13 +61,13 @@ Run `horovodrun --check` to check the installation of horovod.
# [X] Gloo
```

### Mxnet Version!
### 2. Mxnet Version!
Some versions of mxnet with horovod have bug.
It is recommended to try version **1.5 or 1.6**.

**The community has found that mxnet1.5.1 cannot install horovod.**

### Check CUDA version!
### 3. Check CUDA version!
```shell script
# Make sure your cuda version is same as mxnet, such as mxnet-cu101 (CUDA 10.1)

Expand All @@ -76,10 +78,10 @@ It is recommended to try version **1.5 or 1.6**.
# Cuda compilation tools, release 10.1, V10.1.168
```

### Block IO
### 4. Block IO
You can turn on the debug mode to check whether your slow training speed is the cause of IO.

### Training Speed.
### 5. Training Speed.
If you find that your training speed is the io bottleneck, you can mount dataset to RAM,
using the following command.
```shell script
Expand Down

0 comments on commit 757e9ec

Please sign in to comment.