Prediction of the growth of Corona Virus Python Project

The upsurge of this disease is CORONA VIRUS has created a life-and-death situation in the world of the living. The virus is increasing day by day and effective lives. Machine Learning can be established very effectively in tracing the disease predicting its growth and forming an effective strategy in order to manage the effect of the virus. This report gives us a full glance and the best mathematical computation with modeling for predicting growth.

In an Corona Virus Prediction ML-based project, we come up with various computations and modeling to suspect or predict the growth of a particular dataset. Although this concept can be used on a dynamic dataset that is changing day to day, here in this report we will study a particular dataset.

Working on the dataset led to various challenges such as modeling different algorithms of machine learning but finally worked on them in order to get the best result. This report is an insight into the working brief of the project such as descriptive information about machine learning, algorithms, statistical description, and most important the programming language used here which is python.

INTRODUCTION

This deadly disease is caused by the spread of various germs and harmful bacteria(pathogens) which transmits from one human to many humans, from one animal to many, and from animal to human. Early diagnoses are curable, while the patients suffering from it with a maximum number of days are not 100% curable.

There is a need for innovation in predicting the growth with deep thorough analysis, of huge global data on the rise of the virus.

The Corona Virus Prediction project comprises two main features or methods we can say, first predicting and analyzing cumulative confirmed cases and then representing with visuals that are data visualization. The second one is predicting the growth of total, confirmed, and new cases and finding accuracy.

  • PRESENT SYSTEM

Many employers are working on the same data and with the same idea of predicting the growth of the virus by analyzing cases. The COVID crisis has led many colleges and students to work in teams to get into a solution against corona.

There are many ongoing types of research and many projects have already been developed in predicting creating awareness on the same

  • PROPOSED SYSTEM

Working on the dataset led to various challenges such as modeling different algorithms of machine learning but finally worked on them in order to get the best result. It is an insight into the working brief of the project such as descriptive information about machine learning, algorithms, statistical description, and most important the programming language used here which is python. 

System Design 

System Flow Chart

Data Dictionary 

Data Pre-Processing: Our dataset needs to be pre-processed. Therefore, data pre-processing is required in this project.

Definition of Training Set: The training set is the data that the algorithm will learn from. Learning looks different depending on which algorithm you are using.

Algorithm Selection: Our project has been implemented using various algorithms such as linear regression, random forest, and decision trees.

Decision Tree: In python, we use a decision tree to observe and figure out the trained data in the structure of the tree in order for any future implementation. Decision Tree, here the target variables take continuous values called regression tree. 

Implementation Work Details 

Libraries used

Numpy

It contains among other things:

  • a powerful N-dimensional array object
  • broadcasting Functions
  • Tools for integrating
  • Useful linear algebra etc.

Pandas

Pandas is an open-source, BSD-authorized library giving superior, simple-to-utilize information structures and information investigation apparatuses for the Python programming language.

  • Benefits:

Python has for some time been incredible for information munging and planning, however less so for information examination and display. pandas help fill this hole, empowering you to do your whole information examination work process in Python without changing to a more space-explicit language like R.

Joined with the amazing IPython toolbox and different libraries, the earth for doing information examination in Python exceeds expectations in execution, profitability, and the capacity to work together.

More work is as yet expected to make Python a top-notch measurable displaying condition.

Download the Complete Project on Prediction of the growth of Corona Virus Python Project Code and Report

Vehicle Management System Project using Python and SQLite

 

The complete development of this Vehicle Management System project using Django as the backend and sqlite3 as the database. This Python project has main sections Login/Signup, Dashboard, Vehicle, Driver, Booking, Repair, and Report which are explained in the coming slides in detail.

Functions Below:

Login/Signup

Users can signup/log in to the portal with this page. It takes in the necessary fields required for the user details

Dashboard

This is the dashboard in which you can view your details is shown and the user can edit the details.

Driver

Driver Section has two pages, one is to add a driver and the other is to view the list of drivers available. This section is only visible to the users which have admin access. The Driver list has the features to search and sort lists according to the fields.

Vehicles

In this section there are two pages one is to add vehicles and the other is to list the vehicles owned by the user. On the vehicle list page, the user can view individual details, edit the details and delete the vehicle.

Booking

The booking section has four pages one is the form to book a trip the second one is the success page where the booking details including the distance, cost, and duration are displayed using google maps API. On the success page, you have the option to pay which will take you to the payment page.

