mlpack 3.4.2
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
15namespace mlpack {
16namespace metric {
17
39template<bool UseCoordinates = false>
40class 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 unsigned int /* 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
Definition of Non Maximal Supression.
static const bool useCoordinates
NMS()
Default constructor required to satisfy the Metric policy.
static void Evaluate(const BoundingBoxesType &boundingBoxes, const ConfidenceScoreType &confidenceScores, OutputType &selectedIndices, const double threshold=0.5)
Performs non-maximal suppression.
void serialize(Archive &ar, const unsigned int)
Serialize the metric.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1