See installation
cd task/recognition/face
# download dummy dataset
wget https://plsc.bj.bcebos.com/dataset/MS1M_v3_One_Sample.tgz
# unzip
mkdir -p ./dataset/
tar -xzf MS1M_v3_One_Sample.tgz -C ./dataset/
python -m plsc.data.dataset.tools.lfw_style_bin_dataset_converter --bin_path ./dataset/MS1M_v3_One_Sample/agedb_30.bin \
--out_dir ./dataset/MS1M_v3_One_Sample/agedb_30/ --flip_test
Run the script from command line.
# Here, for simplicity, we just reuse the single node 8 gpus yaml configuration file.
export CUDA_VISIBLE_DEVICES=0
plsc-train \
-c configs/IResNet50_MS1MV3_ArcFace_pfc10_1n8c_dp_mp_fp16o1.yaml \
-o DataLoader.Train.dataset.image_root=./dataset/MS1M_v3_One_Sample \
-o DataLoader.Train.dataset.cls_label_path=./dataset/MS1M_v3_One_Sample/label.txt \
-o DataLoader.Eval.dataset.image_root=./dataset/MS1M_v3_One_Sample/agedb_30 \
-o DataLoader.Eval.dataset.cls_label_path=./dataset/MS1M_v3_One_Sample/agedb_30/label.txt
Run the script from command line.
export PADDLE_NNODES=1
export PADDLE_MASTER="127.0.0.1:12538"
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python -m paddle.distributed.launch \
--nnodes=$PADDLE_NNODES \
--master=$PADDLE_MASTER \
--devices=$CUDA_VISIBLE_DEVICES
plsc-train \
-c configs/IResNet50_MS1MV3_ArcFace_pfc10_1n8c_dp_mp_fp16o1.yaml \
-o DataLoader.Train.dataset.image_root=./dataset/MS1M_v3_One_Sample \
-o DataLoader.Train.dataset.cls_label_path=./dataset/MS1M_v3_One_Sample/label.txt \
-o DataLoader.Eval.dataset.image_root=./dataset/MS1M_v3_One_Sample/agedb_30 \
-o DataLoader.Eval.dataset.cls_label_path=./dataset/MS1M_v3_One_Sample/agedb_30/label.txt
export CUDA_VISIBLE_DEVICES=0
plsc-export \
-c configs/IResNet50_MS1MV3_ArcFace_pfc10_1n8c_dp_mp_fp16o1.yaml \
-o Global.pretrained_model=output/IResNet50/latest \
-o Model.data_format=NCHW
export PADDLE_NNODES=1
export PADDLE_MASTER="127.0.0.1:12538"
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python -m paddle.distributed.launch \
--nnodes=$PADDLE_NNODES \
--master=$PADDLE_MASTER \
--devices=$CUDA_VISIBLE_DEVICES \
plsc-export \
-c configs/IResNet50_MS1MV3_ArcFace_pfc10_1n8c_dp_mp_fp16o1.yaml \
-o Global.pretrained_model=output/IResNet50/latest \
-o Model.data_format=NCHW