The payment page lets you enter the card details to pay. There is a page to display all the bookings made by the user wherein the user can search for the bookings. The admin will have another option which is to confirm the booking and a driver will be allotted and a mail will be sent to the user saying the mail is confirmed. The map option in the booking list page displays the route using google maps API. When the admin confirms the booking a confirmation mail will be sent to the user.

Repair

The repair section has two pages, one for reporting the issue and another page to show the issues made by the user. On the issues page, the admin has an option to solve the issue made by all the users.

Report

Each user can have a report of the trips that he has made. There is an option to mail the user the report for further use. Demo Here is the live demo of our project. The quality of the gif is a bit low.

Database tables:

Vehicle Table

Owner
Cost per KM
Price
Registration Plate
Vehicle Status
Insurance Status
Total KM traveled
Fuel Type
Mileage
Vehicle Type
Image

Report Table

Registered Date
Registered User
Vehicle Mileage
Issue

Driver Table

First Name
Last Name
National ID
Address
Email
Phone Number
License Category

BookingTable

Source
Destination
Distance
Booking Date
Start Date
End Date
Security Deposit
Allotted User
Allotted Driver
Vehicle
Cost
Duration

Temperature and Air Quality Monitoring System Project for Pet lovers

Introduction:

In this modern world, there are many pet lovers who would like to carry their pets to places wherever they go. It’s the responsibility of the same person to ensure the safety of their pets. There are some public places where they can’t take their pets. For example, if a person visits a shopping mall he can’t carry his pet into the shopping mall. Hence, he/she has to park his car in the parking lot, leave his pet inside the car, slide down the window a little bit for air circulation and continue his shopping.

For suppose he/she forgot to slide down the window and left for shopping then the pet gets suffocated due to lack of air circulation and a rise in temperature. Even though he/she slides down the window and leaves for shopping there is a possibility that one of the many people inside the parking lot may smoke a cigarette. The smoke released may enter the car and damage the air quality which in turn may have effects on pets.

This is where our project finds its scope. We are developing a “Temperature and Air quality monitoring system for Pet lovers” in which we are monitoring the temperature levels, humidity, pressure, and air quality of the air inside our automobile and present them in an attractive dashboard so that the pet owner can monitor the atmospheric conditions inside his automobile through all of his gadgets having internet connection.

High-level architecture of the project:

Hardware Requirements:

  • Raspberry Pi Zero
  • 32 GB or larger Micro–SD Card
  • Power Supply and cable
  • BME680 Sensor
  • Connecting cables

Software Requirements:

  • Balena Cloud to create dashboards using sensor data
  • Balena Etcher to flash our SD card
  • Balena CLI for command line interface
  • Balena Sense code for installing the services

Project Implementation:

Step-1:

  • The first step of our implementation is to flash the operating system is to flash balena operating system into our Raspberry pi zero board.
  • For this initially, we have to create a balena cloud
  • Once we signed up and login into our balena cloud account then we have to create an application as shown below with our Wifi SSID and password and then we have to download Balena operating system image
  • Once we download the operating system image file then we will insert our SD card into card reader and connect the card reader to our
  • Then we will flash the OS image file into an SD card by means of balena Etcher as shown
  • By end of this system, our SD card should be ready with the flashed operating system for insertion into our Raspberry Pi zero board.

Step-2:

  • The main aim of this step is to complete the hardware
  • Please find the pin configuration of the Raspberry Pi Zero
  • Please find the pin configuration of the BME680 sensor
  • The connections are listed below:

Pin1 of Raspberry Pi zero——- CC pin of BME680

Pin3 of Raspberry Pi zero—– SDA pin of BME680

Pin 5 of Raspberry Pi zero—– SCL pin of BME680

Pin 9 of Raspberry Pi zero—– GND pin of BME680

  • Once we complete the connections to the BME680 sensor then we have to insert the flashed SD card into the SD card slot of our Raspberry Pi Zero
  • Please find the Raspberry Pi zero board after the connections are done as below:

Step-3:

  • Once we completed step 2 then we have to power up our Raspberry Pi zero board and then we have to open balena
  • If everything goes right our device must automatically be listed in balena cloud as shown
  • Then we have to install Balena command line interface for pushing the services
  • Then we have to push balena sense code into our board by using push
  • Please find the balena CLI below:
  • Once the push is successful then automatically the services get installed as shown below:

