Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
licenseplates
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
licenseplates
Commits
baf8c220
Commit
baf8c220
authored
Dec 22, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Plain Diff
Fixed merge conflict.
parents
8fd925f4
bff2bb2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
34 deletions
+42
-34
docs/report.tex
docs/report.tex
+42
-34
No files found.
docs/report.tex
View file @
baf8c220
...
...
@@ -350,63 +350,71 @@ it as good as possible because all occurrences are in the learning set.
To be able to use the code efficiently, we wrote a number of scripts. This
section describes the purpose and usage of each script. For each script it is
essential that you use the correct folder and subfolder naming scheme. The
scheme
is as follows:
essential that you use the correct folder and subfolder naming scheme. The
scheme
is as follows:
\begin{enumerate}
\item
A main folder called `images' placed in the current directory as the
src folder.
\item
A main folder called `images' placed in the root directory.
\item
In the images folder there have to be three folders. Images, Infos
and LearningSet.
\item
The Images and Infos folder contain sub
folder
s which are numbered
characters
\item
The Images and Infos folder contain sub
directorie
s which are numbered
(
$
0001
$
to possibly
$
9999
$
).
\item
In each of the sub
folders the data (i.e the images or xml files) can
be placed.
And have to be named
$
00991
_
XXXXX.ext
$
, where XXXXX can be
\item
In each of the sub
directories the data (i.e the images or xml files)
can be placed.
And have to be named
$
00991
_
XXXXX.ext
$
, where XXXXX can be
$
00000
to
99999
$
.
\item
For-loops in the script currently only go up to 9 sub
folders, with a
maximum of containing 100 images or xml files. These numbers have to be
adjusted if the scripts are being used, but with a bigger dataset.
\item
For-loops in the script currently only go up to 9 sub
directories,
with a maximum of containing 100 images or xml files. These numbers have to
be
adjusted if the scripts are being used, but with a bigger dataset.
\end{enumerate}
It is of course possible to use your own naming scheme. A search for the
$
filename
$
variable will most likely find the occurences where the naming
scheme is implemented.
\subsection*
{
\texttt
{
create
\_
characters.py
}}
Generates a file containing character objects with their feature vectors. Also,
the learning set and test set files are created for the given combination of
NEIGHBOURS and BLUR
\_
SCALE.
\subsection*
{
\texttt
{
create
\_
classifier.py
}}
Generates a file containing a classifier object for the given combination of
NEIGHBOURS and BLUR
\_
SCALE. The script uses functions from
\texttt
{
create
\_
characters.py
}
to ensure that the required character files
exist first. Therefore,
\texttt
{
create
\_
characters.py
}
does not need to
executed manually first.
\subsection*
{
\texttt
{
find
\_
svm
\_
params.py
}}
Performs a grid-search to find the optimal value for
\texttt
{
c
}
and
\texttt
{
gamma
}
, for the given combination of NEIGHBOURS and BLUR
\_
SCALE. The
optimal classifier is saved in
\emph
{
data/classifier
\_\{
BLUR
\_
SCALE
\}\_\{
NEIGBOURS
\}
.dat
}
, and the accuracy
scores are saved in in
\emph
{
results/results
\_\{
BLUR
\_
SCALE
\}\_\{
NEIGBOURS
\}
.txt
}
.
Like
\texttt
{
create
\_
classifier.py
}
, the script ensures that the required
character object files exist first.
\subsection*
{
\texttt
{
run
\_
classifier.py
}}
Runs the classifier that has been saved in
\emph
{
data/classifier
\_\{
BLUR
\_
SCALE
\}\_\{
NEIGBOURS
\}
.dat
}
. If the classifier
file does not exist yet, a C and GAMMA can be specified so that it is created.
Therefore, it is not necessary to run
\texttt
{
create
\_
classifier.py
}
first.
\subsection*
{
\texttt
{
generate
\_
learning
\_
set.py
}}
Usage of this script could be minimal, since you only need to extract the
letters carefully and successfully once. Then other scripts in this list can
use the extracted images. Most likely the other scripts will use caching to
speed up the system too. But in short, the script will create images of a
single character based on a given dataset of license plate images and
corresponding xml files. If the xml files give correct locations of the
characters they can be extracted. The workhorse of this script is
$
plate
=
xml
_
to
_
LicensePlate
(
filename, save
_
character
=
1
)
$
. Where
speed up the system too. But in short, the script will create images of a
single
character based on a given dataset of license plate images and corresponding
XML files. If the XML files give correct locations of the characters they can
be extracted. The workhorse of this script is
\texttt
{
plate =
xml
\_
to
\_
LicensePlate(filename, save
\_
character=1)
}
. Where
\texttt
{
save
\_
character
}
is an optional variable. If set it will save the image
in the LearningSet folder and pick the correct subfolder based on the character
value. So if the XML says a character is an 'A' it will be placed in the 'A'
folder. These folders will be created automatically if they do not exist yet.
\subsection*
{
\texttt
{
load
\_
learning
\_
set.py
}}
\subsection*
{
\texttt
{
run
\_
classifier.py
}}
in the characters folder and pick the correct subdirectory based on the
character value. So if the XML says a character is an 'A' it will be placed in
the `A' folder. These folders will be created automatically if they do not
exist yet.
\section
{
Finding parameters
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment