Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

A Project Report On: Landmark Detection Tool

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

A PROJECT REPORT ON

Landmark Detection Tool

For

Thakur College of Science and Commerce

By
Meenakshi Kalimuthu

Submitted in partial fulfillment of Bachelors of Science (Computer


Science)

[UNIVERSITY OF MUMBAI]

Thakur Degree College of Science and


Commerce Kandivali (East), Mumbai.
ACADEMIC YEAR 2023-2024

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

1
Certification from College:

DATE: 31-1-2024

COMPUTER SCIENCE DEPARTMENT

(2023-2024)

Certificate of Approval

This is to certify that the project work entitled "Landmark Detection Tool”
is prepared by 050-Meenakshi Kalimuthu a student of “Third Year
Bachelor of Science (Computer Science)” course of University of Mumbai,
which is conducted by our college. This is the original study work and
important sources used have been duly acknowledged in the report. The
report is submitted in partial fulfillment of B.Sc. (Computer Science)
course as per rules of University of Mumbai.

Anjali Wagh ASHISH TRIVEDI


Project Guide Head of Department

_____________________
External Examiner

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

2
Index:
Sr.No Index Topic
Page

Acknowledgement 1-4

I. Preliminary Investigation

(i) Organization Overview 5

(ii) Abstract 6

(iii) Motivation 8

(IV) Literature Review 9

(v) Objectives 11

(vi) Requirements 12-13

(vii) Feasibility Study 14

(viii) Timeline 15

(IX) Workflow 17

II System Analysis

(i) Fact Finding Techniques 33

III Working 24-27

IV System Code 29

VI Future Enhancement 32

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

3
VII References and Bibliography 34

ACKNOWLEDGEMENT

Achievement is finding out what you would be doing rather than


what you have to do. It is not until you undertake such a project that you
realize how much effort and hard work it really is, what are your
capabilities and how well you can present yourself or other things. It gives
me immense pleasure to present this report towards the fulfillment of my
project.

It has been rightly said that we are built on the shoulders of


others. For everything I have achieved, the credit goes to all those who
have helped me to complete this project successfully. I take this
opportunity to express my profound gratitude to the management of
Thakur Degree College of Science & Commerce for giving me this
opportunity to accomplish this project work.

I am very much thankful to Mrs. C. T. Chakraborty - Principal


of Thakur College for their kind cooperation in the completion of my
project. A special vote of thanks to our HOD Mr. Ashish Trivedi and our
project guide Mrs. Anjali Wagh.

Finally, I would like to thank all my friends & entire Computer


Science department who directly or indirectly helped me in completion of
this project & to my family without whose support, motivation &
encouragement this would not have been possible.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

4
Organizational Overview

The Thakur College of Science and Commerce (TCSC) is a


college in Kandivali in Mumbai of Maharashtra, India running by Thakur
Educational Trust Thakur College was started in 1992 to serve the needs
of students passing SSC examination from the schools around Kandivali
area and Thakur Vidhya Mandir which has already established itself as
one of the schools in the area. It offers courses at primarily the higher
secondary and under-graduate levels. The courses at the undergraduate
and post- graduate level are offered in affiliation with Mumbai University,
Mumbai. An ISO 9001:2008 College with A grade as assessed by the
National Assessment and Accreditation Council NAAC.

Name: Thakur College of Science and Commerce


Founded: 1997
Address: Thakur Village Kandivali (E), Mumbai – 400 001
Motto: Journey towards Excellence
Total Staff: 200
Number of
Students: 12500
Email: Helpdesk@tcsc.org.in

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

5
Description of the System:

The landmark detection tool is a sophisticated system


designed to automatically identify and locate landmarks within images or
videos. Leveraging advanced computer vision algorithms, it accurately
detects prominent features such as buildings, monuments, natural
landmarks, or any predefined points of interest in asia. The landmark
detection tool, powered by TensorFlow Hub, stands at the forefront of
modern computer vision advancements. By leveraging TensorFlow Hub's
pre-trained models, the system gains access to state-of-the-art deep
learning architectures, streamlining the process of landmark identification
with remarkable accuracy and efficiency.This tool finds extensive utility
across various domains. In urban planning and architecture, it aids in city
mapping, infrastructure development, and heritage preservation. In
healthcare, it assists in medical imaging for precise anatomical landmark
identification, facilitating diagnosis and treatment planning. Moreover, in
autonomous vehicles and robotics, it enables navigation and scene
understanding, enhancing safety and efficiency. By automating the
process of landmark detection, this tool significantly reduces human effort
and error, saving time and resources. Its impact spans from improving
navigation and tourism experiences to facilitating research and
development in numerous fields. Ultimately, the system's robustness and
versatility empower industries and researchers to extract valuable
insights, make informed decisions, and propel innovation forward.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

6
Abstract:

The goal of the landmark detection system project is to create


an automated system for the recognition of historical sites.Monument
recognition is a challenging problem in the domain of image classification
due to huge variations in the architecture of different monuments.
Different orientations of the structure play an important role in the
recognition of the monuments in their images.A monument implies a
structure that has been constructed in order to commemorate a person ,
event or which has become an important part to a social group as a part
of them remembering historic times or cultural heritage, or as an example
of the historic architecture [1]. The project's main goal is to identify the
historical heritage of Asia, which comprises a variety of structures and
monuments. Convolutional Neural Networks (CNNs), one of the most
advanced deep learning techniques, will be used in this research to
extract features and representations of various monuments from a big
dataset of photographs. By creating an automated system for the
identification and categorization of monuments using computer vision
techniques, the landmark detection system project overall wants to
contribute to the preservation and promotion of the world's cultural and
historical heritage.The people belonging to the various cultures, castes,
creeds and religions take pride in their culturally rich heritage bestowed
upon them in the form of monuments. The term 'monument' is often
applied to the buildings or structures that have been considered as
examples of an important architectural and/or cultural heritage.
Monuments are also the tourist destinations in any country. They even are
representations of great achievements present in art and architecture. It is
therefore important to preserve them for the purpose that we can continue
to enjoy their majestic views and the future generations too can learn from
them. They are a part of Asia’s vast heritage because they show the
historical influence of any country with respect to its citizens.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

7
Motivation:

The motivation behind developing the landmark detection tool


stemmed from a recognition of the growing importance of automated
image analysis in numerous industries and research fields. Traditional
methods of landmark identification often proved time-consuming,
labor-intensive, and prone to human error. As such, there was a clear
need for a more efficient and accurate solution.

Moreover, with the proliferation of digital imagery and the


advent of powerful machine learning frameworks like TensorFlow Hub, the
opportunity to create a sophisticated yet accessible landmark detection
system became apparent. This project aimed to harness the potential of
cutting-edge technology to streamline processes, enhance
decision-making, and unlock new insights.

Furthermore, the potential applications of such a tool are vast


and impactful. From urban planning and infrastructure development to
healthcare and autonomous systems, the ability to automatically detect
landmarks within images or videos can revolutionize how we navigate,
understand, and interact with our environment. Ultimately, the motivation
behind this project was to empower individuals, industries, and
researchers with a powerful tool that simplifies complex tasks, accelerates
innovation, and ultimately contributes to advancements in various
domains.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

8
Literature review:

Monument Recognition is a novel idea. There has not


been much work carried out in this field. Some of the authors have shown
different strategies for monument recognition. Throughout the last few
decades, researchers have been working on landmark classification, a
subset of monument classification, employing a variety of methodologies
that can be either global feature-based or local feature based. Global
characteristics like edges, textures, and colors are the most basic and
need the least amount of resources. Higher-order composite field
histograms were shown to be superior by Linde et al. [2] using effective
computation on sparse matrices. A covariance descriptor-based method
utilizing a Support Vector Machine (SVM) was demonstrated by Ge et al.
[3] for the combined classifier and voting strategy. Torralba et al[4] .'s use
of visual context for location recognition and classification showed how
contextual priming can be used to use scene information for item
detection. The Google Landmark Recognition challenge on the GLDv2
dataset [6] was won in 2020 by a unique strategy that used an ensemble
of subcentre ArcFace models [5] with dynamic margins and just global
features. For monument detection or the object detection class of issues
in general, global features are typically employed in conjunction with local
features because they lack granularity and cannot focus on Regions of
Interest (ROIs). Local characteristics are robust to partial occlusion,
illumination variance, and changes in viewpoint and are concentrated on
Points of Interest (POI) or Regions of Interest (ROI). Scale-invariant
Feature Transform (SIFT) [7] and affine-invariant features [8] are
examples of common methodologies.These methods frequently apply a
Bag-of-Words (BoW) model [9,10] to the visual words that are packed
together and stand in for local attributes. Numerous such approaches
have been proposed, including the use of a probability density response
map for determining the likelihood of local patches [11], the estimation of
patch saliency using contextual information [12], the estimation of patch

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

9
importance using non- parametric density estimation [13], spatial pyramid
kernel- based BoW approaches (SPK-BoW) [14,15], and scalable
vocabulary trees [16]

Problem Statement:

Deep learning algorithms have developed rapidly in recent


years as a result of the widespread use of big image datasets and
previously unheard-of computer power (DL). Convolutional neural
networks (CNNs) have emerged as one of the most successful DL
techniques in computer vision, finding use in a variety of fields.Heritage
technologies have long produced and explored digital models and spatial
archives, whereas AI is just starting to interact with the built world through
mobile devices.

Existing System

An important duty in the digital documenting of cultural assets is the


classification of the photographs that are captured during the measuring
of an architectural asset. Since a lot of photos are often handled,
classifying them is a laborious operation that frequently takes a long time
(and is consequently prone to mistakes). An essential step in the digital
documentation process would be enhanced by the availability of
automatic approaches to simplify these sporting activities. Also, proper
classification of the photos that are available enables better administration
and more effective searches through certain terms, aiding in the
responsibilities of researching and interpreting the contested heritage
asset. This project’s main goal is to use deep learning methods for the
categorization of photographs of historically significant architecture,
specifically by means of convolutional neural networks.
.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

10
Objectives:

The objectives for the landmark detection project are:


Develop an Automated System: Create a robust and efficient system
capable of automatically detecting landmarks within images or videos
using machine learning techniques, specifically leveraging TensorFlow
Hub for model integration.
Achieve High Accuracy: Train and fine-tune the detection models to
achieve high levels of accuracy and reliability in landmark identification
across diverse types of landmarks and environmental conditions.
Enhance Efficiency: Improve the efficiency of landmark identification
processes by reducing the time and resources required compared to
manual methods, thereby enabling faster data analysis and
decision-making.
Ensure Scalability: Design the system to scale effectively with increasing
dataset sizes and complexity, allowing for the analysis of large-scale
datasets and applications in real-world scenarios.
Enable Real-time Detection: Implement algorithms and optimizations to
support real-time landmark detection, facilitating applications such as
navigation, robotics, and live event monitoring.
Promote Accessibility: Develop user-friendly interfaces and
documentation to make the landmark detection tool accessible to a wide
range of users, including researchers, industries, and individuals with
varying levels of expertise.
Validate Performance: Conduct rigorous testing and validation to assess
the performance and reliability of the system across different use cases
and benchmark it against existing methods for accuracy and efficiency.
Facilitate Integration: Provide APIs or integration options to enable
seamless integration of the landmark detection tool into existing workflows
and applications, fostering its adoption and usability in various domains.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

11
Hardware Requirements:-

CPU: A modern multi-core CPU is recommended for running training and


inference tasks efficiently. Intel Core i7 or equivalent AMD Ryzen
processors are suitable for smaller-scale projects.

GPU (Optional): For accelerated training and inference, especially with


large datasets and complex models, a dedicated GPU from NVIDIA (e.g.,
GeForce GTX or RTX series) or AMD (e.g., Radeon RX series) is
beneficial. Models with CUDA support for NVIDIA GPUs are preferred for
compatibility with TensorFlow's GPU acceleration.

RAM: At least 16GB of RAM is recommended to handle memory-intensive


tasks such as loading large datasets and training deep learning models
efficiently.

Storage: Sufficient storage space is needed for storing datasets, model


checkpoints, and other project-related files. SSDs (Solid State Drives) are
preferred over HDDs (Hard Disk Drives) for faster data access and
processing.

Software Requirements:

Operating System: The project can be developed and run on various


operating systems, including Windows, macOS, and Linux distributions
such as Ubuntu or CentOS.

Python: The programming language used for implementing the project.


Ensure that Python (preferably version 3.6 or higher) is installed on the
system.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

12
TensorFlow: Install TensorFlow, a popular deep learning framework,
preferably through pip or Anaconda, to leverage its functionalities for
training and inference tasks.
TensorFlow Hub: Install TensorFlow Hub to access pre-trained models
and embeddings from TensorFlow Hub's repository, enabling easy
integration of state-of-the-art models into the project. Additional Python
Libraries: Install other required Python libraries such as NumPy, OpenCV,
Matplotlib, and scikit-learn for data manipulation, image processing,
visualization, and evaluation tasks. Development Environment: Use an
integrated development environment (IDE) such as PyCharm, Visual
Studio Code, or Jupyter Notebook for coding, debugging, and
experimentation.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

13
Limitation of present system

This note assesses the feasibility of a landmark detection


system. It highlights limitations and considerations for further
development.
Technical Feasibility:
Limited Scope: The pre-trained model focuses on Asian landmarks,
hindering its applicability to other regions.
Single Image Input: Processing single images restricts real-world
applications dealing with videos or continuous streams.
Uncertain Accuracy: The code lacks explicit accuracy evaluation, making
it difficult to gauge real-world performance.
Economic Feasibility:
Computational Cost: Using pre-trained models like this one can be
expensive on resource-constrained devices, impacting deployment costs.
Consideration: Based on the current system, single image processing,
and unclear accuracy, the current code exhibits limitations for real-world
deployment. Further development is necessary to address these
limitations and conduct a more comprehensive feasibility study.
This would involve: Exploring alternative models with broader
geographical coverage and diverse landmark recognition capabilities.
Implementing video processing functionalities or adapting the system for
continuous data streams. Evaluating the model's accuracy using
benchmark datasets to understand its strengths and weaknesses.
Considering resource requirements and potential costs associated with
deployment and maintenance. Conducting market research to identify
target markets, analyze competitors, and assess potential demand.
Designing a user-friendly interface and exploring integration with existing
systems for operational feasibility. Investigating legal and regulatory
requirements relevant to your specific application and target market.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

14
Timelines

Timeline: 8 weeks
Tasks: Duration Dependencies
Data Acquisition and Preprocessing |2| |Task 1 |
* Gather diverse landmark datasets representing the target regions and
landmark types.
* Preprocess the data, including cleaning, labeling, and formatting for
model training.
| Model Selection and Evaluation |2| |Task 1 |
(using TensorFlow Hub)
* Explore available pre-trained models on TensorFlow Hub based on
functionalities and compatibility. * Evaluate potential models on a smaller
portion of the preprocessed data, considering accuracy and resource
requirements.
| Select and Fine-tune a TensorFlow Hub Model |3| |Task 3 |
* Based on evaluation results, select the best performing model. *
Fine-tune the model on the entire preprocessed dataset
| System Integration and Development |2| |Task 4 |
* Integrate the trained model into the system architecture.
| Testing and Deployment |1| |Task 5 |
* Performed comprehensive testing to ensure system functionality,
accuracy, and robustness.
* Deployed the system to the target environment, considering scalability
and security.
| Documentation and Maintenance |1| |All Tasks |
* Created comprehensive documentation for system usage and
maintenance.
* Established a maintenance plan to address future issues and potential
updates.
Dependencies: Most tasks depend on the completion of the previous
task(s). Tasks 1 and 2 can potentially proceed partially in parallel.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

15
Activity process:
This activity diagram outlines the high-level processes involved in
enhancing a landmark detection system using pre-trained models from
TensorFlow Hub:

Start Requirement Gathering and Analysis: Define project goals and


functionalities. Identify user needs and potential use cases. Research
existing solutions and analyze their strengths and limitations.
Data Acquisition and Preprocessing: Gather diverse landmark datasets
representing target regions and types.
Preprocess the data: cleaning, labeling, and formatting for model
evaluation.
Model Selection and Evaluation: Explore pre-trained models on
TensorFlow Hub based on functionalities and compatibility.
Evaluate potential models on a smaller portion of preprocessed data:
Assess accuracy. Consider resource requirements.
Model Selection and Refinement: Select the best-performing model based
on evaluation results.
System Integration and Development: Integrate the chosen model into the
system architecture.
Testing and Deployment:
Perform comprehensive testing to ensure: System functionality Accuracy
Robustness Deploy the system to the target environment, considering:
Scalability Security

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

16
Workflow diagram:

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

17
Overview of Technologies Used:
Python:
● Overview:
Python is a high-level, versatile programming language known for its
readability and ease of
use. It supports multiple programming paradigms and has a vast
ecosystem of libraries and
frameworks.
● Usage in the Project:
Python serves as the primary programming language for developing the
Landmark Detection tool . Its simplicity and extensive libraries make it an
ideal choice for integrating various components of the system seamlessly.
Python enables quick development, easy integration of modules, and
provides a straightforward syntax that contributes to the project's
accessibility and maintainability.

TensorFlow and TensorFlow Hub:


● Overview:
TensorFlow: The core framework for building and running machine
learning models. TensorFlow Hub: Provides access to pre-trained models
for various tasks, including image classification. This project leverages a
pre-trained model from TensorFlow Hub specifically designed for
landmark classification in Asia

● Machine Learning Model:


The project utilizes a pre-trained convolutional neural network (CNN)
model for image classification. The chosen model is specifically trained to
identify various landmarks based on image features.

● Label Map:
A CSV file containing a mapping between numerical labels and their
corresponding human-readable names for the landmarks. Used to

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

18
interpret the model's predictions and provide meaningful output to the
user.
● Additional Libraries:
Depending on the project's specific features, additional libraries like:
Matplotlib: For creating visualizations (e.g., plotting confidence scores).
Gradio: For building interactive web interfaces for user interaction.
Overall, this project combines Python's versatility with the power of
TensorFlow and pre-trained models to achieve real-time landmark
detection from user-provided images.