Step-4:

  • When the above three steps are successful then our cloud starts pulling the data from the sensor
  • To see the readings in dashboards we need to enable the public device URL and we can copy the URL we can access the dashboards on any device on which a web browser is installed across any geographic location.
  • Please find the screenshot of the dashboards below:
  • Then for testing purposes, I started breathing on the sensor. As we all know human breath contains CO2 and it is warm we can see on the dashboards as Indoor Air Quality showing Unhealthy and temperature is also raised as
  • After I have stopped breathing on the sensor within some time the IAQ returned to Good and also we can see the temperature started dropping as
  • As I have mentioned earlier every individual having a public device URL can monitor the dashboards from any electronic device which has a web browser installed in it. Please find the dashboards opened from the mobile phone
  • Hence the device is placed in a car with wifi module connected to it our device starts sending the data to the cloud. Hence even though pet owners leave their pets in cars and left for shopping can monitor the temperature and air quality and can make sure their pet is safe.

Corona Virus Prediction and Analysis Machine Learning Project

1.  Introduction 

Background 

Currently, there are many people, who are being affected by CoronaVirus. It started in China and now it is spreading all over the world. Till now, there is no medicine for this virus, and it’s killing millions of millions of people. So, it is a big question among all of us of how many people are going to be affected.

Problem Statement 

Currently, there is no application that can predict the spread of CoronaVirus for the future 30 days. So, with this project, we would like to create awareness among the people, by showing them how the corona rises for the future 30 days so that they can take some preventive measures by staying indoors.

Project Goal 

The main objective of this Corona Virus Prediction project is :

  • Future prediction of the increase/decrease in the number of active Coronavirus Cases for the next 30 days – for the whole world as well as for the United States of America. We have chosen the USA among all the counties as it is the highly affected country due to corona.
  • Future prediction of the increase/decrease in the number of deaths due to Coronavirus for the next 30 days.
  • Future prediction of the increase/decrease in the number of recovered cases due to Coronavirus for the next 30 days.

2.  Literature Review

 There is an outbreak of Corona in early December. This is caused due to severe acute respiratory syndrome coronavirus 2, which is basically the family of SARS virus. Many governments all over the world are issuing their own preventive measures to control the spread of coronavirus. So, we have conducted a literature review regarding this virus, based on the information that is publicly available.

Background of Literature Review:

China alerted WHO on 31st December 2019 that many people are reported to be suffering from Pneumonia, in Wuhan City. They reported that it started on Dec 8th, 2019, and there were an increasing number of patients who are working or living around the Huanan Seafood Wholesale Market.

When we started working on this project at the start of February, the Coronavirus was majorly prevalent in China. Initially, at the time of our project proposal, the mortality rate in China among all the confirmed cases is around 1.2% as of February 2020. And the mortality rate in all other countries, other than china was around only 0.2%. Among all the patients, who were admitted to the hospitals, the mortality rate, was around 11%. COVID-19 is increasing with great speed, and now there is a relatively very high mortality rate

A Way to Further Research :

So, we have performed this literature review, to analyze the spread of coronavirus. After analyzing how increasingly it’s spreading all over the world, we thought of performing our own prediction regarding this virus, so as to make people aware of its spread, and with this, they can take their own preventive measures, so that they do not fall prey to this dangerous virus.

We had very little amount of data when we started this project. It is a very trending topic all over the world. And millions of millions of people are losing their lives due to this virus. So, we are very curious to analyze this pandemic and so we have taken up this project.

We have found many datasets to collect data regarding the corona cases. Some of them include Kaggle, John Hoppkins, etc. So, we thought of choosing the dataset from John Hoppkins, as it’s updating the dataset on a daily basis. So, we collected the data and performed our own future predictions.

3. Methodology 

Approach

 So, basically, we have followed the below approach to kick-start our Corona Virus Prediction project:

  1. Firstly, we have started with research on choosing the datasets. On performing research on various datasets, we have finalized with John Hoppkins data set, as it gives us the live data on coronavirus.
  2. Secondly, we have collected the data and performed our preprocessing operation, so as to make our data ready for future predictions.
  3. Next, coming to choosing the machine learning algorithm. We have chosen appropriate machine learning(we will discuss below regarding this).
  4. Finally, we have performed our predictions to analyze the active cases, deaths, and recoveries for the next 30 days, based on the data available from the datasets and the chosen machine learning algorithm.

Figure: Approach

4.  Implications 

Benefits of the Project: 

  • This Corona Virus Prediction project helps in the prediction of coronavirus cases for the next 30 days, all over the world.
  • With this, we can also predict the increase in corona cases in the world.
  • By this, we can know how fast the coronavirus is spreading all over the world.
  • We can create awareness among people.
  • We can also create awareness in government so that they can take preventive measures to stop the spread of corona.

Lessons Learned:

