medical-leaf-recognition-1
medical-leaf-recognition-1
medical-leaf-recognition-1
Abstract
Abstract—It's really important to correctly identify medicinal plants because that helps
us understand what healing properties they have and how we can use them for different
purposes. Identifying medicinal plants is tough due to their changing appearance and the
difficulty of traditional identification methods. This paper suggests a method using deep
learning, specifically a convolutional neural network (CNN) called MobilenetV2, to
tackle the identification of medicinal plants. Using a dataset of 1,455 images, the CNN
can learn intricate features within the images, allowing it to accurately recognize and
classify medicinal plants with great precision. The suggested method holds immense
promise in offering healthcare professionals and herbal medicine researchers a dependable
tool for identifying medicinal plants. This study marks a significant step forward in
utilizing deep learning techniques for recognizing medicinal plants, overcoming the
hurdles presented by their intricate appearances.
1. INTRODUCTION
For a very long time, herbal therapy was a crucial part of conventional medical systems. But
correctly recognizing herbal plants can be difficult, particularly for those who don't have a
background in botany or plant systematics. Deep learning methods and computer vision
methods have garnered increasing attention in recent years as tools for herbal plant
identification. These methods hold promise as a quick and precise way to identify plants, which
makes them useful resources for herbal medicine researchers and medical experts. For the
creation of novel medications and therapies, it is essential to accurately identify medicinal
plants. The accuracy and efficiency of herbal plant recognition could be greatly increased by
deep learning-based techniques, which have shown promise in a variety of image recognition
tasks. Traditional methods of plant identification, like manual inspection and morphological
analysis, can be laborious and error-prone. The study introduces a deep learning-based method
for recognizing and identifying herbal medicinal plants, comprising two primary elements: a
dataset and a model architecture. The dataset comprises images of various plant species,
gathered using mobile phones in natural environments. The model architecture adopts a
MobileNetV2-based deep learning model.
1.1 Project Background:
In response to the growing importance of medicinal plants in healthcare and conservation, this
project aims to develop a robust leaf recognition system for identifying medicinal plant species
based on leaf characteristics. By leveraging image processing techniques and machine
learning algorithms, the system will enable accurate species classification, facilitating
research, healthcare practices, and biodiversity conservation efforts. The project addresses the
need for reliable tools to aid in the identification of medicinal plants, ensuring their safe and
effective use in various applications.
The project focuses on collecting diverse datasets of labeled medicinal plant leaf images,
implementing image processing techniques for feature extraction, and developing machine
learning models for species classification. The system's significance lies in its potential to
accelerate drug discovery, promote safe herbal medicine practices, and contribute to the
preservation of endangered plant species. By providing researchers, healthcare professionals,
and conservationists with a user-friendly tool for leaf identification, the project aims to
advance scientific knowledge and support sustainable healthcare and environmental
initiatives.
1.2 Objectives:
2. SYSTEM ANALYSIS
2.1 Existing System:
The existing system presents a new shape description approach called triangle-distance
representation (TDR) for plant leaf recognition. The TDR descriptor is represented by two
matrices: a sign matrix and a triangle center distance matrix. The sign matrix is used to
characterize the convex/concave property of a shape contour, while the triangle center distance
matrix is used to represent the bending degree and spatial information of a shape contour. This
method can effectively capture the detailed and global characteristics of a leaf shape while
keeping the similarity transformations (translation, rotation, and scaling) unchanged.
3. FEASIBILITY STUDY
Feasibility analysis acts as a predictive tool to gauge the likelihood of a project's success
or failure. It entails a thorough assessment of technical, economic, legal, operational, and
scheduling factors to determine the project's feasibility and justify its pursuit.
Feasibility studies hold significant importance in both governmental and corporate sectors. By
conducting feasibility studies before initiating work or launching new products, organizations
can mitigate risks, optimize resource allocation, and increase the likelihood of project success.
• Technical Feasibility.
• Economic Feasibility
• Operational Feasibility.
• Schedule Feasibility.
Technical feasibility evaluation ensures that the project can be executed effectively
using available technology, expertise, and resources. This involves scrutinizing the feasibility
of implementing necessary systems, processes, and infrastructure.
An economic feasibility study examines the financial viability of the project. It involves
analyzing costs, revenue projections, potential returns on investment, and assessing alignment
with budgetary constraints and financial objectives
Legal and regulatory feasibility analysis ensures compliance with applicable laws,
regulations and industry standards. It entails identifying legal requirements, securing permits,
Operational feasibility assesses whether the project can be integrated into existing
operations without significant disruption. It involves evaluating organizational readiness,
resource availability, and potential impacts on workflows and processes.
Requirement analysis in software engineering is like the compass that guides developers
through the creation of a software system. It's all about understanding what the software needs
to do and how it should perform. The process starts with listening to the users. Sometimes they
give a clear picture of what they want (formal specification), while other times it's a bit fuzzy
(informal specification).
In either case, software engineers work closely with users to make sure they understand
the goals and outcomes desired. This back-and-forth helps refine the specifications until
everyone is on the same page, ensuring that the final product meets user needs effectively. So,
requirement analysis is like the roadmap that ensures software development stays on track,
heading in the right direction to deliver what users really want.
A software requirements specification (SRS) is like a detailed map that describes how a
program will behave and what it needs to do. It includes a series of examples, called use cases,
that show how a user will interact with the program. These use cases paint a clear picture of
what the system should do and help set boundaries for what it shouldn't do.
In addition to describing how the program should work, an SRS also lists criteria that aren't
directly related to its functions. These criteria, called non-functional requirements, set limits
on how the program should be built or designed.
To create an SRS, it's essential to have a deep understanding of the project's goals and
objectives. This often involves lots of discussions with the client and the project team to ensure
everyone's on the same page. Having a well-defined SRS can save time and money by reducing
the guesswork for developers and helping them focus on achieving their goals efficiently.
An effective SRS not only describes how the program will work but also details how it will
interact with the hardware, other software applications, and users in various real-world
situations. This comprehensive understanding ensures that the final product meets the needs of
its users effectively.
Data Preprocessing:
• Resizing images means making them all the same size so the computer can understand
them better. We use a tool called OpenCV to do this. By doing this, we make it easier
for the computer to learn from the pictures and make accurate guesses about the leaves.
We need to choose the size carefully to balance between making things easy for the
computer and keeping the pictures clear.
• Normalization is like putting all the colors of the images on the same scale so the
computer can understand them better. We change the brightness and darkness of the
colors so they all fall within a range, usually from 0 to 1. This helps the computer focus
on important details in the images without getting confused by differences in brightness.
Data Spitting:
• The data splitting strategy partitions the dataset into training, validation, and testing
subsets, with 80% allocated for training and 20% for validation to assess model
performance. The testing dataset, comprising the remaining data, facilitates unbiased
evaluation of the trained model's performance on unseen samples. This organization
enables effective model training, validation, and evaluation, enhancing generalization
and reliability in predictions.
Model Selection:
• Selecting MobileNetV2 as the base model offers key advantages such as computational
efficiency and memory optimization, making it ideal for resource-constrained
environments. Its extensive pre-training on ImageNet provides a rich set of visual
features crucial for diverse image classification tasks. By integrating MobileNetV2 and
Model Training:
• Model training is a critical phase where the model learns from the training data to make
accurate predictions by adjusting its parameters to minimize the defined loss function
over several epochs. Monitoring performance metrics like loss and accuracy on both
training and validation datasets provides insights into the model's learning progress,
guiding adjustments to optimize performance. This process is fundamental for
developing robust and accurate machine learning models for various tasks.
• Model testing verifies how well the trained model performs on new data, ensuring it
can generalize effectively. Once validated, deployment involves making the model
available for use in real-world applications. This typically requires packaging the model
and integrating it into the target environment, with ongoing monitoring to ensure
optimal performance and compliance with security and regulatory standards.
Performance:
• The system must efficiently handle large datasets, utilizing minimal computational
resources.
• It should offer real-time predictions to facilitate prompt decision-making in business
contexts.
Scalability:
• The system should seamlessly scale to accommodate expanding datasets and user
demands.
Reliability:
• The system must guarantee data integrity and reliability during data collection and
preprocessing phases.
• It must uphold model accuracy and stability over time, adapting to changing market
conditions.
Security:
• The system must prioritize data privacy and security at all stages, from data collection
to preprocessing and model deployment.
• It should incorporate access controls and encryption mechanisms to safeguard sensitive
information.
4.4 Software Requirements :
Operating System: Compatible with Windows, macOS, or Linux distributions.
Python Environment: Python 3.x installed with necessary libraries for machine learning, such
as NumPy, Tensorflow, Keras, Matplotlib, OpenCV,and Jupyter Notebook for code
development.
Development Environment: Visual Studio Code, or Jupyter Notebook for coding and
experimentation.
Version Control: Git for version control management, facilitating collaboration and code
tracking.
4.5 Hardware Requirements:
Processor: Multi-core processor (e.g., Intel Core i5) for efficient computation.
Memory (RAM): At least 8GB RAM for handling large datasets and model training.
Storage: Sufficient disk space for storing datasets, code, and model files. SSD storage is
recommended for faster read/write speeds.
5. MODULES
The working procedures of the proposed model can be divided into the six modules:
• The first step in the machine learning process is data collection. The data collection
module in a leaf recognition system is responsible for gathering a diverse set of leaf
images from various sources. It employs methods such as web scraping, manual
uploads, or crowdsourcing to compile an extensive dataset.
• Once collected, the data needs to be prepared for machine learning. This process
involves organizing the data in a suitable format, such as a .png or .jpg or .jpeg file.
6. TECHNICAL DESCRIPTION
6.1 Python:
Python is a popular programming language known for its simplicity and readability. Created
in 1991, it emphasizes clear and straightforward code, making it ideal for both beginners and
experienced developers. With its use of significant indentation and dynamic typing, Python
offers flexibility and ease of use. It supports various programming styles, including procedural,
object-oriented, and functional programming, catering to diverse project needs. Its extensive
standard library and vast ecosystem of third-party packages provide a wide range of tools for
web development, data analysis, machine learning, and more. Overall, Python's versatility and
user-friendly nature have made it a go-to choice for programmers worldwide.
6.1.1 History:
The programming language Python was conceived in the late 1980s, and its implementation
was started in December 1989 by Guido van Rossum at CWI in the Netherlands as a successor
to ABC capable of exception handling and interfacing with the Amoeba operating system. Van
Rossum is Python's principal author, and his continuing central role in deciding the direction
of Python is reflected in the title given to him by the Python community.
Python 2.0 was released on October 16, 2000, with many major new features, including a cycle-
detecting garbage collector (in addition to reference counting) for memory management and
support for Unicode. However, the most important change was to the development process
itself, with a shift to a more transparent and community backed process. Python 3.0, a major,
backwards- incompatible release, was released on December 3, 2008, after a long period of
testing. Many of its major features have also been back ported to the backwards-compatible,
though now-unsupported, Python 2.6 and 2.7.
developers. This simplicity and readability reduce the chances of syntax errors and
make code maintenance easier over time.
• Interpreted and Interactive: Python is an interpreted language, meaning that code is
executed line by line by an interpreter, rather than being compiled into machine code
beforehand. This allows for quick testing and debugging, as you can see results
immediately after writing each line of code. Python also supports an interactive mode,
where you can type code directly into the interpreter and see the results instantly. This
interactive nature makes Python ideal for prototyping, experimenting, and exploring
ideas.
• Dynamic Typing: Python is dynamically typed, meaning that you don't need to declare
the data type of variables explicitly. Instead, the interpreter determines the data type of
variables at runtime based on the values assigned to them. This flexibility allows for
more concise and expressive code, as you can focus on solving problems rather than
worrying about variable types. However, it also requires careful attention to variable
types to avoid unexpected behaviour, especially in larger projects.
• Multi-paradigm Programming: Python supports multiple programming paradigms,
including procedural, object-oriented, and functional programming. This versatility
allows developers to choose the most suitable approach for their projects and combine
different paradigms as needed. For example, you can use procedural programming to
write step-by-step instructions, object-oriented programming to organize code around
objects and classes, and functional programming to treat computation as mathematical
functions. This flexibility makes Python suitable for a wide range of applications and
encourages code reuse and modularization.
• Extensive Standard Library: Python comes with a comprehensive standard library,
which includes a vast collection of modules and tools for various tasks. These modules
cover a wide range of functionalities, such as file handling, networking, data
manipulation, and web development. By leveraging the standard library, you can
perform common tasks without writing extra code or relying on external dependencies.
This saves time and effort and ensures consistency and reliability across different
Python projects.
• Third-party Libraries and Ecosystem: In addition to the standard library, Python
has a vibrant ecosystem of third-party libraries and frameworks created by the
community. These libraries extend Python's capabilities for specialized tasks, such as
web development, data analysis, machine learning, and scientific computing. For
example, libraries like NumPy and pandas are widely used for data manipulation and
analysis, while frameworks like Django and Flask are popular choices for web
development. By tapping into this rich ecosystem, you can leverage existing solutions,
accelerate development, and collaborate with other developers on shared projects.
a) Numpy:
NumPy, standing as a cornerstone of Python's scientific computing landscape, empowers users
with its robust capabilities and versatile functionalities. At its core lies the ndarray, a powerful
data structure capable of handling arrays and matrices of multiple dimensions efficiently. This
structure not only offers uniformity in data types but also ensures a contiguous memory layout,
facilitating swift and optimized numerical operations. Thanks to its vectorized operations,
NumPy significantly enhances computational performance compared to traditional Python
lists, making it indispensable for handling large datasets and complex mathematical
computations.
The library boasts an extensive array of mathematical functions tailored precisely for array
manipulation. Whether it's basic arithmetic operations or advanced mathematical
transformations, NumPy provides a comprehensive suite of tools to address diverse numerical
challenges. From trigonometric functions to logarithms and statistical operations, its rich
functionality caters to the needs of scientists, engineers, and data analysts alike.
NumPy's intuitive interface simplifies array manipulation and operations, empowering users
with robust indexing and slicing mechanisms. These features enable efficient access to
elements and subarrays within arrays, streamlining data processing tasks. Moreover, NumPy's
broadcasting feature enables seamless execution of element-wise operations across arrays with
varying shapes, further enhancing its usability and flexibility.
When it comes to tasks involving linear algebra, NumPy emerges as a powerhouse. It offers an
extensive repertoire of linear algebra functions, including matrix multiplication, inversion, and
decomposition. These functions form the backbone of numerous scientific and engineering
applications, facilitating complex computations with ease and efficiency.
In addition to its prowess in array manipulation and linear algebra, NumPy simplifies the
generation of random numbers—a crucial requirement for simulations and statistical analyses.
Its random number generation functions provide users with the flexibility to generate numbers
and arrays with various probability distributions, further expanding the library's utility and
applicability.
Furthermore, NumPy seamlessly integrates with other Python libraries, such as SciPy,
Matplotlib, and pandas, creating a robust ecosystem for scientific computing, data analysis,
and visualization. This integration not only amplifies NumPy's utility but also fosters
collaborative workflows, enabling users to leverage the strengths of multiple libraries
seamlessly. In essence, NumPy's versatility, efficiency, and extensive functionality position it
as an indispensable tool for tackling a myriad of numerical computing tasks in Python.
b) TensorFlow:
TensorFlow is an open-source machine learning framework developed by Google. It provides
a comprehensive ecosystem of tools, libraries, and resources for building and deploying
machine learning models, particularly deep learning models. TensorFlow is designed to be
flexible, scalable, and efficient, making it suitable for a wide range of applications, from
research prototyping to large-scale production deployment.
TensorFlow provides high-level APIs like Keras, which offers a user-friendly interface for
building and training neural network models with minimal boilerplate code. It also includes
lower-level APIs for more advanced users who require fine-grained control over model
architecture and training process.
Overall, TensorFlow has emerged as one of the leading frameworks for machine learning and
deep learning, powering applications in various domains, including computer vision, natural
language processing, speech recognition, and more. Its rich features, scalability, and
community support make it a preferred choice for researchers, developers, and engineers
working on machine learning projects.
c)Flask:
Flask is a simple, lightweight web framework for Python, perfect for creating web applications
and APIs. It keeps things straightforward, allowing developers to focus on building their
projects without getting bogged down in unnecessary complexity. With Flask, you can define
routes to handle different URL patterns, making it easy to navigate through your web app. Its
templating engine lets you create dynamic web pages by combining static HTML templates
with Python code to generate content.
One of Flask's strengths is its flexibility—it integrates smoothly with other Python libraries
and tools, so you can easily add features like database access or user authentication. It's like
building with Lego blocks; you can pick and choose the components you need for your project.
Flask also has a vibrant ecosystem of extensions that provide additional functionality, from
handling forms to managing sessions.
Despite its simplicity, Flask is powerful enough to handle a wide range of web development
tasks. Whether you're building a small personal website or a large-scale web application, Flask
scales with your needs. Plus, it has a supportive community of developers who share
resources, tutorials, and advice to help you along the way. So if you're looking for a user-
friendly way to dive into web development with Python, Flask is a fantastic choice.
d)Matplotlib:
Matplotlib is a powerful and versatile Python library for creating static, animated, and
interactive visualizations. It serves as a go-to tool for data visualization tasks, providing a
MATLAB-like interface for generating a wide range of plots and charts with ease. With
Matplotlib, users can create line plots, scatter plots, bar charts, histograms, pie charts, 3D plots,
and much more, making it suitable for various data exploration, analysis, and presentation
needs.
At its core, Matplotlib operates on the concept of figures and axes. A figure is the top-level
container for all elements of a plot, while axes represent the individual plots within a figure.
This hierarchical structure allows for the creation of complex plots with multiple subplots
arranged in grids or other configurations. Matplotlib offers fine-grained control over every
aspect of the plot, including axis limits, labels, ticks, colors, markers, and annotations, enabling
users to customize their visualizations to meet specific requirements.
One of Matplotlib's strengths lies in its flexibility and extensibility. It provides multiple APIs
for creating plots, including a procedural interface (Pyplot) and an object-oriented interface.
This versatility allows users to choose the level of abstraction that best suits their needs.
Additionally, Matplotlib supports integration with other Python libraries and tools, such as
NumPy for numerical computations, Pandas for data manipulation, and Jupyter Notebooks for
interactive data analysis, enhancing its capabilities further.
Matplotlib's rich ecosystem includes a vast collection of built-in plotting functions, as well as
numerous external packages and extensions that extend its functionality. These include tools
for specialized plots, interactive visualization, and aesthetic enhancements, ensuring that users
have access to a wide range of resources to create visually appealing and informative plots.
e) Keras:
Keras is a high-level neural networks API in Python that facilitates the development of deep
learning models with remarkable simplicity and efficiency. Its user-friendly interface abstracts
away the intricate details of neural network architecture and optimization, enabling users to
focus on conceptualizing and experimenting with models. With Keras, building a neural
network is akin to assembling building blocks, where layers are stacked to form a cohesive
architecture. This modular approach allows for quick prototyping and iteration, making Keras
particularly appealing to beginners and experienced practitioners alike.
A standout feature of Keras is its versatility, offering support for various types of neural
networks, including convolutional neural networks (CNNs), recurrent neural networks
(RNNs), and more. Whether it's image classification, natural language processing, or time
series prediction, Keras provides the necessary tools and abstractions to tackle a diverse range
of tasks. Moreover, Keras seamlessly integrates with popular deep learning frameworks such
as TensorFlow, enabling users to harness the power of efficient computation engines while
leveraging Keras' intuitive API.
Keras' flexibility extends to its support for distributed computing and GPU acceleration,
enabling users to scale their deep learning workflows across multiple devices and
computational clusters. This scalability is crucial for handling large datasets and complex
models, ensuring that Keras remains a robust solution for both research and production
environments. With its rich ecosystem of pre-trained models, tutorials, and community support,
Keras empowers developers to unlock the potential of deep learning and build innovative
solutions to real-world challenges.
Jupyter Notebook:
Jupyter is an open-source web application renowned for its versatility in creating and sharing
documents containing live code, equations, visualizations, and narrative text. Widely employed
for tasks like data cleaning, transformation, statistical modeling, machine learning, and more,
it offers a browser-based interface for crafting and executing Jupyter notebooks. These
notebooks serve as interactive documents housing code cells, capable of immediate execution,
alongside markdown cells for text and image integration.
Supporting multiple programming languages such as Python, R, Julia, and others, Jupyter's
hallmark feature lies in its interactive code execution. This enables users to run code cells and
observe results instantly, streamlining experimentation and data exploration without toggling
between editor and console interfaces.
6.2 Algorithm:
MobileNetV2:
Algorithm:
Algorithm description:
1.Input Shape:
2.Include Top:
Setting include_top to False indicates that only the convolutional base of the MobileNetV2
model will be instantiated, excluding the classifier layers.
3.Weights Initialization:
a.Depthwise convolution: Involves convolving each input channel separately with its own
kernel. Mathematically, this can be represented as:
Yi = DepthwiseConv(Xi,Wi)
where Yi is the output feature map for channel i ,Xi is the input feature map for channel i, and
Wi represents the depthwise filter for channel i.
Y = DepthwiseConv(X,W)
where Y is the output feature map, X is the output of the depthwise convolution, and W is the
pointwise filter.
follows:
Yout = ReLU(X+F(Conv(1x1,ReLU(Conv(3x3,X)))))
Where X is the input feature map, Conv(3x3) represents a depthwise separable convolution, F
represents a linear bottleneck, and Conv(1x1) denotes a 1x1 convolution.
Y=ReLU(Conv(1x1,X))
where X is the input feature map and Conv(1x1) denotes a 1x1 convolution.
- Mathematical Equation:
where Yi is the ith output feature, H and W are the height and width of the feature map, and
Xi,j,k represents the element at position (i, j, k) in the input feature map.
- Mathematical Equation:
Y = softmax(W . X + b)
where W represents the weight matrix, X is the input vector, and b is the bias vector.
- The output of the base model is passed through the global average pooling layer to obtain a
fixed-length vector, which is then fed into the dense prediction layer to produce the final
classification probabilities for each class.
7. SYSTEM DESIGN
System Design:
• Data Collection: Raw data is the starting point for data collection. i.e. The. It may
come from databases or an API, or in the case of hand-coding.
• Pre-processing: Preparing data for training. involves this step, which includes
resizing and normalization of data.
• Model Selection: Carefully select the appropriate machine learning algorithm or
model. Absolutely. It is the type of problem and not related to the data set (e.g,
classification or regression)
• Training and Validation: The model chosen is trained and validated using the pre-
calculation data. The training set is then integrated into it and validated to verify its
effectiveness using a different validation set.
• Evaluation: The model is evaluated based on whether data from test or unobserved
sources are present. Model generalization can be assessed using the following criteria:
accuracy, precision, recall, or F1-score.
The Unified Modelling Language (UML) is a powerful tool utilized in object-oriented software
engineering, renowned for its capacity to model application structures, behaviours, and even
Developed by Grady Booch, Ivar Jacobson, and James Rumbaugh at Rational Software during
1994–95, UML underwent further refinement under their guidance through 1996. In 1997, the
Object Management Group (OMG) officially adopted UML as a standard, entrusting its
ongoing management to the organization. Additionally, in 2000, the International Organization
for Standardization (ISO) recognized UML as an approved ISO standard, solidifying its
position as a universally accepted modeling language in software engineering.
Class diagrams are arguably the most used UML diagram type. It is the main building block
of any object-oriented solution. It shows the classes in a system, attributes and operations of
each class and the relationship between each class. In most modeling tools a class has three
parts, name at the top, attributes in the middle and operations or methods at the bottom.
A deployment diagrams shows the hardware of your system and the software in those hardware.
Deployment diagrams are useful when your software solution is deployed across multiple
machines with each having a unique configuration.
Object Diagrams, sometimes referred as Instance diagrams are very similar to class diagrams
As class diagrams they also show the relationship between objects but they use real world
examples. They are used to show how a system will look like at a given time.
Most known diagram type of the behavioral UML diagrams, Use Case diagrams gives a
graphic overview of the actors involved in a system, different functions needed by those actors
and how these different functions are interacted. It’s a great starting point for any project
discussion because you can easily identify the main actors involved and the main processes
of the system.
Activity diagrams represent workflows in an graphical way. They can be used to describe
business workflow or the operational workflow of any component in a system. Sometimes
activity diagrams are used as an alternative to State machine diagrams.
State machine diagrams are similar to activity diagrams although notations and usage changes
a bit. They are sometime known as state diagrams or start chart diagrams as well. These are
very useful to describe the behavior of objects that act different according to the state they are
at the moment.
Sequence diagrams in UML shows how object interact with each other and the order those
interactions occur. It’s important to note that show the interactions for a particular scenario.
The processes are represented vertically and interactions are show as arrows.
It is similar to sequence diagrams but the focus is on messages passed between objects. The
same information can be represented using a sequence diagram and different objects.
Association
Association represents a
static relationship between
classes.
Aggregation Aggregation is a form of
association. It aggregates
several classes into a
single
class.
Actor Actors are the users of the
system and other external
entities that react with the
system.
Transition
It represents any
communication that occurs
between the processes.
System
The leaf recognition system begins with the user gathering a dataset of leaf images for training
the machine learning model. Once trained, the system can recognize leaves from input images,
generate results, and create graphs for visualization. This streamlined process enables efficient
and accurate leaf identification, from dataset preparation to result interpretation.
The sequence diagram illustrates the step-by-step process of the leaf recognition system. It
begins with the user providing an input image of a leaf, which the system preprocesses before
passing it to the trained model. The model then analyzes the image and generates recognition
results, which are presented to the user. Additionally, the system may create graphs based on
these results for visualization purposes, offering insights into the recognition process and
classification accuracy.
In the data flow diagram for leaf recognition, the input data comprises leaf images provided by
the user. These images then undergo preprocessing, which involves operations like resizing,
normalization, and feature extraction to prepare them for training. After preprocessing, the
dataset is split into training and validation sets. The training set is used to train the machine
learning model, while the validation set is used to evaluate its performance during training.
This process ensures that the model is trained effectively and can accurately recognize leaf
images.
8. EXPERIMENTAL RESULTS
8.1 Dataset:
The dataset were collected from the Kaggle. The dataset is Medical Leaf Dataset ,which
contains nearly 30 species with 1455 images.
The below table describes the local names and botanical names of 30 species:
8.3 Graphs:
Model Accuracy: Achieving a 1% accuracy on the training set after just 5 epochs demonstrates
strong learning capability within the model. This accuracy indicates that the model effectively
captures underlying data patterns within the training dataset.
Model Loss: Achieving a loss of 0.1 signifies significant progress in training the model. This
low loss value indicates that the model's predictions closely match the actual values in the
training dataset, showcasing its ability to learn complex patterns effectively.
9. SYSTEM TESTING
Testing is the essential process of identifying errors within software. It plays a critical role in
quality assurance and ensuring the reliability of software systems. The insights gained from
testing are invaluable not only during development but also for subsequent maintenance
phases.
Psychology of testing:
The objective of testing is frequently to showcase that a program functions by illustrating its
error-free operation. However, the fundamental goal of the testing phase is to uncover any
errors present within the program. Therefore, the approach to testing should not be to validate
that a program works, but rather to reveal any instances where it does not. Testing entails
executing a program with the explicit aim of identifying errors.
Testing Objectives
The primary objective of testing is to methodically uncover a range of errors with efficiency
and within a minimal timeframe. Formally stated:
➢ Testing is the systematic process of executing a program with the aim of identifying
errors.
➢ A successful test is defined by its ability to reveal previously undiscovered errors.
➢ A high-quality test case is one that possesses a high likelihood of uncovering errors, if
they exist.
➢ Tests may be inadequate in detecting potentially existing errors.
➢ The software generally adheres to quality and reliability standards.
Levels of Testing:
In order to identify errors across different phases, testing employs various levels.
System Testing:
The core principle guiding testing is error detection. Test cases are crafted with this objective
in mind. One strategy utilized in system testing is code testing.
Code Testing:
This approach focuses on scrutinizing the program's logic. It involves developing test data to
execute every instruction and module within the program, ensuring that every possible path is
tested. Systems are not constructed or tested in isolation. To ensure flawless coding, two types
of testing are typically employed across all systems.
Unit Testing:
Unit testing zooms in on the tiniest building blocks of software, like modules. It uses detailed
design and process specifications to hunt down errors within each module's limits. Every
module needs to pass its unit test before we move on to integration testing. Unit testing starts
by testing each module separately to find any mistakes.
Link Testing:
Link testing doesn't test the software itself, but rather focuses on integrating each module into
the system. The main goal is to ensure that all modules work well together. During this phase,
the programmer tests modules that are designed with different parameters, lengths, types, and
so on.
Integration Testing:
After completing unit testing, the next step is integration testing. The objective is to ensure that
modules can be seamlessly integrated, with a focus on testing interfaces between them. This
testing phase is crucial for evaluating the system's design, particularly the interactions between
modules.
In this project, integrating all the modules forms the core system. During integration, I've
meticulously checked whether combining different modules affects the functionality of any
services. This involves testing various combinations of inputs to ensure that each service
operates smoothly before integration.
System Testing:
In this phase, the entire software system undergoes testing. The requirements document serves
as the primary reference for this process , guiding the evaluation to determine if the
Acceptance Testing:
The Acceptance Test involves using realistic client data to showcase that the software functions
satisfactorily. Testing in this phase primarily concentrates on the system's external behaviour
rather than its internal logic.
Test cases are chosen to cover the widest range of attributes within an equivalence class
simultaneously. This phase of testing is pivotal in software development, as it entails
uncovering errors, identifying missing operations, and conducting comprehensive verification
to ensure that the objectives are fulfilled and user requirements are met.
This method is a form of unit testing where each unit is meticulously tested at the statement
level to uncover as many errors as possible. I systematically examined every piece of code,
ensuring that each statement was executed at least once. This approach, often referred to as
White Box Testing, is also known as Glass Box Testing.
This testing method treats a module as a single unit and focuses on testing its interface and
communication with other modules, rather than delving into the details at the statement level.
In this approach, the module is regarded as a black box, receiving inputs and producing outputs.
The outputs generated for various input combinations are then forwarded to other modules.
10.1 Conclusion
The approach, employing the MobileNetV2 model, achieved a 98% recognition rate,
surpassing traditional methods. This study underscores the effectiveness of deep learning,
particularly CNNs, in accurately classifying medicinal plants despite appearance variations.
By learning complex image features, the proposed CNN-based approach ensures high accuracy
in plant classification, offering a reliable tool for healthcare professionals and herbal medicine
researchers in identifying medicinal plants.
Future work aims to integrate identified plants with a large language model, offering scientific
names, additional images, and usage instructions in English and local languages, enhancing
accessibility and understanding for informed herbal medicine usage.
11.REFERENCES
[1]
1
Chengzhuan Yang, 2Hui Wei – ‘Plant Species Recognition Using Triangle-Distance
Representation’- 1School of Information, Zhejiang University of Finance and Economics
,Hangzhou 310018,China, 2Laboratory of Cognitive Algorithm and Model, Shanghai Key
Laboratory of Data Science, School of Computer Science, Fudan University, Shanghai
201203, China
[2]
1
XUAN WANG , 2WEIKANG DU , 3FANGXIA GUO ,AND 4SIMIN HU –‘ Leaf
Recognition Based on Elliptical Half Gabor and Maximum Gap Local Line Direction
Pattern’-School of Physics and Information Technology, Shaanxi Normal University,
Xi’an 710062, China
[3]
1
Ayan Chaudhury and 2John L. Barron-‘ Plant Species Identification from Occluded Leaf
Images’.
[4]
1
Jibi Thanikkal, 2Ashwani Kumar Dubey , 3Thomas M T,-‘A Novel Edge detection method
for medical plants leaf features extraction ’-1Amity University, 2
Amity University Uttar
Pradesh,3St Thomas College ,Thrissur