non_maximal_supression.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_METRICS_NMS_HPP
13 #define MLPACK_CORE_METRICS_NMS_HPP
14 
15 namespace mlpack {
16 namespace metric {
17 
39 template<bool UseCoordinates = false>
40 class NMS
41 {
42  public:
44  NMS() { /* Nothing to do here. */ }
45 
63  template<
64  typename BoundingBoxesType,
65  typename ConfidenceScoreType,
66  typename OutputType
67  >
68  static void Evaluate(const BoundingBoxesType& boundingBoxes,
69  const ConfidenceScoreType& confidenceScores,
70  OutputType& selectedIndices,
71  const double threshold = 0.5);
72 
73  static const bool useCoordinates = UseCoordinates;
74 
76  template <typename Archive>
77  void serialize(Archive &ar, const uint32_t /* version */);
78 }; // Class NMS.
79 
80 } // namespace metric
81 } // namespace mlpack
82 
83 // Include implementation.
84 #include "non_maximal_supression_impl.hpp"
85 
86 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
void serialize(Archive &ar, const uint32_t)
Serialize the metric.
Definition of Non Maximal Supression.
NMS()
Default constructor required to satisfy the Metric policy.
static const bool useCoordinates
static void Evaluate(const BoundingBoxesType &boundingBoxes, const ConfidenceScoreType &confidenceScores, OutputType &selectedIndices, const double threshold=0.5)
Performs non-maximal suppression.