Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
692ddb8c
Commit
692ddb8c
authored
Nov 17, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
e7d713cf
364e97c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
base_widgets.h
dlib/gui_widgets/base_widgets.h
+2
-2
canvas_drawing.h
dlib/gui_widgets/canvas_drawing.h
+4
-4
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
auto_mutex
M
(
m
);
assign_image_scaled
(
img
,
new_img
);
rectangle
old
(
rect
);
rect
.
set_right
(
rect
.
left
()
+
img
.
nc
(
)
-
1
);
rect
.
set_bottom
(
rect
.
top
()
+
img
.
nr
(
)
-
1
);
rect
.
set_right
(
rect
.
left
()
+
num_columns
(
img
)
-
1
);
rect
.
set_bottom
(
rect
.
top
()
+
num_rows
(
img
)
-
1
);
parent
.
invalidate_rectangle
(
rect
+
old
);
}
...
...
dlib/gui_widgets/canvas_drawing.h
View file @
692ddb8c
...
...
@@ -681,7 +681,7 @@ namespace dlib
{
const
long
x
=
p
.
x
();
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_
);
if
(
area
.
is_empty
())
return
;
...
...
@@ -709,11 +709,11 @@ namespace dlib
)
{
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
;
const
matrix
<
long
,
1
>
x
=
matrix_cast
<
long
>
(
round
(
linspace
(
0
,
img
.
nc
(
)
-
1
,
rect
.
width
())));
const
matrix
<
long
,
1
>
y
=
matrix_cast
<
long
>
(
round
(
linspace
(
0
,
img
.
nr
(
)
-
1
,
rect
.
height
())));
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
,
num_rows
(
img
)
-
1
,
rect
.
height
())));
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;
// 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
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
>>>>>>>>>
;
...
...
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