This project exemplifies the power of technological synergy, where


various technologies come together to create a more robust and efficient
system. Let's delve into the harmonious blend of technologies employed
in this landmark detection project:

1. Python: The Orchestrator:


Python acts as the maestro, skillfully conducting the entire project.
Its versatility allows for:
Data manipulation: Libraries like NumPy and Pandas facilitate efficient
handling of image data and label maps.
Image processing: The PIL library empowers image resizing,
normalization, and other preprocessing steps crucial for model input.
Machine learning: TensorFlow serves as the foundation for building and
deploying the pre-trained model, while TensorFlow Hub grants access to
the specialized landmark classification model.
Optional functionalities: Libraries like Gradio can be integrated to create
user-friendly interfaces for interacting with the system.
2. TensorFlow & TensorFlow Hub: The Powerhouse Duo:
TensorFlow: This framework acts as the engine, providing the
computational power and infrastructure for building and running the
machine learning model.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

19
TensorFlow Hub: This platform serves as the arsenal, offering a vast
repository of pre-trained models, including the one specifically designed
for landmark classification in this project.
By leveraging this pre-trained model, the project benefits from:
Reduced development time: No need to train a model from scratch,
saving significant time and resources. .
Specialization: The pre-trained model is specifically tailored for landmark
classification, leading to potentially higher accuracy compared to generic
models.
3. The Machine Learning Model: The Specialist:
The pre-trained convolutional neural network (CNN) acts as the expert,
specifically trained to identify landmarks within images. Its intricate
architecture, honed through extensive training data, allows it to:
Extract features: The CNN automatically learns to identify patterns and
features within images that are relevant to different landmarks. Classify
images: Based on the extracted features, the model assigns probabilities
to different landmark categories, enabling the system to predict the most
likely landmark present in the image.
4. The Label Map: The Translator:
The label map acts as the translator, bridging the gap between the
model's numerical predictions and human-understandable labels. It maps
the numerical codes generated by the model to their corresponding
landmark names, allowing the system to: Interpret results: The system
can translate the model's predictions into meaningful labels, such as
"mountain," "building," or "temple," for user comprehension.
Display results: The translated labels can be displayed alongside the
image, providing clear information about the detected landmarks.
5. The Synergy Effect:
Python seamlessly integrates the functionalities of various libraries,
enabling a smooth workflow. TensorFlow and TensorFlow Hub provide the
foundation and expertise for leveraging the pre-trained model's
capabilities. The model's specialized skills in landmark classification are

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

20
harnessed to achieve accurate predictions. The label map translates the
model's predictions into human-readable labels, enhancing user
experience. This harmonious blend of technologies empowers the project
to efficiently and accurately detect landmarks within user-provided
images, showcasing the true potential of technological synergy in driving
innovation and solving real-world problems.

System Analysis:
Defining the System and its Scope: This system detects landmarks in
images. It utilizes pre-trained models from TensorFlow Hub for landmark
recognition and focuses on static images at this stage.
Model Loading: The code specifies the URL for the pre-trained landmark
detection model hosted on TensorFlow Hub. This model is then loaded
using hub.KerasLayer.
Data Loading and Preparation: It loads a CSV file containing the label
map for the model predictions. This map translates the numerical
predictions into human-readable labels. The image shape is also defined.
Image Processing: An image (presumably in JPEG format) is loaded from
a local file location using PIL (Python Imaging Library). It is then resized to
match the required input shape for the model.
Normalization: The image is normalized by dividing each pixel value by
255.0 to bring them into the range [0, 1], which is a common
preprocessing step for neural networks.
Model Prediction: The preprocessed image is fed into the loaded model
for prediction. The output is a set of predictions represented as logits,
which are converted into human-readable labels using the label map.
Prediction Function Definition: A function classify_image is defined to
encapsulate the prediction process. It takes an image as input,
preprocesses it, predicts the landmark using the loaded model, and
returns the predicted label.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

21
Dataset

About My Dataset
Dataset Used in the Pre-trained Model (TensorFlow Hub)
Since we’re using a pre-trained model from TensorFlow Hub, the specific
details about the dataset used to train the model might not be readily
available.

1. Model Description: The model we’re using is: URL:


https://tfhub.dev/google/on_device_vision/classifier/landmarks_classifier_
asia_V1/1 Description: "Landmark classifier for Asia" This suggests the
dataset likely focuses on landmarks found in Asian countries.

2. Potential Dataset Characteristics: Type: Large collection of images


containing various landmarks in Asia (e.g., buildings, monuments, natural
wonders).
Content: Images might depict diverse landmarks across different
categories and locations within Asia.
Labels: Each image might be associated with a label corresponding to the
specific landmark it represents.
Format: Likely stored in a common image format like JPG or PNG. Size:
The dataset size is crucial for the model's training effectiveness, but this
information might not be publicly available.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

22
Fact Finding Techniques:

Introduction: Automated landmark detection plays a crucial role in various


fields, including urban planning, tourism, and cultural heritage
preservation. This literature survey explores the advancements and
challenges in automated landmark recognition, focusing on image
recognition techniques, landmark detection methods, datasets,
applications, and future directions. Image Recognition Techniques: The
survey begins by examining fundamental image recognition techniques,
such as convolutional neural networks (CNNs), deep learning
architectures, and feature extraction methods. It discusses the evolution
of these techniques and their application to landmark detection tasks.
Landmark Detection Methods: Various approaches to landmark detection
are reviewed, including traditional methods based on handcrafted features
and machine learning algorithms, as well as state-of-the-art deep
learning-based techniques. The survey compares different
methodologies, highlighting their strengths, weaknesses, and
performance metrics. Datasets and Benchmarks: A survey of publicly
available datasets and benchmarking frameworks commonly used for
evaluating landmark detection algorithms is presented. The survey
discusses popular datasets such as Google Landmarks Dataset and
evaluates their suitability for benchmarking landmark detection systems.
Applications and Use Cases: The survey explores the diverse applications
of automated landmark detection, including urban planning, tourism
recommendation systems, archaeological site mapping, and navigation
assistance. It presents case studies and real-world examples
demonstrating the practical significance of automated landmark
recognition in various domains.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

23
Working:

1. Importing Libraries:
numpy: Used for numerical operations and array manipulation.
pandas: Used for data analysis and manipulation (specifically reading the
label map).
matplotlib.pylab: Used for plotting visualizations (not directly used in this
code).
gradio: Used for creating interactive interfaces (not directly used in this
code).
PIL.Image: Used for image processing tasks like opening and resizing
images.
tensorflow: The core library for building and running machine learning
models. tensorflow_hub: Provides access to pre-trained models hosted on
TensorFlow Hub.

2. Defining Constants:
TF_MODEL_URL: Specifies the URL of the pre-trained model for
landmark classification in Asia.
LABEL_MAP_URL: Specifies the URL of the CSV file containing labels
corresponding to the model's predictions.
IMAGE_SHAPE: Defines the expected input image size for the model
(321x321 pixels).

3. Loading the Model:


A tf.keras.Sequential model is created. The hub.KerasLayer is used to
incorporate the pre-trained model from TF_MODEL_URL. The input
shape is set to IMAGE_SHAPE with three channels (RGB). The output
key is specified as "predictions:logits", indicating the model's raw
predictions before converting them to probabilities.

4. Loading Label Map:

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

24
The pandas.read_csv function reads the label map from the specified
URL. A dictionary named label_map is created, mapping each label ID to
its corresponding name.

5. Loading and Preprocessing Image:


The image path (img_loc) is defined. The image is opened using
PIL.Image.open. The image is resized to IMAGE_SHAPE using the resize
method. The image is converted to a NumPy array. The pixel values are
normalized by dividing by 255.0 (converting them to a range of 0 to 1).
The image is reshaped to add a new dimension at the beginning,
representing a batch of one image.

6. Making Predictions: The pre-processed image is fed to the model using


the predict method. The result variable stores the model's output, which
are the raw logits for each class.

7. Interpreting Results: The np.argmax function finds the index of the


class with the highest probability in the predictions. The corresponding
label name is retrieved from the label_map using the index. Finally, a list
of all class names (class_names) is created from the label_map values.

Challenges and Considerations:

● Environmental Variability: Landmarks may appear differently due to


changes in lighting conditions, weather, or seasonal variations.
Addressing these variations requires robust algorithms capable of
generalizing across diverse environmental conditions.

● Scale and Complexity: Large-scale datasets containing millions of


images pose challenges for efficient processing and model training.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

25
Developing scalable algorithms that can handle the volume and
complexity of such datasets is essential.

● Occlusion and Clutter: Landmarks may be partially occluded or


surrounded by clutter in images, making them challenging to detect.
Algorithms must be robust to occlusion and clutter while still
accurately identifying landmarks.
● Ambiguity and Similarity: Some landmarks may share visual
similarities with others, leading to ambiguity in detection.
Discriminating between visually similar landmarks requires
algorithms capable of capturing subtle differences in appearance or
context.

● Localization Accuracy: Precise localization of landmarks within


images is crucial for applications such as navigation or augmented
reality. Ensuring high localization accuracy requires fine-tuning
detection algorithms and optimizing localization techniques.

● Computational Resources: Deep learning-based landmark detection


models can be computationally intensive, requiring significant
resources for training and inference. Considerations must be made
for efficient use of computational resources, especially in
resource-constrained environments.

● Data Bias and Diversity: Datasets used for training landmark


detection models may exhibit biases in terms of geographic
coverage, cultural representation, or landmark types. Ensuring
dataset diversity and mitigating bias is essential for developing
inclusive and generalizable models.

● Ethical and Privacy Concerns: Landmark detection systems may


inadvertently capture sensitive information or infringe upon privacy

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

26
rights. Implementing privacy-preserving measures and adhering to
ethical guidelines are paramount when deploying automated
landmark detection systems in real-world scenarios.

● Interpretability and Explainability: Understanding how landmark


detection models make decisions is crucial for trust and
transparency. Developing interpretable and explainable models that
provide insights into the reasoning behind landmark detections is an
important consideration.

● Integration and Deployment: Integrating automated landmark


detection systems into existing workflows or applications requires
seamless interoperability. Considerations must be made for
deployment strategies, compatibility with existing infrastructure, and
user interface design to ensure smooth integration and adoption.
Addressing these challenges and considerations requires a holistic
approach, combining advancements in algorithm development, data
collection, ethical practices, and deployment strategies. By
acknowledging and mitigating these challenges, automated
landmark detection systems can realize their full potential in diverse
applications and domains.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

27
Thakur college of science and commerce
Department Of Computer Science
Science 2023-2024

Student’s Name: Meenakshi Kalimuthu

Project Name: Landmark Detection System

College Name: Thakur College of Science and Commerce

PHASES EXPECTED DATE ACTUAL DATE SIGNATURE


OF OF COMPLETION
COMPLETION

Preliminary
Investigation

System Analysis

System Designing

System Coding

System
Implementation

Report
Submission

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

28
Code:
import numpy as np
import pandas as pd
import matplotlib.pylab as plt
import gradio as gr
import PIL.Image as Image
import tensorflow as tf
import tensorflow_hub as hub
TF_MODEL_URL =
'https://tfhub.dev/google/on_device_vision/classifier/landmarks_classifier_
asia_V1/1'
LABEL_MAP_URL =
'https://www.gstatic.com/aihub/tfhub/labelmaps/landmarks_classifier_asia
_V1_label_map.csv'
IMAGE_SHAPE = (321, 321)
classifier = tf.keras.Sequential([hub.KerasLayer(TF_MODEL_URL,
input_shape=IMAGE_SHAPE+(3,), output_key="predictions:logits")])
df = pd.read_csv(LABEL_MAP_URL)
label_map = dict(zip(df.id, df.name))
img_loc = "image1.jpg"
img = Image.open(img_loc).resize(IMAGE_SHAPE)
img
img = np.array(img)/255.0
img.shape
img = img[np.newaxis, ...]
img.shape
result = classifier.predict(img)
result label_map[np.argmax(result)]
class_names=list(label_map.values())

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

29
Use case diagram:

A use case diagram is a type of Unified Modeling Language (UML)


diagram that shows the interactions between a system and its users. It is
a useful tool for understanding and documenting the requirements of a
system.Use case is a description of a set of sequence of
Use Cases:
Classify Image:
Trigger: User uploads an image.
Precondition: Image is in a supported format (e.g., JPG, PNG).
Flow of Events: User uploads an image.
System preprocesses the image (resizing, normalization).
System feeds the preprocessed image to the pre-trained model.
System retrieves the model's predictions.
System post-processes the predictions (finding most likely class,
confidence score).
Postcondition: System displays the predicted landmark information
(name, confidence score) and optionally visualizes the landmarks on the
image.
Browse Supported Landmarks:
Trigger: User wants to know the types of landmarks the system can
identify.
Precondition: System is running.
Flow of Events: User requests a list of supported landmarks.
System retrieves the list of labels from the label map.
System displays the list of supported landmarks for the user.
Postcondition: User has information about the types of landmarks the
system can identify.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

30
Output:

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

31
Future Enchantments:

In the future, enhancing the landmark detection project to


identify monuments beyond Asia holds tremendous potential for
expanding its utility and impact globally. Several avenues for improvement
and extension could be pursued: Geographic Expansion: Expand the
dataset and training procedures to encompass landmarks from other
continents, allowing the system to recognize iconic structures and natural
features worldwide. This expansion could include famous landmarks from
Europe, Africa, the Americas, and beyond, broadening the tool's
applicability and relevance on a global scale. Multi-Cultural Training Data:
Incorporate a diverse range of cultural landmarks into the training dataset
to ensure the system's ability to recognize and appreciate the rich
diversity of human heritage. By including landmarks representing various
cultures, historical periods, and architectural styles, the tool can become
more inclusive and comprehensive in its recognition capabilities.
Fine-Grained Localization: Enhance the system's localization capabilities
to provide more precise identification and geolocation of landmarks within

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

32
images or videos. This could involve developing algorithms to pinpoint
specific features or architectural details, enabling more accurate mapping
and annotation of identified landmarks. Semantic Understanding:
Augment the system's understanding of landmark context and
significance by integrating semantic analysis techniques. By incorporating
information about the historical, cultural, and social importance of
recognized landmarks, the tool can provide richer contextual information
and enhance its value for educational, tourism, and cultural heritage
preservation purposes. User-Driven Contributions: Implement
mechanisms for user-driven contributions to continuously update and
expand the landmark database. This could involve crowdsourcing efforts
to collect images and information about lesser-known landmarks,
ensuring that the system remains up-to-date and relevant as new
landmarks emerge or gain prominence. Cross-Domain Applications:
Explore applications beyond traditional landmark recognition, such as
urban planning, environmental monitoring, or virtual tourism.

CONCLUSION:
In conclusion, the development of the landmark detection tool
represents a significant advancement in automated image analysis,
addressing the inefficiencies and limitations of manual landmark
identification methods. By leveraging machine learning techniques,
particularly with TensorFlow Hub integration, this project has achieved its
objectives of creating a robust, accurate, and efficient system for
detecting landmarks within images or videos. The system's high accuracy,
scalability, and real-time capabilities offer numerous benefits across
various domains, including urban planning, healthcare, robotics, and
more. Furthermore, its user-friendly interfaces and accessibility
enhancements ensure that it can be readily adopted by researchers,
industries, and individuals alike. With the potential to streamline
processes, enhance decision-making, and unlock new insights, the
landmark detection tool stands poised to make a significant impact in

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

33
diverse applications. Moving forward, continued refinement, validation,
and integration efforts will further solidify its position as a valuable asset in
the realm of computer vision and image analysis

References and bibliography:


INTERNET REFERENCES:
[1] Cole, J.Y. and Reed, H.H. eds., 1997. The Library of Congress: the art
and architecture of the Thomas Jefferson Building. WW Norton &
Company
[2] O. Linde and T. Lindeberg, “Object recognition using composed
receptive field histograms of higher dimensionality,” in Proceedings of the
17th International Conference on Pattern Recognition, 2004. ICPR 2004.,
2004, vol. 2, pp. 1-6 Vol.2, doi: 10.1109/ICPR.2004.1333965.
[3] Y. Ge and J. Yu, “A scene recognition algorithm based on covariance
descriptor,” 2008 IEEE Int. Conf. Cybern. Intell. Syst. CIS 2008, pp. 838–
842, 2008, doi: 10.1109/ICCIS.2008.4670816.
[4] A. Torralba, K. P. Murphy, W. T. Freeman, and M. A. Rubin,
“Contextbased vision system for place and object recognition,” Radiology,
vol. 239, no. 1, p. 301, 2006, doi: 10.1148/radiol.2391051085. [5] J. Deng,
J. Guo, T. Liu, M. Gong, and S. Zafeiriou, “Sub-center ArcFace: Boosting
Face Recognition by LargeScale Noisy Web Faces,” Lect. Notes Comput.
Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics),
vol. 12356 LNCS, pp. 741–757, 2020, doi:
10.1007/978-3-030-58621-8_43. [6] T. Weyand and B. Leibe, “Visual
landmark recognition from Internet photo collections: A large-scale
evaluation,” Comput. Vis. Image Underst., vol. 135, pp. 1– 15, 2015, doi:
10.1016/j.cviu.2015.02.002. [7] D. G. Lowe, “Object recognition from local
scaleinvariant features,” Proc. Seventh IEEE Int. Conf. Comput. Vision,
1999, vol. 2, pp. 1150– 1157, 1999, doi: 10.1109/ICCV.1999.790410. [8] J.
Sivic and A. Zisserman, “Video google: A text retrieval approach to object
matching in videos,” Proc. IEEE Int. Conf. Comput. Vis., vol. 2, pp. 1470–
1477, 2003, doi: 10.1109/iccv.2003.1238663.

Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

34
Meenakshi Kalimuthu
Landmark Detection System
050, TYCS [A]

35

You might also like