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
52edc0d2
Commit
52edc0d2
authored
Feb 11, 2018
by
Davis King
Browse files
Fixed incorrect input validation.
parent
0040eb7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tools/python/src/shape_predictor.h
tools/python/src/shape_predictor.h
+2
-2
No files found.
tools/python/src/shape_predictor.h
View file @
52edc0d2
...
@@ -149,8 +149,8 @@ namespace dlib
...
@@ -149,8 +149,8 @@ namespace dlib
throw
error
(
"Invalid lambda_param value given to train_shape_predictor(), lambda_param must be > 0."
);
throw
error
(
"Invalid lambda_param value given to train_shape_predictor(), lambda_param must be > 0."
);
if
(
!
(
0
<
options
.
nu
&&
options
.
nu
<=
1
))
if
(
!
(
0
<
options
.
nu
&&
options
.
nu
<=
1
))
throw
error
(
"Invalid nu value given to train_shape_predictor(). It is required that 0 < nu <= 1."
);
throw
error
(
"Invalid nu value given to train_shape_predictor(). It is required that 0 < nu <= 1."
);
if
(
options
.
feature_pool_region_padding
<
0
)
if
(
options
.
feature_pool_region_padding
<
=
-
0.5
)
throw
error
(
"Invalid feature_pool_region_padding value given to train_shape_predictor(), feature_pool_region_padding must be >
= 0
."
);
throw
error
(
"Invalid feature_pool_region_padding value given to train_shape_predictor(), feature_pool_region_padding must be >
-0.5
."
);
if
(
images
.
size
()
!=
detections
.
size
())
if
(
images
.
size
()
!=
detections
.
size
())
throw
error
(
"The list of images must have the same length as the list of detections."
);
throw
error
(
"The list of images must have the same length as the list of detections."
);
...
...
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