mirror of https://github.com/davisking/dlib.git
Made labeled_detection serializable.
This commit is contained in:
parent
b294f4d4c7
commit
7f3550d983
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue