Gender Detection using CNN, Python, Keras, OpenCV | Detect gender & faces on real-time video streams

Sdílet
Vložit
  • čas přidán 18. 07. 2020
  • In this Python programming video, we will learn how to build a Gender Detector using Keras, Tensorflow, and OpenCV. We will also see how to apply this on a Live Video Camera.
    Face region is cropped by applying face detection using cvlib package on the images.
    This is a very beginner friendly project and try to use Anaconda Terminal to install the dependencies and running the model. Feel free to play around with the code, change the parameters and come up with better accuracy. Let me know the changes in the comment section.
    GitHub: github.com/balajisrinivas/Gen...
    Matplotlib: • Matplotlib Tutorial Pa...
    LinkedIn: LinkedIn: / balaji2512
    Stay tuned for more such videos and subscribe to the channel
    #python #GenderDetection #keras #tensorflow #opencv

Komentáře • 124

  • @akrana722
    @akrana722 Před 3 lety +10

    The code is so clean and precised. Praise to you for explaining it in such easy way. If possible please make some video on image segmentation (medical use), thanks.

  • @Neek0tine
    @Neek0tine Před 2 lety

    THANK YOU! For not just grabbing an already available model and call it a "tutorial"

  • @brianthomas9148
    @brianthomas9148 Před 2 lety

    Thank you soo much Balaji, one of the best explanations even gotten to see!!!!

  • @muskaanvyas9097
    @muskaanvyas9097 Před 3 lety

    Thank you so much it really really helped me in my project. You have such a great work. Keep posting and spreading knowledge thank you sir

  • @shashankjois5452
    @shashankjois5452 Před 3 lety +1

    Please keep uploading these type of vedios ,,,, We always support you ,,,,,

  • @rajkumarmaity1243
    @rajkumarmaity1243 Před rokem

    thank you sir for such video, this video is so clean and easily understandable, and sir please post this kind of video in the future so that we can understand any concept from the root.

  • @purplehouse5808
    @purplehouse5808 Před 3 lety

    wonderful video and surely it solved my problem

  • @gokulsrinath7714
    @gokulsrinath7714 Před 4 lety +2

    Really good bro!! I watched the whole video without skipping,it was very good.
    I have a doubt ,how do you determine no. Of conv2d layers & its size for your model?
    And about batch normalization you said it depends on the model you're working.so,what all scenario should i consider using batch norm?
    Would really appreciate if you could help me with this!!
    Thankyou

  • @pomeyprince7226
    @pomeyprince7226 Před 4 lety +2

    Great work respect from Pakistan🤗🤗

  • @jay-rathod-01
    @jay-rathod-01 Před 3 lety

    Awesome tutorials

  • @SANJAY2ROKA
    @SANJAY2ROKA Před 3 lety

    I have subscrived to your channel wonderful explanation.................................to all topics...... please upload more video in deep learning image classification object detection in image and video behaviour detection..................Good Video Sir....................

  • @photorealm
    @photorealm Před 3 lety +3

    This code worked with zero changes in 3 minutes up and running (even on windows). How often does that happen :) Great work thank you for sharing.

    • @meghana9876
      @meghana9876 Před rokem

      can you tell me how to download the dataset

  • @aliensonmars3662
    @aliensonmars3662 Před 4 lety

    Please make a video on how to get started with machine learning ?
    I mean everything weather it could be time how to master, time taken, how to learn, mathematics requirements, where to learn, required skills to start.
    We hope you will make a video

  • @solveunsolvable1024
    @solveunsolvable1024 Před 4 lety +12

    sir could u please specify the requirements that needed to be installed in a seperate file as if u did in the last video

  • @Sweet5695
    @Sweet5695 Před 3 lety +2

    Thanks for the video.
    How do you know which steps to take to make code work? Do you read documentation on the libraries or some other way?
    Im trying to build something on my own i just dont know which steps to take.
    I understand we load the data but how do you learn what to do with the data afterwards

  • @SanjaySahu-be9ll
    @SanjaySahu-be9ll Před rokem

    good explanation bro ....

  • @sandrej5598
    @sandrej5598 Před 3 lety

    nice video, thanks

  • @rajalakshmirajalakshmi5706
    @rajalakshmirajalakshmi5706 Před 5 měsíci +1

    Sir supr sir....Super Explanation with Coding...But,Where you do this Coding?

  • @akd9977
    @akd9977 Před 4 lety +2

    Great work!! How to identify gender from group of person in an image

  • @sandeepkumaar7176
    @sandeepkumaar7176 Před 3 lety +1

    Amazinflg bro ur work helped my assignment 🙂🙂

  • @devinpython5555
    @devinpython5555 Před 4 lety

    hello @Balaji srinivasan hope you are doing could you please tell why are you using sublime text instead of jupyter notebook

  • @pcharith395
    @pcharith395 Před 4 lety

    Btw great work

  • @matovushafik2372
    @matovushafik2372 Před 3 lety +1

    Thanks for the good work man.
    How can I take my dataset/ images from a webcam and directly save them to the database according to the stipulated number of images in my code that I want to save

  • @aliniaz6448
    @aliniaz6448 Před měsícem

    the video is so helpful but the problem though is that video is 3 years old, there should be an updated needed with keras 3.3. Thanks in advance.😄

  • @shanmukhabhiram3526
    @shanmukhabhiram3526 Před 3 lety

    hello i was trying training program i downloaded every thing from gethub link i deleted the model in the downloaded folder and wanted to train it again as the training completes the model is being saved as a folder can you help me how to make it as an normal model file

  • @ranjancom2000
    @ranjancom2000 Před 3 lety

    Please let me know we can do this ML using drag and drop using Azure work flow pipe line module

  • @muzafpanasonic1683
    @muzafpanasonic1683 Před 4 lety

    Nice one...Very interesting

    • @BalajiSrinivasan25
      @BalajiSrinivasan25  Před 4 lety

      Thank you 😊

    • @kollivenkatamadhukar5059
      @kollivenkatamadhukar5059 Před 3 lety

      @@BalajiSrinivasan25 That was a great video, Could you please leave a link to the paper which you referred to for the architecture used. It would be of great help thanks.

  • @binitfofariya3071
    @binitfofariya3071 Před 3 lety

    Amazing bro.. 💯% accurate code

    • @digcompare1948
      @digcompare1948 Před 3 lety

      bhai yaar mere to work hi nhi kar raha help kar de plz

    • @dhinakaran4075
      @dhinakaran4075 Před 3 lety

      I got some error bro please. Send your mail id

  • @sherifeletriby
    @sherifeletriby Před 3 lety +2

    I have a code that reads the photo or video and determines if a mask is wearing or not. The question is how to calculate the quality

  • @Display670
    @Display670 Před 3 lety +2

    Sir in this project requirement.txt file not there please give me

  • @dungnguyen_ute
    @dungnguyen_ute Před rokem

    Hi everyone, i tried like video but I have an error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 14: invalid continuation byte" when I load_model('gender_detection.model'). How can I solve an error ??. Thank you!!

  • @xeweultechinsight
    @xeweultechinsight Před rokem

    Thank you for this amazing tuto.
    Can I use the same method to detect if someone is minor or adult ?

  • @mukthaaa3506
    @mukthaaa3506 Před 3 lety

    sir which function in cvlib should be used in hand gesture recognition

  • @paulcosta6142
    @paulcosta6142 Před 3 lety

    are you use data augmentatio?
    for pre processing?

  • @sriramgk130
    @sriramgk130 Před 2 lety +1

    While detecting it says man for everyone...Can anyone help me with that

  • @relaxmindzone6578
    @relaxmindzone6578 Před 3 lety

    Plz help!!!!!!!!!! i am getting this warning
    W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found

  • @universalreels3183
    @universalreels3183 Před 4 lety

    Brother make video on number plate detection and text extraction

  • @sudhirmanandhar4818
    @sudhirmanandhar4818 Před rokem

    should the image type also be same i.e it must be jpg only or can be any thing like jpg,png,jpeg and all ?

  • @fiyazkhan6460
    @fiyazkhan6460 Před 3 lety

    Hi Balaji, Can you please make videos on NLP

  • @shashankjois5452
    @shashankjois5452 Před 3 lety

    Please,,,,,,, make a vedio on ,,, how to do similar thing with other thing ,,,,,,,like,,,,,,machine/device detection,,, programming
    I love your vedios,,,,,,,,,,,,,,,,,,,,thanks a lot

  • @zainabhassan8622
    @zainabhassan8622 Před 2 lety

    Hello,
    I can't seem to download the file. I'm really in need of it for my project.

  • @debabratapaul6397
    @debabratapaul6397 Před 3 lety

    I have taken another dataset to run the model.. but the graph plot is not showing....i hve stuck in this problem.

  • @raghulsubramani5146
    @raghulsubramani5146 Před 4 měsíci

    DLL load failed while importing _pywrap_tf2: A dynamic link library (DLL) initialization routine failed. this error occurs sir while compling the code but i installed all the libraries correctly

  • @DhanunjayaSrisailamTTT

    I am stuck with this error. Please Help. ImportError: No module named '_pywrap_tensorflow'

  • @rajichandran2272
    @rajichandran2272 Před 2 lety

    how to calculate performance metrices like precission recall accuracy..etc

  • @kaustubhraikar5272
    @kaustubhraikar5272 Před 3 lety +1

    Hello sir i really appreciate you, for the simplifying a project. Can you can take a minute out of your busy schedule and review my code.

  • @mytop5602
    @mytop5602 Před 3 lety

    Can I apply this to another webcam source, i.e. XPath from a website?

  • @Nithin_3424
    @Nithin_3424 Před 3 dny

    My webcam sometimes Not responding how can i solve the problem. but the cam working good.the recognition is strucked sometimes. please help

  • @princesyal2518
    @princesyal2518 Před 3 lety

    In this we using supervised learning or unsupervised learning ????

  • @Hitesh-d-l1o
    @Hitesh-d-l1o Před 3 lety

    sir can we use Resnet 50 using transfer learning anyone plz suggest

  • @vinaykarandi836
    @vinaykarandi836 Před 3 lety

    how can we implement the same for helmet detection

  • @saphead-invader3100
    @saphead-invader3100 Před 4 lety

    I am a. Newbie just learning python wanna ask although funny could we with the help of ML and AI can make application To read Doctors hand writing infact any vernacular writing style and able to print in. Normal font ???

  • @pcharith395
    @pcharith395 Před 4 lety

    Can u do a video on modules in keras like layers

  • @desikristiyani4647
    @desikristiyani4647 Před 2 lety

    what CNN architecture are you used Sir? Thank you

  • @amirulhafiz8951
    @amirulhafiz8951 Před 3 lety

    Sir, could you make gender classification by walk movement ?

  • @solveunsolvable1024
    @solveunsolvable1024 Před 4 lety +2

    sir i am getting this error , With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

  • @CGCSMAHESHAC
    @CGCSMAHESHAC Před 3 lety +1

    .model file format is not working ,how to save the model in .model extension, but i tried with keras .h5 format for saving model

    • @gsayesh
      @gsayesh Před 3 lety

      issue comes from Tensorflow... model.fit_genarator method is deprected... please use model.fit

  • @sach2274
    @sach2274 Před 3 lety +12

    Who else got this video in recommendation and liked it without even watching the first 1 minute.

    • @ashugoyal8207
      @ashugoyal8207 Před 3 lety

      can u help with this problem
      from tensorflow.keras.preprocessing.image import ImageDataGenerator
      ModuleNotFoundError: No module named 'tensorflow'

    • @sach2274
      @sach2274 Před 3 lety

      @@ashugoyal8207 all you need to do is pip install tensorflow in your cmd or powershell

    • @sach2274
      @sach2274 Před 3 lety

      @@ashugoyal8207 all you need to do is pip install tensorflow in your cmd or powershell ...after that you need to import in your ide and use it

  • @relaxmindzone6578
    @relaxmindzone6578 Před 3 lety

    I don't have webcam so can i identify gender using photos. How to do it?

  • @vijua847
    @vijua847 Před 3 lety

    FailedPreconditionError: gender_detection.model is not a directory showing like this error

  • @mohammedaasif9707
    @mohammedaasif9707 Před 3 lety

    Sir Do you have video on Chest-X-Ray-Images-Pneumonia-Prediction?

  • @kreifuentes6949
    @kreifuentes6949 Před 3 lety +1

    Can you make a gui for this ,I appreciate if you do this

  • @amsaprabhaa8879
    @amsaprabhaa8879 Před 3 lety

    i have an error like no module named tensorlow.keras

  • @slapstickamigos2435
    @slapstickamigos2435 Před 2 lety

    hello bro, i need some help can we add age code in that and how pls tell

  • @amruthavarshini7999
    @amruthavarshini7999 Před 4 lety

    can u post videos on ml algorithms and also on opencv?

  • @Ashley-nh4ez
    @Ashley-nh4ez Před 2 lety

    About the plot, seems like they are not working anymore. Can you check it out please?

  • @aniketjaiin
    @aniketjaiin Před 3 lety +1

    Hello brother... can you tell about cvlib. I was trying to run it in jupyter notebook.. all gone well but while implementing it gives that no module named cvlib. I tried to do everything but the error remained same. Can you please tell?

    • @nithishgowdam6486
      @nithishgowdam6486 Před 2 lety

      Even I got the same prblm bro do u have any solutions to that

    • @aniketjaiin
      @aniketjaiin Před 2 lety

      @@nithishgowdam6486 Actually I was working on jupyter notebook in Anaconda. So as and when I run that there was a notification to install this library. I installed them and now it's working
      Also I set up a different environment tensorflow for my project

  • @yagizseven7
    @yagizseven7 Před 2 lety

    Does not work on Ubuntu as there are lots of errors (detecting wrong faces and genders) while detecting faces via webcam

  • @jatinbhoirjb
    @jatinbhoirjb Před 3 lety

    Can u tell me your gpu specifications?

  • @sreethasetty
    @sreethasetty Před 25 dny

    what are the requirements to run this code , can anyone explain please

  • @amsaprabhaa8879
    @amsaprabhaa8879 Před 3 lety

    ModuleNotFoundError: No module named 'tensorflow.keras' plz provide solution.ffffffffffffffffffff

  • @The-Whole-Universe
    @The-Whole-Universe Před 3 lety

    i have error when i used this code i don't know why ?
    ValueError: With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

    • @ZuesNgcobo
      @ZuesNgcobo Před rokem

      in my case I needed to change the way I access my data from my drive

  • @amnarehman2485
    @amnarehman2485 Před 4 lety

    Which tool is used here and how

  • @user-kj7yn2lh8j
    @user-kj7yn2lh8j Před 2 lety

    hello my friend how can i download the man and woman folder ? can you help me

  • @406_meghana2
    @406_meghana2 Před 8 měsíci

    what libraries have to install init

  • @kamilmuhdtaufeeq1002
    @kamilmuhdtaufeeq1002 Před 10 měsíci

    Please sir can i get the dataset you use for this project?

  • @patrickpuentelml4958
    @patrickpuentelml4958 Před 3 lety

    Hey Mr Balaji could you make a video only training a simple objec detection in other words only detectin one object. I'm very new in the shields of the object detections and i can understand a little plese could you make a video like this but only for detect one object

    • @patrickpuentelml4958
      @patrickpuentelml4958 Před 3 lety

      sorry I was trying to said that I'm very new in the field of object detection. My english is so bad jaja Please help me

  • @shaimakulavoor271
    @shaimakulavoor271 Před 25 dny

    can we use jupiter notebook?

  • @prajwalrao6381
    @prajwalrao6381 Před 2 měsíci +1

    bro does these work on vs code

  • @supreethu2308
    @supreethu2308 Před 4 měsíci

    in which software we have to do this ??

  • @harikk7872
    @harikk7872 Před 3 lety

    Sir i am getting model is not defined

  • @HarvLittGaming
    @HarvLittGaming Před 3 lety

    Can u make a discord servers for us so we can talk and ask our queries please

  • @madalanrupenchakravarthi1830

    can anyone help me with the project

  • @jdw4578
    @jdw4578 Před rokem

    Is there any database in this project

  • @CurryCravingsIndia
    @CurryCravingsIndia Před 4 lety

    Bro can u make video on segmentaion using unet

  • @knowledgedoctor3849
    @knowledgedoctor3849 Před 3 lety

    Don't get the correct output.
    When i checked it it can say female.
    Why

  • @mohan.r2155
    @mohan.r2155 Před 3 lety

    bro can t import tensorflow what will i do?

    • @ritikthakur6270
      @ritikthakur6270 Před 3 lety +1

      Use python version 3.6 to install the tensorflow

  • @priyanayak2000
    @priyanayak2000 Před rokem

    Bro explain in detail for better understanding

  • @mdmahinulalamtanjid4798
    @mdmahinulalamtanjid4798 Před měsícem

    Which IDE is this

  • @CGCSMAHESHAC
    @CGCSMAHESHAC Před 3 lety

    how to save the model in .model format

    • @gsayesh
      @gsayesh Před 3 lety

      Issue comes from Tenserflow... model.fit_genrator method is deprecated please use model.fit

  • @nsk6914
    @nsk6914 Před rokem

    Iam getting error iam using pycharm

  • @as_sulthoni
    @as_sulthoni Před 3 lety

    i got out of sample error too high

  • @aliap1177
    @aliap1177 Před 2 lety

    Sir can u make it for detecting Transgender too...

  • @dtrgaming6566
    @dtrgaming6566 Před 3 lety

    bro plot is not getting saved

  • @yadvendarSingh84
    @yadvendarSingh84 Před 3 lety +1

    is this able to recognise transgender

  • @salmashaik1291
    @salmashaik1291 Před 2 lety

    Can I have code

  • @kossaiyt2764
    @kossaiyt2764 Před 3 lety +1

    هههه

  • @plab9034
    @plab9034 Před 3 lety

    why don't you get a better camera?

  • @ManasNandMohan
    @ManasNandMohan Před 2 měsíci

    only detecting male classes

  • @aimlelectronics4838
    @aimlelectronics4838 Před 2 lety

    Dont you have a girl to present that. So sad. same here. LOL