".github/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "c1edb03c372c12f92b1b5580b718e8cf2196016c"
Commit 7f3550d9 authored by Davis King's avatar Davis King
Browse files

Made labeled_detection serializable.

parent b294f4d4
......@@ -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 <
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment