A03ki / f-AnoGAN

Implementation of f-AnoGAN with PyTorch
MIT License
130 stars 35 forks source link

How can I implement a validation dataset? #16

Open richiprieto opened 1 year ago

richiprieto commented 1 year ago

Hello thank you very much for your code, it is very useful to study it, I wanted to ask how to implement the validation process in the code since currently there is only training and testing. Thank you very much in advance

A03ki commented 1 year ago

Hi, @richiprieto. Thank you for using this repository and for your positive comment.

Do you expect to split the data between training and validation data, or do you expect to load files for validation?

richiprieto commented 1 year ago

I would like to use new files for validation

A03ki commented 1 year ago

Thank you for your response.

In that case, some code needs to be corrected on this repository. The files to be modified and their parts are as follows.

Feel free to ask me if you have any questions. I hope it will go well!

A03ki commented 1 year ago

I implemented the validation process.

You can try the following commands.

git clone -b add_validation_process https://github.com/A03ki/f-AnoGAN.git
cd f-AnoGAN
python setup.py install
cd your_own_dataset
python train_wgangp.py "your_own_dataset_dir_name/train_dir_name" --valid_root "your_own_dataset_dir_name/valid_dir_name"
python train_encoder_izif.py "your_own_dataset_dir_name/train_dir_name" --valid_root "your_own_dataset_dir_name/valid_dir_name"

Please replace your_own_dataset_dir_name/valid_dir_name with a relative path of your own validation data.

richiprieto commented 1 year ago

Thank you very much, you are a great programmer, as I see the code, the only thing to do to have the training values is to train with the new dataset. Nothing else changes.