You are on page 1of 69

A

Mini Project Report on

Real-time Cognitive Analysis and Prediction of Human Behaviour in


Collaborative Environments
Submitted for partial fulfilment of the requirements for the award of the degree of

BACHELOR OF TECHNOLOGY

In

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

by

1.Mahendar Reddy Kongolla (20K81A0492)

2.Nithin Reddy Sama (20K81A04A6)

3.Vennapureddy Naveen Reddy (20K81A04B8)

4.Yampalla Chaitanya Reddy (20K81A04B9)


Under the Guidance of

Dr.M.Thirupathi
ASSOCIATE PROFESSOR

DEPARTMENT OF ELECTRONIC AND COMMUNICATION ENGINEERING

St. MARTIN'S ENGINEERING COLLEGE

NOVEMBER - 2023
UGC Autonomous
Affiliated to JNTUH, Approved by AICTE,
Accredited by NBA & NAAC A+, ISO 9001:2008 Certified
Dhulapally, Secunderabad - 500 100

St. MARTIN'S ENGINEERING COLLEGE


UGC Autonomous
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad - 500 100
www.smec.ac.in

Certificate

This is to certify that the project entitled “Real-time Cognitive Analysis and
Prediction of Human Behaviour in Collaborative Environments ” is
being submitted by K.Mahendar Reddy (20K81A0492), S.Nithin Reddy (20K81A04A6),
V.Naveen Reddy (20K81A04B8), Y.Chaitanya Reddy (20K81A04B9) in fulfilment of the
requirement for the award of degree of BACHELOR OF TECHNOLOGY IN
ELECTRONICS AND COMMUNICATION ENGINNERING is recorded of bonafide work
carried out by them. The result embodied in this report have been verified and found
satisfactory.

Signature of Guide Head of the Department


Dr.M.Thirupathi Dr. B. Hari Krishna
Associate Professor Professor & Head
Department of ECE Department of ECE

Internal Examiner External Examiner


St. MARTIN'S ENGINEERING COLLEGE
UGC Autonomous
NBA & NAAC A+ Accredited
Date:
Dhulapally, Secunderabad - 500 100
www.smec.ac.in

Place:

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

DECLARATION

We, the students of ‘Bachelor of Technology in Department of Electronics and Communication


Engineering’, session: 2020 - 2024, St. Martin’s Engineering College, Dhulapally, Kompally,
Secunderabad, hereby declare that the work presented in this Project Work entitled “ Real-time

Cognitive Analysis and Prediction of Human Behaviour in Collaborative


Environments” is the outcome of our own bonafide work and is correct to the best of our knowledge
and this work has been undertaken taking care of Engineering Ethics. This result embodied in this
project report has not been submitted in any university for award of any degree.

1.Mahendar Reddy Kongolla (20K81A0492)

2.Nithin Reddy Sama (20K81A04A6)

3.Vennapureddy Naveen Reddy (20K81A04B8)

4.Yampalla Chaitanya Reddy (20K81A04B9)


ACKNOWLEDGEMENT

The satisfaction and euphoria that accompanies the successful completion of any task would be
incomplete without the mention of the people who made it possible and whose encouragement and
guidance have crowded our efforts with success.
First and foremost, we would like to express our deep sense of gratitude and indebtedness to our
College Management for their kind support and permission to use the facilities available in the
Institute.
We especially would like to express our deep sense of gratitude and indebtedness to
Dr. P. SANTOSH KUMAR PATRA, Group Director, St. Martin’s Engineering College Dhulapally,
for permitting us to undertake this project.
We wish to record our profound gratitude to Dr. M. SREENIVAS RAO, Principal, St. Martin’s
Engineering College, for his motivation and encouragement.
We are also thankful to Dr. B. HARI KRISHNA, Head of the Department, Electronics and
communication engineering, St. Martin’s Engineering College, Dhulapally, Secunderabad, for his
support and guidance throughout our project as well as Project Coordinator Mr.Venkanna Mood ,
associate Professor, Dr.M.Thirupathi , professor, department of Electronics and Communication
Engineering for their valuable support.
We would like to express our sincere gratitude and indebtedness to our project supervisor
Dr.M.Thirupathi , professor, electronics and communication engineering , St. Martins Engineering
College, Dhulapally, for his support and guidance throughout our project.
Finally, we express thanks to all those who have helped us successfully completing this project.
Furthermore, we would like to thank our family and friends for their moral support and encouragement.
We express thanks to all those who have helped us in successfully completing the project.

1.Mahendar Reddy Kongolla (20K81A0492)

2.Nithin Reddy Sama (20K81A04A6)

3.Vennapureddy Naveen Reddy (20K81A04B8)

4.Yampalla Chaitanya Reddy (20K81A04B9)


i
CONTENTS
Acknowledgement i

List of figures ii-iii


List of Tables iv

Abstract v
CHAPTER 1 INTRODUCTION 01-05
1.1 Overview 01-02
1.2 Research Motivation 02-03
1.3 Problem Statement 03-04
1.4 Applications 04-05

CHAPTER 2 LITERATURE SURVEY 06-08


CHAPTER 3 EXISTING SYSTEM 09-10
3.1 Disadvantages 10

CHAPTER 4 PROPOSED SYSTEM 11-19


4.1 Overview 11-12
4.2 Video to Frame Conversion 12-13
4.3 Frame Preprocessing 13-15
4.4 Datasets Spitting 15
4.5 DLCNN 15-18
4.6 Advantages of Proposed System 18-19

CHAPTER 5: MACHINE LEARNING 20-26


5.1 What is Machine Learning 20
5.2 Categories of Machine Learning 20-21
5.3 Need for Machine Learning 21
5.4 Challenges in Machine Learning 21-22
5.5 Applications of Machine Learning 22
5.6 How to Start Learning Machine Learning 22-24
5.6.1Terminologies of Machine in Learning 24
5.6.2 Types of Machine Learning 24-25
5.7 Advantages of machine Learning 25-26
5.8 Disadvantages of machine Learning 26

CHAPTER 6: SOFTWARE ENVIRONMENT 27-42


6.1 What is Python 27
6.2 Advantages of Python 27-30
6.3 Disadvantages of Python 30-31
6.4 History of Python 31
6.5 Python Development Steps 31-32
6.6 Purpose 32
6.7 Python 32-33
6.8 Modules Used in Python 33-38
6.9 Installation Of Python 38-42

CHAPTER 7: SOURCE CODE 43-48


CHAPTER 8: RESULTS AND DISCUSSION 49-52
CHAPTER 9: CONCLUSION AND FUTURE WORK 53-55
9.1 Conclusion 53
9.2 Future Scope 53-55
References 56-57
LIST OF FIGURES

Figure Figure Title Page No.


No.
4.1 Block diagram of proposed system 12

4.2 Representation of convolution 16


layer process

4.3 Example of convolution layer 16


process. (a) a feature with size
5 ×5 is convolving with 3 ×3
kernel. (b) Convolved feature map

4.4 SoftMax classifier 17

4.5 Example of SoftMax classifier 18


4.6 Example of SoftMax classifier 18

6.1 Step1 for download python 36

6.2 Step2 for download python 37

6.3 Step3 for download python 37

6.4 Step5 for download python 38

6.5 Step1 for installation python 39

6.6 Step2 for installation python 39

6.7 Step3 for installation python 40

6.8 Step2 for Verify the Python 40

6.9 Testing python 41

6.10 Step2 for checking python IDLE 41

6.11 Step4 for checking python IDLE 42

6.12 Step6 for checking python IDLE 42

ii
i

ii

8.1 CNN Layers Description 49


8.2 Predicted outcome as Using\talking phone 49

8.3 Predicted outcome as drinking 50

8.4 Proposed DLCNN accuracy and loss for 10 epochs 50


iii
LIST OF TABLES

Table No. Table Name Page No.

01 Performance comparison 52

iv
ABSTRACT

Collaborative learning methods have been implemented broadly by organizations at


all stages, as research recommends that active human involvement in cohesive and
micro group communications is critical for effective. The conventional Machine
Learning -based system architecture to promote understanding of the behaviours,
group dynamics, and interactions. However, these models are resulted in poor
classification performance due to lack of feature analysis. The objective of this work
is to propose a machine learning-based methodology system architecture and
algorithms to find patterns of learning, interaction, and relationship and effective
assessment for a complex system involving massive data that could be obtained from
a proposed collaborative learning environment. Collaborative learning may take place
between dyads or larger team members to find solutions for real time events or
problems, and to discuss concepts or interactions during situational judgment tasks.
Finally, convolutional neural networks (CNNs) are developed for feature extraction,
action identification.

v
CHAPTER 1
INTRODUCTION

1.1 Overview

Predicting human behaviour in collaborative environments is a complex yet crucial


area of study, especially in the context of workplaces, social settings, and online
platforms. This field combines insights from psychology, sociology, and data science
to understand how individuals and groups interact and make decisions collectively.
Researchers and organizations aim to predict and influence human behaviour for
various purposes, such as enhancing team productivity, optimizing resource
allocation, or tailoring user experiences.

One key aspect of this endeavor involves analyzing individual and group dynamics.
Psychologically, understanding human motivation, personality traits, and cognitive
biases helps in predicting how individuals might react or contribute in a collaborative
setting. Additionally, sociological factors like culture, norms, and social hierarchies
play a significant role in shaping group behaviour. These insights are often combined
with data-driven approaches, such as machine learning and big data analytics, to
develop predictive models. These models can anticipate how individuals and groups
might respond to different situations, tasks, or incentives.

Moreover, technology has played a pivotal role in this domain. With the advent of
digital platforms and the proliferation of social media, vast amounts of data are
generated, offering valuable insights into human behaviour. Predictive algorithms can
leverage this data to anticipate user preferences, social interactions, and decision-
making patterns. In collaborative work environments, this can translate into better
team composition, task assignment, and conflict resolution strategies.

Ethical considerations are paramount in predicting human behaviour. Ensuring


privacy, consent, and the responsible use of predictive models is crucial to avoid
potential biases and violations of individual rights. Additionally, transparency in how
predictions are made and used is essential to maintain trust and fairness in
collaborative environments.

So, predicting human behaviour in collaborative environments is a multidisciplinary


field that combines psychology, sociology, and data science. It aims to leverage
insights and data to anticipate individual and group actions, ultimately leading to
more effective and harmonious
1
collaborations in various domains. However, it must be approached with ethical
considerations to ensure responsible and equitable use of predictive models.

1.2 Research Motivation

The motivation behind researching and understanding human behaviour in


collaborative environments is multifaceted and driven by a range of compelling
reasons.

Firstly, improving team productivity and performance is a central goal. In


collaborative settings, such as workplaces and project teams, predicting how
individuals will interact and contribute can have a profound impact on outcomes. By
gaining insights into the strengths, weaknesses, and communication patterns of team
members, organizations can optimize team composition, assign tasks more
effectively, and foster a more harmonious working environment. This can lead to
increased productivity, better project outcomes, and higher job satisfaction among
employees.

Secondly, predicting human behaviour is crucial for resource allocation and decision-
making. In organizations and societies, resources are often limited, and decisions need
to be made about how to allocate them optimally. Predictive models can help in
forecasting demand, assessing the impact of various resource allocation strategies, and
making informed decisions about investments, budgets, and resource distribution.

Moreover, understanding human behaviour in collaborative environments is pivotal


for designing effective interventions and policies. For instance, in the realm of public
health, predicting how individuals and communities might respond to health
campaigns or behavioural change initiatives can be vital for curbing disease outbreaks
or promoting healthier lifestyles. In education, predicting student behaviour can
inform personalized learning approaches, leading to improved educational outcomes.

Additionally, in the digital age, online platforms and social media have become
integral parts of our lives. Predicting user behaviour in these virtual collaborative
environments is crucial for businesses, advertisers, and content creators seeking to
tailor their offerings and experiences to individual preferences. This drives user
engagement and revenue generation.

Ethical considerations also serve as a strong motivator. As predictive technologies


become more sophisticated, it is essential to ensure that they are used responsibly and
do not infringe upon individual rights or exacerbate biases. Research in this area is
2
motivated by the need to develop ethical guidelines and safeguards to prevent misuse
of predictive models.

So, the motivation behind researching human behaviour in collaborative environments


stems from the desire to enhance productivity, optimize resource allocation, design
effective interventions, and ensure responsible and equitable use of predictive
technologies. These motivations collectively drive interdisciplinary research efforts in
psychology, sociology, data science, and ethics to better understand and predict
human behaviour in collaborative settings.

1.3 Problem Statement

In today's interconnected world, collaborative environments, ranging from workplace


teams to online social networks, play a pivotal role in shaping outcomes across
various domains. However, understanding and predicting human behaviour within
these environments remains a formidable challenge. The problem at hand is twofold:
firstly, the need to comprehend the intricate interplay of psychological, sociological,
and technological factors that influence how individuals and groups behave and make
decisions collaboratively; and secondly, the imperative to harness this understanding
to improve the efficiency, fairness, and ethical integrity of these collaborative spaces.

The complexity of predicting human behaviour arises from the multifaceted nature of
individuals and groups. Psychological variables, including personality traits, cognitive
biases, and motivations, interact with sociological factors such as cultural norms,
group dynamics, and power structures. In parallel, the digital age has introduced vast
datasets generated by online interactions, further complicating the problem.
Navigating this complexity is essential, as it has direct implications for optimizing
team dynamics, resource allocation, and decision-making processes, which can
significantly impact productivity, innovation, and overall societal well-being.

Moreover, ethical concerns loom large in this context. The power to predict and
influence human behaviour can be misused, leading to privacy violations, unfair
manipulation, and exacerbation of existing biases. Addressing these ethical challenges
is integral to the problem statement, requiring the development of responsible
predictive models and guidelines to ensure equitable and transparent use in
collaborative environments.

In summary, the problem statement revolves around the need to understand and
predict human behaviour within collaborative environments, considering the intricate

3
interplay of psychological, sociological, and technological factors. This understanding
must be leveraged to enhance productivity, fairness, and ethical integrity in these
contexts. Balancing the complexity of human behaviour with ethical considerations
constitutes a central challenge in this research domain.

1.4 Applications

The research on understanding and predicting human behaviour in collaborative


environments has a wide range of practical applications across diverse fields and
industries:

 Workplace Optimization: One of the most immediate applications is in the


workplace. Predictive models can help organizations optimize team dynamics,
making it possible to assemble teams with complementary skills and
personalities for specific projects. This leads to improved teamwork, increased
efficiency, and better overall job satisfaction among employees.

 Resource Allocation: In sectors like healthcare and education, predicting


human behaviour can inform resource allocation decisions. Hospitals can
anticipate patient admission rates and allocate resources accordingly, while
educational institutions can tailor course offerings based on student
preferences and performance predictions.

 Public Health: Predicting human behaviour is instrumental in public health


campaigns. Health authorities can forecast how individuals or communities
might respond to interventions like vaccination drives or health education
initiatives, thereby enabling more effective disease prevention and
management strategies.

 Marketing and Advertising: In the realm of marketing and advertising,


predictive models are used to analyze consumer behaviour and preferences.
Companies can personalize marketing efforts based on individual user data,
leading to more targeted advertising campaigns and increased customer
engagement.

 Social Media and Content Recommendation: Online platforms leverage


predictive algorithms to recommend content to users, from articles and videos
to products and services. Understanding user behaviour enables platforms to

4
provide more personalized and engaging content, resulting in longer user
engagement and higher ad revenue.

 Crime Prevention: Law enforcement agencies can benefit from predictive


policing, where historical crime data and human behaviour patterns are used to
anticipate areas with higher crime rates and deploy resources accordingly.
This can lead to more efficient crime prevention strategies and safer
communities.

 Finance and Investment: Predictive models are widely used in finance to


forecast market trends, customer behaviour, and investment opportunities.
Financial institutions can make data-driven decisions on loan approvals,
investment strategies, and risk management.

 Human Resources: HR departments use predictive analytics for employee


retention, performance evaluation, and talent acquisition. Understanding how
employees behave in the workplace can aid in making informed decisions
about promotions, training, and recruitment.

 Smart Cities: In the context of smart cities, predicting human behaviour can
optimize traffic management, energy consumption, and public services. This
leads to more sustainable and efficient urban environments.

 Ethical AI Development: As AI and machine learning become increasingly


integrated into our lives, research in this domain is essential for developing
ethical guidelines and ensuring responsible AI usage. It can help prevent
algorithmic biases and protect individual privacy.

5
CHAPTER 2

LITERATURE SURVEY

Chopade et al. focused on proposing a Machine Learning - (ML)-based system


architecture to promote understanding of the behaviours, group dynamics, and
interactions in the CLE. This framework integrated techniques from computational
psychometrics (CP) and deep learning models that include the utilization of
convolutional neural networks (CNNs) for feature extraction, skill identification, and
pattern recognition. This framework also identified the behavioural components at a
micro level and can help us model behaviours of a group involved in learning.

Zhang et al. proposed a prediction-based human-robot collaboration model for


assembly scenarios. An embedded learning from demonstration technique enables the
robot to understand various task descriptions and customized working preferences. A
state-enhanced convolutional long short-term memory (ConvLSTM)-based
framework is formulated for extracting the high-level spatiotemporal features from
the shared workspace and predicting the future actions to facilitate the fluent task
transition. This model allows the robot to adapt itself to predicted human actions and
enables proactive assistance during collaboration. We applied our model to the seats
assembly experiment for a scale model vehicle and it can obtain a human worker’s
intentions, predict a co-worker’s future actions, and provide assembly parts
correspondingly. It has been verified that the proposed framework yields higher
smoothness and shorter idle times, and meets more working styles, compared to the
state-of-the-art methods without prediction awareness.

Tang et al. investigated and compared the cycle time, waiting time, and operators’
subjective preference of a human–robot collaborative assembly task when three
handover prediction models were applied: traditional method-time measurement
(MTM), Kalman filter, and trigger sensor approaches. The Kalman filter prediction
model could adjust the handover timing according to the operator’s current speed and
reduce the waiting time of the robot and operator, thereby improving the subjective
preference of the operator. Moreover, the trigger sensor method’s inherent flexibility
concerning random single interruptions on the operator’s side earned it the highest
scores in the satisfaction assessment.

6
Bianchi et al. presented an innovative HAR system, exploiting the potential of
wearable devices integrated with the skills of deep learning techniques, with the aim
of recognizing the most common daily activities of a person at home. The designed
wearable sensor embedded an inertial measurement unit (IMU) and a Wi-Fi section to
send data on a cloud service and to allow direct connection to the Internet through a
common home router so that the user themselves could manage the installation
procedure. The system is conceived for daily activity monitor and nine different
activities can be highlighted with an accuracy of 97%.

Wan et al. designed a smartphone inertial accelerometer-based architecture for HAR.


When the participants perform typical daily activities, the smartphone collects the
sensory data sequence, extracts the high-efficiency features from the original data,
and then obtains the user’s physical behaviour data through multiple three-axis
accelerometers. The data are pre-processed by denoising, normalization and
segmentation to extract valuable feature vectors. In addition, a real-time human
activity classification method based on a convolutional neural network (CNN) is
proposed, which uses a CNN for local feature extraction. Finally, CNN, LSTM,
BLSTM, MLP and SVM models are utilized on the UCI and Pamap2 datasets.

Nwekw et al. focused to provide in-depth summaries of deep learning methods for
mobile and wearable sensor-based human activity recognition. The review presented
the methods, uniqueness, advantages, and their limitations. This framework not only
categorise the studies into generative, discriminative and hybrid methods but also
highlight their important advantages. Furthermore, the review presented classification
and evaluation procedures and discusses publicly available datasets for mobile sensor
human activity recognition. Finally, this work outlined and explained some challenges
to open research problems that require further research and improvements.

Hassan et al. presented a smartphone inertial sensors-based approach for human


activity recognition. Efficient features are first extracted from raw data. The features
include mean, median, autoregressive coefficients, etc. The features are further
processed by a kernel principal component analysis (KPCA) and linear discriminant
analysis (LDA) to make them more robust. Finally, the features are trained with a
Deep Belief Network (DBN) for successful activity recognition. The proposed
approach was compared with traditional expression recognition approaches such as
typical multiclass Support Vector Machine (SVM) and Artificial Neural Network
(ANN) where it outperformed them.

7
Zhou et al. developed an intelligent Autolabeling scheme based on deep Q-network
(DQN) with a newly designed distance-based reward rule which can improve the
learning efficiency in IoT environments. A multisensory based data fusion mechanism
is then developed to seamlessly integrate the on-body sensor data, context sensor data,
and personal profile data together, and a long short-term memory (LSTM)-based
classification method is proposed to identify fine-grained patterns according to the
high-level features contextually extracted from the sequential motion data.

Chen et al. proposed a new deep learning-based approach, i.e., attention based bi-
directional long short-term memory (ABLSTM), for passive human activity
recognition using WiFi CSI signals. The BLSTM is employed to learn representative
features in two directions from raw sequential CSI measurements. Since the learned
features may have different contributions for final activity recognition, this
framework leveraged on an attention mechanism to assign different weights for all the
learned features.

Xu et al. proposed a deep learning model (InnoHAR) based on the combination of


inception neural network and recurrent neural network. The model inputs the
waveform data of multi-channel sensors end-to-end. Multi-dimensional features are
extracted by inception-like modules by using various kernel-based convolution layers.
Combined with GRU, modeling for time series features is realized, making full use of
data characteristics to complete classification tasks. Through experimental
verification on three most widely used public HAR datasets, this proposed method
showed consistent superior performance and has good generalization performance,
when compared with the state-of-the-art.

Kong et al. surveyed the complete state-of-the-art techniques in action recognition and
prediction. Existing models, popular algorithms, technical difficulties, popular action
databases, evaluation protocols, and promising future directions are also provided
with systematic discussions.

8
CHAPTER 3

EXISTING SYSTEM

ML falls under the larger canvas of Artificial Intelligence. ML seeks to build


intelligent systems or machines that can automatically learn and train themselves
through experience, without being explicitly programmed or requiring any human
intervention. In this sense, ML is a continuously evolving activity. It aims to
understand the data structure of the dataset at hand and accommodate the data into
ML models that can be used by companies and organizations. Following are the
benefits of ML.

 Enhanced decision-making: ML uses advanced algorithms to improve the


decision-making process capacity. It facilitates innovative models and
business services simultaneously. It provides a deep understanding of the
variations and types of data patterns. You can determine which step to take
next based on the variations and data patterns.
 Increases business productivity: It improves the business process and
productivity, contributing to business growth. It helps you to adapt to the
changing situations at workplaces quickly. The data continue to be updated
daily. So, the work environment, too, keeps on changing quickly. ML reduces
the chances of error occurrence by half. Hence, it boosts business productivity.
This aspect is important to consider when carrying out deep learning vs neural
network.
 Removes manual data entry: One of the most common concerns in many
organizations is the usage of duplicate records. ML algorithms use predictive
models that significantly avoid any errors caused by manual data entry. The
corresponding programs use the discovered data to enhance these processes.
Hence, the employees can save time to focus on other important business
tasks.
 Guarantees customer satisfaction: The ML algorithms are uniquely designed
to continue attaining experience with time. They are accurate and efficient.
These algorithms improve the machines’ decision-making skills. ML can
9
anyhow find a way to make accurate decisions or predictions, although the
data is overwhelming and ever-increasing. It benefits businesses with the latest
market opportunities related to revenue. As a result, it can satisfy the
customers’ expectations and boost your business’ sales in less time. Moreover,
it can quickly recognize threats in the market. You can compare deep learning
vs neural networks based on this aspect to have a clear judgment.
 Provides product recommendation: Unsupervised research assists in the
development of suggestion systems depending on goods. Currently, most e-
commerce platforms use ML to provide product recommendations. ML
algorithms use the consumers’ purchasing experience to balance it with the
assets’ huge inventory. This helps in detecting secret trends and connects
identical products. Finally, these goods are recommended to the consumers.
 Detects spam: ML is widely used for spam detection. It uses spam filters to
identify spam and phishing communications.
 Improves network security: ML improves an organization’s security. It helps
organizations to develop new systems capable of quickly and efficiently
recognizing unknown threats. It can track abnormalities present in network
activity and automatically execute relevant actions. When the ML algorithm is
used for self-training, it removes manual research and analysis. So, it enhances
the organization’s network security. Many deep learning neural networks are
also used for this purpose.
 Simplifies business analysis: ML is used in business analysis that involves
huge volumes of precise and quantitative historical data. It is widely used for
algorithmic trading, portfolio management, fraud detection, and lending in
finance. The future ML applications for finance will entail Chatbots and a few
other interfaces for improving customer service, security, and sentiment
analysis. Many neural networks and deep learning algorithms are also used to
streamline finance analysis.

3.1 Disadvantages

 ML Model makes decisions based on what it has learnt from the data. As a
result, while ML models may learn from data, they may need some human
interaction in the early stages.
 Moreover, its performance is poor with large dataset.

10
CHAPTER 4

PROPOSED SYSTEM

4.1 Overview

The real-time cognitive analysis and prediction of human behaviour in collaborative


environments, as described, involves several steps using a Deep Learning
Convolutional Neural Network (DLCNN) model for video analysis. Figure 4.1 shows
the proposed system model. The detailed operation illustrated as follows:

step 1: Video to Frame Conversion: In this step, a video stream is converted into
individual frames. Each frame represents a single image captured from the video
at a specific time instance. This process allows the model to analyze and make
predictions based on individual frames, which are then combined to make real-
time predictions.

step 2: Frame Preprocessing: Before feeding the frames into the DLCNN model,
preprocessing is essential to enhance the model's ability to detect patterns and
features. Common preprocessing steps may include:

 Resizing: Frames are resized to a consistent resolution to ensure uniform


input to the model.

 Normalization: Pixel values are scaled to a common range (e.g., [0, 1] or [-


1, 1]) to facilitate model convergence.

 Data Augmentation: Techniques such as rotation, cropping, and flipping


may be applied to increase the diversity of the training data and improve
model robustness.

step 3: DLCNN Model Building: A Deep Learning Convolutional Neural Network


(DLCNN) is designed and trained to recognize human behaviours from the
preprocessed frames. The model architecture typically consists of convolutional

11
layers for feature extraction, followed by fully connected layers for classification.
Here's a simplified overview of the steps involved in building the model:

 Convolutional Layers: These layers detect spatial patterns and features in


the frames. They use filters to extract information from the images.

 Pooling Layers: Pooling layers reduce the spatial dimensions of the feature
maps, helping to focus on the most relevant information.

 Fully Connected Layers: These layers provide the final classification based
on the extracted features.

 Training: The model is trained on a labeled dataset of video frames, where


each frame is associated with a behaviour label (e.g., safe driving, phone
usage, etc.). During training, the model learns to map input frames to the
corresponding behaviour labels through backpropagation and optimization
techniques (e.g., gradient descent).

Fig. 4.1: Block diagram of proposed system.

step 4: Model Prediction: After the DLCNN model is trained, it can be used for real-
time prediction of human behaviour. This involves:

 Feeding the preprocessed video frames into the trained model.

 The model assigns a behaviour label to each frame based on its learned
patterns and features.

 The behaviour labels are typically encoded as numerical values (e.g., 0 for
safe driving, 1 for phone usage, etc.).

 The model's output for each frame can be interpreted to determine the
predicted behaviour.

12
 In the provided code snippet, a conditional structure is used to map the
numerical predictions (e.g., '0', '1', '2') to human-readable behaviour
descriptions (e.g., 'Safe Driving', 'Using/Talking Phone').

4.2 Video to Frame Conversion

The process of converting a video into individual frames involves breaking down a
video stream into a sequence of static images, where each image represents a single
frame captured at a specific time instance. This is a crucial step in video analysis,
especially for tasks like object detection, behaviour recognition, or any application
that requires analyzing the visual content of a video. Here are the key steps involved
in video to frame conversion:

Video Capture: Open a video file or connect to a video stream (e.g., from a webcam
or surveillance camera) using a video processing library or tool. Popular libraries for
video processing include OpenCV (Open Source Computer Vision Library) in Python
and FFmpeg.

Frame Extraction: Read the video frame by frame. For each frame, which typically
retrieve an image that represents the content of that frame at a specific time.

Frame Storage: Store each frame as a separate image file or in memory as an image
object. Common image formats like JPEG or PNG are often used for storage.

4.3 Frame Preprocessing

Image preprocessing is a critical step in computer vision and image analysis tasks. It
involves a series of operations to prepare raw images for further processing by
algorithms or neural networks. Here's an explanation of each step in image
preprocessing:

Step 0. Image Read: The first step in image preprocessing is reading the raw image
from a source, typically a file on disk. Images can be in various formats, such as
JPEG, PNG, BMP, or others. Image reading is performed using libraries or functions
specific to the chosen programming environment or framework. The result of this step
is a digital representation of the image that can be manipulated programmatically.

Step 1. Image Resize: Image resize is a common preprocessing step, especially when
working with machine learning models or deep neural networks. It involves changing
the dimensions (width and height) of the image. Resizing can be necessary for several
reasons:

13
 Ensuring uniform input size: Many machine learning models, especially
convolutional neural networks (CNNs), require input images to have the same
dimensions. Resizing allows to standardize input sizes.

 Reducing computational complexity: Smaller images require fewer


computations, which can be beneficial for faster training and inference.

 Managing memory constraints: In some cases, images need to be resized to fit


within available memory constraints.

When resizing, it's essential to maintain the aspect ratio to prevent image distortion.
Typically, libraries like OpenCV or Pillow provide convenient functions for resizing
images.

Step 2. Image to Array: In this step, the image is converted into a numerical
representation in the form of a multidimensional array or tensor. Each pixel in the
image corresponds to a value in the array. The array is usually structured with
dimensions representing height, width, and colour channels (if applicable).

