Professional Documents
Culture Documents
Project Preliminary Report Sample
Project Preliminary Report Sample
Machine Vision
To
CERTIFICATE
Certified that this report entitled ‘Detection and Grading of Multiple
Fruits/Vegetable using Machine Vision’ is the report of project completed by the
following students during 2020-2021 in partial fulfillment of the requirements for the
award of the Degree of Bachelor of Technology in Computer Science and
Engineering.
We, hereby declare that, this project report entitled is the bonafide work of ours
carried out under the supervision of Ms. Renju Rachel Varghese, Assistant Professor,
Department of Computer Science and Engineering. We declare that, to the best of
our knowledge, the work reported herein does not form part of any other project
report or dissertation on the basis of which a degree or award was conferred on an
earlier occasion to any other candidate. The content of this report is not being
presented
any by
other student to this or any other University for the award of a
degree.
4 SOORAJ S PRC17CS018
Date: 10/12/2020
ACKNOWLEDGEMENTS
We take this opportunity to express our deep sense of gratitude and sincere thanks to
all who helped us to preliminary project successfully.
We are deeply indebted to our Project Supervisor Ms. Renju Rachel Varghese,
Assistant Professor for her excellent guidance, positive criticism, and valuable
comments. We record our appreciation and sincere thanks to our Departmental Project
Coordinator and Co-guide Mr. Pramod Mathew Jacob, Assistant Professor for his
overall coordination and timely guidelines.
We are also greatly thankful to our Head of Department Dr. Santhosh Simon,
Associate Professor for his continuous support.
Finally, we thank our parents, family members and friends who directly and indirectly
contributed to the successful completion of our preliminary project.
Date: 10/12/2020
i
ABSTRACT
ii
TABLE OF CONTENTS
ACKNOWLEDGEMENTS............................................................................................i
ABSTRACT...................................................................................................................ii
LIST OF FIGURES........................................................................................................v
LIST OF TABLES........................................................................................................vi
LIST OF ABBREVIATIONS......................................................................................vii
CHAPTER 1 INTRODUCTION................................................................................1
1.1 Background..........................................................................................................1
1.4 Objectives.............................................................................................................2
1.5 Scope....................................................................................................................2
CHAPTER 4 METHODOLOGY.............................................................................18
iii
4.1.1 Android App....................................................................................................18
4.1.2 Classification...................................................................................................19
5.6 UI Design...........................................................................................................29
REFERENCES...........................................................................................................30
iv
LIST OF FIGURES
v
LIST OF TABLES
vi
LIST OF ABBREVIATIONS
Abbreviation Expansion
ML Machine Learning
SVM Support Vector Machine
KNN K-Nearest Neighbors
ANN Artificial Neural Network
CCD Charged Couple Device
RGB Red Green Blue
COCOMO Constructive Cost Model
HSV Hue Saturation Value
BoF Bag of Features
GLCM Gray Level Co-occurrence Matrix
IDE Integrated Development Environment
APK Android Package
KLOC Kilo Lines of Code
RBF Radial Basis Function
LOC Lines of Code
VEGA Vector Evaluation Genetic Algorithm
BSA Backtracking Search Algorithm
GBSA Genetic Backtracking Search Algorithm
OS Operating System
CNNsF Convolution Neural Network Features
UML Unified Modeling Language
vii
CHAPTER 1
INTRODUCTION
1.1 Background
1
1.2 Existing System
The existing systems include systems with automated checking of masks, temperature
and count of people entering a place.
Although these systems have its own advantages, they also exhibit following
disadvantages: -
Manual checking of temperature.
Attendance tracking is not available.
Real time system not available.
Smart phone enabled systems are not available.
1.4 Objectives
Various objectives of our proposed model are:
To check whether people are wearing masks or not.
To check the temperature of people.
To identify the number of people entering a room.
1.5 Scope
Technological advancements such as ML and image processing are required to help
with automation. The scope of this project has a global perspective as it works on
smartphones. The system creates an efficient, real time application to check whether
people are obeying Covid protocols.
2
CHAPTER 2
LITERATURE REVIEW
We have analyzed various existing works in the field of detection and , different types
of classification algorithms and Machine Learning models. The summary of the most
relevant 20 papers is set down below.
Fransico Rodriguez [1] presents a system known as Rinku that aims to provide critical
data to health professionals so that they can validate COVID-19 indicators remotely.
Rinku can handle data from several patients at the given period and provide useful
information on the intensity of the symptoms reported, which could aid healthcare
professionals in making management decisions to optimize their clinical resources.
The functioning of the ClinicalKit, connectivity between the IoT architecture and the
cloud, and physiological parameter monitoring were all tested in this paper. The
findings revealed that the enclosure design is practical, the IoT architecture is
efficient, and subject tracking of temperature, heart rate, and blood oxygen levels is
promising. We believe that the Rinku system has the ability to provide an accurate
forecast of clinical resource demand and to help clinicians plan ahead.
3
neural network which is deployed on Android-based mobile devices. The model
composed of three convolutional layers which are activated by a rectified linear unit
function followed by a max-pooling layer and finally two dense layers and an
accuracy rate of 97.87% was obtained. They have used TensorFlow Lite library to run
trained CNN model in the Android devices. Before deploying in the device, it was
converted to TensorFlow file from Keras file. The method used to deploy a model
into an Android device can be used in our system for deployment.
Jiri Prinosil, Ondrej Maly [3] proposed a system that deals with the evaluation of
several methods for face detection when the face is covered by a mask. The methods
evaluated are Haar cascade and Histogram of Oriented Gradients as feature-based
approaches, Multitask Cascade Convolutional Neural Network, Max Margin Object
Detection and TinyFace as convolutional neural network based approaches. Various
types of face masks are considered: disposal face mask, burka, balaclava, ski helmet
with ski goggles, hockey helmet with protective grill, costumes, and others. The
TinyFace method achieves the best accuracy result, but also requires much more
computational power than other approaches. Therefore, this paper describes an
experiment to see if the accuracy of some of the remaining methods can be improved
by retraining their models with new image data containing faces with various face
masks.
Hong, Z. Wang, Z. He, N. Wang, X. Tian and T. Lu [4] proposed a model which is a
masked face recognition method based on person re-identification association, which
converts the masked face recognition problem into an association uncovering problem
between the masked face and the appearing faces of the same person. Based on the
characteristics that person re-identification technique does not rely solely on facial
information, it first takes advantages of re-identification to establish the association
between face-masked pedestrians and face-unveiled pedestrians. It further provides an
effective face image quality assessment to select the most identifiable faces for
subsequent recognition from a variety of appearing candidate faces. Finally, the
selected high-quality recognizable faces are used to replace masked faces for
identification. The comparison experiments with the existing disguise face recognition
methods show its superiority in terms of accuracy.
Kun Zhang; Xiang Jia; Yinghui Wang; Hongwei Zhang; Jingying Cui [5] proposed an
algorithm network structure based on the improved YOLOV3-tiny algorithm and use
4
the combination of nose detection and mask detection for feature fusion based on the
training of massive data sets, which perfectly solves the problem of detecting whether
the mask is worn in a normative way. The experiment shows that this system can
detect the target of wearing face masks in different scenes with an accuracy rate of
over 99%, laying a solid foundation for the detection of wearing face maks
normatively.
5
X. Fan, M. Jiang and H. Yan [6] proposed a model a deep learning based single-shot
light-weight face mask detector to meet the low computational requirements for
embedded systems, as well as achieve high performance. To cope with the low feature
extraction capability caused by the light-weight model, we propose two novel
methods to enhance the model's feature extraction process. First, to extract rich
context information and focus on crucial face mask related regions, we propose a
novel residual context attention module. Second, to learn more discriminating features
for faces with and without masks, we introduce a novel auxiliary task using
synthesized Gaussian heat map regression. Ablation studies show that these methods
can considerably boost the feature extraction ability and thus increase the final
detection performance. Comparison with other models shows that the proposed model
achieves state-of-the-art results on two public datasets, the AIZOO and Moxa3K face
mask datasets. In particular, compared with another light-weight you only look once
version 3 tiny model, the mean average precision of our model is 1.7% higher on the
AIZOO dataset, and 10.47% higher on the Moxa3K dataset. Therefore, the proposed
model has a high potential to contribute to public health care and fight against the
coronavirus disease 2019 pandemic.
6
YOLOv3, Density-based spatial clustering of applications with noise (DBSCAN),
Dual Shot Face Detector (DSFD) and MobileNetV2 based binary classifier have been
employed on surveillance video datasets. This paper also provides a comparative
study of different face detection and face mask classification models. Finally, a video
dataset labelling method is proposed along with the labelled video dataset to
compensate for the lack of dataset in the community and is used for evaluation of the
system. The system performance is evaluated in terms of accuracy, F1 score as well as
the prediction time, which has to be low for practical applicability. The system
performs with an accuracy of 91.2% and F1 score of 90.79% on the labelled video
dataset and has an average prediction time of 7.12 seconds for 78 frames of a video
M. Xu, H. Wang, S. Yang and R. Li [10] proposed a system on the basis of SSD
algorithm, SSD-Mask introduces a channel attention mechanism to improve the
ability of the model to express salient features. At the same time, the information of
different feature levels is fully utilized, and the loss function is optimized. The final
experimental results show that the algorithm can effectively achieve the goal of face
recognition and mask detection.
7
A. Das, M. Wasif Ansari and R. Basak [12] proposed a system that presents a
simplified approach to achieve this purpose using some basic Machine Learning
packages like TensorFlow, Keras, OpenCV and Scikit-Learn. The proposed method
detects the face from the image correctly and then identifies if it has a mask on it or
not. As a surveillance task performer, it can also detect a face along with a mask in
motion. The method attains accuracy up to 95.77% and 94.58% respectively on two
different datasets. We explore optimized values of parameters using the Sequential
Convolutional Neural Network model to detect the presence of masks correctly
without causing over-fitting.
S. Sakshi, A. K. Gupta, S. Singh Yadav and U. Kumar [14] proposed a two phased
face mask detector which will be easy to deploy at the mentioned outlets. With the
help of Computer Vision, it is now possible to detect and implement this on large
scale. CNN/ MobileNet V2 architecture was used for the implementation of our
model. The implementation is done in Python, and the python script implementation
will train our face mask detector on our selected dataset using TensorFlow and Keras.
It was have added more robust features and trained our model on various variations,
we made sure to have large varied and augmented dataset so that the model is able to
clearly identify and detection the face masks in real time videos. The trained model
was tested on both real-time videos and static pictures and in both the cases the
accuracy was more than the other designed models.
8
deep learning architecture is trained on a dataset that consists of images of people
with and without masks collected from various sources. The trained architecture
achieved 98.7% accuracy on distinguishing people with and without a facial mask for
previously unseen test data. It is hoped that our study would be a useful tool to reduce
the spread of this communicable disease for many countries in the world.
9
the system on preselected data samples. The hardware includes the conveyer, camera
control and control systems. The software system analyzes the fruit image and
classifies them. Our fruit quality grading into three grades was based on human
perception. The fruits having a good shape, large size, high intensity, high flabbiness
and no defects were branded as of the best quality, i.e., grade 1. The grade two fruits
have distorted shape, medium size, low flabbiness, low intensity and no defects and
fruits having defects were considered as grade three fruits regardless of other features.
There were problems in detecting the flabbiness from the color. An impact sensor
might improve flabbiness detection. To determine the feature-based grades,
unsupervised learning techniques must be used.
Farady, Lin, Rojanasarit, Prompol and Akhyar [20] designed a real-time deep
learning model to meet current demand to detect the mask-wearing position and head
temperature of a person before he or she enters a public space. In this experiment, we
use a deep learning object detection method to create a mask position and head
temperature detector using a popular one-stage object detection, RetinaNet. We build
two modules for the RetinaNet model to detect three categories of mask-wearing
positions and the temperature of the head. We implement an RGB camera and thermal
camera to generate input images and capture a person's temperature respectively. The
output of these experiments is a live video that carries accurate information about
whether a person is wearing a mask properly and what his or her head temperature is.
Our model is light and fast, achieving a confidence score of 81.31% for the prediction
object and a prediction speed below 0. 1s/image.
11
The above review does not give a solution to the possible challenges in the existing
system. So our goal is to propose a real time implemented application to determine
the quality of fruit or vegetable in an efficient way .The number of days where the
fruit or vegetable can remain is also calculated in the new system which is the shelf
life.
12
CHAPTER 3
SYSTEM ANALYSIS
The system analysis phase includes the analysis of various functional requirements,
non-functional requirements, design constraints and hardware requirements.
REQ 3: Should be able to keep a count on the number of people that have entered the room
REQ 4: Alert the people if they are not wearing masks or if their temperature is
higher than a reference value.
13
3.1 Feasibility Analysis
The feasibility study for the above-mentioned requirements are done and is concluded
that it is practically possible to build such a system. The technical, economical and
operational feasibility analysis is discussed below.
14
3.4 Life Cycle Used
In this project we choose the incremental model. It is an iterative enhancement model.
We develop our project as different modules which will be completed as different
iterations. The Incremental model is flexible and is easier to incorporate new features
during the development phase.
COCOMO Model (Constructive Cost Estimation Model) is used for cost estimation.
days
15
3.8 Project Scheduling using Gantt chart
16
CHAPTER 4
METHODOLOGY
4.1.1 Esp32cam
The ESP32-CAM is a very small camera module with the ESP32-S chip that costs
approximately $10. Besides the OV2640 camera, and several GPIOs to connect
peripherals, it also features a microSD card slot that can be useful to store images
taken with the camera or to store files to serve to clients.
17
4.1.2 Arduino UNO
4.1.2.2 Led
In the simplest terms, a light-emitting diode (LED) is a semiconductor device that
emits light when an electric current is passed through it. Light is produced when the
particles that carry the current (known as electrons and holes) combine together
The main characteristic is that servo motors with magnetic encoder and brushless
motor are used. In this way it is no longer necessary to modify the servos to obtain the
desired rotation. Simply program the limits of the servos and choose the configuration
with the torque that best suits your needs.
4.1.2.4 Contactless Temperature Sensor MLX90614
18
4.1.2.5 HC-05 Bluetooth Module
Replace cable connections HC-05 uses serial communication to communicate with
the electronics. Usually, it is used to connect small devices like mobile phones using a
short-range wireless connection to exchange files. It uses the 2.45GHz frequency
band.
19
CHAPTER 5
SYSTEM DESIGN
The proposed system model is illustrated using various system modeling techniques
such as Architecture diagram, Use Case Diagram, Activity Diagram and Sequence
Diagram along with the Flow Chart.
Description:
Figure 5.1 shows the architecture of the proposed system. The dataset is trained by the
neural network and the output obtained from the tensor flow is converted to. tflite file.
ML KIT is used to optimize the device as easy-to-use package and to use. tflite file.
Android Studio is used to develop the application and apk file is obtained and can be
used in the Android device. The user can use the app from smartphone to scan the
fruit/vegetable.
20
5.2 Flow Chart
Figure 5.2 illustrates the flow chart of a fruit/vegetable grading system. The system
starts by first classifying what type of fruit or vegetable the given product is. Then the
fruit/vegetable is given one of the following ranks: 1, 2 or defected. After the rank
classification, the shelf-life is also given as three classifications. The process ends
after the shelf-life is detected.
21
5.3 Use Case Diagram
Use case diagram is a Unified Modeling Language (UML) diagram which represents
the relationship between the various use cases and actors. The system includes two
actors: User and the Developer.
Description:
The Use Case Diagram shown in Figure 5.3 illustrates the various use cases of the
fruit grading system. The end user of this system will be the system users. The user
can use the mobile application to scan the fruit/vegetable and get the name, rank and
shelf-life of the fruit or vegetable as output.
22
5.4 Activity Diagram
Description:
Figure 5.4 shows the order of execution of the Android application. When the
application is opened, the device camera is first accessed. When the user points the
camera towards the fruit/vegetable, the respective frames are obtained. If the
application is unable to detect the required features, then the execution ends with an
error message shown. Otherwise, the application starts classifying the fruit/vegetable
based on its features. Using the required datasets, the name, grade, and shelf-life of
the fruit/vegetable is generated.
23
5.5 Sequential Diagram
The sequence diagram shown in Figure 5.5 illustrates the interaction between the user
and the application. The user first opens the application to scan the fruit/vegetable.
The application will respond with an error message if the fruit/vegetable is
undetected. Otherwise, the application classifies the name, rank and shelf-life
respectively and they are shown as output.
5.6 UI Design
Figure 5.6 shows the UI design of Android mobile application the starting page and
scanning area and it displays the information regarding the fruit/vegetable
24
REFERENCES
[1] IoMT: Rinku’s Clinical Kit Applied to Collect Information Related to COVID-
19 Through Medical Sensors, IEEE LATIN AMERICA TRANSACTIONS,
VOL. 19, NO. 6, JUNE 2021
[4] Hong, Z. Wang, Z. He, N. Wang, X. Tian and T. Lu, "Masked Face Recognition
with Identification Association," 2020 IEEE 32nd International Conference on
Tools with Artificial Intelligence (ICTAI), 2020, pp. 731-735, doi:
10.1109/ICTAI50040.2020.00116..
[5] K. Zhang, X. Jia, Y. Wang, H. Zhang and J. Cui, "Detection System of Wearing
Face Masks Normatively Based on Deep Learning," 2021 International
Conference on Control Science and Electric Power Systems (CSEPS), 2021, pp.
35-39, doi: 10.1109/CSEPS53726.2021.00014.
[6] X. Fan, M. Jiang and H. Yan, "A Deep Learning Based Light-Weight Face
Mask Detector With Residual Context Attention and Gaussian Heatmap to Fight
Against COVID-19," in IEEE Access, vol. 9, pp. 96964-96974, 2021, doi:
10.1109/ACCESS.2021.3095191.
[7] B. Wang, Y. Zhao and C. L. P. Chen, "Hybrid Transfer Learning and Broad
Learning System for Wearing Mask Detection in the COVID-19 Era," in IEEE
Transactions on Instrumentation and Measurement, vol. 70, pp. 1-12, 2021, Art
no. 5009612, doi: 10.1109/TIM.2021.3069844.
25
Surveillance video datasets," 2021 International Conference on Emerging Smart
Computing and Informatics (ESCI), 2021, pp. 449-455, doi:
10.1109/ESCI50559.2021.9396783.
26
Conference on Computational Performance Evaluation (ComPE), Shillong,
2020.
[10] M. Xu, H. Wang, S. Yang and R. Li, "Mask wearing detection method based on
SSD-Mask algorithm," 2020 International Conference on Computer Science and
Management Technology (ICCSMT), 2020, pp. 138-143, doi:
10.1109/ICCSMT51754.2020.00034.
[12] A. Das, M. Wasif Ansari and R. Basak, "Covid-19 Face Mask Detection Using
TensorFlow, Keras and OpenCV," 2020 IEEE 17th India Council International
Conference (INDICON), 2020, pp. 1-5
[14] S. Sakshi, A. K. Gupta, S. Singh Yadav and U. Kumar, "Face Mask Detection
System using CNN," 2021 International Conference on Advance Computing and
Innovative Technologies in Engineering (ICACITE), 2021, pp. 212-216, doi:
10.1109/ICACITE51222.2021.9404731.
27
Employee Management System with Mask Detection and Body Temperature
Measurement using TensorFlow," 2021 Sixth International Conference on
Wireless Communications, Signal Processing and Networking (WiSPNET),
2021
28
29
30
31
32
33
34
35