Initially, I had no idea of a Machine learning algorithm. I started learning about machines from scratch. I bought some Udemy tutorials and through that, I learned everything step by step. At the start of the project, I am not even aware of what machine learning algorithm to use.

It was really an exciting experience doing this project. I am inspired to take up a Machine Learning Course for my next semester to learn deeply about Machine Learning Algorithms.

I tried my level best and contributed my 100% to this project.

Now, I came to know about machine learning, different types of machine learning Algorithms, and the differences between classification and regression algorithms -when to use what, creating test and train sets, building up the model, choosing the appropriate parameters, and performing future predictions. In the future, I would also love to take up a project related to Classification Algorithms.

5.  Conclusion 

  • Finally, to conclude, we have performed prediction using SVR and Polynomial Regression Algorithm.
  • SVR predictions are mainly for predicting the world case scenario, which includes confirmed, death, and recovered cases.
  • Polynomial Regression is used for the prediction of US Cases.
  • Based on the results, we believe that our predictions were almost accurate, with some little differences from the actual values.
  • This project can be further scalable, to include the predictions for various individual

6.  Appendix 

  • We have used Google Collab for our project. As we are two members of the team, we have chosen this, because it enables us to simultaneously work on the project from different
  • No Installation is Required.
  • We just need to have a google account. And we can easily create a Google Collaboratory file in our google drive, just like Google docs.
  • We will provide both .py files as well as .ipynb files along with this report, so as to run on google collab.
  • .ipynb can be uploaded to google collab directly and the results of the projects can be easily checked.

Predicting Life Expectancy Using Machine Learning Python Project

Project Name: Predicting Life Expectancy Using Machine Learning

Project scope: The scope of this project is ” Predicting Life Expectancy Using Machine Learning” in this project we are given the task to predict life expectancy, life expectancy is the average time period for which the subject lives.

Project schedule: 

  1. Understanding what to do in the above-given Predicting Life Expectancy Project
  2. Identify and get familiar with the tools needed to complete this project
  3. Writing codes
  4. Collecting Data sets
  5. The time duration is 5 days

 Deliverables: 

  1. Predicting Life Expectancy Using Machine Learning.
  2. Making a user interface too as front-end work and writing code as backend work to make the user interact and calculate the Life

Setting The Development Environment

  1. Creating GitHub account
  2. Creating Slack account
  3. Signing up for cloud services
    1. Node-Red for front end
    2. Watson Studio for coding
  • Machine Learning services

1.  INTRODUCTION

  1.1          Overview:

 This project is based on predicting the life expectancy of a person. It is the statistical average of the number of years a person is expected to live. Factors affecting life expectancy are Country, Mental and Physical Illness, lifestyle, diet, health care services, financial condition, BMI, alcohol consumption, Diseases, etc.

Here in this Predicting Life Expectancy project, our motive is to find the life expectancy of a person after providing details such as the country he is living in is developed or is developing, BMI of the person, Disease history, Income, Population of that country, Expenditure, etc. So here I have used Machine learning and Artificial Intelligence to predict life expectancy. The data used in the training of the model was the data by WHO taken from Kaggle.

There were almost 22 columns stating different factors affecting Life expectancy and 2939 rows comprising data of different persons from different countries. Based on the results we got on Watson Studio some factors which were not affecting the Life expectancy much were removed and the scoring endpoint was obtained after running full code. This scoring endpoint is the URL that helps us to send payload data to a model or function development for analysis (such as to classify the data or to make predictions).

After obtaining the endpoint the next step is to work on Node-red which is the platform, we can use for developing our front-end page that will have a form asking you your details such as year of birth, adult mortality, infant deaths, BMI, etc. rest we’ll discuss in details later on.

Requirements: IBM Cloud, GitHub, Slack, IBM Watson, Node-Red

1.2          Purpose:

 The purpose of this project is to build a model that will predict the Life Expectancy of a person after giving the details of the BMI, Expenditure, Disease history, etc.

2.  Literature Survey

2.1          Proposed Solution:

 The project tries to create a model based on data provided by the World Health Organization (WHO) to evaluate the life expectancy for different countries in years. The data offers data on different person’s Physical health, Mental health, etc from the time frame 2000 to 2015. The data was taken from the website: https://www.kaggle.com/kumarajarshi/life-expectancy- who/data. 

3.  Theoretical Survey

 3.1          Block diagram

 

Block Diagram for Predicting Life Expectancy with Python

3.2          Hardware/Software Designing:

·       GitHub

GitHub is the largest community of developers in the world with millions of people sharing their projects, and ideas for benefiting many people in a very unique way. Any person living in any corner of this world can access this platform for his/her benefit. They can share their problem, their ideas, and solution to some problems. In simple words, it is basically a platform in which anyone can come and share their problems and solutions. It is easy to manage. A team working on the same project can easily monitor the progress and can easily access their work anywhere.

·       Slack

It is a messaging tool that is intended to contact your internal team easily. As it gives you a platform through which we can communicate to our team members easily under one roof. It is not as hectic as sending emails and reading them. It directly comes as a message to you from the group created having your team members. It is great if you are having a team of more than 2 members. Searching for messages becomes an easy, fast medium, searching old messages.

·       IBM Cloud

It is the platform that enables us to use its various features such as Watson Studio which provides a platform where we can write our python code and observe our results in the form of heat maps, graphs, and tables. In this project, we used it and got our scoring endpoint. It is the URL that helps us to send payload data to a model or function development for analysis (such as to classify the data or to make predictions).

·       Node-Red

Node-Red helps us to create a front-end window on which we can get the data from the user such as his Year, BMI, Alcohol intake, etc. and it will then connect to the code written on Watson Studio via the scoring endpoint created after running the python code.

4.  Experimental Investigations

 The graphs of various Factors affecting the prediction of life expectancy are shown in the figure given below:

Curves of life expectancy v/s different factors

Heat map of different factors

Shown above is the heat map of the various factors affecting other various factors some of them have positive values some of them have negative but the thing we have to keep in mind is that we can’t neglect the factors having negative values because they will have the adverse effect which will affect the life expectancy. After some observations, I decided not to include 6 factors that are not affecting life expectancy much and will reduce the calculations and make our model less complex.

5.  Flow Chart

  1. Result

 After filling in all the necessary details asked in the UI form, we got the prediction of life expectancy. The accuracy of our model was 94.41%

Screenshot of the prediction of life expectancy obtained

Advantages and Disadvantages

 Advantages:

  • Easily identifies trends and patterns
  • Wide Applications
  • Handling multi-dimensional and multi-variety data
  • No human intervention is needed (automation)
  • Continuous Improvement

Disadvantages:

  • High error-susceptibility
  • Needs a lot of time to implement
  • Interpreting the results accurately
  • Data set collection is a complex task

Applications 

  1. The form created is easy to understand and is easy to fill by anyone.
  2. It can be used for monitoring health conditions in a particular country
  3. It can be used to get the data about the factor affecting Life expectancy the most in order to work in the direction of obtaining a high life expectancy
  4. It can be used to develop statistics for a country’s development process

Conclusions

This user interface enables any user to predict the life expectancy value of anyone on the basis of the details asked in the form.

Future Scope 

  1. Increase model accuracy
  2. Gives suggestions on how to increase Life Expectancy
  3. Mental health data was missing from the WHO data set which also plays the important role in affecting life expectancy
  4. The scalability and flexibility of the application can be

Energy Management System Python Project

ENERGY MANAGEMENT

  • This is a project on energy management.
  • The project helps to save energy.

Description

  • First, create an IBM cloud account with an e-mail address and password.
  • Then create an IoT platform and node-red platform.
  • We need to write a python code for it because it is a real-time example.
  • Create an MIT app.

First, create an IBM cloud account with an e-mail address and password

Go to google and search for IBM and create an account using your email address and log in to the page. we will get the interface as an IBM dashboard.

CREATING IBM PLATFORM

After creating an IBM account there will be a search option then we can able to see it. Type Internet of things there will be a platform called the internet of thing in that u can able connect the so many services in that internet of things and create a service in that it will ask u to launch it and for creating an internet of things u need some keys as API keys, Device connects and so many things will fill and u can able to see an option as the add device click on new device u can see the device has been created for that u need to keep the API keys, Device information safely in the note pad because it will help u at the need for connecting it.

WRITE PYTHON CODE

we are writing python code because we are going to deal with a real-time example so we need to use python. actually, our project is about how much electricity is causing monthly and its estimated cost
In this, we are writing about fan, light, washing machine, tv, and ac let s take some random values in that because we can’t able take the exact values, and then we need to add all of the to know the charge and then we need to find out the estimation money for it. after completion of this code, u can able to know the code is running.
we need to send it to the IoT platform so we need to install pip by command prompt and then write the code separately so u can able to run and send information to the IoT platform. For sending to the IoT platform we need to give information in a notepad.

python code:

python running code

Information on IoT platform

Creating node-red platform