For grayscale images, the array is 2D, with each element representing the intensity of
a pixel. For colour images, it's a 3D or 4D array, with dimensions for height, width,
colour channels (e.g., Red, Green, Blue), and potentially batch size (if processing
multiple images simultaneously).

The conversion from an image to an array allows for numerical manipulation and
analysis, making it compatible with various data processing libraries and deep
learning frameworks like NumPy or TensorFlow.

Step 3. Image to Float32: Most machine learning and computer vision algorithms
expect input data to be in a specific data type, often 32-bit floating-point numbers
(float32). Converting the image array to float32 ensures that the pixel values can
represent a wide range of intensities between 0.0 (black) and 1.0 (white) or sometimes
between -1.0 and 1.0, depending on the specific normalization used.

This step is essential for maintaining consistency in data types and enabling
compatibility with various machine learning frameworks and libraries. It's typically
performed by dividing the pixel values by the maximum intensity value (e.g., 255 for
an 8-bit image) to scale them to the [0.0, 1.0] range.

Step 4. Image to Binary: Image binarization is a process of converting a grayscale


image into a binary image, where each pixel is represented by either 0 (black) or 1

14
(white) based on a specified threshold. Binarization is commonly used for tasks like
image segmentation, where you want to separate objects from the background.

The process involves setting a threshold value, and then for each pixel in the
grayscale image, if the pixel value is greater than or equal to the threshold, it is set to
1; otherwise, it is set to 0.

Binarization simplifies the image and reduces it to essential information, which can be
particularly useful in applications like character recognition or object tracking, where
you need to isolate regions of interest.

4.4 Dataset Splitting

In machine learning data pre-processing, we divide our dataset into a training set and
test set. This is one of the crucial steps of data pre-processing as by doing this, we can
enhance the performance of our machine learning model. Suppose if we have given
training to our machine learning model by a dataset and we test it by a completely
different dataset. Then, it will create difficulties for our model to understand the
correlations between the models. If we train our model very well and its training
accuracy is also very high, but we provide a new dataset to it, then it will decrease the
performance. So we always try to make a machine learning model which performs
well with the training set and also with the test dataset. Here, we can define these
datasets as:

Training Set: A subset of dataset to train the machine learning model, and we already
know the output.

Test set: A subset of dataset to test the machine learning model, and by using the test
set, model predicts the output.

4.5 DLCNN

According to the facts, training and testing of CNN involves in allowing every source
feature via a succession of convolution layers by a kernel or filter, rectified linear unit
(ReLU), max pooling, fully connected layer and utilize SoftMax layer with
classification layer to categorize the objects with probabilistic values ranging from
[ 0 , 1 ]. Convolution layer is the primary layer to extract the features from a source
feature and maintains the relationship between pixels by learning the features of
feature by employing tiny blocks of source data. It’s a mathematical function which
considers two inputs like source feature I ( x , y , d ) where x and y denotes the spatial

15
coordinates i.e., number of rows and columns. d is denoted as dimension of an feature
(here d=3, since the source feature is RGB) and a filter or kernel with similar size of
input feature and can be denoted as F ( k x , k y , d ).

Fig. 4.2: Representation of convolution layer process

The output obtained from convolution process of input feature and filter has a size of
C ( ( x−k x + 1 ) , ( y−k y +1 ) , 1 ), which is referred as feature map. An example of
convolution procedure is demonstrated in Fig. 2(a). Let us assume an input feature
with a size of 5 ×5 and the filter having the size of 3 ×3 . The feature map of input
feature is obtained by multiplying the input feature values with the filter values as
given in Fig. 2(b).

(a)

(b)

Fig. 4.3: Example of convolution layer process. (a) a feature with size 5 ×5 is
convolving with 3 ×3 kernel. (b) Convolved feature map.

ReLU layer: Networks that utilize the rectifier operation for the hidden layers are
cited as rectified linear unit (ReLU). This ReLU function G(∙) is a simple
computation that returns the value given as input directly if the value of input is

16
greater than zero else returns zero. This can be represented as mathematically using
the function max (∙) over the set of 0 and the input x as follows:

G ( x )=max { 0 , x }

Max pooing layer: This layer mitigates the number of parameters when there are
larger size features. This can be called subsampling or down sampling that mitigates
the dimensionality of every feature map by preserving the important information. Max
pooling considers the maximum element form the rectified feature map.

SoftMax classifier

Generally, SoftMax function is added at the end of the output since it is the place
where the nodes are meet finally and thus, they can be classified. Here, X is the input
of all the models and the layers between X and Y are the hidden layers and the data is
passed from X to all the layers and Received by Y. Suppose, we have 10 classes, and
we predict for which class the given input belongs to. So, for this what we do is allot
each class with a particular predicted output. Which means that we have 10 outputs
corresponding to 10 different class and predict the class by the highest probability.

Fig. 4.4: SoftMax classifier.

In Fig. 4.4, and we must predict what is the object that is present in the picture. In the
normal case, we predict whether the crop is A. But in this case, we must predict what
is the object that is present in the picture. This is the place where softmax comes in
handy. As the model is already trained on some data. So, as soon as the picture is
given, the model processes the pictures, send it to the hidden layers and then finally
send to softmax for classifying the picture. The softmax uses a One-Hot encoding
Technique to calculate the cross-entropy loss and get the max. One-Hot Encoding is

17
the technique that is used to categorize the data. In the previous example, if softmax
predicts that the object is class A then the One-Hot Encoding for:

Class A will be [1 0 0]

Class B will be [0 1 0]

Class C will be [0 0 1]

From the diagram, we see that the predictions are occurred. But generally, we don’t
know the predictions. But the machine must choose the correct predicted object. So,
for machine to identify an object correctly, it uses a function called cross-entropy
function. So, we choose more similar value by using the below cross-entropy formula.

Fig. 4.5: Example of SoftMax classifier.

In Fig. 4.5, we see that 0.462 is the loss of the function for class specific classifier. In
the same way, we find loss for remaining classifiers. The lowest the loss function, the
better the prediction is. The mathematical representation for loss function can be
represented as: -

LOSS=np . ∑ (−Y ∗np . log (Y pred ))

18
Fig. 4.6: Example of SoftMax classifier with test data.

4.6 Advantages of proposed system

 CNNs do not require human supervision for the task of identifying important
features.
 They are very accurate at image recognition and classification.
 Weight sharing is another major advantage of CNNs.
 Convolutional neural networks also minimize computation in comparison with
a regular neural network.
 CNNs make use of the same knowledge across all image locations.

19
CHAPTER 5

MACHINE LEARNING

5.1 What is Machine Learning

Before we look at the details of various machine learning methods, let's start by
looking at what machine learning is, and what it isn't. Machine learning is often
categorized as a subfield of artificial intelligence, but I find that categorization can
often be misleading at first brush. The study of machine learning certainly arose from
research in this context, but in the data science application of machine learning
methods, it's more helpful to think of machine learning as a means of building models
of data.

Fundamentally, machine learning involves building mathematical models to help


understand data. "Learning" enters the fray when we give these models tunable
parameters that can be adapted to observed data; in this way the program can be
considered to be "learning" from the data. Once these models have been fit to
previously seen data, they can be used to predict and understand aspects of newly
observed data. I'll leave to the reader the more philosophical digression regarding the
extent to which this type of mathematical, model-based "learning" is similar to the
"learning" exhibited by the human brain. Understanding the problem setting in
machine learning is essential to using these tools effectively, and so we will start with
some broad categorizations of the types of approaches we'll discuss here.

5.2 Categories of Machine Leaning

At the most fundamental level, machine learning can be categorized into two main
types: supervised learning and unsupervised learning.

Supervised learning involves somehow modeling the relationship between measured


features of data and some label associated with the data; once this model is
determined, it can be used to apply labels to new, unknown data. This is further

20
subdivided into classification tasks and regression tasks: in classification, the labels
are discrete categories, while in regression, the labels are continuous quantities. We
will see examples of both types of supervised learning in the following section.

Unsupervised learning involves modeling the features of a dataset without reference


to any label and is often described as "letting the dataset speak for itself." These
models include tasks such as clustering and dimensionality reduction. Clustering
algorithms identify distinct groups of data, while dimensionality reduction algorithms
search for more succinct representations of the data. We will see examples of both
types of unsupervised learning in the following section.

5.3 Need for Machine Learning

Human beings, at this moment, are the most intelligent and advanced species on earth
because they can think, evaluate, and solve complex problems. On the other side, AI
is still in its initial stage and have not surpassed human intelligence in many aspects.
Then the question is that what is the need to make machine learn? The most suitable
reason for doing this is, “to make decisions, based on data, with efficiency and scale”.

Lately, organizations are investing heavily in newer technologies like Artificial


Intelligence, Machine Learning and Deep Learning to get the key information from
data to perform several real-world tasks and solve problems. We can call it data-
driven decisions taken by machines, particularly to automate the process. These data-
driven decisions can be used, instead of using programming logic, in the problems
that cannot be programmed inherently. The fact is that we can’t do without human
intelligence, but other aspect is that we all need to solve real-world problems with
efficiency at a huge scale. That is why the need for machine learning arises.

5.4 Challenges in Machines Learning

While Machine Learning is rapidly evolving, making significant strides with


cybersecurity and autonomous cars, this segment of AI as whole still has a long way
to go. The reason behind is that ML has not been able to overcome number of
challenges. The challenges that ML is facing currently are −

1. Quality of data − Having good-quality data for ML algorithms is one of the


biggest challenges. Use of low-quality data leads to the problems related to
data preprocessing and feature extraction.
2. Time-Consuming task − Another challenge faced by ML models is the

21
consumption of time especially for data acquisition, feature extraction and
retrieval.
3. Lack of specialist persons − As ML technology is still in its infancy stage,
availability of expert resources is a tough job.
4. No clear objective for formulating business problems − Having no clear
objective and well-defined goal for business problems is another key challenge
for ML because this technology is not that mature yet.
5. Issue of overfitting & underfitting − If the model is overfitting or underfitting,
it cannot be represented well for the problem.
6. Curse of dimensionality − Another challenge ML model faces is too many
features of data points. This can be a real hindrance.
7. Difficulty in deployment − Complexity of the ML model makes it quite
difficult to be deployed in real life.

5.5 Applications of Machines Learning

Machine Learning is the most rapidly growing technology and according to


researchers we are in the golden year of AI and ML. It is used to solve many real-
world complex problems which cannot be solved with traditional approach. Following
are some real-world applications of ML

 Emotion analysis
 Sentiment analysis
 Error detection and prevention
 Weather forecasting and prediction
 Stock market analysis and forecasting
 Speech synthesis
 Speech recognition
 Customer segmentation
 Object recognition
 Fraud detection
 Fraud prevention
 Recommendation of products to customer in online shopping

5.6 How to Start Learning Machine Learning?

22
Arthur Samuel coined the term “Machine Learning” in 1959 and defined it as a “Field
of study that gives computers the capability to learn without being explicitly
programmed”.

And that was the beginning of Machine Learning! In modern times, Machine
Learning is one of the most popular (if not the most!) career choices. According
to Indeed, Machine Learning Engineer Is The Best Job of 2019 with a 344% growth
and an average base salary of $146,085 per year.

But there is still a lot of doubt about what exactly is Machine Learning and how to
start learning it? So, this article deals with the Basics of Machine Learning and also
the path you can follow to eventually become a full-fledged Machine Learning
Engineer. Now let’s get started!!!

This is a rough roadmap you can follow on your way to becoming an insanely
talented Machine Learning Engineer. Of course, you can always modify the steps
according to your needs to reach your desired end-goal!

Step 1 – Understand the Prerequisites

In case you are a genius, you could start ML directly but normally, there are some
prerequisites that you need to know which include Linear Algebra, Multivariate
Calculus, Statistics, and Python. And if you don’t know these, never fear! You don’t
need a Ph.D. degree in these topics to get started but you do need a basic
understanding.

(a) Learn Linear Algebra and Multivariate Calculus

Both Linear Algebra and Multivariate Calculus are important in Machine Learning.
However, the extent to which you need them depends on your role as a data scientist.
If you are more focused on application heavy machine learning, then you will not be
that heavily focused on maths as there are many common libraries available. But if
you want to focus on R&D in Machine Learning, then mastery of Linear Algebra and
Multivariate Calculus is very important as you will have to implement many ML
algorithms from scratch.

(b) Learn Statistics

Data plays a huge role in Machine Learning. In fact, around 80% of your time as an
ML expert will be spent collecting and cleaning data. And statistics is a field that
handles the collection, analysis, and presentation of data. So it is no surprise that you
23
need to learn it!!!
Some of the key concepts in statistics that are important are Statistical Significance,
Probability Distributions, Hypothesis Testing, Regression, etc. Also, Bayesian
Thinking is also a very important part of ML which deals with various concepts like
Conditional Probability, Priors, and Posteriors, Maximum Likelihood, etc.

(c) Learn Python

Some people prefer to skip Linear Algebra, Multivariate Calculus and Statistics and
learn them as they go along with trial and error. But the one thing that you absolutely
cannot skip is Python! While there are other languages you can use for Machine
Learning like R, Scala, etc. Python is currently the most popular language for ML. In
fact, there are many Python libraries that are specifically useful for Artificial
Intelligence and Machine Learning such as Keras, TensorFlow, Scikit-learn, etc.

So if you want to learn ML, it’s best if you learn Python! You can do that using
various online resources and courses such as Fork Python available Free on
GeeksforGeeks.

Step 2 – Learn Various ML Concepts

Now that you are done with the prerequisites, you can move on to actually learning
ML (Which is the fun part!!!) It’s best to start with the basics and then move on to the
more complicated stuff. Some of the basic concepts in ML are:

5.6.1 Terminologies of Machine Learning

 Model – A model is a specific representation learned from data by applying


some machine learning algorithm. A model is also called a hypothesis.
 Feature – A feature is an individual measurable property of the data. A set of
numeric features can be conveniently described by a feature vector. Feature
vectors are fed as input to the model. For example, in order to predict a fruit,
there may be features like color, smell, taste, etc.
 Target (Label) – A target variable or label is the value to be predicted by our
model. For the fruit example discussed in the feature section, the label with
each set of input would be the name of the fruit like apple, orange, banana, etc.
 Training – The idea is to give a set of inputs(features) and it’s expected
outputs(labels), so after training, we will have a model (hypothesis) that will
then map new data to one of the categories trained on.

24
 Prediction – Once our model is ready, it can be fed a set of inputs to which it
will provide a predicted output(label).

5.6.2 Types of Machine Learning

 Supervised Learning – This involves learning from a training dataset with


labeled data using classification and regression models. This learning process
continues until the required level of performance is achieved.
 Unsupervised Learning – This involves using unlabelled data and then finding
the underlying structure in the data in order to learn more and more about the
data itself using factor and cluster analysis models.
 Semi-supervised Learning – This involves using unlabelled data like
Unsupervised Learning with a small amount of labeled data. Using labeled
data vastly increases the learning accuracy and is also more cost-effective than
Supervised Learning.
 Reinforcement Learning – This involves learning optimal actions through trial
and error. So the next action is decided by learning behaviours that are based
on the current state and that will maximize the reward in the future.

5.7 Advantages of Machine learning

1. Easily identifies trends and patterns -

Machine Learning can review large volumes of data and discover specific trends and
patterns that would not be apparent to humans. For instance, for an e-commerce
website like Amazon, it serves to understand the browsing behaviours and purchase
histories of its users to help cater to the right products, deals, and reminders relevant
to them. It uses the results to reveal relevant advertisements to them.

2. No human intervention needed (automation)

With ML, you don’t need to babysit your project every step of the way. Since it
means giving machines the ability to learn, it lets them make predictions and also
improve the algorithms on their own. A common example of this is anti-virus
softwares; they learn to filter new threats as they are recognized. ML is also good at
recognizing spam.

3. Continuous Improvement

25
As ML algorithms gain experience, they keep improving in accuracy and efficiency.
This lets them make better decisions. Say you need to make a weather forecast model.
As the amount of data you have keeps growing, your algorithms learn to make more
accurate predictions faster.

4. Handling multi-dimensional and multi-variety data

Machine Learning algorithms are good at handling data that are multi-dimensional
and multi-variety, and they can do this in dynamic or uncertain environments.

5. Wide Applications

You could be an e-tailer or a healthcare provider and make ML work for you. Where
it does apply, it holds the capability to help deliver a much more personal experience
to customers while also targeting the right customers.

5.8 Disadvantages of Machine Learning

1. Data Acquisition

Machine Learning requires massive data sets to train on, and these should be
inclusive/unbiased, and of good quality. There can also be times where they must wait
for new data to be generated.

2. Time and Resources

ML needs enough time to let the algorithms learn and develop enough to fulfill their
purpose with a considerable amount of accuracy and relevancy. It also needs massive
resources to function. This can mean additional requirements of computer power for
you.

3. Interpretation of Results

Another major challenge is the ability to accurately interpret results generated by the
algorithms. You must also carefully choose the algorithms for your purpose.

4. High error-susceptibility

Machine Learning is autonomous but highly susceptible to errors. Suppose you train
an algorithm with data sets small enough to not be inclusive. You end up with biased
predictions coming from a biased training set. This leads to irrelevant advertisements
being displayed to customers. In the case of ML, such blunders can set off a chain of
errors that can go undetected for long periods of time. And when they do get noticed,
26
it takes quite some time to recognize the source of the issue, and even longer to
correct it.

CHAPTER 6

SOFTWARE ENVIRONMENT

6.1 What is Python?

Below are some facts about Python.

 Python is currently the most widely used multi-purpose, high-level


programming language.
 Python allows programming in Object-Oriented and Procedural paradigms.
Python programs generally are smaller than other programming languages
like Java.
 Programmers have to type relatively less and indentation requirement of the
language, makes them readable all the time.
 Python language is being used by almost all tech-giant companies like –
Google, Amazon, Facebook, Instagram, Dropbox, Uber… etc.

The biggest strength of Python is huge collection of standard library which can be
used for the following –

 Machine Learning
 GUI Applications (like Kivy, Tkinter, PyQt etc. )
 Web frameworks like Django (used by YouTube, Instagram, Dropbox)
 Image processing (like Opencv, Pillow)
 Web scraping (like Scrapy, BeautifulSoup, Selenium)
 Test frameworks
 Multimedia

27
6.2 Advantages of Python

Let’s see how Python dominates over other languages.

1. Extensive Libraries

Python downloads with an extensive library and it contain code for various purposes
like regular expressions, documentation-generation, unit-testing, web browsers,
threading, databases, CGI, email, image manipulation, and more. So, we don’t have to
write the complete code for that manually.

2. Extensible

As we have seen earlier, Python can be extended to other languages. You can write
some of your code in languages like C++ or C. This comes in handy, especially in
projects.

3. Embeddable

Complimentary to extensibility, Python is embeddable as well. You can put your


Python code in your source code of a different language, like C++. This lets us add
scripting capabilities to our code in the other language.

4. Improved Productivity

The language’s simplicity and extensive libraries render programmers more


productive than languages like Java and C++ do. Also, the fact that you need to write
less and get more things done.

5. IOT Opportunities

Since Python forms the basis of new platforms like Raspberry Pi, it finds the future
bright for the Internet Of Things. This is a way to connect the language with the real
world.

6. Simple and Easy

When working with Java, you may have to create a class to print ‘Hello World’. But
in Python, just a print statement will do. It is also quite easy to learn, understand, and
code. This is why when people pick up Python, they have a hard time adjusting to
other more verbose languages like Java.

7. Readable

28
Because it is not such a verbose language, reading Python is much like reading
English. This is the reason why it is so easy to learn, understand, and code. It also
does not need curly braces to define blocks, and indentation is mandatory. This
further aids the readability of the code.

8. Object-Oriented

This language supports both the procedural and object-oriented programming


paradigms. While functions help us with code reusability, classes and objects let us
model the real world. A class allows the encapsulation of data and functions into one.

9. Free and Open-Source

Like we said earlier, Python is freely available. But not only can you download
Python for free, but you can also download its source code, make changes to it, and
even distribute it. It downloads with an extensive collection of libraries to help you
with your tasks.

10. Portable

When you code your project in a language like C++, you may need to make some
changes to it if you want to run it on another platform. But it isn’t the same with
Python. Here, you need to code only once, and you can run it anywhere. This is called
Write Once Run Anywhere (WORA). However, you need to be careful enough not to
include any system-dependent features.

11. Interpreted

Lastly, we will say that it is an interpreted language. Since statements are executed
one by one, debugging is easier than in compiled languages.

Any doubts till now in the advantages of Python? Mention in the comment section.

Advantages of Python Over Other Languages

1. Less Coding

Almost all of the tasks done in Python requires less coding when the same task is
done in other languages. Python also has an awesome standard library support, so you

29
don’t have to search for any third-party libraries to get your job done. This is the
reason that many people suggest learning Python to beginners.

2. Affordable

Python is free therefore individuals, small companies or big organizations can


leverage the free available resources to build applications. Python is popular and
widely used so it gives you better community support.

The 2019 Github annual survey showed us that Python has overtaken Java in the most
popular programming language category.

3. Python is for Everyone

Python code can run on any machine whether it is Linux, Mac or Windows.
Programmers need to learn different languages for different jobs but with Python, you
can professionally build web apps, perform data analysis and machine learning,
automate things, do web scraping and also build games and powerful visualizations. It
is an all-rounder programming language.

6.3 Disadvantages of Python

So far, we’ve seen why Python is a great choice for your project. But if you choose it,
you should be aware of its consequences as well. Let’s now see the downsides of
choosing Python over another language.

1. Speed Limitations

We have seen that Python code is executed line by line. But since Python is
interpreted, it often results in slow execution. This, however, isn’t a problem unless
speed is a focal point for the project. In other words, unless high speed is a
requirement, the benefits offered by Python are enough to distract us from its speed
limitations.

2. Weak in Mobile Computing and Browsers

While it serves as an excellent server-side language, Python is much rarely seen on


the client-side. Besides that, it is rarely ever used to implement smartphone-based
applications. One such application is called Carbonnelle.

The reason it is not so famous despite the existence of Brython is that it isn’t that
secure.

30
3. Design Restrictions

As you know, Python is dynamically typed. This means that you don’t need to declare
the type of variable while writing the code. It uses duck-typing. But wait, what’s that?
Well, it just means that if it looks like a duck, it must be a duck. While this is easy on
the programmers during coding, it can raise run-time errors.

4. Underdeveloped Database Access Layers

Compared to more widely used technologies like JDBC (Java DataBase Connectivity)
and ODBC (Open DataBase Connectivity), Python’s database access layers are a bit
underdeveloped. Consequently, it is less often applied in huge enterprises.

5. Simple

No, we’re not kidding. Python’s simplicity can indeed be a problem. Take my
example. I don’t do Java, I’m more of a Python person. To me, its syntax is so simple
that the verbosity of Java code seems unnecessary.

This was all about the Advantages and Disadvantages of Python Programming
Language.

6.4 History of Python

What do the alphabet and the programming language Python have in common? Right,
both start with ABC. If we are talking about ABC in the Python context, it's clear that
the programming language ABC is meant. ABC is a general-purpose programming
language and programming environment, which had been developed in the
Netherlands, Amsterdam, at the CWI (Centrum Wiskunde &Informatica). The
greatest achievement of ABC was to influence the design of Python. Python was
conceptualized in the late 1980s. Guido van Rossum worked that time in a project at
the CWI, called Amoeba, a distributed operating system. In an interview with Bill
Venners1, Guido van Rossum said: "In the early 1980s, I worked as an implementer
on a team building a language called ABC at Centrum voor Wiskunde en Informatica
(CWI). I don't know how well people know ABC's influence on Python. I try to
mention ABC's influence because I'm indebted to everything I learned during that
project and to the people who worked on it. "Later on in the same Interview, Guido
van Rossum continued: "I remembered all my experience and some of my frustration
with ABC. I decided to try to design a simple scripting language that possessed some
of ABC's better properties, but without its problems. So I started typing. I created a
31
simple virtual machine, a simple parser, and a simple runtime. I made my own version
of the various ABC parts that I liked. I created a basic syntax, used indentation for
statement grouping instead of curly braces or begin-end blocks, and developed a small
number of powerful data types: a hash table (or dictionary, as we call it), a list,
strings, and numbers."

6.5 Python Development Steps

Guido Van Rossum published the first version of Python code (version 0.9.0) at
alt.sources in February 1991. This release included already exception handling,
functions, and the core data types of list, dict, str and others. It was also object
oriented and had a module system.

