Synthetic Image Generation of Veins using Generative Models
Use this script to install the requirements for this implementation.
pip install -r requirements.txt
To download the dataset locally, use this script as follows.
python -m scripts.download --dataset=<dataset> --target=<target>
Parameter
dataset
: A Kaggle Dataset Name or Keykaggle-fv
: Kaggle Finger Vein Dataset (Default)
target
: Target Directory for Dataset (Default: ./veingan-tmp/dataset/)
To train the model and generate synthetic images, use the following command and adjust the given parameters.
python -m scripts.generate <model> <dataset> <target> --verbose --epoch=<epoch> --configuration=<configuration>
Parameter
model
: The GAN model to generate the image-gan
: Deep Convolutional GANvae
: Variational Autoencoderscyclegan
: CycleGAN
dataset
: The dataset to train ontarget
: The target directory to save the imagesverbose
: Argument to enable verbose output of model progressepoch
: The amount of cycle to train onconfiguration
: Configuration Specifc for Modelvae_128+cpu
: VAE CPU Mode (Default)vae_128+gpu
: VAE GPU Modegan128_64+cpu
: GAN CPU Mode (Default)gan128_64+gpu
: GAN GPU Modegan128_64+full
: GAN GPU Mode with (Full Train)cyclegan128_1+cpu+train
: CycleGAN CPU Mode (Default)cyclegan128_1+gpu+train
: CycleGAN GPU Modecyclegan128_1+full+train
: CycleGAN GPU Mode (Full Train)cyclegan128_1+infer
: CycleGAN Inference Mode
Evaluate some sample of the dataset using various methods.
python -m scripts.evaluate <method> <target> --configuration=<configuration>
Parameter
method
Method of Evaluationentropy
: Calculates Entropy of Sample Setslaplace
: Calculates Laplace Gradient of Sample Setsinception
: Calculates Inception Score of Sample Setssnapshot
: Preview a snapshot of Sample Sets
target
: Target Directory and Label of Evaluation Sets (Example: "dir:label;dir:label")configuration
: Specific Configuration for Evaluation Method