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
7f3550d9
".github/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "c1edb03c372c12f92b1b5580b718e8cf2196016c"
Commit
7f3550d9
authored
Feb 26, 2014
by
Davis King
Browse files
Made labeled_detection serializable.
parent
b294f4d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
dlib/svm/svm.h
dlib/svm/svm.h
+20
-0
dlib/svm/svm_abstract.h
dlib/svm/svm_abstract.h
+18
-1
No files found.
dlib/svm/svm.h
View file @
7f3550d9
...
...
@@ -321,6 +321,26 @@ namespace dlib
label_type
label
;
};
template
<
typename
detection_type_
,
typename
label_type_
>
inline
void
serialize
(
const
labeled_detection
<
detection_type_
,
label_type_
>&
item
,
std
::
ostream
&
out
)
{
serialize
(
item
.
det
,
out
);
serialize
(
item
.
label
,
out
);
}
template
<
typename
detection_type_
,
typename
label_type_
>
inline
void
deserialize
(
labeled_detection
<
detection_type_
,
label_type_
>&
item
,
std
::
istream
&
in
)
{
deserialize
(
item
.
det
,
in
);
deserialize
(
item
.
label
,
in
);
}
// ----------------------------------------------------------------------------------------
template
<
...
...
dlib/svm/svm_abstract.h
View file @
7f3550d9
...
...
@@ -185,8 +185,25 @@ namespace dlib
label_type
label
;
};
// ----------------------------------------------------------------------------------------
template
<
typename
detection_type_
,
typename
label_type_
>
void
serialize
(
const
labeled_detection
<
detection_type_
,
label_type_
>&
item
,
std
::
ostream
&
out
);
/*!
provides serialization support
!*/
template
<
typename
detection_type_
,
typename
label_type_
>
void
deserialize
(
labeled_detection
<
detection_type_
,
label_type_
>&
item
,
std
::
istream
&
in
);
/*!
provides deserialization support
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
detection_type
,
...
...
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