Skip to content

Instantly share code, notes, and snippets.

View udaylunawat's full-sized avatar
🔥
Being Pythonic

Uday Lunawat udaylunawat

🔥
Being Pythonic
View GitHub Profile
@udaylunawat
udaylunawat / image_classification_ImageDataGenerator.py
Created September 8, 2022 15:36
Multi Class Image Classification using keras ImageDataGenerator
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import gc
import subprocess
import random
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
@udaylunawat
udaylunawat / image_classification_tfds.py
Last active September 8, 2022 15:37
Multi Class Image Classification using keras tf.keras.utils.image_dataset_from_directory
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import gc
import subprocess
import random
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
@udaylunawat
udaylunawat / create_tfdf.py
Created July 15, 2022 16:02
Split folders with files (e.g. images) into train, validation and test (dataset) folders. And then convert them to Tensorflow Datasets.
# https://stackoverflow.com/a/64006242/9292995
# https://github.com/jfilter/split-folders
import splitfolders
# If your datasets is balanced (each class has the same number of samples), use ratio
# otherwise use fixed if dataset is imbalanced.
splitfolders.ratio('input_dir', output="output_dir", oversample=False, ratio = (0.8, 0.1, 0.1),
seed=1337)
# https://www.tensorflow.org/datasets/api_docs/python/tfds/folder_dataset/ImageFolder
@udaylunawat
udaylunawat / breathe-text-animation.markdown
Created July 11, 2022 22:10
Breathe - text animation
@udaylunawat
udaylunawat / hello.gif
Last active August 21, 2020 12:38
😎 About Me
hello.gif