Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
363d505c
Commit
363d505c
authored
Nov 23, 2013
by
Davis King
Browse files
Simplified code slightly.
parent
77f6c9f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
dlib/svm/structural_svm_object_detection_problem.h
dlib/svm/structural_svm_object_detection_problem.h
+2
-15
No files found.
dlib/svm/structural_svm_object_detection_problem.h
View file @
363d505c
...
@@ -334,7 +334,7 @@ namespace dlib
...
@@ -334,7 +334,7 @@ namespace dlib
// The point of this loop is to fill out the truth_score_hits array.
// The point of this loop is to fill out the truth_score_hits array.
for
(
unsigned
long
i
=
0
;
i
<
dets
.
size
()
&&
final_dets
.
size
()
<
max_num_dets
;
++
i
)
for
(
unsigned
long
i
=
0
;
i
<
dets
.
size
()
&&
final_dets
.
size
()
<
max_num_dets
;
++
i
)
{
{
if
(
overlaps_any_box
(
final_dets
,
dets
[
i
].
second
))
if
(
overlaps_any_box
(
boxes_overlap
,
final_dets
,
dets
[
i
].
second
))
continue
;
continue
;
const
std
::
pair
<
double
,
unsigned
int
>
truth
=
find_best_match
(
truth_object_detections
[
idx
],
dets
[
i
].
second
);
const
std
::
pair
<
double
,
unsigned
int
>
truth
=
find_best_match
(
truth_object_detections
[
idx
],
dets
[
i
].
second
);
...
@@ -371,7 +371,7 @@ namespace dlib
...
@@ -371,7 +371,7 @@ namespace dlib
// detections.
// detections.
for
(
unsigned
long
i
=
0
;
i
<
dets
.
size
()
&&
final_dets
.
size
()
<
max_num_dets
;
++
i
)
for
(
unsigned
long
i
=
0
;
i
<
dets
.
size
()
&&
final_dets
.
size
()
<
max_num_dets
;
++
i
)
{
{
if
(
overlaps_any_box
(
final_dets
,
dets
[
i
].
second
))
if
(
overlaps_any_box
(
boxes_overlap
,
final_dets
,
dets
[
i
].
second
))
continue
;
continue
;
const
std
::
pair
<
double
,
unsigned
int
>
truth
=
find_best_match
(
truth_object_detections
[
idx
],
dets
[
i
].
second
);
const
std
::
pair
<
double
,
unsigned
int
>
truth
=
find_best_match
(
truth_object_detections
[
idx
],
dets
[
i
].
second
);
...
@@ -431,19 +431,6 @@ namespace dlib
...
@@ -431,19 +431,6 @@ namespace dlib
}
}
bool
overlaps_any_box
(
const
std
::
vector
<
rectangle
>&
truth_object_detections
,
const
dlib
::
rectangle
&
rect
)
const
{
for
(
unsigned
long
i
=
0
;
i
<
truth_object_detections
.
size
();
++
i
)
{
if
(
boxes_overlap
(
truth_object_detections
[
i
],
rect
))
return
true
;
}
return
false
;
}
bool
overlaps_ignore_box
(
bool
overlaps_ignore_box
(
const
long
idx
,
const
long
idx
,
const
dlib
::
rectangle
&
rect
const
dlib
::
rectangle
&
rect
...
...
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