1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef LOCALIZATIONANALYSISINCLUDE
- #define LOCALIZATIONANALYSISINCLUDE
- #include <vector>
- #include <map>
- #include "LocalizationResult.h"
- namespace OBJREC {
- class LocalizationAnalysis
- {
- protected:
- double trapezoidArea ( double x1, double y1, double x2, double y2 );
- public:
-
-
- LocalizationAnalysis();
-
-
- virtual ~LocalizationAnalysis();
-
- void matchResults ( LocalizationResult *l,
- const LocalizationResult *l_gt,
- std::vector< std::pair<double, int> > & results,
- double matchThreshold = 0.3,
- bool rejectMultipleDetections = true);
- void calcRecallPrecisionCurve ( const std::vector< std::pair<double, int> > & results_unsorted,
- int count_positives,
- std::vector<double> & thresholdsv,
- std::vector<double> & recallv,
- std::vector<double> & precisionv );
- double calcAreaUnderROC ( const std::vector<double> & fprate,
- const std::vector<double> & tprate );
- void calcROCCurve ( const std::vector< std::pair<double, int> > & results_unsorted,
- int count_positives,
- int count_negatives,
- std::vector<double> & thresholdsv,
- std::vector<double> & fprates,
- std::vector<double> & tprates );
-
- double calcAveragePrecision ( const std::vector<double> & recall,
- const std::vector<double> & precision );
-
- double calcAveragePrecisionPrecise ( const std::vector<double> & recall,
- const std::vector<double> & precision );
- };
- }
- #endif
|