<jupyter_start><jupyter_text>GANArt: Using AI to create Portraits  Selecting the tensorflow version as 1.x as styleGAN2 still uses this version :)<jupyter_code>%tensorflow_version 1.x<jupyter_output><empty_output><jupyter_text>Making sure we are using GPU to train the styleGAN2 model<jupyter_code>!nvidia-smi<jupyter_output><empty_output><jupyter_text>Importing the google drive<jupyter_code>from google.colab import drive
drive.mount('/content/drive')<jupyter_output><empty_output><jupyter_text>Cloning the Nvidia's stylegan2 repo<jupyter_code>%cd "/content/drive/My Drive/Kaggle/Portrait"
!mkdir colab-sg2-ada
%cd colab-sg2-ada
!git clone https://github.com/dvschultz/stylegan2-ada.git<jupyter_output><empty_output><jupyter_text>Using dataset_tool.py to create<jupyter_code>!python dataset_tool.py create_from_images "/content/drive/My Drive/Kaggle/Portrait/Dataset" '/content/drive/My Drive/Kaggle/Portrait/DataSet'<jupyter_output><empty_output><jupyter_text>Setting up the Hyperparameters<jupyter_code>#how often should the model generate samples and a .pkl file
snapshot_count = 10
#should the images be mirrored left to right?
mirrored = True
#should the images be mirrored top to bottom?
mirroredY = False
#metrics? 
metric_list = None
#augments
augs = "bg"
#resume_from = "ffhq512"<jupyter_output><empty_output><jupyter_text>Training Process<jupyter_code>!python train.py --outdir='/content/drive/MyDrive/Kaggle/Portrait/Results' --snap=5  --data='/content/drive/MyDrive/Kaggle/Portrait/Dataset' --augpipe='bg' --mirror=True  --mirrory=False --metrics=None<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11062771908017402, 'fraction_numerical': 0.00870105655686762, 'mean_word_length': 7.05, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '144517', 'license': 'MIT', 'n_tokens_mistral': 599, 'n_tokens_neox': 584, 'n_words': 111, 'path': 'GANArt-ModelTraining.ipynb', 'repo_name': 'DeewakarChakraborty/GANArt-Using-AI-to-create-Portraits', 'size': '1609'}