Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom dataset #81

Open
deeksha1927 opened this issue Jan 27, 2023 · 5 comments
Open

Custom dataset #81

deeksha1927 opened this issue Jan 27, 2023 · 5 comments

Comments

@deeksha1927
Copy link

Could you please let us know the folder structure required for custom dataset training?

@selingok033
Copy link

If you find the result, could you share with us?

@ANDRESHZ
Copy link

ANDRESHZ commented Apr 27, 2023

for a custom dataset, I use:

"AnyDatasetName" folder:
   -"train" folder:
      -"imgs" folder:
        -"1"..."#last_class" folders:

example image
imagen

   -"val" folder:
      -6 validation folder create by the 
        python convert.py --rec_path <datafolder>/<faces_webface_112x112> --make_image_files --make_validation_memfiles

example image
imagen

and the main.py comand:

    --data_root /.../datafolder/AnyDatasetName \
    --train_data_path train \
    --val_data_path val \
    --prefix ir50_ms1mv2_adaface \
    --gpus 1 \
    --use_16bit \
    --arch ir_50 \
    --batch_size 6 \
    --num_workers 3 \
    --epochs 13 \
    --lr_milestones 12,20,24 \
    --lr 0.1 \
    --head adaface \
    --m 0.4 \
    --h 0.333 \
    --custom_num_class 62 \
    --low_res_augmentation_prob 0.2 \
    --crop_augmentation_prob 0.25 \
    --photometric_augmentation_prob 0.2 \
    --start_from_model_statedict pretrained/adaface_ir50_ms1mv2.ckpt

@ANDRESHZ
Copy link

ANDRESHZ commented Apr 27, 2023

Any of you have a solution for: this issue #75?

Or find a nice guide to finalize the fine-tuning?

@selingok033
Copy link

@ANDRESHZ Thank you for your response but I didn't fully understand what path I should provide in "/<faces_webface_112x112>". Additionally, I would like to mention that I won't be using face data as a custom dataset, instead, I will be using another biometric feature to fine-tune Adaface. Can you please let me know if you can assist me with this?

@ANDRESHZ
Copy link

ANDRESHZ commented May 4, 2023

@ANDRESHZ Thank you for your response but I didn't fully understand what path I should provide in "/<faces_webface_112x112>". Additionally, I would like to mention that I won't be using face data as a custom dataset, instead, I will be using another biometric feature to fine-tune Adaface. Can you please let me know if you can assist me with this?

@selingok033 You must use the folder that you want to convert the .rec and the binary files to create the 5 validation datasets.
python convert.py --rec_path <datafolder>/faces_webface_112x112 --make_image_files --make_validation_memfiles
the .rec and .bin files are into the .zip file faces_webface_112x112.zip. (see section one of training .MD file on github).

OK if you will have not used custom dataset like actual "issue thread #81" you will modify the "head" to add the structure EX: into a MLP and get union with the structure after to the load de ".ckpt" file, or would you train from 0 changing the head to admit you new additional metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants