👉 Check out the blog post and other resources for this video: 🔗 deeplizard.com/learn/video/LhEMXbjGV_4 👀 Come say hey to us on OUR VLOG: 🔗 kzbin.info
@jordandarian41053 жыл бұрын
Instablaster
@srujanvajram94304 жыл бұрын
Ina addition to watching your videos, I visited your website. Your ability to explain Deep Learning fundamentals (both here and in your comprehensive website courses) without shying away from confounding details, is a strong reflection of your immense talent and domain expertise. It's rare. You've earned a supporter. I'm excited to watch this channel grow into something big which I know it will. Keep it up!
@deeplizard4 жыл бұрын
Thank you, Srujan!
@mohammedkassab31103 жыл бұрын
One of the best keras dataset preprocessing videos on youtube. I fully watched this, thank you
@linknero14 жыл бұрын
thank you, I really regret not knowing about this channel before, I had some difficulties on my university because it was hard to get the information, really thank you :D
@igor-policee3 жыл бұрын
I've been looking for your channel for a long time, thanks for the work!
@rashmikuchhal53394 жыл бұрын
best video for image data processing. Many many thanks for you efforts.
@suyashrahatekar49649 ай бұрын
Thank you very much for this teacher ❤
@jedidiaholadele20862 жыл бұрын
Thanks Mandy!!
@samanehshamshiri13853 жыл бұрын
your tutorial was very useful and helpful for me, thank you very much
@anthonychung29073 жыл бұрын
Neural Network is amazing ...
@syedrehman57554 жыл бұрын
thanks for such great and easiest way to learn preprocessing
@Sikuq4 жыл бұрын
Great video. Runs perfectly in my VSCode. Thanks.
@tymothylim65503 жыл бұрын
Thank you very much for this video! It's an excellent video with very beginner-friendly handles on how to get started with CNN models!
@Sikuq4 жыл бұрын
Second time I'm going through this topic and learning more about the os.listdir functions. Great Video. Thanks.
@miguelalba21064 жыл бұрын
This is something that you do only for toy datasets or small sample sets. In the reality using image data generator is not recommended when you have huge volumes of images or video frames (which is usually the case). In those cases is a good practice to load and split the data across multiple tfrecords, then loading it progressively with tf.data and perform multithreaded augmentations dynamically during training. The majority of the augmentations can be computed using low level tf or common python functions.
@miguelalba21064 жыл бұрын
Mher Arabian you can see tf.data documentation for more concrete examples. In general try to manage everything related to input pipelines with tf.data www.tensorflow.org/guide/data
@pablopepo16676 ай бұрын
BUenas tardes Miguel. Me dirías donde puedo ver ejemplos de lo que comentás?. Muchas gracias
@Mzah144 жыл бұрын
The pre processing is always the most annoying part Thanks for the clear explanation
@databridgeconsultants91634 жыл бұрын
Thank You Mandy for the hard work . I regularly visit you website and I can say you are have one of the best ways to make things simpler for NN. Can I request you something in RNN/LSTM/ NLP space? Something of this kind of series . I would be grateful to you .
@sarthaksharma93223 жыл бұрын
You are just amazing! Exploring and Explaining every single little detail is extremely awesome and helpful, Thankyou!
@dtjiangutube3 жыл бұрын
good stuff! amazing clarity! Hi, professor!
@troyegilbert99714 жыл бұрын
Awesome explanation and great content.
@raoashwi2 жыл бұрын
I am getting this error module 'tensorflow' has no attribute 'preprocessing_function'. It will be great if anyone could help with this.
@verdh1004 жыл бұрын
Awesome tutorials. These tutorials have really helped me in my path towards learning machine learning. Great stuff 👍
@sukanyaiyer87764 жыл бұрын
I love thank you I've been waiting for this.
@quamar03134 жыл бұрын
Nice explanation thanks
@amritbhattarai50833 жыл бұрын
After deleting the csv files with labels, how did the training batches with preprocessing function recognize the cats and dogs images by using classes=[ 'cat' , 'dog' ] 11:30 ? How did the model know which is which and then correctly label at 14:20 ? Can anyone help me understand? Im super confused.
@deeplizard3 жыл бұрын
flow_from_directory() understands labels based on the names of the directories for which the images are stored.
@amritbhattarai50833 жыл бұрын
@@deeplizard Great! Thanks for the clarification.
@RAY-fk3tv4 жыл бұрын
Hi, awesome explanation. Hope this series covers the deployment part too.
@pranjalshahi22773 жыл бұрын
when i run the code of 6:24 it throws "Sample larger than population or is negative" value error please help me
@humayonkhan21344 жыл бұрын
gj..you are making deep learning easy..
@gourabsarker54914 жыл бұрын
I am getting this ,"ValueError: Sample larger than population or is negative" when running the second cell. Means, the change directory cell.
@Faisalamin014 жыл бұрын
same here idk what could be the problem
@Faisalamin014 жыл бұрын
okay so the fix is that you have to put all the images into the 'dogs-vs-cats' dir but not the 'Train' dir
@kgnightcry8118 Жыл бұрын
@@Faisalamin01 yeah i realized after lol
@unamattina60232 жыл бұрын
instead of deleting the files by hand you can use this script: path = r"path/to/your/dogs-vs-cats/dataset/" train_folder = "train/" allfolders = os.listdir(path) for folder in allfolders: source = os.path.join(path,folder,train_folder) destination = os.path.join(path,folder+'/') for img in os.listdir(source): shutil.move(source+img, destination+img) os.rmdir(source) that will do the exact thing :) thank you for the video!
@david9176543212 жыл бұрын
Hi. I am using Anaconda - Jupyter notebook. May I know how to read the file ?? As it could only allow zip file, I cannot do the splitting of photos like you did starting from 5:14 after unzip. Hope there is a full code tutorial on this. Thanks !!
@adiai60832 жыл бұрын
Very nice explanation 👌👌.make videos on opencv and object tracking and detection
@marccasals63663 жыл бұрын
If you have an image preprocessing problem, like super resolution. How would you do the image generator part????
@abdul-latifgbadamoshie56024 жыл бұрын
Thank you for the video. Where does should the jupyter notebook lie relative to the data folder? I am able to create the train, val, and test directories but can't seem to get the images moved to them. Any help would be appreciated. Thanks!
@deeplizard4 жыл бұрын
Choose a directory. Within that directory, place your Jupyter notebook. Within the same directory, place the train, val, and test directories.
@umairmalik64804 жыл бұрын
@@deeplizard i was stick in this problem from the last 4 hours then i read this comment and done Thankyou :) you are the real gal gadot ;)
@rsnadata70992 жыл бұрын
Can't we pass other features along with directory and classes in the generator to train our model?
@hoapham73893 жыл бұрын
subscribed to your patreon!!!!
@deeplizard3 жыл бұрын
Thank you Hoa!
@gokukrishh4 жыл бұрын
Hey great work,you made it very simple to understand.If possible,can you please make a video on face recognition using cnn it would be very helpful.
@datascience_with_yetty4 жыл бұрын
Great tutorial, May I ask why you used one-hot encoding? We could have used 0 for cat, 1 for dog for instance right?
@deeplizard4 жыл бұрын
Hey Sanni - Yes you're right, we could use either type of label. Just a matter of arbitrary choice for this example since we would get the same results either way. If we use integer labels, we need to use sparse categorical crossentropy loss. If we use one-hot labels, we need to use categorical crossentropy loss.
@akshadjha51254 жыл бұрын
@@deeplizard Hi I have followed the code in this video and it get executed without error and the respective folders of test, valid, train are created in the directory but they don't contain the images. Could jus tell what's cozing that error?
@manojrajsr60014 жыл бұрын
There are no images in the train, valid and test files after running all the for loops...., and when I run the train_batch, valid_batch, test_batch cell, the output was all 0 images found under the 2 classes. Help me out with this error.
@saloniagarwal46464 жыл бұрын
Change the directory to C: drive
@manojrajsr60014 жыл бұрын
@@saloniagarwal4646 it's already in c drive only, I'm sure. There should be something else....
@rohtashbeniwal92024 жыл бұрын
I want to fine-tune vgg-16 model for age detection which is a regression modal. how can I use this image date generator function for regression model (u used for classes classification )
@starstenaal5273 жыл бұрын
7:56 Im going to make these into a desktop wallpaper that changes to a different cat image 10 times per second.
@md.nazrulislamsiddique7492 Жыл бұрын
Hi. Thanks for this amazing video. I am getting some errors while compiling line PlotImages(imgs). The error shows "invalid shape (3,224,224) for image data".
@marthasamuel3 жыл бұрын
if our image dataset was gray, can we specify (224, 224,3) instead?
@prathampandey98982 жыл бұрын
Hello. I am getting "TypeError: 'str' object is not callable" at img, labels=next(train_batches) line.
@BPSC_ESSAY_SPECIAL4 жыл бұрын
can you make something on OpenCV ...that will be great help.
@paradona3204 жыл бұрын
This is awesome.
@benedictjn1924 жыл бұрын
When we are randomly picking 500 dogs for train and 100 dogs for test and 50 dogs for validation, there is a possiblity that same image may be picked up(may be in all three cases).
@deeplizard4 жыл бұрын
The move function we use actually moves the files to a new location, not just copies them. Therefore, there is no overlap or duplication between the three sets.
@Sikuq4 жыл бұрын
deeplizard Excellent point and a good question asked.
@JMLJ263 жыл бұрын
Hello Mandy, I would like to thank you first for the awesome work you have done; your tutorials have really been helpful to me, from data augmentation to image preparation. However, I am encountering some problems whereby I have been getting this "Found 0 images belonging to 2 classes". Albeit, I place the directory in jupyter notebook as you have advised, I still am getting the same result. I am utilising my own data which I augmented and the original data I place then into the validation folder. I beseech you, would you advise me to what to do to overcome this problem? I would like to hear from you very soon.
@deeplizard3 жыл бұрын
The way you specify your paths to the data depends on your OS. Instead of using forward slashes / in the path, try using escaped backslash characters like this: 'data\\dogs-vs-cats\\train'
@JMLJ263 жыл бұрын
@@deeplizard Good day, dear Mandy, tranks a million for reapplying to my request; I will strongly apply this new approach you have come to advise me. I will come back to you for feedback. Thanks in advance, stay safe.
@JMLJ263 жыл бұрын
First of all, may the Lord God bless you and your team enormously. You are a lifesaver; now it is perfectly working. In fact, I made a mistake on data labeling, instead of a small letter, I utilised a capital letter. for instance, instead of using dog, I used Dog. Thanks a million.
@عزوزالمزيني-س9م2 жыл бұрын
@@JMLJ26 many thanks
@kgnightcry8118 Жыл бұрын
@@deeplizard yeah it wouldn't work until i moved all the images from train into dogvscats
@v-sig23894 жыл бұрын
Ok, so far i learned that we have a dog directory, and a cat directory ... Cool vid, thank you !
@thomasvmf39843 жыл бұрын
my code won't load, the first part when I import all the libraries I'm gonna need is all ok, but then when I try to divide the images between train, test and validation the code won't load, it show this symbol * and have stayed like that for hours.. can someone tell me what to do?
@AKalen964 жыл бұрын
Whats the difference between using flow_from_directory and preprocessing.image_dataset_from_directory? Is there a specific reason to use one before the other?
@user-nadya1113 жыл бұрын
i dave one problem. Why train, valid and test directory are empty when i try creating them by meanf of running the code?
@pablopepo16676 ай бұрын
the if sentences could be at the same indentation as the for sentences, also os.chdir('../../'). Like this (excuse my basic english): os.chdir('M:/Descargas F en M/Varios archivos/Python/Libros/Python/IA/Datasets/Curso Keras Tensorflow/trainer') # acá va el direct relativo a mi workplace if os.path.isdir('train/dog') is False: # chequea si dentro de ese direct están creados los subdirect os.makedirs('train/dog') os.makedirs('train/cat') os.makedirs('valid/dog') os.makedirs('valid/cat') os.makedirs('test/dog') os.makedirs('test/cat') for i in random.sample(glob.glob('cat*'), 500): shutil.move(i, 'M:/Descargas F en M/Varios archivos/Python/Libros/Python/IA/Datasets/Curso Keras Tensorflow/trainer/train/cat') for i in random.sample(glob.glob('dog*'), 500): shutil.move(i, 'train/dog') for i in random.sample(glob.glob('cat*'), 100): shutil.move(i, 'valid/cat') for i in random.sample(glob.glob('dog*'), 100): shutil.move(i, 'valid/dog') for i in random.sample(glob.glob('cat*'), 50): shutil.move(i, 'test/cat') for i in random.sample(glob.glob('dog*'), 50): shutil.move(i, 'test/dog') os.chdir('../../')
@diogoqueiroga27743 жыл бұрын
Hey! Thank you for uploading such amazing content. I have a question about this video. I am a bit confused as to why you apply the function below to both train, validation and test sets: preprocessing_function=tf.keras.applications.vgg16.preprocess_input My understanding is that this line of code will apply the same type of pre-processing that was applied in vgg16, instead of we manually specifying our own parameters. But I thought this was only important for the train set, and not for validation or test since those directories will be helping us understand the model performance with unseen data...thus, no need to pre-process. Can you clarify why you also run that line in validation and test as well? Thank you so much!
@salmanwafiq45992 жыл бұрын
I have problem when I organize the data. My output is error, it said sample larger than population or is negative. How to fix it ?Thankyou
@kgnightcry8118 Жыл бұрын
i got the same problem any solution?
@darklord97244 жыл бұрын
Mam can you make some videos on projects on computer vision plz
@upomashahrin54924 жыл бұрын
i can not fix this. i followed exactly the same steps and even created all the folders using the given code. however i think it cannot fine the path directory train_path = 'C:\data\dogs-vs-cats\train' .please help. Found 0 images belonging to 2 classes. Found 0 images belonging to 2 classes. Found 0 images belonging to 2 classes.
@upomashahrin54924 жыл бұрын
i fixed it. it must be like this train_path = 'C:/data/dogs-vs-cats/train' not train_path = 'C:\data\dogs-vs-cats\train'
@deeplizard4 жыл бұрын
Thanks for sharing your solution. They way in which you specify file paths (with forward or back slashes) depends on your OS.
@GauravSingh-ku5xy4 жыл бұрын
@@deeplizard I have a similar problem here. Instead of Found 0 images belonging to 2 classes. Found 0 images belonging to 2 classes. Found 0 images belonging to 2 classes. It shows Found 2000 images belonging to 2 classes. Found 400 images belonging to 2 classes. Found 200 images belonging to 2 classes. See each number here should actually be half because there are 1000 images in train, 200 in validate and 100 in test. I even checked the number of images from the folders. They really are 1000 in train and so on. Any help?
@srinivasarao4162 жыл бұрын
Hi Madam, how to HOW TO load from npZ file . please let me know
@sujanpaul993 жыл бұрын
can i build a mobile application using this data model?
@nithishkrish34429 ай бұрын
Can you upload the invoice image model
@Dresseurdecode4 жыл бұрын
Hello,deeplizard! Mandy i like your job, great and impressive. Please, can you help your community with image segmentation? It should be great! Thanks
@deeplizard4 жыл бұрын
Thanks! May add in the future :)
@Dresseurdecode4 жыл бұрын
Thank you so much😎!
@myclassical2582 жыл бұрын
wow!
@Whereismymind-hn3eo3 жыл бұрын
Is there this code on github or somewhere i can download ?
@Kraulfisch3 жыл бұрын
website
@urvashimesariya4 жыл бұрын
ValueError: Sample larger than population or is negative getting this error while running code for organize data
@justinsunarto57654 жыл бұрын
I got same error, to fix this, first, I print the length of glob.glob('cat*') function, and I got 0 value. My conclusion is glob.glob didn't find the right directory of the cat images. So what I did is specify the directory for base cat and dog images url., and that's work for me. Maybe you can solve your problem using this solution..
@atheeralgarni16874 жыл бұрын
I don't know why I'm getting this Error ValueError: Sample larger than population or is negative !
@azpazy4 жыл бұрын
i had the same issue it means that the pics arent in the correct location
@AyushGupta-kp9xf4 жыл бұрын
hi, i faced the same error, try moving the pics from train folder to the dogs-vs-cats folder. (with the train folder being empty). that should work
@avijitbiswas26284 жыл бұрын
@@AyushGupta-kp9xf Thanks dear..it works. I just rename os.chdir('data/dogs-vs-cats') to os.chdir('data/dogs-vs-cats/train')...
@pablopepo16676 ай бұрын
Hay errores: *Donde dice tensorflow.keras. ....., borrar tensorflow. , que comience desde keras. ..., porque keras trabaja ahora como módulo independiente *Esto no es error pero puede confundir: en os.chdir('data/dogs-vs-cats'), puede llevar dentro de las comillas el dir relativo o el absoluto, por ej: 'M:/Descargas F en M/Varios archivos/dogs-vs-cats' , respetando la barra hacia la derecha, y una sola barra después de la letra de unidad y los 2 puntos *El indentado está mal. Los for i in random. ... , van a la altura del if os.path.isdir ... y el os.chdir('../../') también a la misma altura de indentado. Si lo ejecutamos así, crea los directorios, pero no les carga las imágenes, puede cargar una sola la primer pasada, porque los for con esa indentación son una condición del if, que está chequeando la creación de los subdirectorios, condición que se cumple en la primer pasada del código
@illenafnayr7 ай бұрын
Finally can do something useful with the 25000 cat photos on my phone
@davide292e2 жыл бұрын
@aflatkhan67252 жыл бұрын
where are labels?
@parthbhardwaj22624 жыл бұрын
This is the path I mentioned - os.chdir('data\d-vs-c') But I am getting this error - The system cannot find the path specified: 'data\\d-vs-c' Could you please help me !!
@AyushGupta-kp9xf4 жыл бұрын
hi, i faced the same error, try moving the pics from train folder to the dogs-vs-cats folder. (with the train folder being empty). that should work
@ineshtickoo25304 жыл бұрын
How do I fix this? ----> 1 for i in random.sample(glob.glob('cat.*'), 500): 2 shutil.move(i, 'train/cat') ValueError: Sample larger than population or is negative Great video btw! But please help me fix this error, thank you.
@AyushGupta-kp9xf4 жыл бұрын
hi, i faced the same error, try moving the pics from train folder to the dogs-vs-cats folder. (with the train folder being empty). that should work
@gapa51464 жыл бұрын
Why there is a bed in the background ? :>
@deeplizard4 жыл бұрын
Since we have been living in different areas of South East over the last year and a half, we don't have a dedicated filming studio. This episode was filmed from our Airbnb in Vietnam, which is why you see a bed.
@benedictjn1924 жыл бұрын
Lockdown time it doesn't matter. Look at the video content and enhance your learning.
@imdarrel3 жыл бұрын
cat.6.jpg: Cat or Human? Yes
@fnfsnafidfjdsaifji39284 жыл бұрын
You wanna marry me?
@tostupidforname4 жыл бұрын
Is there a way to get the dataset without kaggle? I dont own a phone and cant download it. EDIT: I got it anyway