For creating a node-red platform we need to search in IBM as a node-red app then u can able to see the node app then create it as the local u can create node-red is nothing but we will get the information in the form of a flow chart.
we need to install IoT in, IOT out will be in the node-red app itself and then u can able to use it for better ability and experience we will use the gauge tool and for doing it on the web we will use the HTTP in, HTTP response and then we will use the payload option to print in and I will show u the flow chat I had created and when we run the program u can see the outputs are coming in the debug option.

Create an MIT app.

Search for the MIT app and click on create apps.

First, we should design the app page with alignments given on the left side of MIT. with horizontal alignments drag them to the screen and edit those with suitable markings.
And next insert a text box into the screen. As we have taken energy management the as a fan, ac, light, tv, etc.
Now insert 5 text boxes to the screen and assign the markings. Take two buttons one as checked and another as not checked.

And the two text boxes with one as charge gives the charge of every applicant and another as cost, which gives the summation of all applicants.

This is done and next tap to blocks button. In that create the blocks with URL.

Paste the URL which we have I IBM as:

Now tap on the build option and get the QR code and scan the code you will receive an apk file and install the file and app.

Now the click on the checked button now the values, cost, and charges will be displayed on the screen in their respective blocks.

Covid-19 Testing Management System Python Project

Covid-19 Testing Management System is a small project developed using Python programming. Here are the application features below.

Project features:

• Adding new testing centers
• Search for available testing centers by locality
• Update and delete testing centers
• Show all testing centers by city, state
• Shows the number and type of testing kits available at each center.

Software to be used to develop this application:

• Python
• SQL for creating a database
• Library to interface between Python and SQL
• Either Django (to create a web app) or a GUI library to create the UI (not decided yet)

Implementation

1. Login page (This has a simple login prompt designed using a GUI library that asks for the user id and password.)
2. Menu:
a. Add a testing center
B. Delete testing center
C. Edit the number of testing kits available
D. Search for the testing center by district/city/state
E. Show all testing centers
3. Separate sections for:
a. Adding a new center
b. Deleting center
c. Updating center information
d. Searching for center
e. Nationwide data

Covid-19 Testing Management System can be developed by using PHP & MySQL Server with different functionalities below.

User Characteristics

The Covid 19 Testing Management system has 2 types of users they are Admin and user(patient)

General Constraints

The tools and technologies that are used to develop this project are:
The language used in this project is PHP5.6 and PHP7.x.
The database used in this project is MySQL 5.x.
The web browsers that are used in this project are Mozilla, Google Chrome, IE8, and OPERA.

Operational Scenarios

Scenario A:
How your application starts
Our application covid19 testing management system starts by login into the application, if the user is a new user, the user needs to register by providing the needed credentials.
New users need to provide testing information. A registered user needs to provide test information.

Scenario B:
Usage Scenarios like Customer Check-out
When a customer visits our application, he/she needs to log in by providing their credentials according to their role i.e., admin and user.
If the user is new, he needs to register if he is an old user, he can directly enter the login details and login directly.

Scenario C:
Database

The data that we are going to store in the database
1) Admin Login
Username
Password

2) New admin login
Admin name
Username
Password

3) User login
Username
Password

4) New user login
Name
Phone number
Username
Password

5) User Registration
Name
Current address
Gender
D.O.B
E-mail id
Phone number
Age
Aadhar card number

Classification of American Sign Language using online RESTful application

  • INTRODUCTION

This document report provides the desired layout to develop an online application service that accepts Human Skeletal key points of a sign video and returns the label of the sign in a JSON response. The document contains information about the extraction of key points from the videos using Tensor Flow’s Pose Net library and four different deep learning models that can classify American Sign Languages into six different signs. i.e {buy, fun, hope, really, communicate, mother}. Moreover, it also contains information about hosting services using flask API on ‘PythonAnywhere’ and steps involving handling HTTP requests coming from different users.

  • TECHNICAL APPROACH

Firstly, we have accumulated all the raw video data sets which have been recorded as a part of Assignment-1 and extracted frames of the particular timeline. Then, we used Tensor Flow’s Pose Net library in order to extract key points from the images, which are considerably used as training data for models. We have tried three different approaches to preprocess data and picked the one which gives the best accuracy for the trained models.

Approach-1: Scaled down raw data using the Universal Normalization technique and extracted a few features like- Standard Deviation, Moving Mean of Window size 5, Zero Crossing Rate, Dynamic Time Warping distance, and built feature matrix. Then we applied PCA on the feature matrix and using K-fold Cross-validation we trained four deep learning models named Convolutional Neural Network, K nearest neighbor, Support Vector Machine, and Random Forest. The average accuracy of the given models lay between 60-65%.

