Industrial Training Report
Industrial Training Report
at
INTERNSHALA
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD
OF THE DEGREE OF
BACHELOR OF ENGINEERING
SUBMITTED BY:
Md Samir Haque
19BCS2234
1
CONTENTS
Certificate by Company/Industry/Institute 3
Abstract 4
Acknowledge 5
About the company/Industry/Institute 6
Definitions,Acronyms and Abbreviations 7
INTRODUCTION 8
Feasibility 11
Methodology 12
Diagrams 14
Implementation 16
Conclusion 20
2
CERTIFICATE BY COMPANY / INDUSTRY/ INSTITUTE
Instructions
Credential ID : 98DD5791-EDB9-58FF-7B7F-B5B25FA02FE43
3
CHANDIGARH UNIVERSITY, GHARUAN, MOHALI
CANDIDATE'S DECLARATION
I Md Samir Haque hereby declare that I have undertaken six weeks industrial training at Internshala
during a period from 08/06/2021 to 12/07/2021 in partial fulfillment of requirements for the award of
GHARUAN, MOHALI. The work which is being presented in the training report submitted to
The four/six weeks industrial training Viva–Voce Examination of PROJECT has been held on
and accepted.
4
ABSTRACT
I have successfully completed Programming with Python training from Internshala Trainings. This
training helped a lot in building a strong base for Coding and development. The course is beautiful,
with well organised sections and bite sized lessons. With this learning, I was able to design the
Face recognition technology is a biometric technology, which is based on the identification of facial
features of a person. People collect the face images, and the recognition equipment automatically processes
the images. The paper introduces the related researches of face recognition from different perspectives. The
paper describes the development stages and the related technologies of face recognition. We introduce the
research of face recognition for real conditions, and we introduce the general evaluation standards and the
general databases of face recognition. We give a forward-looking view of face recognition. Face
recognition has become the future development direction and has many potential application prospects.
To perform this task, we have designed the front-end part through Python, and the back-end part
This way, I have designed the Face Recognition and Identification. I have successfully
executed it, implemented it and finally my project is ready to be used and published.
5
ACKNOWLEDGEMENT
In the present world of competition there is a race of existence in which those are having will
to come forward succeed. Project is like a bridge between theoretical and practical working.
With this willing I joined this particular project. I would like to express my special thanks of
gratitude to my college Chandigarh University who gave me the golden opportunity to do this
wonderful project of Face Recognition and Identification Using Python Project. This training
helped a lot in building a strong base for Android App Development. The course is beautiful,
with well organised sections and bite sized lessons. Secondly I would also like to thanks my
friends who helped me a lot infinalizing this project within a limited time frame.
Md Samir Haque
19BCS2234
CSE 11/C
6
ABOUT THE COMPANY / INDUSTRY/ INSTITUTE
Internshala is a technology company on a mission to equip students with relevant skills & practical
exposure to help them get the best possible start to their careers. Imagine a world full of freedom and
possibilities. A world where you can discover your passion and turn it into your career. A world
where you graduate fully assured, confident, and prepared to stake a claim on your place in the
world.
1. Internship and job posting: Organization & individuals looking to hire interns and/or full-
time employees can post their internship and/or job requirement on Internshala. Currently,
internships are posted for free and a fee of INR 4999 is charged from the employers for
2. Internship and job search: Internship and job seekers from all over India can search and
apply for internships and jobs relevant to their coursework and interest free of cost.
multiple disciplines (Machine Learning, Web Development, Digital Marketing, Java, French
and several others) which students can do from the comfort of their homes and learn the skills
Internshala reserves the right to add/remove any product and service at its sole discretion or change
7
Definitions, Acronyms and Abbreviations
1. OS : The OS is the Operating System within which you create your app. (Do not confuse it with
Open Source!)
2. UX : UX, standing for User Experience, refers to how a user perceives, reacts, or feels
3. UI : UI (User Interface) is the design of the mobile app with a focus on the experience of the
4. Backend : Backend development is typically talked about in terms of databases, which provide a
5. Push Notification : A push notification is a short message that developers can send to app users
even when said users don’t have their mobile applications open. The messages are displayed on
6. API : API stands for Application Programming Interface. Together with backend databases, APIs
provide a set of fixed rules and specifications that define interactions between software
components.
7. SDK : SDK stands for Software Development Kit, which is a programming package that enables
8. APK : An APK is an Android Application Package. It is a file format that is used to deliver
9. JSON : JSON stands for JavaScript Object Notation. It is a lightweight data-interchange format
that is easy for humans to read and write and for machines to parse and generate.
10. Bugs : Bugs are any sort of unintended behavior in your mobile app.
8
INTRODUCTION
What if the machine is able to detect objects automatically in an image without human involvement? Let us
see: Face detection can be such a problem where we detect human faces in an image. There might be slight
differences in human faces, but after all, it is safe to say that there are specific features that are associated
with all human faces. Various face detection algorithms are there but the Viola-Jones Algorithm is the
oldest method that is also used today.
Face detection is generally the first step towards many face-related applications like face recognition or
face verification. But, face detection has very useful applications. One of the most successful applications
of face detection is probably “photo-taking”.
Example: When you click a photo of your friends, the camera in which the face detection algorithm has
built-in detects where the faces are and adjusts focus accordingly.
Generally, Face Recognition is a method of identifying or verifying the identity of an individual by using
their face. Various algorithms are there for face recognition but their accuracy might vary
9
The Technology used:
PYTHON
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a
simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic
typing, together with its interpreted nature, make it an ideal language for scripting and rapid application
development in many areas on most platforms. The Python interpreter is easily extended with new
functions and data types implemented in C or C++ (or other languages callable from C). Python is also
suitable as an extension language for customizable applications.
OpenCV
OpenCV is an image and video processing library and is used for image and video analysis, like facial
detection, license plate reading, photo editing, advanced robotic vision, optical character recognition, and a
whole lot more.
Dlib
The dlib library, maintained by Davis King, contains our implementation of “deep metric learning” which
is used to construct our face embeddings used for the actual recognition process.
To install the face_recognition, install the dlib package first.
Face_Recognition
The face recognition library, created by Adam Geitgey, wraps around dlib’s facial recognition
functionality, and this library is super easy to work with and we will be using this in our code. Installation
of dlib library is prior before installation of face recognition.
Now, install face_recognition module using the below command.
10
Feasibility Study:
A feasibility study evaluates the project's potential for success; therefore, perceived objectivity is an
important factor in the credibility of the study for potential investors and lending institutions. It must
therefore, be conducted with an objective, unbiased approach to provide information upon which decisions
can be based. Here, we discuss 3 major feasibility studies required for our project.
Operational Feasibility
Operational feasibility is the measure of how well a proposed system solves the problems with the users.
Operational feasibility is dependent on human resources available for the project and involves projecting
whether the system will be used if it is developed and implemented. The project is operationally feasible
for the users as nowadays almost all the teachers/staffs are familiar with digital technology.
Economic Feasibility
Economic feasibility defines whether the expected benefit equals or exceeds the expected costs. It is also
commonly referred to as cost/benefit analysis. The procedure is to determine the benefits and the savings
expected from the system and compare them with the costs. A proposed system is expected to outweigh the
costs. This is a small project with no cost for development. The system is easy to understand and use.
Therefore, there is no need to spend on training to use the system. This system has the potential to grow by
adding functionalities for students as well as teachers. This can Hence, the project could have economic
benefits in the future.
Technical Feasibility
Technical feasibility is carried out to determine whether the project is feasible in terms of software,
hardware, personnel, and expertise, to handle the completion of the project. It considers determining
resources for the proposed system. As the system is developed using python, it is platform independent.
Therefore, the users of the system can have average processing capabilities, running on any platform. The
technology is one of the latest hence the system is also technically feasible.
11
Methodology :
Scoping and planning
This phase focuses on the planning of the project’s overall direction, including the definition of the
project’s scope, objectives, and timelines. The deliverable from this phase is this Design Plan.
Conceptual design
In this phase, the conceptual design of the methodology is developed and research on existing
methodologies is conducted.
Development of methodology
The actual methodology is developed in this phase. Detailed descriptions of each task in the methodology
are documented, including the objectives, inputs, approach, applicable tools and techniques, outputs, and
any references.
Final touches and revisions to the methodology are made in this phase. The majority of these revisions
come from experiences on the project. Sample reports and any additional references are added to the
methodology
12
Innovations in Project:
1. Improved Payment Methods:- Facial Recognition systems in addition with some other security
measures to make our payments safe and convenient.
2. Smarter Border Control:- Immigration checkpoints use facial recognition to enforce smarter
border control.
3. Improve Security:- Improve security of our devices i.e for unlocking our electronic devices.
4. Mass Surveillance:- Using facial recognition for is a controversial application of this technology,
Yet it is useful in some cases.
Many more features can be added in this project according to the demand in future.
13
Diagrams:-
Data Flow Diagram:-
Flowchart:-
14
USE CASE DIAGRAM :-
15
Program Code (IMPLEMENTATION):-
Module 1:- It basically collects the sample faces.
import numpy as np
import cv2
face_classifier =
cv2.CascadeClassifier('D:/python_project/to_check_confidence_percent_of_image_matching/libraries/haar
cascade_frontalface_default.xml')
def face_extractor(img):
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces = face_classifier.detectMultiScale(gray,1.3,5)
if faces is():
return None
for(x,y,w,h) in faces:
cropped_face = img[y:y+h, x:x+w]
return cropped_face
cap = cv2.VideoCapture(0)
count = 0
while True:
ret, frame = cap.read()
if face_extractor(frame) is not None:
count+=1
face = cv2.resize(face_extractor(frame),(200,200))
face = cv2.cvtColor(face, cv2.COLOR_BGR2GRAY)
file_name_path =
"D:/python_project/to_check_confidence_percent_of_image_matching/samples_faces/user'+str(count)+'.jp
g"
cv2.imwrite(file_name_path,face)
cv2.putText(face,str(count),(50,50),cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2)
cv2.imshow('Face Cropper',face)
else:
16
print("Face Not Found")
pass
if cv2.waitKey(1)==13 or count==25:
break
cap.release()
cv2.destroyAllWindows()
print('collecting samples complete!!!')
Module 2:-
import cv2
import numpy as np
from os import listdir
from os.path import isfile, join
data_path = 'D:/python_project/to_check_confidence_percent_of_image_matching/samples_faces/'
onlyfiles = [f for f in listdir(data_path) if isfile(join(data_path,f))]
17
Module 3:- Comparing the sample faces and showing the output.
import cv2
import numpy as np
from os import listdir
from os.path import isfile, join
data_path = 'D:/python_project/to_check_confidence_percent_of_image_matching/samples_faces/'
onlyfiles = [f for f in listdir(data_path) if isfile(join(data_path,f))]
face_classifier =
cv2.CascadeClassifier('D:/python_project/to_check_confidence_percent_of_image_matching/libraries/haar
cascade_frontalface_default.xml')
if faces is():
18
return img,[]
for(x,y,w,h) in faces:
cv2.rectangle(img, (x,y),(x+w,y+h),(0,255,255),2)
roi = img[y:y+h, x:x+w]
roi = cv2.resize(roi,(200,200))
return img,roi
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
image, face = face_detector(frame)
try:
face = cv2.cvtColor(face, cv2.COLOR_BGR2GRAY)
result = model.predict(face)
if result[1]<500:
confidence = int(100*(1-(result[1])/300))
display_string = str(confidence)+'% Confidence it is user'
cv2.putText(image,display_string,(100,120), cv2.FONT_HERSHEY_COMPLEX,1,(250,120,255),2 )
else:
cv2.putText(image,"Not_Matched!!!",(250,450), cv2.FONT_HERSHEY_COMPLEX,1,(0,0,255),2
)
cv2.imshow('Face Cropper', image)
except:
cv2.putText(image,"Face Not Found!!",(250,450), cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2 )
cv2.imshow('Face Cropper', image)
pass
if cv2.waitKey(1)==13:
break
cap.release()
cv2.destroyAllWindows()
19
CONCLUSION:-
Our goal is to provide the users a wonderful experience of studying and gathering knowledge. The
computational models, which were implemented in this project, were chosen after extensive research, and
the successful testing results confirm that the choices made by the researcher were reliable. The system
with manual face detection and automatic face recognition did not have recognition accuracy over 90%,
due to the limited number of eigen faces that were used for the PCA transform. This system was tested
under very robust conditions in this experimental study and it is envisaged that real-world performance will
be far more accurate. The fully automated frontal view face detection system displayed virtually perfect
accuracy and in the researcher's opinion further work need not be conducted in this area. The fully
automated face detection and recognition system was not robust enough to achieve a high recognition
accuracy. The only reason for this was the face recognition subsystem did not display even a slight degree
of invariance to scale, rotation or shift errors of the segmented face image. This was one of the system
requirements identified in section However, if some sort of further processing, such as an eye detection
technique, was implemented to further normalize the segmented face image, performance will increase to
levels comparable to the manual face detection and recognition system. There are better techniques such as
iris or retina recognition and face recognition using the thermal spectrum for user access and user
verification applications since this need a very high degree of accuracy. The real-time automated pose
invariant face detection and recognition system would be ideal for crowd surveillance applications. The
implemented fully automated face detection and recognition system (with an eye detection system) could
be used for simple surveillance applications such as ATM user security, while the implemented manual
face detection and automated recognition system is ideal of mug shot matching., were we obtained in this
study, which was conducted under adverse conditions. Implementing an eye detection technique would be
a minor extension to the implemented system and would not require a great deal of additional research. All
other implemented systems displayed commendable results and reflect well on the deformable template and
Principal Component Analysis strategies.
Software Requirement:
Operating System, eg, Windows 7 (or higher), Mac OS, Linux etc.
Git: A version control system.
Text Editor: Visual Studio Code, Sublime Text 3, Atom etc.
Git bash, command prompt, or Terminal.
Python Runtime
Python Package Installer (pip)
20
Hardware Requirement:
Bibliography
https:internshala.com/programming with python
https://github.com/trending/python
https://www.youtube.com/results?search_query=learn+about+python+libraries
https://www.quora.com/How-can-I-do-facial-recognition-in-Python
https://en.wikipedia.org/wiki/Facial_recognition_system
https://en.wikipedia.org/wiki/Machine_learning
21