Commit 9622f9b919190efd292c13fec1685d07005ede0c
1 parent
cd3140e2
Make representation trainable and allow classifiers to return raw score
Showing
1 changed file
with
2 additions
and
1 deletions
openbr/openbr_plugin.h
| ... | ... | @@ -1385,6 +1385,7 @@ public: |
| 1385 | 1385 | |
| 1386 | 1386 | static Representation *make(QString str, QObject *parent); /*!< \brief Make a representation from a string. */ |
| 1387 | 1387 | virtual cv::Mat preprocess(const cv::Mat &image) const { return image; } |
| 1388 | + virtual void train(const QList<cv::Mat> &images, const QList<float> &labels) { (void) images; (void)labels; } | |
| 1388 | 1389 | // By convention, an empty indices list will result in all feature responses being calculated |
| 1389 | 1390 | // and returned. |
| 1390 | 1391 | virtual cv::Mat evaluate(const cv::Mat &image, const QList<int> &indices = QList<int>()) const = 0; |
| ... | ... | @@ -1400,7 +1401,7 @@ public: |
| 1400 | 1401 | |
| 1401 | 1402 | static Classifier *make(QString str, QObject *parent); /*!< \brief Make a classifier from a string. */ |
| 1402 | 1403 | virtual void train(const QList<cv::Mat> &images, const QList<float> &labels) = 0; |
| 1403 | - virtual float classify(const cv::Mat &image) const = 0; | |
| 1404 | + virtual float classify(const cv::Mat &image, bool returnSum = false) const = 0; | |
| 1404 | 1405 | }; |
| 1405 | 1406 | |
| 1406 | 1407 | /*! | ... | ... |