Approach- 2: As a part of the second approach, we expelled some features by observing the movement of each body part in videos for different signs and made a feature matrix of only important features. Then we apply Standard Scaler and Min Max Scaler in order to normalize data and trained our models using the first approach.

Somehow, we were able to increase the average accuracy of the models by 10%.

Approach -3: We have observed in the second approach that, our model is only considering the static coordinates of each body part, so we subtracted each coordinate of different body parts from the static body parts and processed the data in the same manner. So, by doing this approach we got our highest average accuracy which lies between 85% to 90%. 

  • INITIAL FEATURE EXTRACTION 
  1. Zero Crossing Rate
  2. Moving Average Window
  • Standard Deviation
  1. Dynamic Time Warping Distance.

Zero Crossing Rate: The zero crossing rate is the rate of sign- changes along with a signal, i.e the rate at which the signal changes from positive to zero to negative or vice versa. Zero Crossing Rate can be used as a primitive pitch detection algorithm for signal processing.

Moving Average Window: Moving Average is optimal for reducing random noise while retaining a sharp step response. This makes it the premier filter for the time domain encoded signals

Standard Deviation: The standard deviation is a measure of how far the signal fluctuates from the mean. It also depicts how data disperse near the mean of particular data series.

Dynamic Time Warping Distance: DTW measures the similarity between two temporal series data. Any linear sequence data can be analyzed with DTW, it aims at aligning two sequences of feature vectors by warping the time axis iteratively until an optimal match between the two sequences is found.

Feature Engineering:

We have expelled a few features by observing the movement of each body part for different signs and made a feature matrix with only important features. Below is the list of features that we considered for training models.

[“nose_x”, “nose_y”, “leftShoulder_x”, “leftShoulder_y”, “rightShoulder_x”, “rightShoulder_y”,”leftElbow_x”, “leftElbow_y”, “rightElbow_x”, “rightElbow_y”, “leftWrist_x”, “leftWrist_y”,      “rightWrist_x”, “rightWrist_y”]

Here, we observed that the coordinates value of each body part shows a static position for a given time, so we have subtracted each body part’s coordinates value from the corresponding static body part’s coordinates. Here, we have considered “nose”  as a static body part and subtracted each body part with corresponding X and Y coordinates.

The above-mentioned approach would become simpler for the models to understand the movement of each body part, as we have a relative position for each body part, the model can easily predict certain gestures by examining the positive or negative sides of coordinates.

  • MODELS USED:
  1. K nearest neighbor
  2. Convolution Neural Network
  • Support Vector Machine
  1. Random Forest

K Nearest Neighbor: The K Nearest Neighbor classifier is one of the most simple machine learning algorithms that simply relies on the distance feature vectors. It classifies unknown data by finding the most common classes among k nearest examples. The majority vote of the class label is assigned to unknown data. As KNN is a lazy learning algorithm, it works more efficiently when our dataset has been distributed in multi classes.

Support Vector Machine: The core idea of Support Vector Machine is to find a hyperplane that separates two sets of objects having different classes. It uses a technique called kernel trick to transform data and based on this transformation it finds an optimal boundary. It is considered one of the most robust and accurate algorithms among other classifiers.

Random Forest: Random Forest is an ensemble classifier; it takes multiple individual models and combined them into a more powerful aggregate model. So, let’s say we have different individual models, then there might be the case that they work efficiently because some part of the data set would be overfitted to the model. So by combining them, we can reduce the chances of error. Random forest built upon by aggregating n possible decision trees which might be generated by randomly picking data set row as root. So, as the dataset would be increasing, the possibilities of generating random decision trees would also increase and aggregating different decision tree models lead to an increase in the efficiency of the aggregated model, too.

REFERENCES:

Drowsiness Detection of a Cab Driver Python Project

  • In the present situation world, Accidents are part of life. On an average of 1214 road accidents in India only. One of the main reasons for road accidents is being drowsy during driving.
  • The application Drowsiness Detection of a Cab Driver helps the manager of the company get a notification that the driver is drowsy and an alarm rings in the car to alert the driver.

USAGE:

>    python detect_drowsiness.py –shape-predictor shape_predictor_68_face_landmarks.dat –alarm alarm.wav

Use the above command to run the application

This Drowsiness Detection of A Cab Driver application needs the following modules: –

MODULE NAME:  scipy

COMMAND USED FOR INSTALLING: conda install -c anaconda scipy

MODULE NAME: imutils

COMMAND USED FOR INSTALLING: conda install -c anaconda imutils

MODULE NAME: threading

COMMAND USED FOR INSTALLING: conda install -c anaconda threading

MODULE NAME: numpy

COMMAND USED FOR INSTALLING: conda install -c anaconda numpy

MODULE NAME: playsound

COMMAND USED FOR INSTALLING: conda install -c anaconda playsound

MODULE NAME: argparse

COMMAND USED FOR INSTALLING: conda install -c anaconda argparse

MODULE NAME: time

COMMAND USED FOR INSTALLING: conda install -c anaconda time

MODULE NAME: cv2

COMMAND USED FOR INSTALLING: conda install -c anaconda cv2

MODULE NAME: dlib

COMMAND USED FOR INSTALLING: It should be installed in the virtual environment the command is: conda install -c anaconda dlib

IN THE ABOVE-MENTIONED MODULES MOST OF THEM WILL BE GIVEN DEFAULT

TO CHECK THE MODULES THE COMMAND IS conda list

Download the complete project source code

Body Fitness Prediction using Random Forest Classifier Project

Purpose of the Project

To avoid several health issues, we should monitor our body fitness by using various fitness prediction gadgets like smartwatches, oximeters, B-P machines, etc. we can monitor our B-P, calories burnt, bone weight, etc. the devices work with smart device technology to exchange data via Bluetooth communication protocol. Here, in this project, we import the data which consists of (date, step count, mood, calories burned, hours of sleep, bool of activity, and weight in kg) and split the dataset into the testing set and training set. We are using a random forest classifier in this project.

Existing problem

Body fitness prediction play’s a key role in leading a healthy life. Fitness is a state of health and well-being, more specifically the ability to perform daily activities body fitness is generally achieved through proper nutrition and physical exercise, and rest. By this, we are losing our body fitness and it leads to various chronic issues

Proposed solution

Importing Dataset

Exploratory Data Analysis ]: df. shape

Here, in this project, we import the data which consists of (date, step count, mood, calories burned, hours of sleep, bool of activity, and weight in kg) and split the dataset into the testing set and training set. We are using a random forest classifier in this project.

EXPERIMENTAL INVESTIGATIONS

Dataset:

We will use the body fitness prediction dataset which was retrieved from Kaggle.com.

  • Check if there are associations between physical activity (by counting steps), caloric expenditure, body weight hours of sleep, and the feeling of feeling active and/or inactive.
  • Compare caloric expenditure between the categories of mood and self-perceived activity (active and inactive)
  • Compare the hours of sleep between the categories of mood and self-perceived activity (active and inactive)
  • Compare body weight between categories of self-perceived activity (active and inactive)
  • Database The database has 96 observations, and 7 columns. Its quantitative variables are “number of steps” (step_count), “caloric expenditure” (calories_burned), “hours of sleep” (hours_of_sleep and “body weight” (weight_kg). And qualitative variables “dates” (date), “mood” “(mood), self-perceived activity” active or inactive “(bool_of_active). The variable” humor “was assigned the value” 300 “to mean” Happy “, the value” 200 “for” Neutral “and” 100 “for” sad “and for the variable” self-perceived activity
  • Contingency tables of categorical variables will be exposed.
  • A correlation matrix between variables will be presented
  • Bar charts and violins to demonstrate the distribution of quantitative variables by categories
  • Scatter plot for analysis of the possible linear relationship between two variables

RESULT

Output result

RANDOM FOREST CLASSIFIER

Random Forest Classifier

CORRELATION PLOT

Correlation Plot

FINAL RESULT:

Body fitness prediction Output

APPLICATIONS

There are so many different kinds of applications used to predict the fitness of Human beings today.

TRAINING AND TESTING:

Splitting the data:

We use sklearn. ensemble module train_test_split which is used for the training and testing part.

Dependent and Independent variables:

Independent variables contain a list of variables on which the bool of activity is dependent.

The dependent variable is the variable that is dependent on the other variable’s values.

Independent variables are mood,step_count, calories burned, hours of sleep,weightkg.

The dependent variables are bool_of_active.

MODEL BUILDING:

We use Random Forest Classifier for predicting Body Fitness Prediction. Because it gives an accurate prediction.

CONCLUSION

We have analyzed the Body fitness prediction Data and used Machine Learning to Predict the fitness of a human being. We have used a Random Forest classifier and its variations, to make predictions and compared their performance. xgboost regressor has the lowest RMSE and is a good choice for this problem.