Train Neural Network by loading your images |TensorFlow, CNN, Keras tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ย. 2024

ความคิดเห็น • 499

  • @whenmathsmeetcoding1836
    @whenmathsmeetcoding1836  4 ปีที่แล้ว +22

    if you liked the content please support by subscribing 😇
    1. here is the video for multiclass:---- th-cam.com/video/1Gbcp66yYX4/w-d-xo.html
    2. here is video for object detection with tensorflow:----- th-cam.com/video/_TCUPl3j2kI/w-d-xo.html
    3. here is video for object detection with YoloV3:------ th-cam.com/video/zm9h4mYymk0/w-d-xo.html

    • @samesho7190
      @samesho7190 3 ปีที่แล้ว

      Great tutorial!!! thanks. Here, I noticed you didn't normalize your test data, don't you think this might have had a negative impact on your prediction in some way? Since your model was trained and evaluated on normalized data. Although at 1st glance it doesn't seem so.

    • @muhammadtalha2493
      @muhammadtalha2493 3 ปีที่แล้ว

      Hello sir, How to upload only one data set folder like chech happy or not
      no need to check the saad, just happy folder so what channges i have to make in code

    • @muhammadtalha2493
      @muhammadtalha2493 3 ปีที่แล้ว

      i need to check weather this is a plant leaf or not for my semester project so it will alot of help if you tell the code for single data set that the given image is the same or not in testing

    • @bibhuprasaddora1776
      @bibhuprasaddora1776 3 ปีที่แล้ว +5

      Bro please give the code lines link

    • @camilo40
      @camilo40 3 ปีที่แล้ว

      Hi, we use the same pictures in training and validation? or we use diferent?

  • @danielpinto1628
    @danielpinto1628 4 ปีที่แล้ว +66

    You know, here in Brazil us IT people praise IT people from your region.

  • @pronoybiswas3810
    @pronoybiswas3810 2 ปีที่แล้ว +28

    This is the exact tutorial I am looking for. Thank you very much. You described all the steps in the most simplified way. This tutorial will help me a lot in my project so thank you again.

  • @imanqoly
    @imanqoly 2 ปีที่แล้ว +10

    This is most awesome and most humble tutorial I've ever seen. Despite many other tuts that more like "watch me code" and throwing a line of code with complex variable naming to show off. Thank you.

  • @TrendingHashtags-bt7tz
    @TrendingHashtags-bt7tz 8 หลายเดือนก่อน +3

    Crystal clear implementation of CNN

  • @yepnah3514
    @yepnah3514 4 ปีที่แล้ว +12

    oh god, i spent HOURS trying to figure out my errors. you helped in five minutes!

  • @vilakshanpanchal
    @vilakshanpanchal หลายเดือนก่อน +1

    🎯 Key points for quick navigation:
    00:14 *Train a neural network to classify mood (happy/not happy) using custom images from Google Photos.*
    01:34 *Organize images into training, testing, and validation folders for efficient model training.*
    05:31 *Use `ImageDataGenerator` in TensorFlow to preprocess and label images automatically.*
    09:00 *Design a convolutional neural network (CNN) for image classification, including convolutional and max pooling layers.*
    11:19 *Compile and train the model using binary cross-entropy loss and RMSprop optimizer.*
    13:55 *Achieve 100% accuracy on a small dataset; discuss implications and potential improvements.*
    Made with HARPA AI

  • @KaveeshaNanayakkara99
    @KaveeshaNanayakkara99 ปีที่แล้ว

    The best video ever for a person who studies deep learning and cnn ❤😍🔥

  • @nonig249
    @nonig249 4 ปีที่แล้ว +9

    After being stuck a whole day, I prayed for wisdom and bumped into your video. You are an answered prayer. Very grateful for your content. Keep at it. #NewSub

  • @Sehmiconductor
    @Sehmiconductor 2 ปีที่แล้ว

    Thank You bro. After building 3 models I forgot the most basic thing, prediction on single random image file. Your video solved my issue. Much love from my side.

  • @sanskritisrivastava2242
    @sanskritisrivastava2242 3 ปีที่แล้ว +7

    Excellent tutorial😍 can’t thank you enough!🙌🏻🔥

  • @EternalNoobCoder
    @EternalNoobCoder 2 ปีที่แล้ว +3

    Exactly what I was looking for. Wonderful video and well explained. Thank You ❤️❤️❤️

  • @JeevaSivalingam
    @JeevaSivalingam 10 หลายเดือนก่อน

    Excellent ji.Really very good explanation with real time image's 🎉🎉🎉

  • @BoneCrushGaming
    @BoneCrushGaming 3 ปีที่แล้ว +1

    lol... the Neural Network did a good job classifying whether you are happy or not because honestly, I couldn't even tell.

  • @adamcalleja9815
    @adamcalleja9815 10 หลายเดือนก่อน

    great job explaining it, you're a great teacher

  • @wafazouari7065
    @wafazouari7065 3 ปีที่แล้ว +1

    you are a wonderful human being

  • @user-kq5cd7bd3o
    @user-kq5cd7bd3o 4 ปีที่แล้ว +1

    The first working tutorial!!! Thanks a lot

  • @sarveshsant5614
    @sarveshsant5614 2 ปีที่แล้ว +2

    Thanks, Man for explaining this in the easiest way🙌

  • @muhammadahmadessa9584
    @muhammadahmadessa9584 ปีที่แล้ว

    always the low quality videos that are the best out there

  • @cassiemst4993
    @cassiemst4993 4 ปีที่แล้ว +5

    Thank you much for the video!! i really enjoy it and helped me a lot to understand more about CNN

  • @jitensethi4668
    @jitensethi4668 3 ปีที่แล้ว +2

    Sir I don't know how to express my feelings u are great ❤️❤️ keep going sir

  • @sergiocorrea7889
    @sergiocorrea7889 2 ปีที่แล้ว +3

    Thanks a lot , this is exactly what i was looking for. Great job man!

  • @inhibited44
    @inhibited44 3 หลายเดือนก่อน

    this is very helpful. I bet if you were picking sad and happy from pictures of friends, the error goes up because too much variation in the photos

  • @120_sagarikadeb8
    @120_sagarikadeb8 3 ปีที่แล้ว

    This is the best video that I have come so far. Thank you so much Sir!!

  • @aimanjavid8441
    @aimanjavid8441 3 ปีที่แล้ว

    Superb...
    No word for thanks and appraisal .
    good keep it up

  • @saadalamgir6225
    @saadalamgir6225 2 ปีที่แล้ว

    Model is overfitting and you are happy that ist giving 100% accuracy. OMG

  • @kajalyadav4246
    @kajalyadav4246 ปีที่แล้ว

    Amazing !! True life saviour. I was looking for exactly the same.

  • @TheBlackNight971
    @TheBlackNight971 3 ปีที่แล้ว +4

    what did u put inside validation folder?

  • @SportSync_official
    @SportSync_official 2 ปีที่แล้ว +3

    Legend, thanks for explaining. i am finally able to put everything i learned about this in practice thanks :)

    • @ousmanealamakaba3135
      @ousmanealamakaba3135 2 ปีที่แล้ว

      hi brother i am confused . i need your help .this lab is important to me?

  • @LeenaGurgPhysics
    @LeenaGurgPhysics 4 ปีที่แล้ว +4

    Your video is very good. I found it extremely useful. Maybe you could rethink the tags for your video so that it shows up quickly in the search.

  • @kanzoni81
    @kanzoni81 3 ปีที่แล้ว +2

    Need help with
    ValueError: logits and labels must have the same shape ((None, 512) vs (None, 1))

  • @salsabilashraf3713
    @salsabilashraf3713 ปีที่แล้ว

    Thank you so much for this video. Cannot appreciate enough!

  • @nurulizzahluthfiahnur1122
    @nurulizzahluthfiahnur1122 3 ปีที่แล้ว +2

    Thankyou so much, its really help me, i can use my own image and its awesome

  • @satishb9975
    @satishb9975 หลายเดือนก่อน

    Thank you 👍🏻🎉 for easy tutorial of CNn

  • @sanskritisrivastava2242
    @sanskritisrivastava2242 3 ปีที่แล้ว +4

    wonderful tutorial. Thankyou so much. Just one request, Can you pls make a tutorial on how to evaluate this model by confusion matrix,F1score etc?

  • @nikethatharangi857
    @nikethatharangi857 ปีที่แล้ว

    this tutorial is really good. thank you so much

  • @mageshdanani
    @mageshdanani 4 ปีที่แล้ว +1

    Great bro ...!!! Very good explanation with appropriate pace ...!! Thank you bro !!

  • @chrisber
    @chrisber 3 ปีที่แล้ว +1

    This is an excellent tutorial, thank you so much!

  • @rvrocks1000
    @rvrocks1000 2 ปีที่แล้ว

    Very well explained and to the point

  • @sanjaypatil-jq8dh
    @sanjaypatil-jq8dh 4 ปีที่แล้ว +4

    Hello nice video..:)
    2 questions:
    1. Since you have 19 unhappy photos how does batch(3) work here?
    2. Diff. btw batch_size and steps per epoch?

  • @joaofonseca528
    @joaofonseca528 3 ปีที่แล้ว +3

    Hello, This helped me a lot but One question what chances would you make if we introduced a third output lets say neutral.
    Thanks

  • @vr-oo7uv
    @vr-oo7uv 4 ปีที่แล้ว +5

    hello sir what is the use of validation folder. can you explain flow_from_directrory and which is compare your photos. i need step by step explanation. This video is very informative but need step by step explanation.

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  4 ปีที่แล้ว +1

      Sure you may not like your model to overfit on top of training data so on every iteration you have to check the accuracy on unseen data thar comes from the validation folder

  • @jameslucas8369
    @jameslucas8369 ปีที่แล้ว

    this is the best video ,cong2ln broo

  • @sakinamosavi1104
    @sakinamosavi1104 3 ปีที่แล้ว +1

    I really enjoyed. Thanks Sir!!!

  • @richardmkechera8461
    @richardmkechera8461 2 ปีที่แล้ว

    waoooh ,this is amazing ,thank you brother

  • @vibhashreehippargi8233
    @vibhashreehippargi8233 ปีที่แล้ว

    Thanks a lot for the amazing video. I tried it out for healthy and diseased plants, it looks like it wrongly identified few. Should i put them back in training folder and re-run everything again? Please suggest.

  • @jerrymavashev9885
    @jerrymavashev9885 3 หลายเดือนก่อน

    Hey, I like your video a lot. However, at 4:30, how exactly did you call this image from your folder? I can't quite seem to figure it out as you didn't show exactly how you called it. Also, when I type in "img = image.load_img("basedata/train/happy/3.PNG"), it's telling me that the file isn't found and there is no such file, even though there is since I created it. Lastly, when I type in "plt.imshow(img)", it's telling me that the name 'img' is not defined. Please help...I'm following your video and this is throwing me off. Thanks

  • @johnmuchori6605
    @johnmuchori6605 หลายเดือนก่อน

    so helpful.I'm glad Sir

  • @DanielRodriguez-cv5yv
    @DanielRodriguez-cv5yv 3 ปีที่แล้ว +3

    Hello from Colombia, ¿How can I classify more than one clase? I need classify five classes from another variable

    • @subhadipghosh8194
      @subhadipghosh8194 3 ปีที่แล้ว

      Hey, use categorical cross entropy and use softmax as the activation function

  • @carloseduardoa.marchiori5598
    @carloseduardoa.marchiori5598 2 ปีที่แล้ว

    Amazing job! Thank you so much for that

  • @riyachougule6356
    @riyachougule6356 2 ปีที่แล้ว +1

    Hello sir, it worked really well till model fitting.
    For 'model_fit' step, it is throwing an error called "AttributeError: 'DirectoryIterator' object has no attribute '_assert_compile_was_called' "

    • @Qaidi_804
      @Qaidi_804 2 ปีที่แล้ว

      Did you sort out the issue, and why this error was encountered?

  • @telabela007
    @telabela007 2 ปีที่แล้ว

    Simply Superb. 🙏🙏

  • @sudhakarp1
    @sudhakarp1 4 ปีที่แล้ว +1

    Very neat explanation, thanks for the video

  • @sonalisingh9344
    @sonalisingh9344 ปีที่แล้ว

    Thank you very much sir, you explained step by step. but I have problem in last step. how to accept sub directory path and select both folder data set. please reply me. Thank you.

  • @aishaakram4270
    @aishaakram4270 3 ปีที่แล้ว

    Thankyou so much for the explanation but I need to train a model for my face recognition project can you please guide how do I train the model for face recognition on both RGB and grey channel. And how can I structure my dataset either multiple folders of people or else?

  • @kelvinkipsang3600
    @kelvinkipsang3600 ปีที่แล้ว

    Very useful and great job, thanks you so much

  • @thanhlongnguyen3454
    @thanhlongnguyen3454 3 ปีที่แล้ว +1

    very nice video, good job bro

  • @CarlosRincon
    @CarlosRincon 3 ปีที่แล้ว

    Nice video! thanks man!

  • @serenataylor8534
    @serenataylor8534 2 ปีที่แล้ว

    i am reading a research paper on the visual with CNN. The size of the images is 250*500. The paper used CNN with 100 kernels of size 10*20 for 1st conv layer and 100 kernels of size 20*30 for 2nd layer. Can you expain abit of this as it is not clear to me why the chosen size..what is the effect of the huge filter size

  • @SadiaAyoub-y8v
    @SadiaAyoub-y8v 17 วันที่ผ่านมา

    Sir, My final year project is related to Automated Fruit Ripeness Detection using Deep Learning model. There will e at least four fruits , we have to train model to classify fruit either Underripe, ripe or overripe. Can you please help me. Can I make a GUI we-based in Flask in Google Collab??? or I should make Web Flask app using VS code and then integrate my model at Google Collab? Which will be more convenient for me?
    One more thing in your video there are two cases(happy or not happy) and you kept it binary. Is there any ternary option available for three classes? underripe, ripe and overipe?

  • @jhin5588
    @jhin5588 2 ปีที่แล้ว

    i love you sir, you making it work. So much thanks!

  • @dody3329
    @dody3329 2 ปีที่แล้ว +1

    sir I did everything like as u have said and I have trained the model but I am facing trouble during testing of a image. Can you kindly help me how should I make the model predict the image class?

  • @PalwinderGill-i4v
    @PalwinderGill-i4v 2 หลายเดือนก่อน

    Sir, i want to know that which model the CNN model used in this video is inspired from?

  • @shilpsshilpa1285
    @shilpsshilpa1285 3 ปีที่แล้ว

    should v need put images in all folders? like testing - in happy 5 images and unhappy 5 images? same for validation too? but high no. of images in training

  • @Sirisiri08
    @Sirisiri08 21 วันที่ผ่านมา

    The best video ever🙏

  • @rakeshreddy1365
    @rakeshreddy1365 3 ปีที่แล้ว +2

    sir i did exact same thing to classify eye images but it is showing same result for every image . plz help sir

  • @bryan_dx
    @bryan_dx 2 ปีที่แล้ว

    Excellent I just finished it and it recognized most of my images (maybe could it have recognized everyone if I had used more images for training), thanks a lot.

    • @gedekresna3237
      @gedekresna3237 2 ปีที่แล้ว

      there's no "basedata/test" folder isnt it? how you can finished it?

  • @merveozdas1193
    @merveozdas1193 3 ปีที่แล้ว

    Why did you need to image to csv?And for example I am going to classify the direction that I am looking at. (eye movements:Right,left,up,down)I am gonna use webcam.
    Can you show me how to test data which I classify at webcam?

  • @ancientgear7192
    @ancientgear7192 ปีที่แล้ว

    Very helpfull tutorial. I have some questions though. Shouldnt all the images of the dataset be the same dimensions before we use them? how can i create a confusion matrix?

  • @plavali_znaem
    @plavali_znaem 2 ปีที่แล้ว +1

    Sir, I got question regarding where did you save your photos initially? Per my understanding, you have put them into training folder. However, down the video, "there's 11 images in our validation dataset", you're saying at 8:40... I am confused: should I copy images to validation folder, too?

    • @Valessito
      @Valessito ปีที่แล้ว

      una parte de las imagenes van en el entrenamiento y otra en validacion, yo usaria 75
      25 para cada carpeta

  • @freadyloaks5339
    @freadyloaks5339 4 ปีที่แล้ว +1

    thankyou very much sir for the great demo,
    but have you the video to explain the details of the models that we have to use for every scenario?

  • @WAWASAMBHUWARA
    @WAWASAMBHUWARA 2 ปีที่แล้ว

    Hello, thank you for this good example.
    I want to ask, how many photo that are good to train, develop, and test?
    because I can't find the dataset that I'm looking for, thankyou!

  • @neilsumanth8013
    @neilsumanth8013 3 ปีที่แล้ว +1

    Thank you very much for this kind of good explanation!

  • @martinhaas4955
    @martinhaas4955 3 ปีที่แล้ว

    Very interesting video, helped me a lot !

  • @nkechiesomonu8764
    @nkechiesomonu8764 2 ปีที่แล้ว

    Thanks a lot, pls can this work with multi-class classification

  • @lokeshreddy1257
    @lokeshreddy1257 4 ปีที่แล้ว +3

    Hello sir, if I'm case I wanna use more the 2 what could I use instead of binary

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  4 ปีที่แล้ว

      you just have to change last layer to softmax and use cross entropy loss

    • @muhammadayoub9161
      @muhammadayoub9161 4 ปีที่แล้ว

      @@whenmathsmeetcoding1836 how to do when we have multiple class images,last layer to softmax, I understood, but not understood ' and use cross entropy loss' please guide me with this line of code please

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  4 ปีที่แล้ว

      @@muhammadayoub9161 Sure here is the video for multiclass th-cam.com/video/1Gbcp66yYX4/w-d-xo.html

    • @neemaradhalalneema5418
      @neemaradhalalneema5418 ปีที่แล้ว

      @@whenmathsmeetcoding1836 Could you write this in a code

  • @fayezsaeed7991
    @fayezsaeed7991 4 ปีที่แล้ว +5

    Thank you for this good video
    I have one question, in the 'Validation' folder which images did you put?
    are they from train group or test group?

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  4 ปีที่แล้ว +5

      I had less no of images but yes you should keep all different images in three folders..

    • @plavali_znaem
      @plavali_znaem 2 ปีที่แล้ว

      Got the same question. Did you figure this out? Is that so that I have to save my images to all 6 folders: 2 folders - happy / unhappy -- in every of 3 folders: test, train, validation?

  • @deekshadheggade1351
    @deekshadheggade1351 3 ปีที่แล้ว

    Can you make leaf disease detection using CNN,keras, DeepLearning

  • @古调不弹
    @古调不弹 ปีที่แล้ว

    Hi, excellent tut, but I want to ask a stupid question, do I need to train or test the network using the same person's face photo? thanks

  • @nurulizzahluthfiahnur1122
    @nurulizzahluthfiahnur1122 3 ปีที่แล้ว

    Can we know what model architecture you use in this model?
    Or this is just a arxhitecture that u made by yourself?

  • @peterslater2914
    @peterslater2914 8 หลายเดือนก่อน

    Excellent video thanks alot.

  • @sharveensmith9947
    @sharveensmith9947 3 ปีที่แล้ว

    Pls do a tutorial for using and training datasets for Mask RCNN as well, your videos helped alot

  • @omeshamendis966
    @omeshamendis966 2 ปีที่แล้ว

    Hello sir I have a question instead of binary if we have multiple choices to check what is the command we need to use

  • @shivamdubey4783
    @shivamdubey4783 2 ปีที่แล้ว

    sir do we have to sotre photos in all the three folders like validation training and testing or only training

  • @josephnasr3385
    @josephnasr3385 3 ปีที่แล้ว +1

    thank you!! But one more question, how can I feed a video from my webcam to the Neural Network to classify in real time?

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  3 ปีที่แล้ว

      yes there are many video on channel where we have applied models on video

  • @ganeshvernekar2797
    @ganeshvernekar2797 2 ปีที่แล้ว

    what should be the class mode when there are 4 sets in train.flow_from_directory?
    PLs reply

  • @akshaysharmaa7
    @akshaysharmaa7 4 ปีที่แล้ว

    A very nice and informative video sir. Thank yoU !!

  • @calvinatuhaire3116
    @calvinatuhaire3116 2 ปีที่แล้ว

    great tutorial, could you kindly show how to display the results with a confusion matrix?

  • @ilhamrizaldywidy744
    @ilhamrizaldywidy744 3 ปีที่แล้ว

    Well your case is almost the same as me, i tried to do sign language detection, training and validation result is very high accuracy, but bad on test, mostly wrong, how can i improve my dataset? Cause i checked it on heatmap, computer read it wrong.. How can i make the computer to read the sign language

  • @nntun03
    @nntun03 3 ปีที่แล้ว

    ..great vdo, but was it over fitted?

  • @deepikasharma952
    @deepikasharma952 2 ปีที่แล้ว

    Nice tutorial
    can mediapipe will provide the accurate results with the guidance of this code? Please provide your Github link...

  • @joseph2009k
    @joseph2009k 4 ปีที่แล้ว +1

    hi jay, thank you very match for this tutorial. i have a question, if you work with multiclass classification, lets say not just happy and not happy but more than 6 or 7, what should be changed exactely in the code ??

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  4 ปีที่แล้ว

      Hi Joseph sure I have a video on youtube channel names as training Residual Neural Network there I have used softmax with multiclass please refer that also don't forget to subscribe...😎

    • @joseph2009k
      @joseph2009k 4 ปีที่แล้ว

      @@whenmathsmeetcoding1836 you are the best man, thank you

    • @al-aminibrahim1394
      @al-aminibrahim1394 2 ปีที่แล้ว

      @@whenmathsmeetcoding1836 please sir shere me the link

    • @al-aminibrahim1394
      @al-aminibrahim1394 2 ปีที่แล้ว

      @@joseph2009k please send the video link if he send it to you

  • @aimanjavid8441
    @aimanjavid8441 2 ปีที่แล้ว

    Kindly extend to check accuracy on test dataset

  • @xXMaDGaMeR
    @xXMaDGaMeR 2 ปีที่แล้ว

    you are amazing ! Have one issue at end, after teaching model on 4 classes i am having error testing i.e. predict, says array is not real something like this (use a.all() or a.any() )

  • @James-mu6th
    @James-mu6th ปีที่แล้ว

    Thx, this is what i looking for.

  • @saritham3610
    @saritham3610 4 ปีที่แล้ว +4

    Thank you very much. You made my day .I am happy to learn. Sir please upload more videos. Can you please send me code for model evaluation for same program

  • @JO-ej3nh
    @JO-ej3nh 3 ปีที่แล้ว +1

    load_img keeps saying PIL is missing even though I have pillow installed

  • @LuffyMonkey0327
    @LuffyMonkey0327 ปีที่แล้ว

    please do tutorial of this with tarfile. i have tar file image dataset and having trouble opening it

  • @rizwansuper009
    @rizwansuper009 3 ปีที่แล้ว +1

    Good explanation. Sir, Which function we can use instead of sigmoid for prediction ?

    • @whenmathsmeetcoding1836
      @whenmathsmeetcoding1836  3 ปีที่แล้ว +1

      softmax for multiclass please checkout ResNet50 tutorial on channel

  • @anahitabh9649
    @anahitabh9649 2 ปีที่แล้ว

    Amazing,thank you very much