Coder Social home page Coder Social logo

kmhmubin / face-recognition-attendance-system Goto Github PK

View Code? Open in Web Editor NEW
432.0 11.0 181.0 369.33 MB

Face Detection | Recognition | Attendance

License: MIT License

Python 100.00%
face-recognition face-detection attendance-system python opencv pillow camera numpy pandas shutil-python

face-recognition-attendance-system's Introduction

Banner

Hi there

Glad to see you here!

I'm K M H Mubin. I'm a final year student pursuing Bachelors's in Computer Science πŸŽ“ from North South University πŸ›. I'm a passionate learner who's always willing to learn and work across technologies. I love to explore new technologies and try to solve real-life problems ✨. Apart from that I also love to guide and mentor newbies πŸ‘¨πŸ»β€πŸ’». I'm currently into Full stack Development πŸ•ΈοΈ and working on Machine Learning πŸ€“.

Talking about personal stuffs:

  • πŸ‘¨πŸ½β€πŸ’» I’m currently working on something cool πŸ˜‰

  • 🌱 I’m currently learning Full stack development and UI design.

  • πŸ“ I regulary write articles on Mubin's Blog

  • πŸ’¬ Ask me about anything KMH Mubin ! I am happy to help.

  • πŸ“« How to reach me KMH Mubin

Connect with me:

kmhmubin kmhmubin kmhmubin kmhmubin kmhmubin kmhmubin mubinsodyssey

Languages and Tools:

bash bootstrap c css3 django electron express figma flask git heroku html5 illustrator javascript linux mysql nodejs opencv photoshop postgresql postman python react sass selenium sqlite tailwind xd


πŸ“• Latest Articles


πŸ“ˆ My Dev Statistics:



⚑ My GitHub Statistics


✨ My followers

Magicianred
Simone Paolucci
lucasrmagalhaes
Lucas MagalhΓ£es
shakiliitju
Md. Shakil Hossain
rakib3004
Md. Rakib Trofder
prathimacode-hub
Prathima Kadari
DionneNoellaBarretto
Dionne Noella
smrjans
Smrutiranjan Sahu
Showrin
Showrin Barua
arjun-ms
Arjun M S
mariasalvadora
Maria
bograh
Bernard Ograh
xSomoy
John Deadman
CojocAdrian
Cojoc Adrian
VladBluestorm
VladBluestorm

Need inspiration for your own README? Check out How Did GitHub Profile READMEs Become the Best? Find out


I love connecting with different people from around the world, so if you want to be my friend, feel free to reach out and introduce yourself and don’t just say hi, tell me about yourself 😊 πŸ’œ

face-recognition-attendance-system's People

Contributors

adeetyau avatar ciroiriarte avatar dependabot[bot] avatar farhattasnim avatar kmhmubin avatar krishvsoni avatar mastercruelty avatar sarvesh-2008 avatar staticshreyas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

face-recognition-attendance-system's Issues

Assembling Everything

Assembling everything both hardware and software. Test our machine. Finding bugs.

Attandence

What if the Their are Twin students there will be a confusion for attandence

Multiple image capture

The system is capturing multiple images and saving it in the folder. This might overload the server

Error Option 4

********** WELCOME MENU **********
[1] Check Camera
[2] Capture Faces
[3] Train Images
[4] Recognize & Attendance
[5] Auto Mail
[6] Quit
Enter Choice: 4
Traceback (most recent call last):
File "main.py", line 101, in
mainMenu()
File "main.py", line 47, in mainMenu
RecognizeFaces()
File "main.py", line 95, in RecognizeFaces
Recognize.recognize_attendence()
File "/Users/shreyasmore/Downloads/OpenSourceRepo/Face-Recognition-Attendance-System/FRAS/Recognize.py", line 30, in recognize_attendence
gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.5.1) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-yvyj7qlp/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Buying Component

To complete this project we need to buy some components. Those components can build the face recognition system.
All those products are bought from this link below.
https://www.techshopbd.com/

Product Name

  • HD WEBCAME

  • Raspberry Pi

  • MicroSD card

  • Battary

  • wires & other

Main.py has Python 2 code

The READMe.md file says this repo was built using Python 3.7. However, print statements in main.py in the Raspberry Pi files/ directory is Python 2:

print 'Training Done . . . '
print ' Done 2 . . . '

Learning Tools

To complete this project we need to learn some hardware and software tools which will be used in the whole project. We need to understand how tools work and how we can implement in our project.

Tools learning

  • Webcam

  • Raspberry Pi

  • Raspbian Os

  • Python

  • OpenCV

Enter Choice: 4 Error

********** WELCOME MENU **********
[1] Check Camera
[2] Capture Faces
[3] Train Images
[4] Recognize & Attendance
[5] Auto Mail
[6] Quit
Enter Choice: 4
[ERROR:0] VIDEOIO(DSHOW): raised unknown C++ exception!

Traceback (most recent call last):
File ".\main.py", line 101, in
mainMenu()
File ".\main.py", line 41, in mainMenu
CaptureFaces()
File ".\main.py", line 79, in CaptureFaces
mainMenu()
File ".\main.py", line 44, in mainMenu
Trainimages()
File ".\main.py", line 88, in Trainimages
mainMenu()
File ".\main.py", line 47, in mainMenu
RecognizeFaces()
File ".\main.py", line 95, in RecognizeFaces
Recognize.recognize_attendence()
File "C:\Users\Administrator\Downloads\Compressed\Face-Recognition-Attendance-System-master\FRAS\Recognize.py", line 30, in recognize_attendence
gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Not working

i have installed everything and followed everything but when i try to run the project nothing happens not even an error comes
py main.py does not do anything
Screenshot (128)

Enhancement

I want to add new features on it in which

1.the admin can calculate the total working hours or active hours of the employee which will show the total active hours and,
2. improve the UI of the system
Can I work on this??

Email attendance updated

Hi sir ,
After recognition it is not sending to my email.can you please help me to fix this issue.

Learning Image Processing

Learning how to apply facial recognition to video streams, building a complete deep learning pipeline for image classification. We need to learn OpenCV.

Learning checklist

  • Face Recognition

  • How do computer see an IMAGE

  • What are the feature

  • Face Algorithm

  • How an Algorithm work

  • Local Binary Patterns Histograms(LBPH)

  • OpenCV

  • OpenCV Cascade

  • LBPH work with OpenCV

mian.py

python3: can't open file 'main.py': [Errno 2] No such file or directory

Capturing camera opening is too slow

Hi ,

I have faced two issue

  1. Check Camera option opens camera but not closes after close button click
  2. Capture image option : camera opening is too slow and movement is not working

Attendance Problem

during the step 4, it recognizes the person, but the camera stays on and nothing happens. Camera stays on recognizing the person and it never says attendance successful.

Unable to share mail

Traceback (most recent call last):
File "C:\Users\Hp\Downloads\Face-Recognition-Attendance-System-master\FRAS\automail.py", line 17, in
yag.send(
File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\site-packages\yagmail\sender.py", line 156, in send
self.login()
File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\site-packages\yagmail\sender.py", line 210, in login
self._login(self.credentials)
File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\site-packages\yagmail\sender.py", line 229, in _login
self.smtp.login(self.user, password)
File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\smtplib.py", line 750, in login
raise last_exception
File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\smtplib.py", line 739, in login
(code, resp) = self.auth(
File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\smtplib.py", line 662, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (534, b'5.7.9 Application-specific password required. Learn more at\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor z8-20020a170902ccc800b0016363b15acasm10419980ple.112 - gsmtp')

Option 3: Train Image - Path Error //Help!

Traceback (most recent call last):
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\main.py", line 101, in
mainMenu()
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\main.py", line 41, in mainMenu
CaptureFaces()
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\main.py", line 79, in CaptureFaces
mainMenu()
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\main.py", line 44, in mainMenu
Trainimages()
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\main.py", line 86, in Trainimages
Train_Image.TrainImages()
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\Train_Image.py", line 40, in TrainImages
faces, Id = getImagesAndLabels("TrainingImage")
File "C:\Users\Guddu\Face-Recognition-Attendance-System\FRAS\Train_Image.py", line 14, in getImagesAndLabels
imagePaths = [os.path.join(path, f) for f in os.listdir(path)]
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'TrainingImage'

Research Materials

Addons to existing project

hello, Mubin myself Rahul I loved the efforts u have taken to do this project I would like to know how to generate a single CSV file for attendance details for a particular day and also how to add emotion detection to it.

cv2 error

Traceback (most recent call last):
File "C:\Users\sushi\Downloads\Face-Recognition-Attendance-System-master\Face-Recognition-Attendance-System-master\FRAS\Capture_Image.py", line 2, in
import cv2
ModuleNotFoundError: No module named 'cv2'

Process finished with exit code 1
Screenshot (52)

problem in option 4

Traceback (most recent call last):
File "C:\Users\lssik\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexes\base.py", line 3361, in get_loc
return self._engine.get_loc(casted_key)
File "pandas_libs\index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Id'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lssik\AppData\Roaming\Python\Python38\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
runfile('C:/Users/lssik/Desktop/New folder/Face-Recognition-Attendance-System/Face-Recognition-Attendance-System/FRAS/main.py', wdir='C:/Users/lssik/Desktop/New folder/Face-Recognition-Attendance-System/Face-Recognition-Attendance-System/FRAS')
File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1\plugins\python-ce\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/lssik/Desktop/New folder/Face-Recognition-Attendance-System/Face-Recognition-Attendance-System/FRAS/main.py", line 101, in
mainMenu()
File "C:/Users/lssik/Desktop/New folder/Face-Recognition-Attendance-System/Face-Recognition-Attendance-System/FRAS/main.py", line 47, in mainMenu
RecognizeFaces()
File "C:/Users/lssik/Desktop/New folder/Face-Recognition-Attendance-System/Face-Recognition-Attendance-System/FRAS/main.py", line 95, in RecognizeFaces
Recognize.recognize_attendence()
File "C:\Users\lssik\Desktop\New folder\Face-Recognition-Attendance-System\Face-Recognition-Attendance-System\FRAS\Recognize.py", line 39, in recognize_attendence
aa = df.loc[df['Id'] == Id]['Name'].values
File "C:\Users\lssik\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\frame.py", line 3455, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\lssik\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexes\base.py", line 3363, in get_loc
raise KeyError(key) from err
KeyError: 'Id'

Option 4 Error Path

Traceback (most recent call last):
File "main.py", line 101, in
mainMenu()
File "main.py", line 47, in mainMenu
RecognizeFaces()
File "main.py", line 95, in RecognizeFaces
Recognize.recognize_attendence()
File "/Users/shreyasmore/Downloads/OpenSourceRepo/Face-Recognition-Attendance-System/FRAS/Recognize.py", line 12, in recognize_attendence
recognizer.read("TrainingImageLabel"+os.sep+"Trainner.yml")
cv2.error: OpenCV(4.5.1) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-yvyj7qlp/opencv/modules/core/src/persistence.cpp:717: error: (-49:Unknown error code -49) Input file is invalid in function 'open'

cv2 Error

Hi @kmhmubin
I'm facing some problems with the cv2 error on option 1,2,4 and I couldn't solve it.
Here the error:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Thanks

Writing Code

Writing the code for face detection and the attendance system.

Bug fixes

Hey, I have the code which fixes the 'bugs', please reply if you want them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.