Python version 1.0 was released in January 1994. The major new features included in
this release were the functional programming tools lambda, map, filter and reduce,
which Guido Van Rossum never liked. Six and a half years later in October 2000,
Python 2.0 was introduced. This release included list comprehensions, a full garbage
collector and it was supporting unicode. Python flourished for another 8 years in the
versions 2.x before the next major release as Python 3.0 (also known as "Python
3000" and "Py3K") was released. Python 3 is not backwards compatible with Python
2.x. The emphasis in Python 3 had been on the removal of duplicate programming
constructs and modules, thus fulfilling or coming close to fulfilling the 13th law of the
Zen of Python: "There should be one -- and preferably only one -- obvious way to do
it."Some changes in Python 7.3:

Print is now a function.

 Views and iterators instead of lists


 The rules for ordering comparisons have been simplified. E.g., a
heterogeneous list cannot be sorted, because all the elements of a list must
be comparable to each other.
 There is only one integer type left, i.e., int. long is int as well.
 The division of two integers returns a float instead of an integer. "//" can be
used to have the "old" behaviour.
 Text Vs. Data Instead of Unicode Vs. 8-bit

6.6 Purpose

32
We demonstrated that our approach enables successful segmentation of intra-retinal
layers—even with low-quality images containing speckle noise, low contrast, and
different intensity ranges throughout—with the assistance of the ANIS feature.

6.7 Python

Python is an interpreted high-level programming language for general-purpose


programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant
whitespace.

Python features a dynamic type system and automatic memory management. It


supports multiple programming paradigms, including object-oriented, imperative,
functional and procedural, and has a large and comprehensive standard library.

 Python is Interpreted − Python is processed at runtime by the interpreter. You


do not need to compile your program before executing it. This is similar to
PERL and PHP.
 Python is Interactive − you can actually sit at a Python prompt and interact
with the interpreter directly to write your programs.

Python also acknowledges that speed of development is important. Readable and terse
code is part of this, and so is access to powerful constructs that avoid tedious
repetition of code. Maintainability also ties into this may be an all but useless metric,
but it does say something about how much code you have to scan, read and/or
understand to troubleshoot problems or tweak behaviours. This speed of development,
the ease with which a programmer of other languages can pick up basic Python skills
and the huge standard library is key to another area where Python excels. All its tools
have been quick to implement, saved a lot of time, and several of them have later been
patched and updated by people with no Python background - without breaking.

6.8 Modules Used in Project

TensorFlow

TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library and is also used for
machine learning applications such as neural networks. It is used for both research
and production at Google.

33
TensorFlow was developed by the Google Brain team for internal Google use. It was
released under the Apache 2.0 open-source license on November 9, 2015.

NumPy

NumPy is a general-purpose array-processing package. It provides a high-


performance multidimensional array object, and tools for working with these arrays.

It is the fundamental package for scientific computing with Python. It contains


various features including these important ones:

 A powerful N-dimensional array object


 Sophisticated (broadcasting) functions
 Tools for integrating C/C++ and Fortran code
 Useful linear algebra, Fourier transform, and random number capabilities

Besides its obvious scientific uses, NumPy can also be used as an efficient multi-
dimensional container of generic data. Arbitrary datatypes can be defined using
NumPy which allows NumPy to seamlessly and speedily integrate with a wide variety
of databases.

Pandas

Pandas is an open-source Python Library providing high-performance data


manipulation and analysis tool using its powerful data structures. Python was majorly
used for data munging and preparation. It had very little contribution towards data
analysis. Pandas solved this problem. Using Pandas, we can accomplish five typical
steps in the processing and analysis of data, regardless of the origin of data load,
prepare, manipulate, model, and analyze. Python with Pandas is used in a wide range
of fields including academic and commercial domains including finance, economics,
Statistics, analytics, etc.

Matplotlib

Matplotlib is a Python 2D plotting library which produces publication quality figures


in a variety of hardcopy formats and interactive environments across platforms.
Matplotlib can be used in Python scripts, the Python and IPython shells, the Jupyter
Notebook, web application servers, and four graphical user interface toolkits.
Matplotlib tries to make easy things easy and hard things possible. You can generate

34
plots, histograms, power spectra, bar charts, error charts, scatter plots, etc., with just a
few lines of code. For examples, see the sample plots and thumbnail gallery.

For simple plotting the pyplot module provides a MATLAB-like interface,


particularly when combined with IPython. For the power user, you have full control
of line styles, font properties, axes properties, etc, via an object oriented interface or
via a set of functions familiar to MATLAB users.

Scikit – learn

Scikit-learn provides a range of supervised and unsupervised learning algorithms via a


consistent interface in Python. It is licensed under a permissive simplified BSD
license and is distributed under many Linux distributions, encouraging academic and
commercial use. Python

Python is an interpreted high-level programming language for general-purpose


programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant
whitespace.

Python features a dynamic type system and automatic memory management. It


supports multiple programming paradigms, including object-oriented, imperative,
functional and procedural, and has a large and comprehensive standard library.

 Python is Interpreted − Python is processed at runtime by the interpreter. You


do not need to compile your program before executing it. This is similar to
PERL and PHP.
 Python is Interactive − you can actually sit at a Python prompt and interact
with the interpreter directly to write your programs.

Python also acknowledges that speed of development is important. Readable and terse
code is part of this, and so is access to powerful constructs that avoid tedious
repetition of code. Maintainability also ties into this may be an all but useless metric,
but it does say something about how much code you have to scan, read and/or
understand to troubleshoot problems or tweak behaviours. This speed of development,
the ease with which a programmer of other languages can pick up basic Python skills
and the huge standard library is key to another area where Python excels. All its tools
have been quick to implement, saved a lot of time, and several of them have later been
patched and updated by people with no Python background - without breaking.

35
Install Python Step-by-Step in Windows and Mac

Python a versatile programming language doesn’t come pre-installed on your


computer devices. Python was first released in the year 1991 and until today it is a
very popular high-level programming language. Its style philosophy emphasizes code
readability with its notable use of great whitespace.

The object-oriented approach and language construct provided by Python enables


programmers to write both clear and logical code for projects. This software does not
come pre-packaged with Windows.

How to Install Python on Windows and Mac

There have been several updates in the Python version over the years. The question is
how to install Python? It might be confusing for the beginner who is willing to start
learning Python but this tutorial will solve your query. The latest or the newest
version of Python is version 3.7.4 or in other words, it is Python 3.

Note: The python version 3.7.4 cannot be used on Windows XP or earlier devices.

Before you start with the installation process of Python. First, you need to know about
your System Requirements. Based on your system type i.e. operating system and
based processor, you must download the python version. My system type is a
Windows 64-bit operating system. So the steps below are to install python version
3.7.4 on Windows 7 device or to install Python 3. Download the Python Cheatsheet
here.The steps on how to install Python on Windows 10, 8 and 7 are divided into 4
parts to help understand better.

Download the Correct version into the system

Step 1: Go to the official site to download and install python using Google Chrome or
any other web browser. OR Click on the following link: https://www.python.org

36
Figure 6.1.Step1 for download python.

Now, check for the latest and the correct version for your operating system.

Step 2: Click on the Download Tab.

Figure 6.2.Step2 for download python.

Step 3: You can either select the Download Python for windows 3.7.4 button in
Yellow Color or you can scroll further down and click on download with respective to
their version. Here, we are downloading the most recent python version for windows
3.7.4

37
Figure 6.3.Step3 for download python.

Step 4: Scroll down the page until you find the Files option.

Step 5: Here you see a different version of python along with the operating system.

Figure 6.4.Step5 for download python.

 To download Windows 32-bit python, you can select any one from the three
options: Windows x86 embeddable zip file, Windows x86 executable installer
or Windows x86 web-based installer.
 To download Windows 64-bit python, you can select any one from the three
options: Windows x86-64 embeddable zip file, Windows x86-64 executable
installer or Windows x86-64 web-based installer.

Here we will install Windows x86-64 web-based installer. Here your first part
regarding which version of python is to be downloaded is completed. Now we move
ahead with the second part in installing python i.e. Installation

Note: To know the changes or updates that are made in the version you can click on
the Release Note Option.

38
6.9 Installation of Python

Step 1: Go to Download and Open the downloaded python version to carry out the
installation process.

Figure 6.5.Step1 for installation python.

Step 2: Before you click on Install Now, Make sure to put a tick on Add Python 3.7 to
PATH.

Figure 6.6.Step2 for installation python.

Step 3: Click on Install NOW After the installation is successful. Click on Close.

39
Figure 6.7.Step3 for installation python.

With these above three steps on python installation, you have successfully and
correctly installed Python. Now is the time to verify the installation.

Note: The installation process might take a couple of minutes.

Verify the Python Installation

Step 1: Click on Start

Step 2: In the Windows Run Command, type “cmd”.

Figure 6.8.Step2 for Verify the Python Installation

40
Step 3: Open the Command prompt option.

Step 4: Let us test whether the python is correctly installed. Type python –V and press
Enter.

Figure 6.9. Testing python

Step 5: You will get the answer as 3.7.4

Note: If you have any of the earlier versions of Python already installed. You must
first uninstall the earlier version and then install the new one.

Check how the Python IDLE works

Step 1: Click on Start

Step 2: In the Windows Run command, type “python idle”.

Figure 6.10.Step2 for checking python IDLE

Step 3: Click on IDLE (Python 3.7 64-bit) and launch the program

Step 4: To go ahead with working in IDLE you must first save the file. Click on File >
Click on Save

41
F
igure 6.11.Step4 for checking python IDLE

Step 5: Name the file and save as type should be Python files. Click on SAVE. Here I
have named the files as Hey World.

Step 6: Now for e.g. enter print (“Hey World”) and Press Enter.

Figure 6.12.Step6 for checking python IDLE

You will see that the command given is launched. With this, we end our tutorial on
how to install Python. You have learned how to download python for windows into
your respective operating system.

Note: Unlike Java, Python does not need semicolons at the end of the statements
otherwise it won’t work.

42
CHAPTER 7

SOURCE CODE

from tkinter import *

import tkinter

import numpy as np

import imutils

import cv2 as cv

from keras.preprocessing.image import ImageDataGenerator

from keras.models import Sequential

from keras.layers import Convolution2D, MaxPooling2D, ZeroPadding2D

from keras.layers import Activation, Dropout, Flatten, Dense

import os

from keras.preprocessing import image

from tkinter import filedialog

from tkinter.filedialog import askopenfilename

main = tkinter.Tk()

main.title("Machine Learning for Efficient Assessment and Prediction of Human


Performance in Collaborative Learning Environments")

main.geometry("800x500")

global cnn_model

global video

43
def loadModel():#load cnn model

global cnn_model

img_width, img_height = 150, 150

cnn_model = Sequential()

cnn_model.add(Convolution2D(32, 3, 3, input_shape = (150, 150, 3), activation =


'relu'))

cnn_model.add(MaxPooling2D(pool_size = (2, 2)))

cnn_model.add(Convolution2D(32, 3, 3, activation = 'relu'))

cnn_model.add(MaxPooling2D(pool_size = (2, 2)))

cnn_model.add(Flatten())

cnn_model.add(Dense(output_dim = 128, activation = 'relu'))

cnn_model.add(Dense(output_dim = 10, activation = 'softmax'))

cnn_model.compile(optimizer = 'adam', loss = 'categorical_crossentropy', metrics =


['accuracy'])

cnn_model.load_weights('model/cnn_model.h5')

pathlabel.config(text=" CNN Model Generated Successfully")

def upload():#upload video as input

global video

filename = filedialog.askopenfilename(initialdir="Video")

pathlabel.config(text=" Video loaded")

video = cv.VideoCapture(filename)

44
#track or assess human performance

def humanPerformance():

global cnn_model

while(True):

ret, frame = video.read()

print(ret)

if ret == True:

cv.imwrite("test.jpg",frame)

imagetest = image.load_img("test.jpg", target_size = (150,150))

imagetest = image.img_to_array(imagetest)

imagetest = np.expand_dims(imagetest, axis = 0)

predict = cnn_model.predict_classes(imagetest)

print(predict)

msg = "";

if str(predict[0]) == '0':

msg = 'Safe Driving'

if str(predict[0]) == '1':

msg = 'Using/Talking Phone'

if str(predict[0]) == '2':

msg = 'Talking On phone'

if str(predict[0]) == '3':

msg = 'Using/Talking Phone'

if str(predict[0]) == '4':

msg = 'Using/Talking Phone'

45
if str(predict[0]) == '5':

msg = 'Drinking/Radio Operating'

if str(predict[0]) == '6':

msg = 'Drinking/Radio Operating'

if str(predict[0]) == '7':

msg = 'Reaching Behind'

if str(predict[0]) == '8':

msg = 'Hair & Makeup'

if str(predict[0]) == '9':

msg = 'Talking To Passenger'

text_label = "{}: {:4f}".format(msg, 80)

cv.putText(frame, text_label, (20, 20), cv.FONT_HERSHEY_SIMPLEX, 0.5,


(0, 255, 0), 2)

cv.imshow('Frame', frame)

if cv.waitKey(2500) & 0xFF == ord('q'):

break

else:

break

video.release()

cv.destroyAllWindows()

def exit():

global main

main.destroy()
46
font = ('times', 16, 'bold')

title = Label(main, text='Machine Learning for Efficient Assessment and Prediction of


Human Performance in Collaborative Learning Environments',anchor=W,
justify=LEFT)

title.config(bg='yellow3', fg='white')

title.config(font=font)

title.config(height=3, width=120)

title.place(x=0,y=5)

font1 = ('times', 13, 'bold')

loadButton = Button(main, text="Generate & Load CNN Model",


command=loadModel)

loadButton.place(x=50,y=200)

loadButton.config(font=font1)

pathlabel = Label(main)

pathlabel.config(bg='DarkOrange1', fg='firebrick4')

pathlabel.config(font=font1)

pathlabel.place(x=50,y=250)

uploadButton = Button(main, text="Upload Input Video", command=upload)

47
uploadButton.place(x=50,y=300)

uploadButton.config(font=font1)

predictButton = Button(main, text="Predict Human Performance",


command=humanPerformance)

predictButton.place(x=50,y=350)

predictButton.config(font=font1)

exitButton = Button(main, text="Exit", command=exit)

exitButton.place(x=50,y=400)

exitButton.config(font=font1)

main.config(bg='MediumPurple1')

main.mainloop()

48
CHAPTER 8

RESULTS AND DISCUSSION

Figure 8.1 illustrates the architecture of a DLCNN used in the context of the real-time
cognitive analysis and prediction of human behaviour in collaborative environments.
It might include graphical representations of different layers within the DLCNN, such
as convolutional layers, pooling layers, and fully connected layers. Each layer's role
and characteristics may be described, providing a visual overview of how data is
processed, and features are extracted within the network.

Figure 8.1. CNN Layers Description.

Figure 8.2. Predicted outcome as Using\talking phone.

Figure 8.2 is a visualization of predicted outcomes from the behaviour prediction


model. It show a scenario where the model has correctly predicted that a person is
engaged in "Using/Talking Phone" behaviour in a collaborative environment. This
49
visualization could include an image or a graphical representation of the predicted
behaviour, along with relevant context or features that contributed to this prediction.

Figure 8.3 represents a predicted outcome, but in this case, the predicted behaviour is
"Drinking." It might include a visual depiction of the situation where the model
correctly identifies this behaviour, potentially showing relevant frames or features
associated with the prediction.

Figure 8.4 provides a graphical representation of the training progress of the proposed
DLCNN model. It may show two distinct plots: one for accuracy and another for loss.
These plots help monitor the model's performance during training. The accuracy plot
typically shows how well the model is performing on the training data over epochs,
while the loss plot illustrates how the model's error (or loss) is decreasing over time.
By observing these plots, you can assess whether the model is converging to a
satisfactory level of accuracy and low loss or if further training adjustments are
needed.

Figure 8.3. Predicted outcome as drinking.

50
Figure 8.4. Proposed DLCNN accuracy and loss for 10 epochs.

Table 8.1 demonstrates a clear performance improvement in terms of accuracy and


loss for the "Proposed Method" compared to the existing methods (Naive Bayes and
Logistic Regression Classifiers). The proposed method achieves nearly perfect
accuracy and minimal loss, indicating its superior predictive capabilities in the given
task or dataset. The table provides a performance comparison between three different
methods, possibly for a predictive modeling task. Here's a breakdown of the metrics
and the comparison:

 Metric: This column indicates the evaluation metric used to assess the
performance of the methods. In this case, two metrics are used: "Accuracy
(%)" and "Loss."

 Existing NBC (Naive Bayes Classifier): This row represents the performance
metrics for an existing method that uses a Naive Bayes Classifier.

 Accuracy (%): The accuracy of this existing method is 86.95%. This


means that the Naive Bayes Classifier correctly predicts the outcome
or classification for approximately 86.95% of the cases in the dataset.

 Loss: The loss value for this method is 0.8747. The loss is a measure
of how well the model's predictions match the actual values, with
lower values indicating better alignment between predictions and
actual outcomes.

 Existing LRC (Logistic Regression Classifier): This row represents the


performance metrics for another existing method that uses a Logistic
Regression Classifier.

 Accuracy (%): The accuracy of this existing method is 90.985%. It


performs slightly better than the Naive Bayes Classifier, with an
accuracy rate of approximately 90.985%.

 Loss: The loss value for this method is 0.284, which is significantly
lower than the loss of the Naive Bayes Classifier. This suggests that
the Logistic Regression Classifier provides better predictions with a
lower error rate.

 Proposed Method: This row presents the performance metrics for a proposed
method, which might be a new or improved approach compared to the existing
methods.
51
 Accuracy (%): The proposed method achieves an impressive accuracy
rate of 99.98%, significantly outperforming both the Naive Bayes and
Logistic Regression Classifiers. This indicates that the proposed
method has a very high rate of correct predictions.

 Loss: The loss value for the proposed method is 0.03773, which is
remarkably low. This suggests that the proposed method's predictions
are very close to the actual values, with minimal error.

Table 1. Performance comparison

Metric Existing Existing LRC Proposed Method


NBC
Accuracy (%) 86.95 90.985 99.98
Loss 0.8747 0.284 0.03773

52
CHAPTER 9

CONCLUSION AND FUTURE WORK

9.1 Conclusion

In conclusion, the real-time cognitive analysis and prediction of human behaviour in


collaborative environments, employing a Deep Learning Convolutional Neural
Network (DLCNN) model, represents a powerful and innovative approach to
understanding and addressing behavioural patterns in various contexts. This multi-
step process, from video to frame conversion and preprocessing to model building and
prediction, demonstrates the intersection of computer vision and machine learning
techniques in the realm of behavioural analysis. By converting video streams into
individual frames, enhancing data quality through preprocessing, and training
DLCNN models to recognize patterns, organizations and researchers can gain
valuable insights into human behaviour, ranging from safe driving practices to phone
usage, among others. The conditional mapping of numerical predictions to behaviour
labels ensures interpretability and usability. However, it's crucial to recognize that the
effectiveness of such systems depends not only on technical proficiency but also on
the quality and diversity of training data and ethical considerations surrounding
privacy and responsible AI usage. In the era of collaborative environments and digital
transformation, these real-time behavioural analysis methods hold immense potential
for enhancing productivity, safety, and overall human experiences across various
domains.

9.2 Future scope

The future scope of real-time cognitive analysis and prediction of human behaviour in
collaborative environments is exceptionally promising, with several exciting avenues
for exploration and development:

 Enhanced Accuracy and Precision: Future research will likely focus on


refining model architectures and training methodologies to achieve even
higher accuracy and precision in behaviour prediction. Advancements in deep
learning techniques, such as attention mechanisms and recurrent neural
networks, may contribute to more robust and context-aware models.

 Multi-Modal Data Integration: Integrating data from multiple sources,


including audio, text, and sensor data, alongside video, will provide a more
53
comprehensive understanding of human behaviour. This multi-modal
approach could enable more nuanced and accurate predictions, especially in
complex collaborative settings.

 Real-time Feedback and Intervention: Beyond prediction, future systems


may incorporate real-time feedback and intervention mechanisms. For
instance, an AI system could provide instant alerts or suggestions to users in
collaborative environments to promote safe or productive behaviours,
contributing to improved decision-making and safety.

 Edge Computing: The deployment of predictive models on edge devices,


such as smartphones and IoT devices, will enable real-time analysis without
reliance on centralized cloud servers. This will be crucial for applications like
autonomous vehicles, where low-latency predictions are essential.

 Ethical Considerations and Privacy: As these systems become more


pervasive, addressing ethical concerns and ensuring privacy protection will
remain a significant focus. Research will delve into developing robust privacy-
preserving techniques and ethical guidelines for deploying behaviour
prediction systems responsibly.

 Cross-Domain Applications: The knowledge gained from predicting human


behaviour can transcend various domains. Future applications may include
healthcare (e.g., monitoring patient behaviour), education (e.g., personalized
learning), and retail (e.g., customer behaviour analysis), among others.

 Human-AI Collaboration: Research will explore ways to enhance


collaboration between humans and AI systems in collaborative environments.
This could involve AI systems assisting humans in decision-making processes
or providing intelligent recommendations to improve teamwork.

 Global Adoption: As technology becomes more accessible, the adoption of


behaviour prediction systems could extend globally, contributing to safety and
productivity improvements in diverse cultural and geographical contexts.

 Interdisciplinary Research: Collaborative environments are inherently


multidisciplinary, and future research will continue to benefit from the
integration of expertise from fields such as psychology, sociology, computer

54
science, and data ethics. Interdisciplinary collaboration will be essential to
tackle complex behavioural challenges effectively.

55
REFERENCES

[1] L. Lei, J. Hao, A. von Davier, P. Kyllonen, and J-D. Zapata-Rivera. “A tough
nut to crack: Measuring collaborative problem solving.” Handbook of Research
on Technology Tools for Real-World Skill Development. IGI Global, 2016.
344-359. Web. 28 Aug. 2018. doi:10.4018/978-1-4666- 9441-5.ch013
[2] P. Chopade, S. M. Khan, D. Edwards, and A. von Davier, "Machine Learning
for Efficient Assessment and Prediction of Human Performance in
Collaborative Learning Environments," 2018 IEEE International Symposium on
Technologies for Homeland Security (HST), 2018, pp. 1-6, doi:
10.1109/THS.2018.8574203.
[3] Zhang Z, Peng G, Wang W, Chen Y, Jia Y, Liu S. Prediction-Based Human-
Robot Collaboration in Assembly Tasks Using a Learning from Demonstration
Model. Sensors. 2022; 22(11):4279. https://doi.org/10.3390/s22114279.
[4] V. Bianchi, M. Bassoli, G. Lombardo, P. Fornacciari, M. Mordonini and I. De
Munari, "IoT Wearable Sensor and Deep Learning: An Integrated Approach for
Personalized Human Activity Recognition in a Smart Home Environment," in
IEEE Internet of Things Journal, vol. 6, no. 5, pp. 8553-8562, Oct. 2019, doi:
10.1109/JIOT.2019.2920283.
[5] Wan, S., Qi, L., Xu, X. et al. Deep Learning Models for Real-time Human
Activity Recognition with Smartphones. Mobile Netw Appl 25, 743–755
(2020). https://doi.org/10.1007/s11036-019-01445-x
[6] H. F. Nweke, Y. W. Teh, M. A. garadi, U. R. Alo, Deep learning algorithms for
human activity recognition using mobile and wearable sensor networks: State of
the art and research challenges, Expert Systems with Applications, Volume 105,
2018, Pages 233-261, ISSN 0957-4174,
https://doi.org/10.1016/j.eswa.2018.03.056.
[7] M. M. Hassan, Md. Z. Uddin, A. Mohamed, A. Almogren, A robust human
activity recognition system using smartphone sensors and deep learning, Future
Generation Computer Systems, Volume 81, 2018, Pages 307-313, ISSN 0167-
739X, https://doi.org/10.1016/j.future.2017.11.029.
[8] X. Zhou, W. Liang, K. I. -K. Wang, H. Wang, L. T. Yang and Q. Jin, "Deep-
Learning-Enhanced Human Activity Recognition for Internet of Healthcare
Things," in IEEE Internet of Things Journal, vol. 7, no. 7, pp. 6429-6438, July
2020, doi: 10.1109/JIOT.2020.2985082.

56
[9] Z. Chen, L. Zhang, C. Jiang, Z. Cao and W. Cui, "WiFi CSI Based Passive
Human Activity Recognition Using Attention Based BLSTM," in IEEE
Transactions on Mobile Computing, vol. 18, no. 11, pp. 2714-2724, 1 Nov.
2019, doi: 10.1109/TMC.2018.2878233.
[10] C. Xu, D. Chai, J. He, X. Zhang, and S. Duan, "InnoHAR: A Deep Neural
Network for Complex Human Activity Recognition," in IEEE Access, vol. 7,
pp. 9893-9902, 2019, doi: 10.1109/ACCESS.2018.2890675.
[11] Kong, Y., Fu, Y. Human Action Recognition and Prediction: A Survey. Int J
Comput Vis 130, 1366–1401 (2022). https://doi.org/10.1007/s11263-022-
01594-9.

57

You might also like