Face Recognition Using Keras And Open CV Part 2- Model Creation And Testing

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 120

  • @surajbista8656
    @surajbista8656 4 года назад +8

    I think using one shot learning like siamese network in this problem makes more sense.

  • @debjyoti34
    @debjyoti34 4 года назад +5

    Can u make a video on what all improvements you can add to improve the accuracy of the model

  • @MrUmsdavid
    @MrUmsdavid 2 года назад

    Super Fantastic Tutorial! Easy to understand & flawless!

  • @diwakarbhatt04
    @diwakarbhatt04 4 года назад +1

    Hi Krish, I am watching your videos since last week and they are guiding a lot.

  • @UsamaChishti
    @UsamaChishti 4 года назад +2

    sir why my non-trainable params are not 0 when dense the classifying classes?? show at 5:55

  • @priyankapadwal4467
    @priyankapadwal4467 Год назад

    krish u r just awesome ,i learn lots of things from u ,thank u so much

  • @rohitg6558
    @rohitg6558 4 года назад +2

    Sir, please make a tutorial video on, How to add new class in old classification model without retraining all the classes again.

  • @bvramu-ew3rd
    @bvramu-ew3rd 4 года назад +4

    Sir please upload with Speech recognition and voice authentication vedio sir

  • @fadhelalsuwaidi1221
    @fadhelalsuwaidi1221 3 года назад +1

    Hi Mr Krish
    Is training by keras better than using face_recognition library
    thanks in advance.

  • @prathameshmore1402
    @prathameshmore1402 3 года назад +2

    If any other person appears in the frame, it still shows my name. How can I solve my issue?

    • @bnikhilraj1381
      @bnikhilraj1381 3 года назад +1

      hey can you send "facefeatures_new_model.h5" this file pls Iam unable to find

    • @prathameshmore1402
      @prathameshmore1402 3 года назад

      @@bnikhilraj1381 U have to create that model by your own. Sir has made that vdo, u can check it out

  • @VenkataRamaRajuLolabhattu
    @VenkataRamaRajuLolabhattu 4 года назад +1

    When we get new face (person).. do we need to retrain the model ??

  • @ambilin7053
    @ambilin7053 4 года назад +2

    Hi krish, which tool are you using for the screen recording?

    • @ExtrinsicTechnology
      @ExtrinsicTechnology 4 года назад

      Real time face attendance system ruclips.net/video/Zp4jgy0es_Y/видео.html

  • @moududhassan3026
    @moududhassan3026 4 года назад +4

    How can I add new image label to pre-trained model, so that my running application can identify new image also? Thanks

  • @riturajmishra3046
    @riturajmishra3046 4 года назад +2

    Sir I am confused should i start learning data science first (I am bsc student) or something other....because data science require lots of input of hardwork and learning and I am unable to see output of it....please guide me

  • @howto7644
    @howto7644 3 года назад +1

    it detects other face also as mine
    no accuracy

  • @arpitcruz
    @arpitcruz 4 года назад +1

    So part 3 will also be there? For covered face recognition?

    • @ExtrinsicTechnology
      @ExtrinsicTechnology 4 года назад

      Real time face attendance system ruclips.net/video/Zp4jgy0es_Y/видео.html

  • @DeepakKumar-uz4xy
    @DeepakKumar-uz4xy 4 года назад +1

    Sir is it possible to use keras model with tensorflow flow model

  • @shirjeelkhan
    @shirjeelkhan 4 года назад

    Superb series sir. Great work go ahead.

    • @ExtrinsicTechnology
      @ExtrinsicTechnology 4 года назад

      Real time face attendance system ruclips.net/video/Zp4jgy0es_Y/видео.html

  • @rohitjagdale4648
    @rohitjagdale4648 3 года назад +1

    Can you please explain use keras layer "Lambda" in this code ?

  • @vishalsharma7268
    @vishalsharma7268 3 года назад +1

    Sir in face_Recognition part it's showing an error
    KeyError Traceback (most recent call last)
    in
    16 # loss
    17 plt.plot(r.history['loss'], label='train loss')
    ---> 18 plt.plot(r.history['val_loss'], label='val loss')
    19 plt.legend()
    20 plt.show()
    KeyError: 'val_loss'

  • @srujanjayraj9490
    @srujanjayraj9490 4 года назад +1

    Hi sir, if possible can you do more videos on Interview experiences......

  • @AmanSingh-re8mw
    @AmanSingh-re8mw 4 года назад +2

    Sir? How can get a Councelling with you. I'm a student

    • @ExtrinsicTechnology
      @ExtrinsicTechnology 4 года назад

      Real time face attendance system ruclips.net/video/Zp4jgy0es_Y/видео.html

    • @anamikamaurya22
      @anamikamaurya22 4 года назад

      Join his paid course..ineuron.ai

  • @alphonseinbaraj7602
    @alphonseinbaraj7602 4 года назад +1

    Sir ,
    In the testfolder ,can we upload any image folder like krish,kumar like that ? or can i upload some images ? becuase i got result like 0 images from 0 classes from test .But train ,200images from 2 classes . that is right .But what about test folder ?

    • @prathameshmore1402
      @prathameshmore1402 3 года назад

      You have to create another folder in the test folder, will work for sure. I had the same problem

  • @Abhishek-jy4ul
    @Abhishek-jy4ul 4 года назад +1

    hello sir great going!! one question is can we recognize human pose by this ?? like the person is standing or sitting ??

  • @harishlakshmanapathi1078
    @harishlakshmanapathi1078 4 года назад +1

    Bro you have forgotten to divide the input image by 255 before feeding into the network!
    Anyways Love Your Videos!!

  • @sharankalyan7
    @sharankalyan7 3 года назад

    Does this algorithm have a maximum limit to classify only 10 different objects/persons ? 4:23 can someone explain ?

  • @sujithramanathan3275
    @sujithramanathan3275 4 года назад

    Thank you Krish Naik for this Tutorial.
    FYI. I got an error with Python 3.7 and found an solution while we are importing packages it should be tensorflow.keras.* instead of keras.* It resolved the issue for me. Hope this information will be helpful.

    • @vaishnavirai7151
      @vaishnavirai7151 4 года назад

      ValueError: operator __getitem__ cannot be overwritten again on class . i am getting this could you tell why?

  • @kikyou8349
    @kikyou8349 Год назад

    How the bounding box get drawn ?

  • @kumaripayal8432
    @kumaripayal8432 3 года назад

    Sir How I print multiple names in a single group image.

  • @rekhakrumkar7239
    @rekhakrumkar7239 3 года назад

    What we have to put inside the test folder? Please tell in detail

  • @nguyendanhhoa3696
    @nguyendanhhoa3696 3 года назад

    after 5 epoch, it shows me a tab named "Figure1" and it has "train loss" and "test loss" lines, and I don't know how to close it, if I click X, code is error. So how I can fix it?

  • @Anonymous-qh6ew
    @Anonymous-qh6ew 4 года назад +1

    How to do multiple face recognition using the given code...I mean what changes do have to do in code??

  • @AdiMehaindroo
    @AdiMehaindroo 2 года назад

    In training process its showing cpu_allocator so i guess its training on cpu and i have a Gpu also so how can i i train it on gpu??

  • @shahnaz1981fat
    @shahnaz1981fat 3 года назад

    cnn is transfer learning?

  • @shachoud
    @shachoud 3 года назад

    Dear @krish, The same code is giving an error to me..
    Please suggest what could have went wrong..
    fit_generator() gives error as
    TypeError: __array__() takes 1 positional argument but 2 were given

  • @VinayKumar-uu4bh
    @VinayKumar-uu4bh 3 года назад

    Sir can u tell us why u used train and test different folders and you explained only train and viewed only train.What about test

  • @sadabratakonar4219
    @sadabratakonar4219 4 года назад +2

    ''' if (pred[0][3] > 0.5): ''' sir, this line seems to be reversed when I am implementing the code. For 3 classes, A, B, C, pred[0][2] should be class C, but I am getting it as class A. Kindly tell what might be the reason and how to fix this??

    • @sravanipvn
      @sravanipvn 4 года назад

      Same issue...based on Probability we would segregate the classes? it should be based on faces right...this s wrong code...

    • @sravanipvn
      @sravanipvn 4 года назад +4

      I have updated the code as below:
      if(pred[:,0]>=1):
      name='A'
      cv2.putText(frame,name, (50, 50), cv2.FONT_HERSHEY_COMPLEX, 1, (0,255,0), 2)
      elif(pred[:,1]>=1):
      name='B'
      cv2.putText(frame,name, (50, 50), cv2.FONT_HERSHEY_COMPLEX, 1, (0,255,0), 2)
      elif(pred[:,2]>=1):
      name='C'
      cv2.putText(frame,name, (50, 50), cv2.FONT_HERSHEY_COMPLEX, 1, (0,255,0), 2)
      elif(pred[:,3]>=1):
      name='D'
      cv2.putText(frame,name, (50, 50), cv2.FONT_HERSHEY_COMPLEX, 1, (0,255,0), 2)
      else:
      cv2.putText(frame,"No face found", (50, 50), cv2.FONT_HERSHEY_COMPLEX, 1, (0,255,0), 2)
      cv2.imshow('Video', frame)
      if cv2.waitKey(1) & 0xFF == ord('q'):
      break

    • @rahilmohammad2913
      @rahilmohammad2913 4 года назад

      @@sravanipvn Hey thanks I have made changes according your code but there's one more problem....I am getting that bounding box around the face but it doesnot display name...Any suggestions would be great

    • @UsamaChishti
      @UsamaChishti 4 года назад

      @@sravanipvn again not work properly

    • @UsamaChishti
      @UsamaChishti 4 года назад

      @@sravanipvn i have 200 face images for each person. Model val_accuracy = 1.000 and accuracy = 1.000 but not know my model behave wrong....it is only predicted one class every time

  • @shrutisusanmathews1271
    @shrutisusanmathews1271 4 года назад

    We wont be able to dynamically add in new persons in this kind of model right? It'll make more sense to use a siamese network

  • @vishalsharma7268
    @vishalsharma7268 3 года назад

    And the file "facefeatures_new_model.h5" is not automatically be saved

  • @MrK-nb7xr
    @MrK-nb7xr 4 года назад +2

    Why don't you create a Udemy course that include various this type of projects

  • @souradipbhadra1406
    @souradipbhadra1406 4 года назад

    I want to test the keras model in real time, that the model gets coninuous frames for predict function.For that i want to run keras model in keras session. How would i do it?

  • @mohamedtimor4114
    @mohamedtimor4114 4 года назад

    hello i'm new to this, i have a question
    does the training done on gpu or cpu?

    • @sarangak.mahanta6168
      @sarangak.mahanta6168 4 года назад

      He said that his training was done in around 20 mins, so obviously it was done on his GPU. You can even train it in your CPU, but it would take hours. I trained 10 epochs using just my 940MX GPU and it was done in 5 mins (for vgg16).

    • @sameerkumarthakur203
      @sameerkumarthakur203 4 года назад

      @@sarangak.mahanta6168 I am facing kernel error while training. Can you help?

  • @yashkhasgiwala7907
    @yashkhasgiwala7907 4 года назад

    I like how easy and quick this method is compared to one-shot learning method and the face_detection library. Indian jhol ftw

  • @diwakarbhatt04
    @diwakarbhatt04 4 года назад

    Is there any algorithm that trains my model with only one image of mine means do not need to provide a complete dataset of images?

    • @rohannegi1877
      @rohannegi1877 2 года назад

      deeplearing is data hungry . the less data u have the bad model will be

  • @ashwinraj8918
    @ashwinraj8918 4 года назад

    Thank you sir

  • @jagjeetsingh3892
    @jagjeetsingh3892 4 года назад

    TypeError: Value passed to parameter 'input' has DataType uint8 not in list of allowed values: float16, bfloat16, float32, float64. This error occured in last file. please help

  • @Hitesh-Salgotra
    @Hitesh-Salgotra 4 года назад +1

    any one plz help!
    i got train_ accuracy and val_accuracy ==1.0
    and train_loss and val_loss = 0
    but when iam using another person's face it is showing the same face of my name why this is so

  • @anjanisriramula9205
    @anjanisriramula9205 4 года назад

    sir please upload a video on face mask recognition

  • @sumantablr13
    @sumantablr13 4 года назад +1

    please any one help me on
    Bellow command raised the error
    if (pred[0][3] > 0.2)
    index 3 is out of bounds for axis 0 with size 2

    • @prathameshmore1402
      @prathameshmore1402 3 года назад

      Predicted result is having some problem. Shape of predicted result is 2 dimensional, while we should have 4 dimensional

  • @raghavagrawal9240
    @raghavagrawal9240 4 года назад

    Sir, can you please make a tutorial on facial expression recognition problem, with 'fer2013' dataset?

  • @arjyabasu1311
    @arjyabasu1311 4 года назад

    Sir, how to deploy this project on heroku?

    • @krishnaik06
      @krishnaik06  4 года назад

      For the model u have to create the api...and expose in the front end

    • @arjyabasu1311
      @arjyabasu1311 4 года назад

      For this type of project how should the front end look like & how can we develop the app.py ?

    • @arjyabasu1311
      @arjyabasu1311 4 года назад

      If you can give any reference that too will be of great help

    • @krishnaik06
      @krishnaik06  4 года назад

      Sure will do a project of that kind

    • @arjyabasu1311
      @arjyabasu1311 4 года назад

      @@krishnaik06 Thank you so much sir !!

  • @Eren-jeager7
    @Eren-jeager7 4 года назад

    Mine is showing error of val_loss and val_acc keyError...can you pls help me

    • @chaimaebelemoualem4659
      @chaimaebelemoualem4659 4 года назад

      plt.plot(r.history['loss'], label='train loss')
      plt.plot(r.history['val_loss'], label='val loss')
      plt.legend()
      plt.show()
      plt.savefig('LossVal_loss')
      # accuracies
      plt.plot(r.history['accuracy'], label='train acc')
      plt.plot(r.history['val_accuracy'], label='val acc')
      plt.legend()
      plt.show()
      plt.savefig('AccVal_acc')

    • @sunilms805
      @sunilms805 4 года назад

      @@chaimaebelemoualem4659 AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'assign'. i'm getting this error do you know the solution

  • @devikams6479
    @devikams6479 4 года назад

    from tensorflow.python.keras.saving.saved_model import export_saved_model
    ImportError: cannot import name 'export_saved_model'
    Does anyone know the solution?

  • @djeffalfarouk1285
    @djeffalfarouk1285 4 года назад

    hello sir i got this error while trying to load my trained model from google colab
    ValueError: Unknown layer: Functional
    can anyone help me please

    • @vinayakparab6260
      @vinayakparab6260 4 года назад

      make sure your tensorflow and keras versions match on local and google colab

    • @dhruvmittal4992
      @dhruvmittal4992 3 года назад

      I am facing the same problem
      ValueError: Unknown layer: Functional
      any solutions?

  • @kratikalohani4715
    @kratikalohani4715 Год назад

    share datasets please

  • @abdelilahdehaoui5665
    @abdelilahdehaoui5665 4 года назад +1

    i keep getting 100% accuracy on wrong result :3 . i have 4 classes but the classifier recognize only two of them

    • @prathameshmore1402
      @prathameshmore1402 3 года назад

      Exactly, I'm having the same problem. Were you able to solve your issue? If yes, then plz tell me how to do it!

    • @bnikhilraj1381
      @bnikhilraj1381 3 года назад +1

      hey can you send "facefeatures_new_model.h5" this file pls Iam unable to find

  • @sumantablr13
    @sumantablr13 4 года назад

    Krish Nice video..I follow your code and created the image Dataset.
    When I trained the model getting bellow error,Please help me
    Bellow command raised the error
    if (pred[0][3] > 0.2)
    index 3 is out of bounds for axis 0 with size 2

  • @vaishnavirai7151
    @vaishnavirai7151 4 года назад

    File "C:\Users\Idea\AppData\Roaming\Python\Python36\site-packages\keras_preprocessing\image\utils.py", line 111, in load_img
    raise ImportError('Could not import PIL.Image. '
    ImportError: Could not import PIL.Image. The use of `load_img` requires PIL.

    • @ashutoshbarkule3573
      @ashutoshbarkule3573 4 года назад

      Install pillow library....It is use for image.

    • @gitaiwane1457
      @gitaiwane1457 3 года назад

      @@ashutoshbarkule3573 requirement satisfied but still error occur

  • @hasanmirza8862
    @hasanmirza8862 4 года назад +1

    I trained dataset of 80 people and its not recognizing anyone now.

  • @deki90to
    @deki90to 4 года назад

    Ugly code