GithubHelp home page GithubHelp logo

arcface_pytorch's Introduction

Distributed Arcface Training in Pytorch

Requirements

RAM > 10G
GPU

How to Training

To train a model, run train.py with the path to the configs.
The example commands below show how to run distributed training.

python -m torch.distributed.launch --nproc_per_node=1 --nnodes=1 --node_rank=0 train.py configs/wf_mbf

config.num_classes = 10572 config.num_image = 501196

Download Datasets or Prepare Datasets

Guide training on Kaggle

1. install network

!conda install -y gdown
!pip install -U --no-cache-dir gdown --pre

2. Clone backbone train

!git clone https://github.com/DuyNguDao/ArcFace_Pytorch.git

3. Download dataset and unzip

Note: change id gdrive of dataset

!gdown --id 1yaLoTdjybeLtXLsODjsJCqPRGvlk2a9k
!unzip /kaggle/working/faces_webface_112x112.zip

4. Change config

%load ./configs/wf4m_mbf.py
Change:
+ config.rec = "path of dataset" 
+ config.num_classes = xxx
+ config.image = xxx
+ config.epoch = xxx
+ config.batch_size = xxx
+ config.val_targets = ['lfw', "agedb_30"]: datatest (lfw, fcp-cp, agedb_30)
writefile:
%%writefile ./configs/wf4m_mbf.py

5. Install environments

!pip install -r requirement.txt

6. Training on GPU

!python -m torch.distributed.launch --nproc_per_node=1 --nnodes=1 --node_rank=0 train.py configs/wf4m_mbf

7. Zip and download

!zip -r result.zip ./work_dirs

arcface_pytorch's People

Contributors

duyngudao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.