Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
4801502a
Commit
4801502a
authored
Jun 25, 2014
by
Vlad Shakhuro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
labelling -> labels
parent
edeef0fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
fcw_train.cpp
modules/adas/tools/fcw_train.cpp
+13
-13
No files found.
modules/adas/tools/fcw_train.cpp
View file @
4801502a
...
...
@@ -61,14 +61,14 @@ static bool read_overlap(const char *str, double *overlap)
return
true
;
}
static
bool
read_label
ling
(
const
string
&
path
,
vector
<
string
>&
filenames
,
vector
<
vector
<
Rect
>
>&
label
ling
)
static
bool
read_label
s
(
const
string
&
path
,
vector
<
string
>&
filenames
,
vector
<
vector
<
Rect
>
>&
label
s
)
{
string
label
ling
_path
=
path
+
"/gt.txt"
;
string
label
s
_path
=
path
+
"/gt.txt"
;
string
filename
,
line
;
int
x1
,
y1
,
x2
,
y2
;
char
delim
;
ifstream
ifs
(
label
ling
_path
.
c_str
());
ifstream
ifs
(
label
s
_path
.
c_str
());
if
(
!
ifs
.
good
()
)
return
false
;
...
...
@@ -77,13 +77,13 @@ static bool read_labelling(const string& path,
stringstream
stream
(
line
);
stream
>>
filename
;
filenames
.
push_back
(
path
+
"/"
+
filename
);
vector
<
Rect
>
filename_label
ling
;
vector
<
Rect
>
filename_label
s
;
while
(
stream
>>
x1
>>
y1
>>
x2
>>
y2
>>
delim
)
{
filename_label
ling
.
push_back
(
Rect
(
x1
,
y1
,
x2
,
y2
));
filename_label
s
.
push_back
(
Rect
(
x1
,
y1
,
x2
,
y2
));
}
label
ling
.
push_back
(
filename_labelling
);
filename_label
ling
.
clear
();
label
s
.
push_back
(
filename_labels
);
filename_label
s
.
clear
();
}
return
true
;
}
...
...
@@ -95,8 +95,8 @@ int main(int argc, char *argv[])
{
printf
(
"Usage: %s OPTIONS, where OPTIONS are:
\n
"
"
\n
"
"--path <path> - path to dir with data and label
ling
\n
"
" (label
ling
should have name gt.txt)
\n
"
"--path <path> - path to dir with data and label
s
\n
"
" (label
s
should have name gt.txt)
\n
"
"
\n
"
"--feature_count <count> - number of features to generate
\n
"
"
\n
"
...
...
@@ -182,10 +182,10 @@ int main(int argc, char *argv[])
b
.
train
(
Mat
(),
Mat
());
ICFDetector
detector
;
vector
<
string
>
filenames
;
vector
<
vector
<
Rect
>
>
label
ling
;
read_label
ling
(
path
,
filenames
,
labelling
);
vector
<
vector
<
Rect
>
>
label
s
;
read_label
s
(
path
,
filenames
,
labels
);
detector
.
train
(
filenames
,
label
ling
,
params
);
detector
.
train
(
filenames
,
label
s
,
params
);
}
catch
(
const
char
*
err
)
{
...
...
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