SlideShare a Scribd company logo
1 of 41
Download to read offline
Genetic Algorithms
George Bora
UTCN
December 4, 2013
George Bora (UTCN) Genetic Algorithms December 4, 2013 1 / 20
Computer Science to Evolutionary Computation
Within the vast field of computer science under it’s vast array of potential
applications there exists the branch of artificial intelligence.
George Bora (UTCN) Genetic Algorithms December 4, 2013 2 / 20
Computer Science to Evolutionary Computation
Within the vast field of computer science under it’s vast array of potential
applications there exists the branch of artificial intelligence.
One of the sub-branches of artificial intelligence is evolutionary
computation which seeks to achieve continuous optimization and
combinatorial optimization by incorporating knowledge of natural evolution
processes.
George Bora (UTCN) Genetic Algorithms December 4, 2013 2 / 20
Basic Concepts from Biology
The basic building blocks for evolutionary computation, which have kept
their names from their native science, are as follows:
genes
allele
chromosome
individual
mapping
mutation and crossover
fitness function
George Bora (UTCN) Genetic Algorithms December 4, 2013 3 / 20
Genes
The element from which this method derives it name, as genes are the
basic building blocks of life.
George Bora (UTCN) Genetic Algorithms December 4, 2013 4 / 20
Genes
The element from which this method derives it name, as genes are the
basic building blocks of life.
So too in our search for the solution for various problems, genes are the
basic elements we switch around and juggle with in order to arrive at a
more optimum solution.
George Bora (UTCN) Genetic Algorithms December 4, 2013 4 / 20
Allele
If genes are the basics of the solution in theory, alleles are the values
encoded in genes are the ones we use in practice, when developing
software which uses genetic programming.
George Bora (UTCN) Genetic Algorithms December 4, 2013 5 / 20
Allele
If genes are the basics of the solution in theory, alleles are the values
encoded in genes are the ones we use in practice, when developing
software which uses genetic programming.
When the time has passed and the solution must effectively be built or
instantiated it is the allele which forms the blue print we go by.
George Bora (UTCN) Genetic Algorithms December 4, 2013 5 / 20
Allele
If genes are the basics of the solution in theory, alleles are the values
encoded in genes are the ones we use in practice, when developing
software which uses genetic programming.
When the time has passed and the solution must effectively be built or
instantiated it is the allele which forms the blue print we go by.
In the original vision for genetic algorithms there was only 1 allele per
gene, which was a binary value and was stored in a 1 bit, as the field
progressed all of those constrictions have been lifted.
George Bora (UTCN) Genetic Algorithms December 4, 2013 5 / 20
Chromosome and Individual
As in nature an animal can not have it’s information encoded in a single
gene, in programming a solution which warrants genetic algorithms is not
simple enough as to be composed on 1 gene.
George Bora (UTCN) Genetic Algorithms December 4, 2013 6 / 20
Chromosome and Individual
As in nature an animal can not have it’s information encoded in a single
gene, in programming a solution which warrants genetic algorithms is not
simple enough as to be composed on 1 gene.
Chromosomes are the collection of genes, which make up the blueprint
from which we will map our solution and create the individual.
George Bora (UTCN) Genetic Algorithms December 4, 2013 6 / 20
Chromosome and Individual
As in nature an animal can not have it’s information encoded in a single
gene, in programming a solution which warrants genetic algorithms is not
simple enough as to be composed on 1 gene.
Chromosomes are the collection of genes, which make up the blueprint
from which we will map our solution and create the individual.
If the chromosomes are the blue prints the individual is the ”end product”,
to make an analogy with software engineering, and individual is to a class
what a instance is to a object.
George Bora (UTCN) Genetic Algorithms December 4, 2013 6 / 20
Mapping
The process by which we construct a individual from the chromosome we
have generated is called mapping, it is one of the important elements
(alongside chromosome structure and fitness functions) we must consider
before we implement our design.
George Bora (UTCN) Genetic Algorithms December 4, 2013 7 / 20
Mapping
The process by which we construct a individual from the chromosome we
have generated is called mapping, it is one of the important elements
(alongside chromosome structure and fitness functions) we must consider
before we implement our design. Mapping and it’s complexity is often tied
with how we define our alleles,genes and chromosome as well as our
genetic operations, a great deal of planning being required in order to
produce the best possible algorithm.
George Bora (UTCN) Genetic Algorithms December 4, 2013 7 / 20
Crossover
Crossover is one of the fundamental operations within the toolbox of
genetic algorithms, and one of the most important methods by which we
can combine existing chromosomes to form new ones in the search for a
fit enough solution.
George Bora (UTCN) Genetic Algorithms December 4, 2013 8 / 20
Crossover
Crossover is one of the fundamental operations within the toolbox of
genetic algorithms, and one of the most important methods by which we
can combine existing chromosomes to form new ones in the search for a
fit enough solution. It involves separating each chromosome which takes
part into two parts, and then recombining parts from the different old
chromosomes to form the new set of chromosomes.
George Bora (UTCN) Genetic Algorithms December 4, 2013 8 / 20
Mutation
Mutation is the changing of the allele of a gene to another one of it’s
possible values.
George Bora (UTCN) Genetic Algorithms December 4, 2013 9 / 20
Mutation
Mutation is the changing of the allele of a gene to another one of it’s
possible values. This operation permits genetic algorithms to potentially
escape from local optimum solutions, a very important characteristic in the
field of artificial intelligence.
George Bora (UTCN) Genetic Algorithms December 4, 2013 9 / 20
Fitness Function
Via crossover and mutation we can create whole populations of
individuals, potential solutions, and so the question arises when do we
stop the evolutionary cycle?
George Bora (UTCN) Genetic Algorithms December 4, 2013 10 / 20
Fitness Function
Via crossover and mutation we can create whole populations of
individuals, potential solutions, and so the question arises when do we
stop the evolutionary cycle? The answer being when we have reached a
certain vicinity of an ideal solution, but for this we need to evaluate how
close is any one individual to satisfying our demands and being the sought
after solution.
George Bora (UTCN) Genetic Algorithms December 4, 2013 10 / 20
Fitness Function II
The implementation of the fitness function changes from one class of
problems to another, standardization being much more difficult than with
genes, and is one of the most time consuming elements of genetic
programming.
George Bora (UTCN) Genetic Algorithms December 4, 2013 11 / 20
Fitness Function II
The implementation of the fitness function changes from one class of
problems to another, standardization being much more difficult than with
genes, and is one of the most time consuming elements of genetic
programming.
Writing the fitness function, which when given a chromosome will return
how fit or close to the ideal it is, is one of the hardest yet essential tasks in
developing a solution with genetic programming as it is the only way to
close the loop and choose a final solution.
George Bora (UTCN) Genetic Algorithms December 4, 2013 11 / 20
Genetic Algorithms vs Genetic Programming
Within this field there exist two very different paradigms, genetic
algorithms and genetic programming the most visible difference between
them being the structure of the chromosomes they produce.
George Bora (UTCN) Genetic Algorithms December 4, 2013 12 / 20
Genetic Algorithms vs Genetic Programming
Within this field there exist two very different paradigms, genetic
algorithms and genetic programming the most visible difference between
them being the structure of the chromosomes they produce.
Genetic algorithms work with a chromosome which is linear and often fixed
in length, making them ideal for tunning the behavior of various solutions.
George Bora (UTCN) Genetic Algorithms December 4, 2013 12 / 20
Genetic Algorithms vs Genetic Programming
Within this field there exist two very different paradigms, genetic
algorithms and genetic programming the most visible difference between
them being the structure of the chromosomes they produce.
Genetic algorithms work with a chromosome which is linear and often fixed
in length, making them ideal for tunning the behavior of various solutions.
Genetic programming instead uses a tree-structured chromosome variable
in size, which allows it to generate the structure of the solution as well as
the behavior.
George Bora (UTCN) Genetic Algorithms December 4, 2013 12 / 20
The problem
The creation of a algorithm which is capable of classifying a target image,
returning information about the general structure, size and color (the
pre-defined classes) of the object present in the image.
George Bora (UTCN) Genetic Algorithms December 4, 2013 13 / 20
The problem
The creation of a algorithm which is capable of classifying a target image,
returning information about the general structure, size and color (the
pre-defined classes) of the object present in the image.
Requirements:
1 the use of genetic computing within the solution
2 as high of a success rate as possible
George Bora (UTCN) Genetic Algorithms December 4, 2013 13 / 20
Image classification
Image recognition, which can be classified as a sub-field of computer
vision, is a field concerned with the identification of objects and entities
within images.
George Bora (UTCN) Genetic Algorithms December 4, 2013 14 / 20
Image classification
Image recognition, which can be classified as a sub-field of computer
vision, is a field concerned with the identification of objects and entities
within images.
Image classification is a classical image recognition problem in which the
task is to assign labels to images based their content or metadata.
George Bora (UTCN) Genetic Algorithms December 4, 2013 14 / 20
The classes
The labels we apply are called classes and for this algorithm we have
defined 3 great families of classes:
form classes: for now we have defined classes for circles,
triangles(isosceles) and circles although additions to these are
relatively easy to add due to our use of genetic algorithms
color classes: right now only red, green and blue are implemented
although using the rgb format is also possible.
size classes: chosen arbitrarily.
George Bora (UTCN) Genetic Algorithms December 4, 2013 15 / 20
The chromosome
The chromosome is fairly simplistic being formed out of:
a gene encoding the form.
a gene encoding the color.
a gene encoding the size.
George Bora (UTCN) Genetic Algorithms December 4, 2013 16 / 20
Genes and Allele
The genes governing shapes at the moment can have the following
values: circle, triangle and square all identified by numeric codes.
George Bora (UTCN) Genetic Algorithms December 4, 2013 17 / 20
Genes and Allele
The genes governing shapes at the moment can have the following
values: circle, triangle and square all identified by numeric codes. The
genes governing color at the moment can accept any color defined by the
SVG standard although they can also handle rgb codes, which would
require 3 separate genes.
George Bora (UTCN) Genetic Algorithms December 4, 2013 17 / 20
Genes and Allele
The genes governing shapes at the moment can have the following
values: circle, triangle and square all identified by numeric codes. The
genes governing color at the moment can accept any color defined by the
SVG standard although they can also handle rgb codes, which would
require 3 separate genes.
The genes governing size are again numeric codes which represent hard
coded categories of size.
George Bora (UTCN) Genetic Algorithms December 4, 2013 17 / 20
Mapping
The mapping process is the most intensive one, in terms of time and lines
of code needed, followed closely by calculating the fitness function.
The process consists of:
creating a SVG file from the chromosome requires only the standard
Java standard file API.
converting said .svg file to the .png (raster) format as the image we
are trying to classify will be a raster image, requires calls to the
Inkscape API via Java’s system API.
George Bora (UTCN) Genetic Algorithms December 4, 2013 18 / 20
Fitness function
As the result of the mapping is a image of a similar raster format like the
one we seek to classify, the fitness function simply does a naive
comparison of the two images bit by bit.
George Bora (UTCN) Genetic Algorithms December 4, 2013 19 / 20
Fitness function
As the result of the mapping is a image of a similar raster format like the
one we seek to classify, the fitness function simply does a naive
comparison of the two images bit by bit.
It then normalizes the bit difference to a range between 0 and 1, as
required by the genetic algorithm, this fitness being then used in the
standard manner for deciding which chromosomes pass into the next
generation.
George Bora (UTCN) Genetic Algorithms December 4, 2013 19 / 20
The cons
This procedure has a number of weak points:
genetic algorithms traditionally aren’t suited to image classification.
the speed of this procedure, is very low due to the calls to Inkscape
and the creation of numerous files (can be improved).
the fitness function relies on a very sensible and naive image
comparison method (can be improved).
George Bora (UTCN) Genetic Algorithms December 4, 2013 20 / 20
The pros
A number of points in it’s favour
the available class list, due to the classes being written in SVG, is
very easily extendable.
in it’s current form it requires only Java and Inkscape (a very available
software).
there are a large number of image comparison methods which can be
used for the fitness function.
George Bora (UTCN) Genetic Algorithms December 4, 2013 21 / 20
The End
Thank your for your attention !
George Bora (UTCN) Genetic Algorithms December 4, 2013 22 / 20
The End
Thank your for your attention !
Any questions ?
George Bora (UTCN) Genetic Algorithms December 4, 2013 22 / 20

More Related Content

Similar to Genetic Algorithms for Image Classification

Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...
Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...
Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...ijseajournal
 
Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0
Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0
Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0Fokhruz Zaman
 
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey GraingerHaystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey GraingerOpenSource Connections
 
Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)Trey Grainger
 
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...AI Publications
 
A Survey On Genetic Algorithms
A Survey On Genetic AlgorithmsA Survey On Genetic Algorithms
A Survey On Genetic AlgorithmsValerie Felton
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...IOSR Journals
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsAmna Saeed
 
Error correction 2 3ºe4 (summary)
Error correction 2 3ºe4 (summary)Error correction 2 3ºe4 (summary)
Error correction 2 3ºe4 (summary)jeanphilippeguy
 
Genetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptxGenetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptxTAHANMKH
 
Genetic algorithms full lecture
Genetic algorithms full lectureGenetic algorithms full lecture
Genetic algorithms full lecturesadiacs
 
Jim Gray Award Lecture
Jim Gray Award LectureJim Gray Award Lecture
Jim Gray Award LecturePhilip Bourne
 
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer  Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer ijsc
 

Similar to Genetic Algorithms for Image Classification (20)

E034023028
E034023028E034023028
E034023028
 
Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...
Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...
Dynamic Radius Species Conserving Genetic Algorithm for Test Generation for S...
 
Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0
Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0
Bioinformatics n bio-bio-1_uoda_workshop_4_july_2013_v1.0
 
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey GraingerHaystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
 
Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)
 
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
 
RM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lectureRM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lecture
 
A Survey On Genetic Algorithms
A Survey On Genetic AlgorithmsA Survey On Genetic Algorithms
A Survey On Genetic Algorithms
 
M017127578
M017127578M017127578
M017127578
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
 
SIRG-BSU_2.pptx
SIRG-BSU_2.pptxSIRG-BSU_2.pptx
SIRG-BSU_2.pptx
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Error correction 2 3ºe4 (summary)
Error correction 2 3ºe4 (summary)Error correction 2 3ºe4 (summary)
Error correction 2 3ºe4 (summary)
 
S04405107111
S04405107111S04405107111
S04405107111
 
Genetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptxGenetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptx
 
Genetic algorithms full lecture
Genetic algorithms full lectureGenetic algorithms full lecture
Genetic algorithms full lecture
 
Jim Gray Award Lecture
Jim Gray Award LectureJim Gray Award Lecture
Jim Gray Award Lecture
 
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer  Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
 
L018147377
L018147377L018147377
L018147377
 
Genetic Algorithms.pdf
Genetic Algorithms.pdfGenetic Algorithms.pdf
Genetic Algorithms.pdf
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Genetic Algorithms for Image Classification

  • 1. Genetic Algorithms George Bora UTCN December 4, 2013 George Bora (UTCN) Genetic Algorithms December 4, 2013 1 / 20
  • 2. Computer Science to Evolutionary Computation Within the vast field of computer science under it’s vast array of potential applications there exists the branch of artificial intelligence. George Bora (UTCN) Genetic Algorithms December 4, 2013 2 / 20
  • 3. Computer Science to Evolutionary Computation Within the vast field of computer science under it’s vast array of potential applications there exists the branch of artificial intelligence. One of the sub-branches of artificial intelligence is evolutionary computation which seeks to achieve continuous optimization and combinatorial optimization by incorporating knowledge of natural evolution processes. George Bora (UTCN) Genetic Algorithms December 4, 2013 2 / 20
  • 4. Basic Concepts from Biology The basic building blocks for evolutionary computation, which have kept their names from their native science, are as follows: genes allele chromosome individual mapping mutation and crossover fitness function George Bora (UTCN) Genetic Algorithms December 4, 2013 3 / 20
  • 5. Genes The element from which this method derives it name, as genes are the basic building blocks of life. George Bora (UTCN) Genetic Algorithms December 4, 2013 4 / 20
  • 6. Genes The element from which this method derives it name, as genes are the basic building blocks of life. So too in our search for the solution for various problems, genes are the basic elements we switch around and juggle with in order to arrive at a more optimum solution. George Bora (UTCN) Genetic Algorithms December 4, 2013 4 / 20
  • 7. Allele If genes are the basics of the solution in theory, alleles are the values encoded in genes are the ones we use in practice, when developing software which uses genetic programming. George Bora (UTCN) Genetic Algorithms December 4, 2013 5 / 20
  • 8. Allele If genes are the basics of the solution in theory, alleles are the values encoded in genes are the ones we use in practice, when developing software which uses genetic programming. When the time has passed and the solution must effectively be built or instantiated it is the allele which forms the blue print we go by. George Bora (UTCN) Genetic Algorithms December 4, 2013 5 / 20
  • 9. Allele If genes are the basics of the solution in theory, alleles are the values encoded in genes are the ones we use in practice, when developing software which uses genetic programming. When the time has passed and the solution must effectively be built or instantiated it is the allele which forms the blue print we go by. In the original vision for genetic algorithms there was only 1 allele per gene, which was a binary value and was stored in a 1 bit, as the field progressed all of those constrictions have been lifted. George Bora (UTCN) Genetic Algorithms December 4, 2013 5 / 20
  • 10. Chromosome and Individual As in nature an animal can not have it’s information encoded in a single gene, in programming a solution which warrants genetic algorithms is not simple enough as to be composed on 1 gene. George Bora (UTCN) Genetic Algorithms December 4, 2013 6 / 20
  • 11. Chromosome and Individual As in nature an animal can not have it’s information encoded in a single gene, in programming a solution which warrants genetic algorithms is not simple enough as to be composed on 1 gene. Chromosomes are the collection of genes, which make up the blueprint from which we will map our solution and create the individual. George Bora (UTCN) Genetic Algorithms December 4, 2013 6 / 20
  • 12. Chromosome and Individual As in nature an animal can not have it’s information encoded in a single gene, in programming a solution which warrants genetic algorithms is not simple enough as to be composed on 1 gene. Chromosomes are the collection of genes, which make up the blueprint from which we will map our solution and create the individual. If the chromosomes are the blue prints the individual is the ”end product”, to make an analogy with software engineering, and individual is to a class what a instance is to a object. George Bora (UTCN) Genetic Algorithms December 4, 2013 6 / 20
  • 13. Mapping The process by which we construct a individual from the chromosome we have generated is called mapping, it is one of the important elements (alongside chromosome structure and fitness functions) we must consider before we implement our design. George Bora (UTCN) Genetic Algorithms December 4, 2013 7 / 20
  • 14. Mapping The process by which we construct a individual from the chromosome we have generated is called mapping, it is one of the important elements (alongside chromosome structure and fitness functions) we must consider before we implement our design. Mapping and it’s complexity is often tied with how we define our alleles,genes and chromosome as well as our genetic operations, a great deal of planning being required in order to produce the best possible algorithm. George Bora (UTCN) Genetic Algorithms December 4, 2013 7 / 20
  • 15. Crossover Crossover is one of the fundamental operations within the toolbox of genetic algorithms, and one of the most important methods by which we can combine existing chromosomes to form new ones in the search for a fit enough solution. George Bora (UTCN) Genetic Algorithms December 4, 2013 8 / 20
  • 16. Crossover Crossover is one of the fundamental operations within the toolbox of genetic algorithms, and one of the most important methods by which we can combine existing chromosomes to form new ones in the search for a fit enough solution. It involves separating each chromosome which takes part into two parts, and then recombining parts from the different old chromosomes to form the new set of chromosomes. George Bora (UTCN) Genetic Algorithms December 4, 2013 8 / 20
  • 17. Mutation Mutation is the changing of the allele of a gene to another one of it’s possible values. George Bora (UTCN) Genetic Algorithms December 4, 2013 9 / 20
  • 18. Mutation Mutation is the changing of the allele of a gene to another one of it’s possible values. This operation permits genetic algorithms to potentially escape from local optimum solutions, a very important characteristic in the field of artificial intelligence. George Bora (UTCN) Genetic Algorithms December 4, 2013 9 / 20
  • 19. Fitness Function Via crossover and mutation we can create whole populations of individuals, potential solutions, and so the question arises when do we stop the evolutionary cycle? George Bora (UTCN) Genetic Algorithms December 4, 2013 10 / 20
  • 20. Fitness Function Via crossover and mutation we can create whole populations of individuals, potential solutions, and so the question arises when do we stop the evolutionary cycle? The answer being when we have reached a certain vicinity of an ideal solution, but for this we need to evaluate how close is any one individual to satisfying our demands and being the sought after solution. George Bora (UTCN) Genetic Algorithms December 4, 2013 10 / 20
  • 21. Fitness Function II The implementation of the fitness function changes from one class of problems to another, standardization being much more difficult than with genes, and is one of the most time consuming elements of genetic programming. George Bora (UTCN) Genetic Algorithms December 4, 2013 11 / 20
  • 22. Fitness Function II The implementation of the fitness function changes from one class of problems to another, standardization being much more difficult than with genes, and is one of the most time consuming elements of genetic programming. Writing the fitness function, which when given a chromosome will return how fit or close to the ideal it is, is one of the hardest yet essential tasks in developing a solution with genetic programming as it is the only way to close the loop and choose a final solution. George Bora (UTCN) Genetic Algorithms December 4, 2013 11 / 20
  • 23. Genetic Algorithms vs Genetic Programming Within this field there exist two very different paradigms, genetic algorithms and genetic programming the most visible difference between them being the structure of the chromosomes they produce. George Bora (UTCN) Genetic Algorithms December 4, 2013 12 / 20
  • 24. Genetic Algorithms vs Genetic Programming Within this field there exist two very different paradigms, genetic algorithms and genetic programming the most visible difference between them being the structure of the chromosomes they produce. Genetic algorithms work with a chromosome which is linear and often fixed in length, making them ideal for tunning the behavior of various solutions. George Bora (UTCN) Genetic Algorithms December 4, 2013 12 / 20
  • 25. Genetic Algorithms vs Genetic Programming Within this field there exist two very different paradigms, genetic algorithms and genetic programming the most visible difference between them being the structure of the chromosomes they produce. Genetic algorithms work with a chromosome which is linear and often fixed in length, making them ideal for tunning the behavior of various solutions. Genetic programming instead uses a tree-structured chromosome variable in size, which allows it to generate the structure of the solution as well as the behavior. George Bora (UTCN) Genetic Algorithms December 4, 2013 12 / 20
  • 26. The problem The creation of a algorithm which is capable of classifying a target image, returning information about the general structure, size and color (the pre-defined classes) of the object present in the image. George Bora (UTCN) Genetic Algorithms December 4, 2013 13 / 20
  • 27. The problem The creation of a algorithm which is capable of classifying a target image, returning information about the general structure, size and color (the pre-defined classes) of the object present in the image. Requirements: 1 the use of genetic computing within the solution 2 as high of a success rate as possible George Bora (UTCN) Genetic Algorithms December 4, 2013 13 / 20
  • 28. Image classification Image recognition, which can be classified as a sub-field of computer vision, is a field concerned with the identification of objects and entities within images. George Bora (UTCN) Genetic Algorithms December 4, 2013 14 / 20
  • 29. Image classification Image recognition, which can be classified as a sub-field of computer vision, is a field concerned with the identification of objects and entities within images. Image classification is a classical image recognition problem in which the task is to assign labels to images based their content or metadata. George Bora (UTCN) Genetic Algorithms December 4, 2013 14 / 20
  • 30. The classes The labels we apply are called classes and for this algorithm we have defined 3 great families of classes: form classes: for now we have defined classes for circles, triangles(isosceles) and circles although additions to these are relatively easy to add due to our use of genetic algorithms color classes: right now only red, green and blue are implemented although using the rgb format is also possible. size classes: chosen arbitrarily. George Bora (UTCN) Genetic Algorithms December 4, 2013 15 / 20
  • 31. The chromosome The chromosome is fairly simplistic being formed out of: a gene encoding the form. a gene encoding the color. a gene encoding the size. George Bora (UTCN) Genetic Algorithms December 4, 2013 16 / 20
  • 32. Genes and Allele The genes governing shapes at the moment can have the following values: circle, triangle and square all identified by numeric codes. George Bora (UTCN) Genetic Algorithms December 4, 2013 17 / 20
  • 33. Genes and Allele The genes governing shapes at the moment can have the following values: circle, triangle and square all identified by numeric codes. The genes governing color at the moment can accept any color defined by the SVG standard although they can also handle rgb codes, which would require 3 separate genes. George Bora (UTCN) Genetic Algorithms December 4, 2013 17 / 20
  • 34. Genes and Allele The genes governing shapes at the moment can have the following values: circle, triangle and square all identified by numeric codes. The genes governing color at the moment can accept any color defined by the SVG standard although they can also handle rgb codes, which would require 3 separate genes. The genes governing size are again numeric codes which represent hard coded categories of size. George Bora (UTCN) Genetic Algorithms December 4, 2013 17 / 20
  • 35. Mapping The mapping process is the most intensive one, in terms of time and lines of code needed, followed closely by calculating the fitness function. The process consists of: creating a SVG file from the chromosome requires only the standard Java standard file API. converting said .svg file to the .png (raster) format as the image we are trying to classify will be a raster image, requires calls to the Inkscape API via Java’s system API. George Bora (UTCN) Genetic Algorithms December 4, 2013 18 / 20
  • 36. Fitness function As the result of the mapping is a image of a similar raster format like the one we seek to classify, the fitness function simply does a naive comparison of the two images bit by bit. George Bora (UTCN) Genetic Algorithms December 4, 2013 19 / 20
  • 37. Fitness function As the result of the mapping is a image of a similar raster format like the one we seek to classify, the fitness function simply does a naive comparison of the two images bit by bit. It then normalizes the bit difference to a range between 0 and 1, as required by the genetic algorithm, this fitness being then used in the standard manner for deciding which chromosomes pass into the next generation. George Bora (UTCN) Genetic Algorithms December 4, 2013 19 / 20
  • 38. The cons This procedure has a number of weak points: genetic algorithms traditionally aren’t suited to image classification. the speed of this procedure, is very low due to the calls to Inkscape and the creation of numerous files (can be improved). the fitness function relies on a very sensible and naive image comparison method (can be improved). George Bora (UTCN) Genetic Algorithms December 4, 2013 20 / 20
  • 39. The pros A number of points in it’s favour the available class list, due to the classes being written in SVG, is very easily extendable. in it’s current form it requires only Java and Inkscape (a very available software). there are a large number of image comparison methods which can be used for the fitness function. George Bora (UTCN) Genetic Algorithms December 4, 2013 21 / 20
  • 40. The End Thank your for your attention ! George Bora (UTCN) Genetic Algorithms December 4, 2013 22 / 20
  • 41. The End Thank your for your attention ! Any questions ? George Bora (UTCN) Genetic Algorithms December 4, 2013 22 / 20