Face Detection Project For Beginners | OpenCV Face Detection Mini Project with Code

Sdílet
Vložit
  • čas přidán 18. 06. 2020
  • In this quick video we will be using OpenCV Haar Cascade classifier to build a Face Detection system. You can easily modify the project to detect hands, eyes or build your own custom classifier.
    Complete Code Download:
    drive.google.com/file/d/1pomC...
    #facedetection #opencvfacedetect #pythontutorial #pythonprojects
    Recommended Learning Path:
    👉 drive.google.com/file/d/1qYeP...
    Code Heroku FREE ML Career Track:
    👉 www.codeheroku.com/ml
    Our Popular Uploads
    Movie Recommendation System
    👉 • Building a Movie Recom...
    👉 • Movie Recommendation S...
    Join WhatsApp Group: chat.whatsapp.com/CXhVnNGEFXj...
    Follow us on:
    Instagram: / codeheroku
    Twitter: / codeheroku
    LinkedIn: / mihirthakkar01
    Email: hello@codeheroku.com
    WhatsApp: +91-9967578720
  • Věda a technologie

Komentáře • 102

  • @EarthCircuits
    @EarthCircuits Před rokem

    I am really very proud about you since I was searching many explanation nothing is clear but your demonstration made my code successful and very cleanly understood the concept. Thank you so much

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

    i'm getting some error after writting the code
    please help
    descriptor 'detectMultiScale' for 'cv2.CascadeClassifier' objects doesn't apply to a 'numpy.ndarray' object

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

    My code runs without any errors but the video capture frame is constantly showing as 'not responding'. Could you help me out with that please?

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

    In the cap.read() function it is giving me an exception : " unknown C++ exception from OpenCV code"...
    Please help

  • @muhammadzohaibkhan2707

    how to used in weapon detection same as face detection please kindly define and which cascade classifier library used both work as well

  • @saurabhkalra3042
    @saurabhkalra3042 Před 3 lety

    can you tell me how to do like this with python:
    detect an image on an application and if the image is not there search for the image again
    and if it's there then do something.

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

    Well I hav a challenge for you....do exactly the same you did in the video above, but 1) add a centerpoint and 2) have a tracking optical flow line starting from that centerpoint of the bounding box....is it possible???

  • @v1hana350
    @v1hana350 Před 2 lety

    How to calculate accuracy and loss functions by using the face recognition library?

  • @Gautamkumar-ls9fs
    @Gautamkumar-ls9fs Před 3 lety

    need help. i'm not able to run code as webcam open for sometime and sudden crashed.

  • @ib2sthok127
    @ib2sthok127 Před 2 lety

    How can i save the detected face once if the same face detected again

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

    How to rectify !_src. empty() in function cvtColor error

  • @rujrabhatt8005
    @rujrabhatt8005 Před 4 lety +1

    sure do!!! nice detection technique !!

  • @user-ry6uk4kz2t
    @user-ry6uk4kz2t Před 5 měsíci +1

    Thanku so much sir

  • @baraksmash
    @baraksmash Před 3 lety

    Thank you!

  • @yassineelyagoubi5170
    @yassineelyagoubi5170 Před 3 lety

    that was great thanks

  • @jesti988
    @jesti988 Před 4 lety

    sir, is this code work in jupyter notebook?

  • @abdulzaheer2813
    @abdulzaheer2813 Před 2 lety

    hello play provide haarcascade to how detect a group of people in a pic

  • @shivamsaxena4214
    @shivamsaxena4214 Před 2 lety

    I am getting an error overload resolution failed

  • @vinsmokearifka
    @vinsmokearifka Před 2 lety

    How to improve face detection in raspi?

  • @jatinkumar4410
    @jatinkumar4410 Před 4 lety +1

    Interesting...

  • @user-kz1hd5rp2h
    @user-kz1hd5rp2h Před 9 měsíci

    thnak you again

  • @nanzz972
    @nanzz972 Před 3 lety

    it's not working on vs code sir

  • @mdarifurrahmananik3973

    do it without haar cascade...use any other algo

  • @randomthings191
    @randomthings191 Před 2 lety

    5:03 bhaiya aap to mere teacher ki traha bol rhe ho

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

    👍🏿👍🏿👍🏿👍🏿👍🏿

  • @kallurinavyasri3307
    @kallurinavyasri3307 Před 3 lety

    Can you please tell me which editor are you using

  • @mrwaseemmalik5766
    @mrwaseemmalik5766 Před 3 lety

    Nice

  • @bikramjeetsingh2067
    @bikramjeetsingh2067 Před 3 lety

    Pls help me.....it is showing error in the detections=cascade_clasifier.detectMultiScale(frame, 1.3, 5)
    And showing cv2.error:opencv(4.4.0)

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

      you need to download the haarcascade_frontalface_default.xml from the opencv github: github.com/opencv/opencv/tree/master/data/haarcascades
      and add it to the folder where you run your python script

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

    error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

  • @Shahnawaz_._shaikh.
    @Shahnawaz_._shaikh. Před rokem +1

    @code heroku bhai plz isko further extend karona emotion detection per plz bhai

  • @josephdogani189
    @josephdogani189 Před 4 lety

    Wow

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

    Everyone is getting error

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

    cap = cv2.VideoCapture(0)
    AttributeError: module 'cv2' has no attribute 'VideoCapture'
    help me fix this error please

  • @sohamdasms.it.cyber_securi7231

    With gui this project please 🙏

  • @Viber-Hrishav
    @Viber-Hrishav Před 2 měsíci

    Sir how to fix break error.

  • @Shahnawaz_._shaikh.
    @Shahnawaz_._shaikh. Před rokem +1

    Sir, pls sir ,can u add emotion recognition in this plz sir ,i understand this far better than other videos

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

    GREAT WORK

    • @jaxtyncrew7664
      @jaxtyncrew7664 Před 3 lety

      you prolly dont give a shit but if you're bored like me atm then you can watch all of the latest series on InstaFlixxer. Been streaming with my gf for the last few weeks :)

    • @rylancarl4770
      @rylancarl4770 Před 3 lety

      @Jaxtyn Crew Yup, been watching on InstaFlixxer for months myself :)

  • @sagarpatil-wp9jx
    @sagarpatil-wp9jx Před 4 lety +4

    iam getting an error saying gray is not defined how to resolve it??

    • @CodeHeroku
      @CodeHeroku  Před 4 lety +1

      Your variable name should be "frame" not gray.
      frame = cv2.cvtColor(frame, 0)
      detections = cascade_classifier.detectMultiScale(frame,scaleFactor=1.3,minNeighbors=5)

    • @sagarpatil-wp9jx
      @sagarpatil-wp9jx Před 4 lety

      @@CodeHeroku okay thanks

    • @sandhyasri7229
      @sandhyasri7229 Před 3 lety

      @@sagarpatil-wp9jx Hii

  • @aditithakre7722
    @aditithakre7722 Před 3 lety +16

    Please give me ideas for Mini project 3rd year CSE

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

    please guide me what is the solution of this;
    OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wwma2wne\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

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

      update your opencv
      pip install opencv-python==4.4.0.44
      or use this version
      pip install opencv-python==4.4.0.42 it is stable version

    • @salmanahmed9056
      @salmanahmed9056 Před 3 lety

      @@tahaqureshi7293 THANKS BRO NOW IT COME WITH NEW ERROR WITH GRAY LINE CODE CAN YOU CLEARIFY IT?

    • @tahaqureshi7293
      @tahaqureshi7293 Před 3 lety

      @@salmanahmed9056 import numpy as np
      import cv2
      cap = cv2.VideoCapture(0)
      while(cap.isOpened()): # check !
      # capture frame-by-frame
      ret, frame = cap.read()
      if ret: # check ! (some webcam's need a "warmup")
      # our operation on frame come here
      gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
      # Display the resulting frame
      cv2.imshow('frame', gray)
      if cv2.waitKey(1) & 0xFF == ord('q'):
      break
      # When everything is done release the capture
      cap.release()
      cv2.destroyAllWindows()

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

    Interesting for novice like me. Great video

    • @CodeHeroku
      @CodeHeroku  Před 4 lety +1

      Thanks Prasad! You are the best :)

  • @shreyamishra5824
    @shreyamishra5824 Před 4 lety +1

    After writing whole code I am getting error as (Assertion failed)! empty().please help

    • @shreyamishra5824
      @shreyamishra5824 Před 4 lety

      Error is showing in the line detections= cascade_classifier.detectMultiScale(frame,1.3,5)...and my webcam is nit opening 😕pls help

    • @sukhadeothul3818
      @sukhadeothul3818 Před 3 lety

      Yup same things happening with me

    • @salmanahmed9056
      @salmanahmed9056 Před 3 lety

      same issue

    • @rahulvishwakarma_ashok
      @rahulvishwakarma_ashok Před 3 lety

      @@salmanahmed9056 faces=face_cascade.detectMultiScale(gray,1.1,4)
      Try this value and let me knw if this works fine for u

  • @cycobot8909
    @cycobot8909 Před 3 lety

    Nice video, but i have this error coming up, NameError: name 'gray' is not defined. Thanks in Advance if someone solves this problem :)

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

    shit every one is getting error

  • @moralesarvinkurta.7820
    @moralesarvinkurta.7820 Před 2 lety +3

    how to fix cv2 error?

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

    Well its working tho. But the AI not detect my face *BUT* detect my eyes XD

  • @ankitajadhav5
    @ankitajadhav5 Před 2 lety

    how to close webcam

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

    Konasi language use ki hai aur konasa editor

  • @veerjoshi4448
    @veerjoshi4448 Před 3 lety +7

    U didnt define gray

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

    It throws nameError : name “gray” is not defined.

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

    Wrong code.. u have errors in code.

    • @atharvagupta8144
      @atharvagupta8144 Před 3 lety

      yes there is an empty source code error showing after compilation

    • @shivamverma1117
      @shivamverma1117 Před 3 lety

      @@atharvagupta8144 download cascaded file.