-
Notifications
You must be signed in to change notification settings - Fork 126
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
How to train it with custom dataset? (webface42m) (folders as classes?_) FileNotFoundError: [Errno 2] No such file or directory: \faces_emore\\agedb_30\\meta\\sizes #109
Comments
The error is probably coming from the val_dataset function (and will very likely also be raised by the test_dataset function). You will probably have to edit them within the data.py file |
@afm215 is there any documentation about using adaFace with a custom dataset? I feel like the code is way too much |
Just create a PR #125. With this, you should now be able to add .bin in your validation folder and regenerate your memfile. Be aware that in the current state , the code will raise an assertion error if any of the initial sets are not present within the validation folder. You can just comment line 50 within five_validation_dataset.py. |
Thanks for creating the PR. I have one question, how do we create the .bin files for the dataset?? Does AdaFace require some format of the folder? |
The .bin files are used for the validation, and the .rec is used for the training. You should thus structure your data this way: You can next take as a model the configurations given the scripts folder. |
Is it not possible to directly train AdaFace on an Image Folder like structure, without involving the .bin files and .rec files?? |
If you want to get rid of the .bin file, I think you'll have to modify the code itself. In the current state, you however don't have to use .rec files for training. If no rec file is detected within <data_root>/<train_path>, the script will create an ImageFolder dataset with, as input, the path: <data_root>/<train_path>/imgs |
Also, what do you mean by not being able to generate the validation files.?Is there a way I can help you with that? |
So I have managed to automate the AdaFace code for any general dataset. The only issue that remains for me is how the validation data is created and used. For example: consider the file |
Ya that's okay. But for running the validating code on my dataset, I do need the bin files, right? |
This is what I think, the first two images probably correspond to the first entry of the npy file. |
Yep. you can try to use the function convert_test_set of my python_utils packages convert_test_set(test_dir: str, pair_file: str). Then pair_file should be the path to a file that contains pair like this: |
If that's the case, it should probably solve the issue. Thanks for the help. Will send a PR for automating the whole process with some UI updates |
Hello @afm215 , @ayush0x00 |
How to train it with custom dataset? (folders as classes?_) FileNotFoundError: [Errno 2] No such file or directory: \faces_emore\agedb_30\meta\sizes
The text was updated successfully, but these errors were encountered: