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
27440b6c
Commit
27440b6c
authored
Jul 04, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bugs in the new --resample option
parent
1e50156e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
main.cpp
tools/imglab/src/main.cpp
+3
-1
No files found.
tools/imglab/src/main.cpp
View file @
27440b6c
...
...
@@ -387,7 +387,7 @@ int resample_dataset(const command_line_parser& parser)
const
size_t
obj_size
=
get_option
(
parser
,
"resample"
,
100
*
100
);
const
double
margin_scale
=
2.5
;
// cropped image will be this times wider than the object.
const
size_t
image_size
=
obj_size
*
margin_scale
;
const
size_t
image_size
=
obj_size
*
margin_scale
*
margin_scale
;
dlib
::
image_dataset_metadata
::
dataset
data
,
resampled_data
;
resampled_data
.
comment
=
data
.
comment
;
...
...
@@ -442,6 +442,8 @@ int resample_dataset(const command_line_parser& parser)
box
.
ignore
=
true
;
box
.
rect
=
tform
(
box
.
rect
);
for
(
auto
&&
p
:
box
.
parts
)
p
.
second
=
tform
.
get_tform
()(
p
.
second
);
dimg
.
boxes
.
push_back
(
box
);
}
dimg
.
filename
=
data
.
images
[
i
].
filename
+
"RESAMPLED"
+
cast_to_string
(
j
)
+
".jpg"
;
...
...
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