ML_LAB_DOC
ML_LAB_DOC
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE & ENGINEERING(DATA SCIENCE)
by
U.KRISHNA KOUSHIK
(227R1A67J6)
Under the esteemed guidance of
Mr.M.Kishore Kumar
Assistant Professor
This to certify that, the Presentation entitled “Flight Fare Predictor Using
Machine Learning”is submitted by U.KRISHNA KOUSHIK bearing the Roll
Numbers 227R1A67J6 of B.Tech Computer Science and Engineering(Data
Science), In Partial fulfillment for the requirement of the Presentation and for
the award of the Degree of Bachelor of Technology during the academic year
2024-25.
Subject Faculty
Mr.M.Kishore Kumar
9. ESTD: 2009
Batch no : 23
15 15 10 40 10
Remarks/Comments by Faculty:
ABSTRACT
INTRODUCTION
SOFTWARE REQUIRED
LITERATURE REVIEW
IMPLEMENTATION
RESULTS
CONCLUSION
ABSTRACT
The COVID-19[1] pandemic has drastically changed the way we live our lives,
with one of the major changes being the need to maintain social distance to prevent
the spread of the virus. With the increase in population density in urban areas and the
constant movement of people, it has become difficult to ensure that individuals
maintain a safe distance from each other. To address this issue, various technologies
are being developed to monitor social distancing in public places. One such
technology is the use of computer vision algorithms and object detection techniques to
monitor social distancing in real-time. In this approach, cameras are installed in public
places to capture live video feeds, which are then analysed using computer vision
algorithms to detect and track individuals in the scene. Object detection techniques are
then used to identify individuals who are not maintaining a safe distance from others.
In this paper, we present a social distancing monitoring system based on the
YOLOv3(You Only Look Once version 3) object detection algorithm. We
demonstrate the effectiveness of our system in detecting individuals and measuring
the distance between them in real-time[2]. This system can be used to monitor social
distancing in public places such as airports, train stations, supermarkets, and parks to
ensure the safety of individuals and prevent the spread of dangerous viruses.
The need for effective monitoring of social distancing has led to the adoption of
computer vision and deep learning algorithms in public safety applications. By
leveraging advanced object detection models like YOLOv3, the system can efficiently
identify individuals, measure their distances, and detect violations in real-time. This
approach enhances automated surveillance, reducing human intervention while
ensuring compliance with safety guidelines. The integration of OpenCV and machine
learning allows for scalable and adaptable monitoring, making it suitable for crowded
areas such as airports, train stations, and shopping centers. Additionally, the use of
bounding boxes and centroid-based calculations improves accuracy in detecting
proximity.
LITERATURE
1.Frontend Technologies
React.js
Purpose: Building an interactive user interface for real-time monitoring of social
distancing violations.
HTML5, CSS3, JavaScript
Purpose: Structuring and styling web pages for a seamless user experience.
2. Backend Technologies
Python (Flask/Django)
Purpose: Server-side scripting and handling backend logic for processing video
feeds.
OpenCV
Purpose: Image processing and real-time object detection.
YOLOv3/YOLOv5
Purpose: Deep learning-based object detection for identifying individuals in video
streams.
5. Development Tools
Jupyter Notebook / PyCharm
Purpose: Code editor for developing and testing machine learning models.
Postman
Purpose: Testing API endpoints for data retrieval and processing.
6. Version Control
Git & GitHub
Purpose: Source code management and collaboration among developers.
IMPLEMENTAION
Source Code:
import cv2
import streamlit as st
import json
import requests
import matplotlib.pyplot as plt
import numpy as np
import imutils
from scipy.spatial import distance as dist
def main():
st.title("Social Distancing Anlyzer Web App")
st.sidebar.title("Social Distancing Anlyzer Web App")
st.markdown("Find total numberr of peoples who are following social-distancing ")
st.sidebar.markdown("Find total numberr of peoples who are following social-distancing ")
filename = open('pedestrians.mp4','rb')
video_bites = filename.read()
st.sidebar.text("Input Video:")
st.sidebar.video(video_bites)
app_mode = st.sidebar.selectbox("Choose the app mode",
["About the App", "Run the app", "Show the source code"])
if app_mode == "About the App":
st.text('This is an app which detects whether the person is following social-distancing or not ')
st.text('over an area with the help of CCTV footage or any video source and plots the data of
same ')
elif app_mode == "Show the source code":
with st.echo():
Link = "https://github.com/shreyanshsatvik/covid_tracer"
elif app_mode == "Run the app":
model = "yolo-coco/yolov3.weights"
cfg = "yolo-coco/yolov3.cfg"
label_path= "yolo-coco/coco.names"
input_location = "pedestrians.mp4"
net = cv2.dnn.readNetFromDarknet(cfg,model)
labels= open(label_path).read().strip().split("\n")
ln= net.getLayerNames()
ln = ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
minimum_threshold=0.3
minimum_probability =0.3
minimum_distance = 50
display = 1
output=""
total_person=[]
number_of_people_violationg_socialdistancing=[]
if __name__ == "__main__":
main()
RESULTS
The code reads video input from a camera, performs object detection on each frame,
and calculates the distance between detected people. If the distance between two
people is less than a predefined threshold value, they are considered in violation of
social distancing, and their bounding boxes are highlighted in red. The number of
violations is also displayed on the video. The video frames are continuously processed
to detect people and analyze their distances. If the distance between two centroids is
less than the configured minimum distance, it is considered a serious violation. If the
distance is below the maximum distance but above the minimum distance, it is
considered as abnormal violation. The code visualizes the violations on the video
frames. Bounding boxes around the detected people are color-coded based on the
severity of the violation. Serious violations are marked with red boxes, and abnormal
violations are marked with orange boxes. The total number of serious violations and
abnormal violations are displayed on the video frame. The counts are updated in real-
time as the video progresses.
CONCLUSION
https://www.tandfonline.com/doi/abs/10.1080/10494
820.2020.1813180abstract
https://www.sciencedirect.com/science/article/pii/S1
672022923000013
neural networks
https://www.tandfonline.com/doi/abs/10.1080/00207
454.2021.1883602
https://ieeexplore.ieee.org/abstract/document/10014
654