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
692ddb8c
Commit
692ddb8c
authored
Nov 17, 2017
by
Davis King
Browse files
merged
parents
e7d713cf
364e97c1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
dlib/gui_widgets/base_widgets.h
dlib/gui_widgets/base_widgets.h
+2
-2
dlib/gui_widgets/canvas_drawing.h
dlib/gui_widgets/canvas_drawing.h
+4
-4
examples/dnn_mmod_find_cars2_ex.cpp
examples/dnn_mmod_find_cars2_ex.cpp
+1
-1
No files found.
dlib/gui_widgets/base_widgets.h
View file @
692ddb8c
...
@@ -410,8 +410,8 @@ namespace dlib
...
@@ -410,8 +410,8 @@ namespace dlib
auto_mutex
M
(
m
);
auto_mutex
M
(
m
);
assign_image_scaled
(
img
,
new_img
);
assign_image_scaled
(
img
,
new_img
);
rectangle
old
(
rect
);
rectangle
old
(
rect
);
rect
.
set_right
(
rect
.
left
()
+
img
.
nc
(
)
-
1
);
rect
.
set_right
(
rect
.
left
()
+
num_columns
(
img
)
-
1
);
rect
.
set_bottom
(
rect
.
top
()
+
img
.
nr
(
)
-
1
);
rect
.
set_bottom
(
rect
.
top
()
+
num_rows
(
img
)
-
1
);
parent
.
invalidate_rectangle
(
rect
+
old
);
parent
.
invalidate_rectangle
(
rect
+
old
);
}
}
...
...
dlib/gui_widgets/canvas_drawing.h
View file @
692ddb8c
...
@@ -681,7 +681,7 @@ namespace dlib
...
@@ -681,7 +681,7 @@ namespace dlib
{
{
const
long
x
=
p
.
x
();
const
long
x
=
p
.
x
();
const
long
y
=
p
.
y
();
const
long
y
=
p
.
y
();
rectangle
rect
(
x
,
y
,
img
.
nc
()
+
x
-
1
,
img
.
nr
(
)
+
y
-
1
);
rectangle
rect
(
x
,
y
,
num_columns
(
img
)
+
x
-
1
,
num_rows
(
img
)
+
y
-
1
);
rectangle
area
=
c
.
intersect
(
rect
).
intersect
(
area_
);
rectangle
area
=
c
.
intersect
(
rect
).
intersect
(
area_
);
if
(
area
.
is_empty
())
if
(
area
.
is_empty
())
return
;
return
;
...
@@ -709,11 +709,11 @@ namespace dlib
...
@@ -709,11 +709,11 @@ namespace dlib
)
)
{
{
const
rectangle
area
=
c
.
intersect
(
rect
).
intersect
(
area_
);
const
rectangle
area
=
c
.
intersect
(
rect
).
intersect
(
area_
);
if
(
area
.
is_empty
()
||
img
.
size
(
)
==
0
)
if
(
area
.
is_empty
()
||
num_columns
(
img
)
*
num_rows
(
img
)
==
0
)
return
;
return
;
const
matrix
<
long
,
1
>
x
=
matrix_cast
<
long
>
(
round
(
linspace
(
0
,
img
.
nc
(
)
-
1
,
rect
.
width
())));
const
matrix
<
long
,
1
>
x
=
matrix_cast
<
long
>
(
round
(
linspace
(
0
,
num_columns
(
img
)
-
1
,
rect
.
width
())));
const
matrix
<
long
,
1
>
y
=
matrix_cast
<
long
>
(
round
(
linspace
(
0
,
img
.
nr
(
)
-
1
,
rect
.
height
())));
const
matrix
<
long
,
1
>
y
=
matrix_cast
<
long
>
(
round
(
linspace
(
0
,
num_rows
(
img
)
-
1
,
rect
.
height
())));
for
(
long
row
=
area
.
top
();
row
<=
area
.
bottom
();
++
row
)
for
(
long
row
=
area
.
top
();
row
<=
area
.
bottom
();
++
row
)
{
{
...
...
examples/dnn_mmod_find_cars2_ex.cpp
View file @
692ddb8c
...
@@ -27,7 +27,7 @@ using namespace dlib;
...
@@ -27,7 +27,7 @@ using namespace dlib;
// The rear view vehicle detector network
// The
front and
rear view vehicle detector network
template
<
long
num_filters
,
typename
SUBNET
>
using
con5d
=
con
<
num_filters
,
5
,
5
,
2
,
2
,
SUBNET
>
;
template
<
long
num_filters
,
typename
SUBNET
>
using
con5d
=
con
<
num_filters
,
5
,
5
,
2
,
2
,
SUBNET
>
;
template
<
long
num_filters
,
typename
SUBNET
>
using
con5
=
con
<
num_filters
,
5
,
5
,
1
,
1
,
SUBNET
>
;
template
<
long
num_filters
,
typename
SUBNET
>
using
con5
=
con
<
num_filters
,
5
,
5
,
1
,
1
,
SUBNET
>
;
template
<
typename
SUBNET
>
using
downsampler
=
relu
<
affine
<
con5d
<
32
,
relu
<
affine
<
con5d
<
32
,
relu
<
affine
<
con5d
<
16
,
SUBNET
>>>>>>>>>
;
template
<
typename
SUBNET
>
using
downsampler
=
relu
<
affine
<
con5d
<
32
,
relu
<
affine
<
con5d
<
32
,
relu
<
affine
<
con5d
<
16
,
SUBNET
>>>>>>>>>
;
...
...
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