Skip to content

Commit

Permalink
modify face_recogniser
Browse files Browse the repository at this point in the history
  • Loading branch information
sree1026 committed May 14, 2019
2 parents 52c9c11 + 67896af commit 61e27e6
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 24 deletions.
48 changes: 27 additions & 21 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions Face_Recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import distutils
import sklearn.neighbors.typedefs
import configparser

import screeninfo

# Load the Knn model
knn = joblib.load('Dependencies/KNN_classifier_model.sav')
Expand Down Expand Up @@ -143,6 +143,7 @@ def face_recognizer():
:return:It displays the image obtained from camera with bounding and text if faces are detected.
"""
# Initializes a variable for Video Capture
screen_detail = screeninfo.get_monitors()[0]
cap = cv2.VideoCapture(0)
frame_array = []
while True:
Expand Down Expand Up @@ -190,16 +191,26 @@ def face_recognizer():
person_name = database_list[0][0]

# Draw the bounding box and write name on top of the face.

frame = draw_rectangle(frame, (cal_left, cal_top), (cal_right, cal_bottom), frame_rect_color, False)
frame = draw_rectangle(frame, (cal_left, cal_top - 30), (cal_right, cal_top), frame_rect_color, True)
frame = write_text(frame, person_name, (cal_left + 6, cal_top - 6), frame_text_color)

frame_array.append(frame)
cv2.imshow('Frame: Press q to quit the frame', frame)


window_name = 'Results of Recognition: Press q to quit the window'
# Results are displayed in full screen
cv2.namedWindow(window_name, cv2.WND_PROP_FULLSCREEN)
cv2.moveWindow(window_name, screen_detail.x - 1, screen_detail.y - 1)
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
cv2.imshow(window_name, image)


# Break the loop when 'q' is pressed
if cv2.waitKey(25) & 0xff == ord('q'):
video_write(frame_arraywq
)
video_write(frame_array)
break
else:
break
Expand Down
97 changes: 97 additions & 0 deletions requirements_Ubuntu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
absl-py==0.7.0
altgraph==0.16.1
astor==0.7.1
attrs==18.2.0
auto-py-to-exe==2.5.2
backcall==0.1.0
beautifulsoup4==4.7.1
bottle==0.12.16
bottle-websocket==0.2.9
bs4==0.0.1
certifi==2018.11.29
chardet==3.0.4
Click==7.0
click-plugins==1.0.4
cligj==0.5.0
configparser==3.7.4
cycler==0.10.0
Cython==0.29.5
darkflow==1.0.0
decorator==4.3.0
descartes==1.1.0
dlib==19.16.0
Eel==0.10.4
face-recognition==1.2.3
face-recognition-models==0.3.0
Fiona==1.8.4
future==0.17.1
gast==0.2.2
geopandas==0.4.0
gevent==1.4.0
gevent-websocket==0.10.1
google-images-download==2.5.0
greenlet==0.4.15
grpcio==1.19.0
h5py==2.9.0
idna==2.8
imutils==0.5.2
ipython==7.2.0
ipython-genutils==0.2.0
jedi==0.13.2
Keras==2.2.4
Keras-Applications==1.0.7
Keras-Preprocessing==1.0.9
kiwisolver==1.0.1
labelImg==1.8.1
lxml==4.2.4
macholib==1.11
Markdown==3.0.1
matplotlib==3.0.2
mock==2.0.0
munch==2.3.2
networkx==2.2
nms==0.1.6
numpy==1.16.2
opencv-python==3.4.4.19
osmnx==0.9
pandas==0.24.1
parso==0.3.1
pbr==5.1.2
pefile==2018.8.8
pexpect==4.6.0
pickleshare==0.7.5
Pillow==5.3.0
pprint==0.1
prompt-toolkit==2.0.7
protobuf==3.6.1
ptyprocess==0.6.0
Pygments==2.3.1
PyInstaller==3.4
pyparsing==2.3.1
pyproj==1.9.6
PyQt5==5.10.1
python-dateutil==2.8.0
pytz==2018.9
PyYAML==3.13
requests==2.21.0
Rtree==0.8.3
scikit-learn==0.20.3
scipy==1.2.0
screeninfo==0.3
selenium==3.141.0
Shapely==1.7a1
sip==4.19.8
six==1.12.0
sklearn==0.0
soupsieve==1.8
tensorboard==1.13.0
tensorflow==1.13.1
tensorflow-estimator==1.13.0
termcolor==1.1.0
traitlets==4.3.2
urllib3==1.24.1
wcwidth==0.1.7
Werkzeug==0.14.1
whichcraft==0.5.2
xlrd==1.2.0
XlsxWriter==1.1.2

0 comments on commit 61e27e6

Please sign in to comment.