Sample
Sample
PERSONALIZATION
A PROJECT REPORT
Submitted by
NIKITHA S (111521203036)
MANVITHA R (111521203040)
RUPIKA N (111521203042)
VAISHNAVI R (111521203055)
MARCH 2025
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
ii
CERTIFICATE OF EVALUATION
Semester : 08
NIKITHA S
(111521203036)
MANVITHA R
VAISHNAVI R
(111521203055)
The report of the project work submitted by the above students in partial fulfillment for
the award of Bachelor of Technology Degree in INFORMATION TECHNOLOGY of
Anna University was evaluated and confirmed to be the report of the work done by the
above students and then evaluated.
iii
ACKNOWLEDGEMENT
A project of this magnitude and nature requires the kind co-operation and support from
many, for the successful completion. We wish to express our sincere thanks to all those
who were involved in the completion of this project.
It is our immense pleasure to express our deep sense of gratitude to our Chairman
[Link], Vice-Chairman [Link], and our
Director [Link] NAIDU, for the facilities and support given by them in the
college.
We are extremely thankful to our Principal [Link], for having given
us an opportunity to serve the purpose of any education.
We wish to express our special thanks to our Dean-Research
[Link] for their constant support and encouragement.
We are indebted to [Link], M.E, Ph.D., Professor, Head of the
Department of Information Technology, for her valuable guidance and useful
suggestions during the course of the project.
We are thankful to our project supervisor Dr. K. BALASUBADRA, M.E, Ph.D.,
Professor and Head in the Department of Information Technology, R.M.D. Engineering
College for her guidance and valuable support given to us throughout the project.
iv
ABSTRACT
Upon completing their shopping, customers receive an electronic bill and a QR code via
email for convenient payment. An additional email verification step enhances security
during store entry. This intelligent system streamlines the entire shopping journey,
eliminating checkout lines and offering a personalized experience through automation. By
integrating convenience, security, and efficiency, the Intelligent Retail Experience
transforms the way customers interact with retail stores, ensuring a frictionless transition
from product selection to payment.
v
TABLE OF CONTENTS
2 PROJECT DESCRIPTION
2.1 GENERAL 9
2.2 SYSTEM CONFIGURATION 9
vi
3 REQUIREMENT ENGINEERING
3.1 GENERAL 16
3.2 HARDWARE REQUIREMENTS 16
3.2.1 Server Infrastructure 16
3.2.2 Storage Devices 17
3.2.3 Processing Units 17
3.2.4 Networking Elements 17
4 SYSTEM DESIGN
4.1 GENERAL 19
4.1.1 Class Diagram 19
4.1.2 Use-Case Diagram 21
4.1.3 Activity Diagram 23
4.1.4 Data Flow Diagram 25
DEVELOPMENT TOOLS
5.1 GENERAL 31
5 5.2 TECHNICAL DESCRIPTION 31
5.2.1 Databases 31
5.2.2 GUI’s 31
5.2.3 Edge Computing Devices 32
32
5.2.4 Material UI
32
5.2.5 Secure Communication 32
5.2.6 Access Control and Authentication
5.3 BACKEND DEVELOPMENT TOOLS
5.3.1 Flask 33
5.3.2 Python 33
vii
6
RESULTS AND DISCUSSION
6.1 GENERAL 34
6.2 PROCEDURES AND SCREENSHOTS 34
REFERENCES 61
viii
LIST OF FIGURES
ix
LIST OF ABBREVATIONS
AI - ARTIFICIAL INTELLIGENCE
ML - MACHINE LEARNING
UI - USER INTERFACE
UX - USER EXPERIENCE
OTP - ONE-TIME-PASSWORD
x
CHAPTER 1
INTRODUCTION
1.1 GENERAL
1
ensures that customers receive a seamless, efficient, and personalized shopping
experience from the moment they step into the store. With this system, customers no
longer need to manually check out or search for products. By simply registering their
details, including email, phone number, and facial data, they can access their personalized
shopping profile upon entry. Returning customers benefit from swift data retrieval,
eliminating the need to input details again. Inside the store, the voice assistant acts as a
helpful guide, providing real-time product information, prices based on quantity and
weight, and recommendations based on previous purchases or preferences.
This instant access to information enhances decision-making and makes the shopping
process smoother and faster.
1.3 OBJECTIVE
The primary objective of the Intelligent Retail Experience is to leverage advanced
technologies like facial recognition and voice assistance to streamline the shopping
process, benefiting both customers and store owners. By utilizing a ResNet-based model
for facial recognition, the system ensures a quick and secure registration process for
customers, allowing for personalized services and easy access to their shopping profiles.
This facial recognition feature enhances security and convenience, as returning customers
can enter the store without the need for manual check-ins, ensuring a seamless experience.
The integration of voice assistance powered by Natural Language Processing (NLP)
further enhances the shopping journey. Customers can interact with the system by simply
asking about product availability, pricing, and other relevant information, making the
shopping process more intuitive and efficient. For sellers, these features simplify store
management by automating customer interactions, product inquiries, and real-time
pricing updates, which reduces manual effort and improves operational efficiency.
2
1.4 EXISTING SYSTEM
1.4.1 CHALLENGES
The existing systems in retail environments typically rely on traditional methods for
customer registration, product discovery, and payment processing. Customers usually
register manually at the entrance, requiring them to fill out forms or provide basic
information such as name and contact details. Product information is often accessed via in-
store signage or by asking store attendants, leading to delays and a lack of real-time updates
on product availability or pricing.
Additionally, checkout processes are primarily manual, involving queues and cashier
interactions, which can be time-consuming and cumbersome for both customers and store
staff. In terms of security and personalization, many stores still rely on basic loyalty
programs or membership cards, which require customers to remember or carry physical
information. These systems do not integrate facial recognition or voice assistance, meaning
that the store experience lacks the level of automation, convenience, and efficiency that
modern consumers increasingly expect.
Customers need to ask store attendants or rely on physical signage for product
information, which may not be updated in real-time. Traditional checkout systems often
involve long queues and manual processing, causing delays and customer dissatisfaction.
Customers may not be aware of product availability until they reach the checkout or ask a
store attendant, leading to frustration if the item is out of stock.
3
1.4.2 LITERATURE SURVEY
PAPER 1:
TITLE: Radar Self-Following Shopping Cart Based on Multi-Sensor Fusion AUTHOR:
Lei yao, Tianhao Li, Rui Tong, Kai Wang, and Lingxiang Zhang YEAR: 2023
ABSTRACT:
Long queues of people waiting for a settlement in global shopping supermarkets are
bustling with traffic. In order to further improve operating efficiency and reduce the cost
of manual operation of the supermarket, this article proposes a multi-sensor integration
shopping cart system, which mainly includes image recognition, radar self-following
technology and road patrol. The improved SIFT algorithm effectively identifies a variety
of commodities. At the same time, relying on the public cloud platform, discount
information is recommended through WeChat programs, and the development of member
users login interface. After comprehensive calculation, the total price is displayed by the
EAIDK-610 user interface edited by Tkinter to complete the checkout. The LD-14 radar
used can realize the functions of autonomous follow-up and pedestrian obstacles. When
a sensor in the system fails or the detection deviation is too large, the multi-sensor fusion
technology can ensure the normal operation of the system due to a certain degree of
redundant. Improve the credibility and effectiveness of the data as a whole. This not only
solves the problem of queuing and checkout in the supermarket, but also helps brand
merchants to achieve precise marketing and scenario access. Finally, the use of computer
vision technology and various embedded hardware devices to build a radar self-following
the hardware prototype of the shopping cart for experimental verification. The average
accuracy of APs in the system is as high as 98.31%and 97.28%, respectively.
4
PAPER 2:
ABSTRACT:
Smart factory also known as smart manufacturing is an emerging field with the
revolution of industry 4.0. With the help of all these concepts, the smart factory integrates
the manufacturing assets and represents industrial networks. In this paper, we focus on
integrated solutions for smart factory concerns; by proposing an efficient task management
mechanism based on an efficient and resource-aware scheduling scheme named as ACM-
FEF. The scheduling algorithm used for the efficient task management is hybrid of the two
scheduling approaches as agent cooperation mechanism (ACM) and fair emergency first
(FEF) scheduling scheme. ACM is a decentralized scheduling approach which focuses on
the production maximization goals per machine, and also pays attention to the production
goals of all the machine networks involved in the smart factory. FEF scheduling scheme
focuses on minimizing the tasks starvation rate and maximizing the machine utilization by
efficiently using the machine slots. The proposed hybrid mechanism aims to efficiently plan
tasks execution, maximize machines’ resource utilization, maximize productivity,
minimize production delays, efficiently handle exceptions and efficiently control smart
factory Actuators
5
1.5 PROPOSED SYSTEM
The proposed system, the Intelligent Retail Experience, aims to revolutionize the
shopping process by integrating advanced technologies such as facial recognition, voice
assistance, and automated billing. Upon entering the store, customers will be prompted to
register their details, including email, phone number, and facial data. This registration
process ensures that both new and returning customers can quickly access their
personalized shopping profiles. For returning customers, the system will automatically
retrieve their information using facial recognition, streamlining entry and improving
security. Inside the store, the voice assistant, powered by Natural Language Processing
(NLP), will allow customers to inquire about product availability, pricing, and
specifications.
Customers can interact with the system using voice commands, and the assistant will
provide real-time responses, ensuring a smoother and more efficient shopping experience.
If a product is unavailable, the voice assistant will immediately inform the customer,
saving time and preventing frustration. Once the customer selects the desired products,
the system will automatically update their account with purchase details, including the
product’s weight and price. At checkout, there will be no need for manual processing, as
the system generates an electronic bill and a QR code, which is sent directly to the
customer’s email. This allows for seamless payment via the QR code, reducing wait times
and enhancing convenience. This project focuses solely on the software development
aspect, serving as a prototype for the Intelligent Retail Experience without involving any
hardware components.
6
1.5.1 ADVANTAGES OF THE PROPOSED SYSTEM
One of the primary advantages of the proposed system is its ability to offer a
seamless and highly convenient shopping experience. By integrating facial recognition
for store entry and automated billing for purchases, the system eliminates the need for
manual authentication and checkout. This hands-free approach minimizes friction in the
shopping process, allowing customers to shop efficiently without unnecessary delays.
7
[Link] AUTOMATED BILLING AND PAYMENT
Efficiency is a key highlight of the proposed system. The automated billing process
eliminates long queues and manual checkout, allowing customers to complete their
purchases effortlessly. A QR code is generated and sent via email, enabling seamless
digital payment and reducing wait times. This automation not only enhances customer
satisfaction but also optimizes store operations by reducing the dependency on cashiers
and manual processing.
8
CHAPTER 2
PROJECT DESCRIPTION
2.1 GENERAL
This section provides a broad yet comprehensive overview of the project, outlining
its key components, technologies, and methodologies within the context of intelligent
retail shopping. The Intelligent Retail Experience leverages facial recognition for
seamless authentication, integrates voice assistance powered by NLP for real-time
customer support, and implements automated billing to streamline the checkout process.
The methodologies involve software-based smart retail system development, data
processing for personalized shopping, and secure digital transactions through QR-based
payments. The significance of this project lies in its ability to redefine the retail shopping
experience by enhancing convenience, security, and operational efficiency, paving the
way for the future of smart retail.
H/W SYSTEMCONFIGURATION:
• Processor – Intel
• Speed - 1.1 GHz
• RAM - 8 Gb
• Hard Disk - 500 GB
S/W SYSTEM CONFIGURATION:
• Operating System - Windows 7/8/10
9
2.3 ARCHITECTURE DIAGRAM
MODULE DESCRIPTION:
10
by providing customers with an intuitive, hands-free interface. Using Natural
Language Processing (NLP) techniques, the voice assistant helps customers
inquire about product availability, pricing, and specifications, making their
interaction with the system more efficient. Additionally, this module handles
payment processing by automatically generating a digital bill and sending a QR
code to the customer's email for seamless payment. By integrating voice
assistance and payment functionality, this module simplifies the purchasing
process and minimizes wait times at checkout.
11
2.5 PROPOSED SYSTEM ALGORITHM:
2.5.1 INTRODUCTION TO RESNET ALGORITHM
ResNet (Residual Network) is a powerful and widely adopted deep learning
architecture, first introduced in the paper “Deep Residual Learning for Image Recognition”
by Kaiming He et al. in 2015. The primary aim of ResNet is to solve the problem of training
very deep neural networks. As networks deepen, they tend to suffer from performance
degradation due to vanishing gradients, poor convergence, and increased complexity, but
ResNet overcomes these challenges with its innovative architecture. It introduces the
concept of residual learning, which helps networks achieve much deeper layers while
maintaining efficient training.
ResNet has been a breakthrough in the field of computer vision, winning the 2015
ImageNet competition with outstanding performance. Since its introduction, ResNet has
become a foundational architecture for various applications, from image recognition to
more advanced tasks like object detection, segmentation, and even natural language
processing.
12
F(x,{Wi})F(x, \{W_i\})F(x,{Wi }) is the output of the residual block
after applying a series of transformations (convolutions, activations, etc.),
Here, instead of learning the direct mapping y=F(x)y = F(x)y=F(x), the network learns
the residual function F(x)F(x)F(x) that is added to the input xxx. This makes it easier for
the network to learn identity mappings (i.e., when the input and output are the same), which
helps prevent the performance degradation associated with deep networks.
Architecture of ResNet:
The ResNet architecture consists of a stack of residual blocks, and there are different
variants of ResNet depending on the number of layers. Common variants are ResNet-18,
ResNet-34, ResNet-50, ResNet-101, and ResNet-152, where the numbers represent the total
number of layers in the network.
15
CHAPTER 3
REQUIREMENT ENGINEERING
3.1 GENERAL
The server infrastructure plays a critical role in the Intelligent Retail Experience,
ensuring efficient data processing, real-time interactions, and secure transactions. A
cloud-based or dedicated server is required to handle customer authentication, voice
assistant queries, and automated billing. The server must support high-speed data retrieval
and concurrent request handling, enabling smooth customer interactions and real-time
updates. Additionally, a scalable server architecture is essential to accommodate growing
user demands and ensure seamless system performance.
16
3.2.2 STORAGE DEVICES
17
3.3 SOFTWARE REQUIREMENTS
The Intelligent Retail Experience is designed with specific software requirements
to ensure efficient operation, secure transactions, and an interactive shopping
experience.
18
CHAPTER 4
SYSTEM DESIGN
4.1 GENERAL
In the system design phase, the overall architecture and structure of the Intelligent
Retail Experience system are conceptualized and outlined. This phase lays the foundation
for the subsequent detailed designs and development. The key components of the general
system design include:
The Class Diagram serves as a foundational element in the system design of the
Intelligent Retail Experience. It provides a structured visual representation of the key
classes and their relationships, offering a clear understanding of how different system
components interact.
19
● Class Relationships:
• Customer-Product Relationship: Represents the interaction where
customer browse and select products. When a product is selected, it is linked
to the customer's shopping cart.
• Customer-Voice Assistant Relationship: Shows how customers engage with
the
voice assistant to inquire about product details, availability, and
recommendations.
• Customer-Billing Relationship: Demonstrates the connection between
customers and the billing system, which updates the purchase details and
generates an invoice.
• Product-Store Database Relationship: Establishes how product data is
stored and retrieved from the store database, ensuring accurate inventory
management.
• Billing-Store Database Relationship: Defines how transaction details are
recorded in the store database for future reference and customer convenience.
20
4.1.2 USE CASE DIAGRAM
The Use Case Diagram plays a crucial role in designing the Intelligent Retail
Experience system by defining the interactions between users and the system. It
highlights the functionalities available to different user roles, offering a high-level
perspective on how users engage with the system. This visual representation ensures
clarity regarding system behavior, providing stakeholders with an intuitive
understanding of user interactions. By categorizing distinct use cases, the diagram
serves as an essential tool for designing a user-centric and efficient shopping
experience.
● Actors:
1. Customer – Represents shoppers who interact with the system for product
22
4.1.3 ACTIVITY DIAGRAM
The Activity Diagram is a crucial component of the system design for the Intelligent
Retail Experience, visually representing the workflow of different system activities.
It illustrates the step-by-step execution of various actions in the system, ensuring a
clear understanding of the process flow from customer entry to payment completion.
This diagram aids in optimizing system functionality and improving efficiency.
● Actors:
1. Customer – Interacts with the system for shopping, voice assistance, and billing.
2. Voice Assistant –Provides real-time product details and helps customers navigate.
3. Retail System – Manages product selection, billing, and checkout.
4. Admin – Handles system operations, inventory updates, and user registration.
5. Database – Stores user credentials, product data, and transaction records.
● Activity Flow:
1. Customer Entry & Registration
• New customers register with their personal details (email, phone, facial data).
• Returning customers use facial recognition for authentication and seamless
access.
• Customers ask the voice assistant about product availability, pricing, and
specifications.
• The assistant fetches details from the retail system and provides real-time
responses.
23
4. Automated Billing & Invoice Generation
• The retail system generates an electronic bill once the customer finalizes
selections.
• The system sends an invoice with a QR code to the customer's email for
payment.
24
Figure.[Link] ACTIVITY DIAGRAM FOR INTELLIGENT RETAIL EXPERIENCE SYSTEM
25
● Actors :
• Customer – Engages with the system for shopping, product search, and
payments.
• Admin – Manages system operations, user data, and inventory updates.
• Payment Gateway – Processes transactions after the customer scans the QR
code.
•
● DFD Levels:
This Data Flow Diagram (DFD) effectively illustrates the structured movement of data
within the Intelligent Retail Experience, ensuring a smooth, efficient, and automated
shopping process.
27
4.2 ARCHITECTURAL DESIGN
In the context of the Intelligent Retail Experience, the Architectural Design outlines
the high-level structure and organization of the system. This design phase encompasses
both Frontend and Backend architectures, detailing how different components interact to
achieve the project's objectives of automated shopping, voice assistance, and seamless
billing.
• Customer Registration & Authentication Form: Enables new users to register and
existing customers to authenticate using facial recognition.
• Product Search & Inquiry Panel: Allows users to browse, filter, and search for
products using voice commands or text input.
• Shopping Cart Display: Shows selected items with price, weight, and quantity for
easy review before checkout.
• Billing & Payment Screen: Generates an electronic bill and QR code for hassle-free
digital payments.
28
3. Visual Elements:
The Backend Design of the system focuses on the server-side logic, database
management, and system security. It processes customer interactions, manages product
databases, and facilitates automated billing and payment transactions.
• Server Infrastructure:
o User & Product Databases: Stores customer profiles, purchase history, and
product details.
o Authentication & Security Modules: Handles facial recognition authentication
and safeguards customer data.
o Billing & Payment Processing System: Generates invoices and QR codes for
seamless checkout and payment verification.
This architectural design forms the foundation of the Intelligent Retail Experience,
ensuring a fast, secure, and automated shopping environment that enhances user satisfaction
and efficiency.
30
CHAPTER 5
DEVELOPMENT TOOLS
5.1 GENERAL
5.2.1 DATABASES:
The total number of databases that were identified to build the system is [Link]
major part of the Databases is categorized as Administrative components and the user
components. The administrative components are useful is managing the actual master
data that may; be necessary to maintain the consistency of the system. The
administrative databases are purely used for the internal organizational needs and
necessities. The user components are designed to handle the transactional state that arise
upon the system whenever the general client makes a visit onto the system for the sake
of the report based information. The user components are scheduled to accept
parametrical information for the user as per the systems necessity.
5.2.2 GUI’s
For the flexibility of the user, the interface has been developed in graphical
user interface mode. The normal interface is applied through browser.
The GUI’s at the top level has been categorized as
1) Administrative user interface
2) Customer or general user interface
31
The administrative user interface concentrates on the consistent information that is
practically, pact of the organizational activities and which needs proper authentication
for the data collection. The interfaces help the visitors with all the transactional states
like Data insertion, Data deletion and Data updating with the data search capabilities.
The general user interface helps the users upon the system in transactions through the
required services that are provided upon the system. The general user interface also
helps the ordinary user is managing their own information in a customized manner as
per their flexibilities.
Edge devices process data locally before sending it to the cloud, reducing latency
and improving response times. These are essential for ensuring fast customer checkout,
smart shelves, and dynamic pricing updates.
5.2.4 MATERIAL UI
32
5.3 BACKEND DEVELOPMENT TOOLS
5.3.1 FLASK
Flask, a lightweight and versatile Python web framework, plays a pivotal role in the
backend development of the Blockchain Document Verification Project. It facilitates the
creation of robust and scalable backend functionalities. Flask's simplicity and flexibility
make it an ideal choice for implementing backend logic, handling verification requests,
and ensuring smooth communication between the frontend and the backend. Leveraging
Flask in conjunction with development tools contributes to the overall efficiency and
effectiveness of the shopping experience.
5.3.2 PYTHON
Python is a high-level object-oriented programming language that was created by
Guido van Rossum. It is also called general-purpose programming language as it is used
in almost every domain we can think of.
Python’s standard library is very extensive, offering a wide range of facilities. The
library contains built-in modules (written in C) that provide access to system functionality
such as file I/O that would otherwise be inaccessible to Python programmers, as well as
modules written in Python that provide standardized solutions for many problems that
occur in everyday programming.
33
CHAPTER 6
RESULTS AND DISCUSSION
6.1 GENERAL
This section presents the general outcomes and findings of the Intelligent
Retail Experience Shopping Project. It provides an overall evaluation of the system's
performance, user engagement, efficiency, and its ability to enhance the shopping
experience. The assessment highlights the system’s effectiveness in automating checkout,
personalizing shopping experiences, optimizing inventory management, and integrating
AI-driven analytics. This general overview sets the stage for a more detailed exploration
in subsequent sections, focusing on procedures, visual representations, and key evaluation
metrics. By offering a holistic perspective, this section helps stakeholders understand the
impact of this smart retail system in revolutionizing traditional shopping.
• User Entry & Smart Recognition: Demonstrating how customers are recognized
upon entering the store via RFID sensors or facial recognition.
• Product Interaction & AI-Powered Suggestions: Showcasing the system’s ability
to track customer movements and suggest personalized offers.
• Automated Checkout & Payment Processing: Illustrating the seamless checkout
process where customers can walk out, and their purchases are automatically billed
via a digital wallet.
• Inventory Monitoring & Smart Shelf Management: Visualizing how IoT-
enabled smart shelves track product stock levels and update inventory in real-time.
• AI-Powered Analytics Dashboard: Presenting insights into customer behavior,
heatmaps, and sales trends, providing store managers with valuable decision-
making data.
34
6.2.1 Implementation
[Link] :
from flask import Flask, render_template, request, jsonify, redirect, url_for, session
import sqlite3
import os
import cv2
import numpy as np
import base64
import tempfile
import dlib
import random
import smtplib
from [Link] import MIMEMultipart
from [Link] import MIMEText
from [Link] import MIMEImage
import smtplib
from [Link] import formataddr
import qrcode
import smtplib
from [Link] import EmailMessage
from fpdf import FPDF
app = Flask(__name__)
app.secret_key = "your_secret_key"
DATABASE = '[Link]'
#manvithar32
conn = [Link](DATABASE)
cursor = [Link]()
[Link]('''
35
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
36
UPLOAD_FOLDER = 'static/images'
[Link](UPLOAD_FOLDER, exist_ok=True)
UPLOAD_FOLDERS = 'static/login'
[Link](UPLOAD_FOLDERS, exist_ok=True)
@[Link]('/register', methods=['POST'])
def register():
data = [Link]
name = data['name']
email = data['email']
phone = data['phone']
image_path = data['image_path'] # base64 image data
conn = [Link](DATABASE)
cursor = [Link]()
# Check if the email already exists
[Link]("SELECT * FROM users WHERE email = ?", (email,))
existing_user = [Link]()
if existing_user:
[Link]()
return jsonify({'status': 'error', 'message': 'Already registered'}), 400
# Decode the base64 string and save the image
image_data = base64.b64decode(image_path.split(',')[1]) # Strip metadata
image_folder = [Link](UPLOAD_FOLDER, email)
[Link](image_folder, exist_ok=True)
image_filename = f"{email}.png" # Create a unique filename
image_full_path = [Link](image_folder, image_filename)
with open(image_full_path, "wb") as image_file:
image_file.write(image_data)
# Store only the relative path in the database
relative_image_path = f"{UPLOAD_FOLDER}/{email}/{image_filename}"
37
[Link]('''
INSERT INTO users (name, email, phone, image_path)
VALUES (?, ?, ?, ?)
''', (name, email, phone, relative_image_path))
[Link]()
[Link]()
return jsonify({'status': 'success', 'message': 'Registration successful', 'image_path':
relative_image_path})
def process_and_match_image(image_path):
training_data_folder = 'static/images' # Folder with pre-saved images
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")
face_recognizer =
dlib.face_recognition_model_v1("dlib_face_recognition_resnet_model_v1.dat")
# Load the uploaded image
uploaded_image = [Link](image_path)
gray_uploaded = [Link](uploaded_image, cv2.COLOR_BGR2GRAY)
faces_uploaded = detector(gray_uploaded)
print(faces_uploaded)
if not faces_uploaded:
print('not work')
return None # No faces detected
# Extract face encoding from the uploaded image
for face in faces_uploaded:
shape_uploaded = predictor(gray_uploaded, face)
uploaded_face_encoding =
face_recognizer.compute_face_descriptor(uploaded_image, shape_uploaded)
#print('d', uploaded_face_encoding)
# Compare with images in the training data folder
38
for person_name in [Link](training_data_folder):
print(person_name)
person_folder = [Link](training_data_folder, person_name)
print(person_folder)
if [Link](person_folder):
for filename in [Link](person_folder):
if [Link](('.jpg', '.jpeg', '.png')):
training_image_path = [Link](person_folder, filename)
training_image = [Link](training_image_path)
gray_training = [Link](training_image, cv2.COLOR_BGR2GRAY)
faces_training = detector(gray_training)
for face in faces_training:
shape_training = predictor(gray_training, face)
training_face_encoding =
face_recognizer.compute_face_descriptor(training_image, shape_training)
# Calculate distance between uploaded image and training image
distance = [Link]([Link](uploaded_face_encoding) -
[Link](training_face_encoding))
print(distance)
if distance < 0.5: # Threshold for a match
return person_name # Return the matched person's name
a=[]
# Login Route
@[Link]('/login', methods=['POST'])
def login():
data = [Link]
email = [Link]('email')
print("Entered Email:", email)
[Link](email)
image_path = [Link]('image_path')
39
if not image_path:
return jsonify({'error': 'No image provided'}), 400
# Decode and save the image
try:
image_data = base64.b64decode(image_path.split(',')[1]) # Remove metadata
image_filename = f"{email}.png"
image_full_path = [Link](UPLOAD_FOLDERS, image_filename)
with open(image_full_path, "wb") as image_file:
image_file.write(image_data)
# Create a temporary file for processing
40
print(email)
otp = str([Link](1000, 9999))
print(otp)
otp_storage[email] = otp
## server = [Link]("[Link]", 587)
## [Link]()
## [Link]("your-email@[Link]", "your-password")
## [Link]("your-email@[Link]", email, f"Subject: OTP
Verification\n\nYour OTP is: {otp}")
## [Link]()
sender_email = 'manvithar32@[Link]'
sender_password = 'eqiuggostmlivfip'
receiver_email = email
host = "[Link]"
mmail = "manvithar32@[Link]"
hmail = email
sender_name= "admin"
receiver_name='user'
msg = MIMEMultipart()
subject = "OTP-Verification"
text =f"Subject: OTP Verification\n\nYour OTP is: {otp}"
## msg = MIMEText(text, 'plain')
[Link](MIMEText(text, 'plain'))
msg['To'] = formataddr((receiver_name, hmail))
msg['From'] = formataddr((sender_name, mmail))
msg['Subject'] = 'Respected sir/mam '
server = [Link](host, 587)
[Link]()
[Link]()
[Link](mmail, sender_password)
[Link](mmail, [hmail], msg.as_string())
41
[Link]()
send="send"
return jsonify({'success': True})
@[Link]('/verify_otp', methods=['POST'])
def verify_otp():
data = [Link]
email = [Link]('email').replace(" ", "")
otp = [Link]('otp')
if otp_storage.get(email) == otp:
del otp_storage[email]
return jsonify({'success': True})
else:
return jsonify({'success': False, 'message': 'Invalid OTP'}), 400
@[Link]("/store_order", methods=["POST"])
def store_order():
try:
print("Received request at /store_order") # Debugging log
data = request.get_json()
print("Received Data:", data) # Print received data
if data is None:
return jsonify({"error": "Invalid JSON format"}), 400
product = [Link]("product")
quantity = [Link]("quantity")
price = [Link]("price")
email = a[-1] # Ensure 'a' is correctly defined
print("Extracted Values:", product, quantity, price, email) # Debugging log
if not product or not quantity or not price:
return jsonify({"error": "Missing required fields"}), 400
# Check if the database connection is working
conn = [Link](DATABASE)
cursor = [Link]()
42
# Debug: Check if the table exists
[Link]("SELECT name FROM sqlite_master WHERE type='table' AND
name='orders';")
table_exists = [Link]()
if not table_exists:
print("Error: Table 'orders' does not exist.")
return jsonify({"error": "Database table missing"}), 500
[Link]("INSERT INTO orders (email, product, quantity, price) VALUES (?,
?, ?, ?)",
(email, product, quantity, price))
[Link]()
[Link]()
print("Order successfully stored!")
return jsonify({"message": "Order stored successfully"})
except Exception as e:
print("Error storing order:", str(e))
return jsonify({"error": str(e)}), 500
class PDF(FPDF):
def header(self):
self.set_font("Arial", "B", 16)
[Link](200, 10, "Supermarket1 Bill", ln=True, align='C')
[Link](10)
def generate_pdf_bill(order_details, total_price, bill_id, qr_filename):
pdf = PDF()
pdf.add_page()
pdf.set_font("Arial", size=12)
# Display payment message
[Link](200, 10, "Use this QR code to pay your bill:", ln=True, align='C')
[Link](5)
# Add QR Code
[Link](qr_filename, x=75, y=30, w=60) # Adjust the size and position
43
[Link](60) # Move down to avoid overlapping
[Link](200, 10, f"Bill ID: {bill_id}", ln=True)
[Link](5)
[Link](50, 10, "Product", 1)
[Link](30, 10, "Quantity", 1)
[Link](40, 10, "Price", 1)
[Link]()
for order in order_details:
[Link](50, 10, order[0], 1)
[Link](30, 10, str(order[1]), 1)
[Link](40, 10, f"Rs. {order[2]}", 1)
[Link]()
[Link](120, 10, "Total", 1)
[Link](40, 10, f"Rs. {total_price}", 1)
bill_pdf = f"bill_{bill_id}.pdf"
[Link](bill_pdf)
return bill_pdf
def send_email(user_email, bill_pdf):
sender_email = 'manvithar32@[Link]'
sender_password = 'eqiuggostmlivfip'
msg = EmailMessage()
msg["Subject"] = "Your Supermarket Bill"
msg["From"] = sender_email
msg["To"] = user_email
msg.set_content("Please find your bill attached. Use the QR code in the bill to make
your payment.")
with open(bill_pdf, "rb") as f:
msg.add_attachment([Link](), maintype="application", subtype="pdf",
filename=bill_pdf)
with smtplib.SMTP_SSL("[Link]", 465) as server:
[Link](sender_email, sender_password)
44
server.send_message(msg)
@[Link]("/generate_bill")
def generate_bill():
conn = [Link](DATABASE)
cursor = [Link]()
[Link]("SELECT product, quantity, price FROM orders")
order_details = [Link]()
[Link]("SELECT SUM(price) FROM orders")
total_price = [Link]()[0] or 0
if total_price == 0:
[Link]()
return jsonify({"message": "No orders found!"})
bill_id = f"BILL{int(total_price*100)}"
# Generate QR Code
qr_data = f"Bill ID: {bill_id}\nTotal: Rs. {total_price}\nScan to Pay"
qr = [Link](qr_data)
qr_filename = f"qr_{bill_id}.png"
[Link](qr_filename)
# Generate PDF with QR Code
bill_pdf = generate_pdf_bill(order_details, total_price, bill_id, qr_filename)
# Send email
user_email = a[-1] # Replace with actual user email
send_email(user_email, bill_pdf)
# Clear order table after bill generation
[Link]("DELETE FROM orders")
[Link]()
[Link]()
return jsonify({
"message": "Bill generated and emailed successfully! Order table cleared.",
"total_price": total_price,
"bill_id": bill_id,
45
"qr_code": qr_filename
})
@[Link]('/home1')
def home1():
return render_template('[Link]')
# Home Page Route
@[Link]('/home')
def home():
if 'email' in session:
return render_template('[Link]', email=session['email'])
return redirect(url_for('index'))
if __name__ == '__main__':
[Link](debug=False)
46
6.2.2 SCREENSHOTS
47
Figure.6.2.2 REGISTRATION PAGE
48
Figure.6.2.3 SUPERMARKET DASHBOARD
49
Figure.6.2.4 SUPERMARKET BILL
50
6.3 EVALUATION METRICS
The Evaluation Metrics section critically assesses the performance and efficiency
of the Intelligent Retail Experience Shopping Project. By defining and analyzing key
metrics such as checkout speed, system responsiveness, customer engagement, and
inventory accuracy, this section provides both quantitative and qualitative insights
into the system’s effectiveness. The discussion highlights areas of success, identifies
challenges, and explores potential improvements, ensuring a comprehensive evaluation
of the project's impact on the retail shopping experience.
• Checkout Speed
• System Responsiveness
● Verification Accuracy:
o Metric Definition: The precision of the system in correctly identifying
52
6.3.2 QUALITATIVE METRICS
• Areas of Success:
o Analysis: Identifying aspects of the project that have performed well, such as
seamless automated checkout, effective product recommendations, or positive
customer feedback.
o Insights: Understanding what works allows replication of successful strategies in
future enhancements.
• Challenges Faced:
o Analysis: Exploring areas where the project can be enhanced, including scalability
improvements, additional features, or integration with emerging technologies.
53
CHAPTER 7
TESTING
7.1 GENERAL
The Testing phase in the Intelligent Retail System is a crucial step to ensure the
accuracy, efficiency, and security of the system. A multi-layered testing approach is
adopted to verify that the system performs optimally under various scenarios. Unit Testing
is conducted to validate individual components, such as product scanning, pricing
algorithms, and AI-based recommendation systems. Integration Testing ensures seamless
communication between different modules, such as the POS system, inventory
management, and user interfaces. User Acceptance Testing (UAT) focuses on real-world
usability by evaluating the system from a customer and retailer perspective to ensure it
meets operational requirements. This thorough testing process is vital for delivering a
reliable, error-free, and user-friendly retail solution.
A strategy for software testing may also be viewed in the context of the spiral. Unit
testing begins at the vertex of the spiral and concentrates on each unit of the software as
implemented in source code. Testing progress by moving outward along the spiral to
integration testing, where the focus is on the design and the construction of the software
architecture. Talking another turn on outward on the spiral we encounter validation testing
where requirements established as part of software requirements analysis are validated
against the software that has been constructed.
54
7.2 UNIT TESTING
Unit testing focuses verification effort on the smallest unit of software design, the
module. The unit testing we have is white box oriented and some modules the
steps are conducted in parallel.
55
7.4 INTEGRATION TESTING
Integration Testing in the Intelligent Retail System is crucial to ensuring seamless
interaction between different modules, including the user interface, backend processing,
inventory management, and AI-driven analytics. This phase validates how effectively
these components work together to deliver a smooth retail experience.
This type of testing selects the path of the program according to the location of
definition and use of variables. This kind of testing was used only when some local
variable were declared. The definition-use chain method was used in this type of testing.
These were particularly useful in nested statements.
56
7.6 USER ACCEPTANCE TESTING
User Acceptance Testing (UAT) in the Intelligent Retail System is a critical phase
where end-users, including store managers, sales staff, and customers, actively evaluate
the system’s functionality, usability, and real-world effectiveness. This phase ensures
that the system meets the expectations and operational needs of retail users.
The insights obtained from UAT contribute to refining the Intelligent Retail System,
ensuring it delivers an intuitive, efficient, and user-friendly experience. By addressing
feedback-driven improvements, the system is fine-tuned to enhance both customer
satisfaction and retailer operational efficiency.
57
7.7 LOOP TESTING
In this type of testing all the loops are tested to all the limits possible.
The following exercise was adopted for all loops:
• All the loops were tested at their limits, just above them and just below them.
• For nested loops test the inner most loop first and then work outwards.
• For concatenated loops the values of dependent loops were set with the help
of connected loop.
• Unstructured loops were resolved into nested loops or concatenated loops and
tested as above.
• Each unit has been separately tested by the development team itself and all the
input have been validated.
• Each loop is tested with zero iterations, one iteration, and multiple iterations to
verify boundary conditions.
• The deepest nested loop is tested first, ensuring that the iterations propagate
correctly outward.
• Ensures that exceptions raised within loops are correctly handled and do not cause
unexpected failures.
• The conditions under which the loop exits are validated to prevent infinite loops or
early termination. Loops are executed with large datasets to check for efficiency
and performance bottlenecks.
• If loops depend on external conditions or variables, those dependencies are tested
for stability. Ensures that each iteration maintains correct logic without unintended
alterations to variables.
• Loops are tested for scenarios where counters or index variables may overflow
their datatype limits.
• Validates correct use of break, continue, and return statements inside loops.
• If loops are executed in parallel or within multi-threaded environments, race
conditions and deadlocks are checked.
58
CHAPTER 8
8.1 CONCLUSION
The Intelligent Retail Experience project presents a revolutionary approach to
modernizing the shopping process through the seamless integration of cutting-edge
technologies such as facial recognition, voice assistance, and automated payment
systems. By fusing these innovations into a cohesive framework, the project redefines
the retail experience, offering customers an intuitive, efficient, and personalized journey
from entry to checkout.
59
Ultimately, this project represents more than just a digital transformation—it ushers in
a new era of intelligent retail, where convenience, personalization, and efficiency
converge to create a future-ready shopping ecosystem. As retail continues to evolve, this
system stands at the forefront, poised to redefine customer experiences, optimize store
operations, and set new benchmarks in smart commerce.
This template is compared with stored profiles to verify identity quickly and
securely as the customer enters the store. In addition to facial features, voice assistance
plays a pivotal role in this experience, where voice commands are processed to extract
acoustic and phonetic features. These features include tone, pitch, and speech patterns,
which are analyzed to understand and respond to customer queries, navigate aisles,
provide pricing information, and even suggest products based on previous purchases.
The system’s ability to interpret and process these voice features ensures a seamless
interaction between the customer and the store. Furthermore, automated payment
systems rely on feature extraction from product data—such as price, quantity, and
weight—along with customer profiles to ensure accurate billing. The real-time tracking
of purchases allows the system to automatically update the shopping cart and generate
an electronic bill. Feature extraction is thus a critical component in ensuring that the
system can respond intelligently and accurately to customer needs, all while providing
a smooth transition from shopping to payment.
60
REFERENCES
[1] L. Yao, T. Li, R. Tong, K. Wang and L. Zhang, “Radar Self-Following Shopping
Cart Based on Multi-Sensor Fusion” in IEEE Access, vol. 11, pp. 77055-77072, 2023,
doi:10.1109/ACCESS.2023.3297889.
[2] S. Malik and D. Kim, “A Hybrid Scheduling Mechanism Based on Agent
Cooperation Mechanism and Fair Emergency First in Smart Factory” in IEEE Access,
vol. 8, pp. 227064-227075, 2020, doi: 10.1109/ACCESS.2020.3046097.
[3] M. Celaya-Echarri, L. Azpilicueta, V. Ramos, P. Lopez-Iturri and F. Falcone,
“Empirical and Modeling Approach for Environmental Indoor RF-EMF Assessment in
Complex High- Node Density Scenarios: Public Shopping Malls Case Study” in IEEE
Access, vol. 9, pp.46755-46775, 2021, doi: 10.1109/ACCESS.2021.3067852.
[4] M. Shahroz, M. F. Mushtaq, M. Ahmad, S. Ullah, A. Mehmood and G. S. Choi, “IoT-
Based Smart Shopping Cart Using Radio Frequency Identification” in IEEE Access, vol.
8,pp. 68426-68438, 2020, doi: 10.1109/ACCESS.2020.2986681.
[5] J. Xu et al., “Design of Smart Unstaffed Retail Shop Based on IoT and Artificial
Intelligence” in IEEE Access, vol. 8, pp. 147728-147737,2020,
doi:10.1109/ACCESS.2020.3014047.
[6] M. M. Taygur and T. F. Eibert, ‘‘A ray-tracing algorithm based on the computation
of (exact) ray paths with bidirectional ray-tracing,’’ IEEE Trans. Antennas Propag., vol.
68, no.8, pp. 6277–6286, Aug. 2020.
[7] Z . E. Khaled, W. Ajib, and H. Mcheick, ‘‘An accurate empirical path loss model
for heterogeneous fixed wireless networks below 5.8 GHz frequencies,’’ IEEE Access,
vol. 8, pp. 182755–182775, 2020.
[8] L. Azpilicueta, P. Lopez-Iturri, J. Zuñiga-Mejia, M. Celaya-Echarri, F. A.
Rodríguez- Corbo, C. Vargas-Rosales, E. Aguirre, D. G. Michelson, and F. Falcone,
‘‘Fifth-generation (5G) mmWave spatial channel characterization for
urban Environments’ system analysis,’’Sensors, vol. 20, no. 18, p. 5360, Sep.
2020.
61
[9] L. Azpilicueta, P. Lopez-Iturri, J. Zuñiga-Mejia, M. Celaya-Echarri, F. A.
Rodríguez- Corbo, C. Vargas-Rosales, E. Aguirre, D. G. Michelson, and F. Falcone,
‘‘Fifth-generation (5G) mmWave spatial channel characterization for urban
Environments’ system analysis,’’Sensors, vol. 20, no. 18, p. 5360, Sep. 2020.
[10] F. Casino, P. Lopez-Iturri, E. Aguirre, L. Azpilicueta, F. Falcone, and A. Solanas,
‘‘Enhanced wireless channel estimation through parametric optimization of hybrid ray
launching-collaborative filtering technique,’’ IEEE Access, vol. 8, pp. 83070–
83080, 2020.
[11] H. Klaina, I. P. Guembe, P. Lopez-Iturri, J. J. Astrain, L. Azpilicueta, O. Aghzout,
A. [Link], and F. Falcone, ‘‘Implementation of an interactive environment with
multilevel wireless links for distributed botanical garden in University campus,’’ IEEE
Access, vol. 8,pp. 132382–132396, 2020.
62