thank u thank u for always helping me like an angel... u are just great sir..keep it up... people like us who are new in this field need your support, so thank u again sir.
please i need to know how can apply the same technique to a dataset of 258 image and generate 20 copies from each single image and save it and achieving 1000 as total
Just wondering how I could change the names of the augmented images that are being saved? For example instead of the randomized numbers "cat_0_1449.jpeg", how could I save it as cat_1, cat_2, cat_3.... Thank you
Sir, can you please show how can I augment data on multiple images(folder of certain labelled pic) to make imbalanced data a balanced one. I am struggling with that
so here we have to store different images in separate folders and similarly store results in separate folders and then use the new data set for the learning algorithms right?
Dear Sir, I am doing research on healthcare and have an MRI dataset. I need to perform data augmentation on MRI images. Could you please suggest any tools or Python code for MRI data augmentation? Thank you.
In this augmentation if we do all augmentations at a time won't it mix everything , means it will flip as well as rotate as well as elongate in single image
is there a way of using those images without saving them on hard drive? edit: you can use .fit() . You need to give datagen.flow(...) as an argument. For anyone looking for the same question's answer.
Let's say My problem is not classification but image to image problem where both the input and output are both images. and I want to expand my data. In this case how can I apply imagedatagenerator to get the same transformations applied to both the input images and output images.????? Thanks in advance
Sir, is image augmentation applied only at the input image (e.g. the image that shows the cat or dog), or also on the label image (binary image)? Thank you.
i haven't used kaggle dataset and my images are no labelled like an image is a cat or dog ....what condition should i apply in the if else block for appending 1 if a dog and 0 if cat
For those facing this error FileNotFoundError: [Errno 2] No such file or directory create a folder named preview in the same path where your notebook or py file is located and then you will be able to see augmented images in this folder
How thia data set used in website??? Such as i want to make data set for Hat pics and put that pic on real time face detection..? Could you tell me how to use?
Sir if possible please make a video on how to create a synthetic categorical dataset for generating a CSV file. I have watched your video in which you have used DataFrame for the generation of artificial data, but attributes in that dataset have no correlation. Thank you.🙏🏻
krish sir just one question please answer....to speed up my processing iam practising them on kaggle as it provides much fast speed....but please answer how to train a image from my computer...or how to set path
FileNotFoundError: [Errno 2] No such file or directory: is the error i am getting even i though i copy the correct path from my system where the image file exists
I want to increase (augment) the number of images that i have (50 images) using ImageDataGeneator. I found the following code, but it only augments one image per time (one file). I am new to python, so, if there any other easier method to automatically augment the 50 images at once and save the outcome in a new folder... Any solution
import numpy as np import keras from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img datagen = ImageDataGenerator(rotation_range =15, width_shift_range = 0.2, height_shift_range = 0.2, rescale=1./255, shear_range=0.2, zoom_range=0.2, horizontal_flip = True, fill_mode = 'nearest', data_format='channels_last', brightness_range=[0.5, 1.5]) # This is my problem, It loads only one file, and i am searching for an automated method to load number of files together and save them in another folder. img = load_img(r"C:\Users\user 1\Pictures\people_1\1.jpg") x = img_to_array(img) x = x.reshape((1,) + x.shape) i = 0 for batch in datagen.flow (x, batch_size=1, save_to_dir =r'C:\Users\user 1\Pictures\people_1\preview', save_prefix ='people2', save_format='jpg'): i+=1 if i>10: break
The expected result from the above code is 10 augmented images extracted from the main file of 1.jpg, while I have another 50 files, I am searching for a quicker method to augment them all in one code
thank u thank u for always helping me like an angel... u are just great sir..keep it up... people like us who are new in this field need your support, so thank u again sir.
simple and comprehensive explanation. thank you sir!
thankyou sir,,,it helped me in data generation for my CNN model
Short and brilliant tutorial ! Thank you so much Krish... May Allah bless you
Thank you Krish..do more on segmentation and detection
Thank you, Krish Sir. It was a good tutorial.
This video has been really helpful. Thank you so much
Sir please upload a video on how to convert image dataset stored in directory as numpy array with image augmentation
That was a superb video.Just want to get my hands dirty with practise.Thanks Krish.
please i need to know how can apply the same technique to a dataset of 258 image and generate 20 copies from each single image and save it and achieving 1000 as total
How can you data augmentation on selected image classes when a dataset is imbalanced
Thank you so much sir for such a great tutorial
love your content man very helpfull
Just wondering how I could change the names of the augmented images that are being saved? For example instead of the randomized numbers "cat_0_1449.jpeg", how could I save it as cat_1, cat_2, cat_3.... Thank you
thank sir, it was great tutorial
Sir, can you please show how can I augment data on multiple images(folder of certain labelled pic) to make imbalanced data a balanced one. I am struggling with that
so here we have to store different images in separate folders and similarly store results in separate folders and then use the new data set for the learning algorithms right?
Dear Sir,
I am doing research on healthcare and have an MRI dataset. I need to perform data augmentation on MRI images. Could you please suggest any tools or Python code for MRI data augmentation?
Thank you.
Thanks Krish
Excelent video, thank you
Where can I find the link to the above python program?
the fourth dimension is for batch number
Can we use GAN to generate images for CNN
In this augmentation if we do all augmentations at a time won't it mix everything , means it will flip as well as rotate as well as elongate in single image
Why we are doing this line?
x = x.reshape((1,) + x.shape) # this is a Numpy array with shape (1, 3, 150, 150)
Even I am stuck in this. Did you get it?
1,3 is colour code ,150*150 size of image
Because ImageDataGenerator takes data in that form where,
1----number of images
3----number of channels
150x150---image size
@@avneshdarsh9880 1---batch size 3---channel ( RGB ) and 150*150
do you have to save it do local drive ? or could you possibly pass the augmented data within the training dataset ?
How can we increase the dataset for numeric dataset?
which link did you implement program right now?
thank you very much
how to change the images save location after augmentation , i want to save images after augmentation in my pc drive ?
Hi Krish,
after augmenting the images when we pass the data for training , do we need to maintain height and width of all images same ?
Hello sir I want anemia prediction from eye image project and how it works plz sir
is data augmentation only applicable to image datasets? what about other types of datasets?
Sourin Roy yes as far as I am concerned. I may be wrong.
in other type you can use like a undersampling and oversampling concepts
Sir i want to increase image dataset using smote technique ...please tell me how to do it???
is there a way of using those images without saving them on hard drive?
edit: you can use .fit() . You need to give datagen.flow(...) as an argument.
For anyone looking for the same question's answer.
MANKIND'S ANGEL YOU ARE, YOU ARE MY SAVIOUR. INDIA ROXX
Let's say My problem is not classification but image to image problem where both the input and output are both images. and I want to expand my data. In this case how can I apply imagedatagenerator to get the same transformations applied to both the input images and output images.????? Thanks in advance
Could not import PIL.Image. The use of `load_img` requires PIL.
sir this error occur continiously , how we can install pil in jupyter?
same here ?
pip install pillow
Sir,
is image augmentation applied only at the input image (e.g. the image that shows the cat or dog), or also on the label image (binary image)?
Thank you.
sir please create a tutorial on MNIST dataset with indepth intution, which will be useful
Thank You Sir
Nice video, I did data augmentation "on fly" inside my model, any ide how to visualize it?
thank you!
Data argumantation for MATLAB code of CNN is available ??
Sir, can u please make video on data augmentation using multiple image and how to split image data into train and test??
i haven't used kaggle dataset and my images are no labelled like an image is a cat or dog ....what condition should i apply in the if else block for appending 1 if a dog and 0 if cat
how to create preview folder and use if i am using colab?????????????????????/
getting bluish images ? how to solve?
For those facing this error
FileNotFoundError: [Errno 2] No such file or directory
create a folder named preview in the same path where your notebook or py file is located and then you will be able to see augmented images in this folder
How thia data set used in website??? Such as i want to make data set for Hat pics and put that pic on real time face detection..?
Could you tell me how to use?
your video is very helpful. Can you tell me which data augmentation technique is used for time frequency domain spectrogram (images) ?
don't go deeper into this topic, just cover the basic one
How can we balance image dataset by using this augmentation??
nice
Hi Krish, thank you for the amazing video. Is there a way we can also preserve labelled data while performing image data augmentation?
If you have corresponding .xml files, then "Roboflow" (google it plz) may work for you. Let me know if you need further help.
Sir please upload a video on image pre processing for model fit()
Sir if possible please make a video on how to create a synthetic categorical dataset for generating a CSV file. I have watched your video in which you have used DataFrame for the generation of artificial data, but attributes in that dataset have no correlation. Thank you.🙏🏻
If I have .nii file and how to augment based on CT, MR
krish sir just one question please answer....to speed up my processing iam practising them on kaggle as it provides much fast speed....but please answer how to train a image from my computer...or how to set path
U probably cannot do that
FileNotFoundError: [Errno 2] No such file or directory...can someone help me with this... I really need help for my project
Use full path of the preview folder in place of save_to_dir='preview' it will work.
Is it applicable for machine learning??
I need help ..Mara error aarha haii save to dir py... augmentation naii show ho rahii preview ma mif someone knw plz help ma
Hi sir getting this error please help em out Input data in `NumpyArrayIterator` should have rank 4. You passed an array with shape', (2720, 4106, 3))
you must have forgoten to put this line
x = x.reshape((1,) + x.shape)
at 3:41
to put and 1 in front of it to make it rank 4
please sir give the explanation in detail i am not understand what i meaning of parameter and why we use
Sir please explain graph convolution neural network
How if we have n numbers of images
Good jop
FileNotFoundError: [Errno 2] No such file or directory: is the error i am getting even i though i copy the correct path from my system where the image file exists
make sure you place it in the same directory your notebook is in. for example Anaconda3/cat.jpg
Hello, I also have the same error as you....how you solve it?
how to do data augmentation of multiple images together??
Loop through the images you have in a folder and apply this on each image.
i am stuck with so many error please help me out
where to create the 'preview folder.
FileNotFoundError: [Errno 2] No such file or directory:
@@divyarajvs8890 create the preview folder in the same location where the notebook file is located.
i have getting error any one can help us
Please provide Github link for this code.
Please provide the github link for this code
same technique I applied but showing error
"Could not import PIL.Image. The use of `load_img` requires PIL."
Please help sir
Pip install pillow
@@santhanalakshmism22 will try thanks
@@darpan810 My pleasure
@@santhanalakshmism22 getting same error after this run command
Did u install pillow ? Please check the version
Source code link??
Can you share the code???
I have 90 real datasets..bt i need total 1000 dataset..shall i apply this technique for machine learning??
I have 30 and have CNN to do😆
dude, please do post code in descritption
blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html
I want to increase (augment) the number of images that i have (50 images) using ImageDataGeneator.
I found the following code, but it only augments one image per time (one file). I am new to python, so, if there any other easier method to automatically augment the 50 images at once and save the outcome in a new folder...
Any solution
import numpy as np
import keras
from keras.preprocessing.image import ImageDataGenerator, array_to_img,
img_to_array, load_img
datagen = ImageDataGenerator(rotation_range =15,
width_shift_range = 0.2,
height_shift_range = 0.2,
rescale=1./255,
shear_range=0.2,
zoom_range=0.2,
horizontal_flip = True,
fill_mode = 'nearest',
data_format='channels_last',
brightness_range=[0.5, 1.5])
# This is my problem, It loads only one file, and i am searching for an
automated method to load number of files together and save them in
another folder.
img = load_img(r"C:\Users\user 1\Pictures\people_1\1.jpg")
x = img_to_array(img)
x = x.reshape((1,) + x.shape)
i = 0
for batch in datagen.flow (x, batch_size=1, save_to_dir =r'C:\Users\user
1\Pictures\people_1\preview', save_prefix ='people2', save_format='jpg'):
i+=1
if i>10:
break
The expected result from the above code is 10 augmented images extracted from the main file of 1.jpg, while I have another 50 files, I am searching for a quicker method to augment them all in one code
Please send this code
blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html
Indian Andrew Ng
Thank You Sir