mirror of https://github.com/davisking/dlib.git
Renamed loss_binary_mmod_ to loss_mmod_
This commit is contained in:
parent
d54597230b
commit
6cd2042dd0
|
@ -443,7 +443,7 @@ namespace dlib
|
|||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
class loss_binary_mmod_
|
||||
class loss_mmod_
|
||||
{
|
||||
struct intermediate_detection
|
||||
{
|
||||
|
@ -470,9 +470,9 @@ namespace dlib
|
|||
|
||||
typedef std::vector<mmod_rect> label_type;
|
||||
|
||||
loss_binary_mmod_() {}
|
||||
loss_mmod_() {}
|
||||
|
||||
loss_binary_mmod_(mmod_options options_) : options(options_) {}
|
||||
loss_mmod_(mmod_options options_) : options(options_) {}
|
||||
|
||||
const mmod_options& get_options (
|
||||
) const { return options; }
|
||||
|
@ -671,32 +671,32 @@ namespace dlib
|
|||
}
|
||||
|
||||
|
||||
friend void serialize(const loss_binary_mmod_& item, std::ostream& out)
|
||||
friend void serialize(const loss_mmod_& item, std::ostream& out)
|
||||
{
|
||||
serialize("loss_binary_mmod_", out);
|
||||
serialize("loss_mmod_", out);
|
||||
serialize(item.options, out);
|
||||
}
|
||||
|
||||
friend void deserialize(loss_binary_mmod_& item, std::istream& in)
|
||||
friend void deserialize(loss_mmod_& item, std::istream& in)
|
||||
{
|
||||
std::string version;
|
||||
deserialize(version, in);
|
||||
if (version != "loss_binary_mmod_")
|
||||
throw serialization_error("Unexpected version found while deserializing dlib::loss_binary_mmod_.");
|
||||
if (version != "loss_mmod_")
|
||||
throw serialization_error("Unexpected version found while deserializing dlib::loss_mmod_.");
|
||||
deserialize(item.options, in);
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& out, const loss_binary_mmod_& )
|
||||
friend std::ostream& operator<<(std::ostream& out, const loss_mmod_& )
|
||||
{
|
||||
// TODO, add options fields
|
||||
out << "loss_binary_mmod";
|
||||
out << "loss_mmod";
|
||||
return out;
|
||||
}
|
||||
|
||||
friend void to_xml(const loss_binary_mmod_& /*item*/, std::ostream& out)
|
||||
friend void to_xml(const loss_mmod_& /*item*/, std::ostream& out)
|
||||
{
|
||||
// TODO, add options fields
|
||||
out << "<loss_binary_mmod/>";
|
||||
out << "<loss_mmod/>";
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -857,7 +857,7 @@ namespace dlib
|
|||
};
|
||||
|
||||
template <typename SUBNET>
|
||||
using loss_binary_mmod = add_loss_layer<loss_binary_mmod_, SUBNET>;
|
||||
using loss_mmod = add_loss_layer<loss_mmod_, SUBNET>;
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ namespace dlib
|
|||
{
|
||||
/*!
|
||||
WHAT THIS OBJECT REPRESENTS
|
||||
This object contains all the parameters that control the behavior of loss_binary_mmod_.
|
||||
This object contains all the parameters that control the behavior of loss_mmod_.
|
||||
!*/
|
||||
|
||||
public:
|
||||
|
@ -419,7 +419,7 @@ namespace dlib
|
|||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
class loss_binary_mmod_
|
||||
class loss_mmod_
|
||||
{
|
||||
/*!
|
||||
WHAT THIS OBJECT REPRESENTS
|
||||
|
@ -438,21 +438,21 @@ namespace dlib
|
|||
- image_space_to_tensor_space()
|
||||
A reference implementation of them and their definitions can be found in
|
||||
the input_rgb_image_pyramid object, which is the recommended input layer to
|
||||
be used with loss_binary_mmod_.
|
||||
be used with loss_mmod_.
|
||||
!*/
|
||||
|
||||
public:
|
||||
|
||||
typedef std::vector<mmod_rect> label_type;
|
||||
|
||||
loss_binary_mmod_(
|
||||
loss_mmod_(
|
||||
);
|
||||
/*!
|
||||
ensures
|
||||
- #get_options() == mmod_options()
|
||||
!*/
|
||||
|
||||
loss_binary_mmod_(
|
||||
loss_mmod_(
|
||||
mmod_options options_
|
||||
);
|
||||
/*!
|
||||
|
@ -517,7 +517,7 @@ namespace dlib
|
|||
};
|
||||
|
||||
template <typename SUBNET>
|
||||
using loss_binary_mmod = add_loss_layer<loss_binary_mmod_, SUBNET>;
|
||||
using loss_mmod = add_loss_layer<loss_mmod_, SUBNET>;
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace dlib
|
|||
typename image_array_type
|
||||
>
|
||||
const matrix<double,1,3> test_object_detection_function (
|
||||
loss_binary_mmod<SUBNET>& detector,
|
||||
loss_mmod<SUBNET>& detector,
|
||||
const image_array_type& images,
|
||||
const std::vector<std::vector<mmod_rect>>& truth_dets,
|
||||
const test_box_overlap& overlap_tester = test_box_overlap(),
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace dlib
|
|||
typename image_array_type
|
||||
>
|
||||
const matrix<double,1,3> test_object_detection_function (
|
||||
loss_binary_mmod<SUBNET>& detector,
|
||||
loss_mmod<SUBNET>& detector,
|
||||
const image_array_type& images,
|
||||
const std::vector<std::vector<mmod_rect>>& truth_dets,
|
||||
const test_box_overlap& overlap_tester = test_box_overlap(),
|
||||
|
@ -27,7 +27,7 @@ namespace dlib
|
|||
and it must contain objects which can be accepted by detector().
|
||||
ensures
|
||||
- This function is just like the test_object_detection_function() for
|
||||
object_detector's except it runs on CNNs that use loss_binary_mmod.
|
||||
object_detector's except it runs on CNNs that use loss_mmod.
|
||||
- Tests the given detector against the supplied object detection problem and
|
||||
returns the precision, recall, and average precision. Note that the task is
|
||||
to predict, for each images[i], the set of object locations given by
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace dlib
|
|||
/*!
|
||||
WHAT THIS OBJECT REPRESENTS
|
||||
This is a simple struct that is used to give training data and receive detections
|
||||
from the Max-Margin Object Detection loss layer loss_binary_mmod_ object.
|
||||
from the Max-Margin Object Detection loss layer loss_mmod_ object.
|
||||
!*/
|
||||
|
||||
mmod_rect() = default;
|
||||
|
|
Loading…
Reference in New Issue