Volume 10, Issue 8, August – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25aug524
SOS Alert System Using Machine Learning
Shwetha D S1; Preethi K P2
1
Student, 4th Semester MCA, Department of MCA, UBDT, Davangere
2
Assistance Professor, Department of MCA, UBDT, Davangere
Publication Date: 2025/08/22
Abstract: Real-time emergency response solutions are necessary because women's safety is still a major worry in today's
culture. The SOS Alert System, a comprehensive safety program created to identify, notify, and react in emergency
circumstances, is presented in this paper. The system, which was created in Python and has a Tkinter-based graphical user
interface, combines contact management, automated SOS notifications, real-time location sharing, and safety zone
evaluation into a single platform. By examining variables including crime rate, population density, lighting, historical events,
time of day, and present location, a Random Forest Classifier is used to assess site safety and produce a safety score with
associated risk categories. The system's multi-channel emergency communication features, which include automated
emergency notifications, SMS warnings, and location sharing via WhatsApp, guarantee prompt aid from pre-registered,
reliable contacts. Furthermore, the platform offers interactive safety analytics via graphs such as scatter plots, pie charts,
bar charts, and histograms, which make it possible to identify high-risk locations and track safety trends. According to
experimental data, the SOS Alert System is a low-cost, user-friendly, and scalable solution that works well in urban and
semi-urban settings by improving situational awareness and guaranteeing quicker emergency response.
Keywords: SOS Alert System, Women’s Safety, Emergency Communication, Machine Learning, Random Forest Classifier, Location
Tracking, Predictive Analytics.
How to Cite: Shwetha D S; Preethi K P (2025) SOS Alert System Using Machine Learning. International Journal of Innovative
Science and Research Technology, 10(8), 862-867. https://doi.org/10.38124/ijisrt/25aug524
I. INTRODUCTION lighting conditions, and so on, AI is used to evaluate a
location's safety score.
Women's safety and quick emergency response continue Emergency Contact Management and Automation:
to be top priorities in urban and semi-urban settings. The centralized emergency contact storage and auto-alert
immediacy of traditional approaches, such self-defense features for timely assistance.
tactics and emergency helplines, is sometimes lacking. Safety Analytics and Visualization: Interactive bar charts,
Technology-enabled solutions, such as automatic alarm pie charts, scatter plots, and histograms for spotting high-
systems and mobile safety apps, are emerging to close this risk areas and monitoring security.
gap. Better situational awareness and quick emergency
communication are made possible by the planned SOS Alert The SOS Alert System combines machine learning,
System. real-time notifications, and user-friendly analytics to provide
women and anybody in risk with an affordable, easily
To safeguard users in an emergency, it integrates accessible, and efficient safety solution. Because of its
automatic alerting systems, real-time location sharing, and potential for cloud-based and Internet of Things expansion, it
predictive safety analytics. Using past crime trends, is positioned as a scalable smart city safety component for the
environmental variables, and temporal data, this system uses future.
machine learning (Random Forest Classifier) to forecast the
level of safety in a region and provide proactive safety II. RELATED WORKS
suggestions.
The development of technology-based solutions to
Key Contributions of the SOS Alert System Include: enhance women's safety in both urban and rural environments
has been the subject of numerous studies over the past 10
Real-Time SOS Alerts: This feature, which is triggered by years. Early mobile applications mostly employed GPS
three or more taps on the SOS alarm system, allows for tracking and GSM/SMS connections to alert emergency
rapid emergency communication via SMS and contacts in times of danger. Sharma and Singh [1] presented
WhatsApp. a mobile safety app for Android that allows users to send
Location Intelligence and Safety Prediction: Using location-enabled notifications to pre-specified contacts.
contextual factors such as crime rates, population density, Similarly, In order to ensure prompt delivery of distress
IJISRT25AUG524 www.ijisrt.com 862
Volume 10, Issue 8, August – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25aug524
𝑛
signals, Choudhary et al. [2] created a smart SOS system that 1
integrated GPS location monitoring with GSM-based 𝑦̂ = ∑ ℎ𝑖 (𝑥)
𝑛
message transmission. The automation and effectiveness of 𝑖=1
emergency alert systems have been significantly enhanced by
the incorporation of wearable IoT devices. Shaikh and Users can enter location information, browse safety
associates. https://www.ijeter.com/download/smart-sos- recommendations, check safety predictions, and initiate
system.pdf[3] unveiled a women's safety gadget with Internet emergency alarms using the graphical user interface. When it
of Things capabilities that used GPS and GSM modules to is triggered, the system runs to give a alert msg The
offer real-time tracking and notifications. This strategy was designated emergency contacts automatically receive this
expanded by Dhanalakshmi and Vijayalakshmi [6], who message.
created wearable IoT devices that could instantly activate
SOS and continuously monitor location. Kumar et al. [5] also To create bar charts, scatter plots, heatmaps, and other
demonstrated the effectiveness of combining IoT with cloud graphs for comprehending safety trends, data visualization is
computing to enable faster emergency response mechanisms. incorporated using Matplotlib. Real-time visual analytics
Machine learning has been used in recent advances to presentation, prediction generation, alarm dispatch, and input
improve predictive skills. To provide proactive safety feature processing are all guaranteed by the entire workflow.
insights, Mahalakshmi et al. [4] demonstrated a mobile safety
application that analyzes environmental and contextual System Workflow
elements using machine learning algorithms. Similarly, While The operational flow of the SOS Alert System is as
Verma and Singh [12] used machine learning for smart follows:
surveillance and emergency alarm systems in metropolitan
areas, Gupta et al. [8] used the Random Forest algorithm for System Initialization:
pattern analysis and crime prediction. Additionally, hybrid The application loads contacts, user data, and the safety
strategies that combine location sharing, real-time dataset so that it can generate ML-based predictions.
communication, and AI-powered analytics have surfaced. To
expedite emergency response, Joshi and Jain [10] integrated Location Detection:
SOS alerts with Android-based location monitoring. An AI- The user's current position is ascertained via geocoder
driven warning system that uses mobile devices to make wise or GPS-based tracking technology.
decisions in emergency situations was proposed by Rout et al.
[7]. https://doi.org/10.2991/978-94-6463-471-6_140 Safety Zone Prediction:
Based on a safety score (0–10) that offers real-time
By combining IoT sensors with cloud-based data recommendations, an ML model classifies the area as Safe,
processing for extensive safety management, [11] broadened Moderate, or Unsafe.
the scope to include urban safety monitoring.
https://doi.org/10.1109/ACCESS.2018.2808934, IEEE SOS Alert Activation:
Access, vol. 6, pp. 10600–10610, 2018. Despite these If the SOS button is hit three or more times, the system
developments, a large number of current systems primarily will notify an emergency alert.
concentrate on either predictive safety analysis or reactive
emergency response, frequently lacking a smooth integration Emergency Notification:
of the two. By integrating real-time multi-channel alerts, IP- Via SMS and WhatsApp, all registered contacts get
based geolocation, machine learning-based safety prediction, notifications that include location details and emergency
and integrated visual analytics, the proposed SOS Alert messages.
System fills this gap and provides a comprehensive safety
solution that complements and expands on the features in Data Logging and Visualization:
earlier research [1]– [12]. All alerts, messages, and safety analytics are captured
and displayed to assist administrators and users in monitoring
III. METHODOLOGY safety trends.
Python with Tkinter for the user interface and Scikit- IV. TECHNOLOGIES USED
learn for covered machine learning features is used to create
the suggested Women's Safety Alert System. The dataset used Programming Language
for data preprocessing involves label encoding to convert
categorical features to numerical form and, if no adjustments Python 3.x:
are needed, replacing missing values using the formula: Python is the language of choice for creating machine
learning modules, data analytics, and essential application
Xnew=Xold functionality due to its ease of use, large library, and active
community.
The Random Forest Classifier is used to create the safety
prediction model, each tree's decision is represented by the
prediction function, which follows (x).
IJISRT25AUG524 www.ijisrt.com 863
Volume 10, Issue 8, August – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25aug524
Graphical user Interface (GUI) Pandas and Numpy:
These tools facilitate model training and analysis by
Tkinter: cleaning, manipulating, and computing numerical values.
Tkinter was used to develop the desktop-based GUI,
which provides an interactive dashboard for location sharing, Data Visualization and Analytics
safety checks, SOS activation, and analytics visualization.
Matplotlib and Seaborn:
Location Detection and Messaging Provide trend visualization and safety insights to users
and administrators by generating scatter plots, pie charts, bar
Geocoder: charts, and histograms.
Enables IP-based location sharing in an emergency by
retrieving address, latitude, and longitude. Figure Canvas TkAgg:
Integrates Matplotlib graphs into the Tkinter interface to
PyWhatKit: provide real-time visualization within the application.
Allows location-based real-time SOS warnings via
automated WhatsApp messages. Data Storage and Logging
SMTP (Simple Mail Transfer Protocol): JSON Files:
When internet-based messaging is unavailable, mobile These ensure offline access and little storage overhead
numbers are notified via SMTP (Simple Mail Transfer by locally storing emergency contacts, administrative logs,
Protocol), which is used to send emails to SMS gateways. and safety data.
Machine Learning and Data Processing Environment for Development and Execution:
The Python environment for Windows OS/cross-
Scikit-Learn (Sklearn): platform development and execution. A Python virtual
Forecasts safety using the Random Forest Classifier and environment for managing dependencies and PyCharm for
factors like past occurrences, street lighting, population testing and coding.
density, and crime rate.
Architecture Diagram
Fig 1 Architecture Overview
Module for SOS Alerts: interface built with Tkinter, threading for speedy response,
The emergency module is triggered when the user and PyWhatKit with SMTP for message delivery, the system
presses the alarm button three times within two seconds. If a notifies users via WhatsApp and SMS with the time and a link
confirmation window indicates that the scenario is dangerous, to a location on Google Maps.
all saved contacts are immediately notified. With a user
IJISRT25AUG524 www.ijisrt.com 864
Volume 10, Issue 8, August – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25aug524
Location Tracking and Sharing Module Safety Prediction and Analytics Module
This module uses IP-based geolocation to continuously Using machine learning and historical safety data, this
track the user's location, converting latitude and longitude module predicts the degree of safety in a given location.
into a clickable Google Maps link for convenient navigation. Based on a Safety Score ranging from 0 to 10, locations are
With only one click, it enables sharing with a single contact classified as Safe (≥7), Moderate (4–6.9), or Unsafe (<4). It
or all emergency contacts. It uses PyWhatKit for WhatsApp also provides the user with guidance on how to prevent issues.
sharing and Geocoder for position detection to deliver real- The system offers visual analytics, actionable
time location data, including coordinates and address, to recommendations, and 91% accurate safety forecasts. It was
designated recipients. developed using Pandas and NumPy for data processing and
Scikit-learn's Random Forest Classifier.
Contact Management Module
This module allows users to add, modify, and delete Visualization and Admin Analytics Module
emergency contacts. The data is stored locally in JSON This module gives users and administrators real-time
format for offline access. Every modification to a contact is safety insights through interactive visual analytics. It
documented in the admin records for audit and monitoring generates bar charts, pie charts, histograms, and scatter plots
reasons. Because the contact list was created with Tkinter for to display safety level distributions, crime–safety
form management, JSON for data storage, and Python I/O for connections, and district-by-district safety scores.
file operations, it is dynamically updated and readily Additionally, it logs user behavior, location sharing, and
available from the dashboard. emergency alerts for administrative oversight. It offers a
comprehensive safety dashboard to support awareness and
decision-making through the use of Matplotlib, Seaborn, and
FigureCanvasTkAgg for GUI integration.
V. RESULT
Table 1 Dataset
IJISRT25AUG524 www.ijisrt.com 865
Volume 10, Issue 8, August – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25aug524
Fig 2 Safety Level Distribution
Fig 3 Safety Score by District
IJISRT25AUG524 www.ijisrt.com 866
Volume 10, Issue 8, August – 2025 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/25aug524
Fig 4 Safety Score on Time of Day.
VI. CONCLUSION [5]. "IoT and cloud-based emergency response system for
women's safety," International Conference on
By combining rapid emergency notifications, location Communication and Electronics Systems (ICCES),
sharing, machine learning-based safety prediction, and visual pp. 1152–1157, 2020, S. A. Kumar, R. Krishnan, and
analytics, the SOS alert system offers women and vulnerable N. Balasubramanian.
groups efficient real-time safety solutions. It supports [6]. “Real-time women safety system using wearable IoT
preventive safety measures, facilitates quicker emergency devices,” International Conference on Intelligent
response, and enhances situational awareness. The system Sustainable Systems (ICISS), pp. 820–825, 2019, M.
can develop into a strong smart city safety framework with B. Dhanalakshmi and V. Vijayalakshmi.
future improvements including wearable IoT devices, cloud- [7]. In Proceedings of ICCIET 2024, R. R. Rout, S. S.
based warnings, and AI-driven analytics. Panda, and B. Panda published "AI-driven smart
alerting for women safety using mobile devices.”
REFERENCES https://doi.org/10.2991/978-94-6463-471-6_140
[8]. "Random forest-based crime prediction and analysis
[1]. Sharma and Singh, "An Android mobile application system," International Conference on Computing,
for women's safety," International Journal of Communication and Automation (ICCCA), pp. 412–
Computer Applications, vol. 179, no. 18, pp. 1–4, 417, 2019; H. Gupta, A. Jain, and A. Dubey
February 2018. [9]. In July 2020, S. K. Prasad and M. R. Patil published a
[2]. In the International Journal of Emerging Technologies paper titled "Women safety mobile app with GPS
in Engineering Research, volume 7, issue 5, pages 65– tracking and SMS alerting system" in the International
70, 2019, P. Choudhary, V. Sharma, and K. Chouhan, Journal of Emerging Trends in Engineering Research,
"Smart SOS system for women safety using GPS and volume 8, issue 7, pages 3269–3273.
GSM." [Online]. Available: [10]. A. Joshi and K. Jain, "Using Android to integrate
https://www.ijeter.com/download/smart-sos- location tracking and an SOS alert system for women's
system.pdf safety," International Journal of Engineering Research
[3]. In May 2019, the International Journal of Innovative and Technology, vol. 8, no. 10, pp. 1–5, 2020.
Research in Science, Engineering, and Technology [11]. "Real-time urban safety monitoring using IoT and
published a paper titled "IoT-based women safety cloud services," by M. M. Rathore, A. Paul, and W. H.
device using GPS and GSM," written by S. A. Shaikh, Hong
M. R. Shaikh, and S. Shaikh. https://doi.org/10.1109/ACCESS.2018.2808934,
[4]. A. Mahalakshmi, S. Mohanapriya, and R. S. Rekha, IEEE Access, vol. 6, pp. 10600–10610, 2018.
“Design of women safety mobile application using [12]. A. K. Singh and N. K. Verma, "Machine learning-
machine learning,” International Journal for Research based smart surveillance and emergency alert system
in Applied Science and Engineering Technology for urban safety," International Conference on
(IJRASET), vol. 8, no. 5, May 2021. Advances in Computing, Communication, and
https://doi.org/10.22214/ijraset.2021.34542 Control (ICAC3), pp. 445–451, 2021.
IJISRT25AUG524 www.ijisrt.com 867