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
d6cd6a2a
Commit
d6cd6a2a
authored
Jul 04, 2015
by
Davis King
Browse files
Fixed a bug that crashed imglab when trying to cluster datasets with empty or
really small boxes.
parent
2651becf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tools/imglab/src/cluster.cpp
tools/imglab/src/cluster.cpp
+2
-2
No files found.
tools/imglab/src/cluster.cpp
View file @
d6cd6a2a
...
@@ -147,7 +147,7 @@ int cluster_dataset(
...
@@ -147,7 +147,7 @@ int cluster_dataset(
for
(
unsigned
long
j
=
0
;
j
<
data
.
images
[
i
].
boxes
.
size
();
++
j
)
for
(
unsigned
long
j
=
0
;
j
<
data
.
images
[
i
].
boxes
.
size
();
++
j
)
{
{
if
(
data
.
images
[
i
].
boxes
[
j
].
ignore
)
if
(
data
.
images
[
i
].
boxes
[
j
].
ignore
||
data
.
images
[
i
].
boxes
[
j
].
rect
.
area
()
<
10
)
continue
;
continue
;
drectangle
rect
=
data
.
images
[
i
].
boxes
[
j
].
rect
;
drectangle
rect
=
data
.
images
[
i
].
boxes
[
j
].
rect
;
rect
=
set_aspect_ratio
(
rect
,
aspect_ratio
);
rect
=
set_aspect_ratio
(
rect
,
aspect_ratio
);
...
@@ -187,7 +187,7 @@ int cluster_dataset(
...
@@ -187,7 +187,7 @@ int cluster_dataset(
{
{
idata
[
i
].
second
.
boxes
.
push_back
(
data
.
images
[
i
].
boxes
[
j
]);
idata
[
i
].
second
.
boxes
.
push_back
(
data
.
images
[
i
].
boxes
[
j
]);
if
(
data
.
images
[
i
].
boxes
[
j
].
ignore
)
if
(
data
.
images
[
i
].
boxes
[
j
].
ignore
||
data
.
images
[
i
].
boxes
[
j
].
rect
.
area
()
<
10
)
continue
;
continue
;
// If this box goes into cluster c then update the score for the whole
// If this box goes into cluster c then update the score for the whole
...
...
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