AdaFace icon indicating copy to clipboard operation
AdaFace copied to clipboard

Validation datasets not correctly used

Open hehehe6 opened this issue 1 year ago • 0 comments

run_ir50_ms1mv2.sh: python main.py
--data_root /root/autodl-tmp/AdaFace/dataset
--train_data_path faces_emore
--val_data_path faces_emore
--prefix ir50_ms1mv2_adaface
--use_mxrecord
--gpus 3
--use_16bit
--arch ir_50
--batch_size 1024
--num_workers 36
--epochs 50
--lr_milestones 12,20,24
--lr 0.1
--head adaface
--m 0.4
--h 0.333
--low_res_augmentation_prob 0.2
--crop_augmentation_prob 0.2
--photometric_augmentation_prob 0.2

There are age_30, cfp_fp, lfw, cplfw, calfw .bin in the folder dataset/faces_emore, and i run the convert.py to get .npy and some folders. But in the training i find that: Unique dataset indices: tensor([0, 1]) from : def validation_epoch_end(self, outputs):

    all_output_tensor, all_norm_tensor, all_target_tensor, all_dataname_tensor = self.gather_outputs(outputs)

    dataname_to_idx = {"agedb_30": 0, "cfp_fp": 1, "lfw": 2, "cplfw": 3, "calfw": 4}
    idx_to_dataname = {val: key for key, val in dataname_to_idx.items()}
    val_logs = {}
    for dataname_idx in all_dataname_tensor.unique():
        print("Unique dataset indices:", all_dataname_tensor.unique())

that means only agedb_30 and cfp_fp were used in validation, and in the metrics.csv, only agedb and cfpfp had correct val acc, the others were all 0.5. How can I fix it?

hehehe6 avatar Apr 03 '25 04:04 hehehe6