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
7f3550d9
Commit
7f3550d9
authored
Feb 27, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made labeled_detection serializable.
parent
b294f4d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
svm.h
dlib/svm/svm.h
+20
-0
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
...
@@ -321,6 +321,26 @@ namespace dlib
label_type
label
;
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
<
template
<
...
...
dlib/svm/svm_abstract.h
View file @
7f3550d9
...
@@ -185,8 +185,25 @@ namespace dlib
...
@@ -185,8 +185,25 @@ namespace dlib
label_type
label
;
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
<
template
<
typename
detection_type
,
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