Given a directory of superpixel segmentations and a directory of ground truth segmentations, this class is used to generate a CSV file of statistics of different metrics.
More...
|
| EvaluationSummary (boost::filesystem::path sp_directory, boost::filesystem::path gt_directory, boost::filesystem::path img_directory) |
| Create an evaluation summary for the given directory. More...
|
|
| EvaluationSummary (boost::filesystem::path sp_directory, boost::filesystem::path gt_directory, boost::filesystem::path img_directory, EvaluationMetrics evaluation_metrics, EvaluationStatistics evaluation_statistics) |
| Constructor. More...
|
|
| EvaluationSummary (boost::filesystem::path sp_directory, boost::filesystem::path gt_directory, boost::filesystem::path img_directory, EvaluationMetrics evaluation_metrics, EvaluationStatistics evaluation_statistics, SuperpixelVisualizations superpixel_visualizations) |
| Constructor. More...
|
|
void | computeSummary (int >_max) |
| Summarize the results; this is the main entrance point. More...
|
|
void | setAppendFile (const boost::filesystem::path &append_file) |
| Add CSV file to append CSV output to. More...
|
|
void | setEvaluationStatistics (const EvaluationStatistics &evaluation_statistics) |
| Set the evaluation statistics to compute. More...
|
|
void | setEvaluationMetrics (const EvaluationMetrics &evaluation_metrics) |
| Set the evaluation metrics to compute. More...
|
|
void | setSuperpixelVisualizations (const SuperpixelVisualizations &superpixel_visualizations) |
| Set the superpixel visualizations to compute. More...
|
|
void | setComputeCorrelation (bool compute_correlation) |
| Set whether to compute correlation. More...
|
|
void | getEvaluationStatistics (EvaluationSummary::EvaluationStatistics &evaluation_statistics) |
| Get the evaluation statistics used. More...
|
|
void | getEvaluationMetrics (EvaluationSummary::EvaluationMetrics &evaluation_metrics) |
| Get the evaluation metrics used. More...
|
|
void | getSuperpixelVisualizations (EvaluationSummary::SuperpixelVisualizations &superpixel_visualizations) |
| Get the visualizations used. More...
|
|
bool | getComputeCorrelation () |
| Get whether correlation is computed. More...
|
|
|
int | countMetrics () |
| Count number of metrics used. More...
|
|
void | evaluateHeader (std::stringstream &output, std::vector< std::string > &metric_order) |
| Add header to output. More...
|
|
void | evaluate (const cv::Mat &sp_segmentation, const cv::Mat >_segmentation, const cv::Mat &image, cv::Mat &data, std::stringstream &output) |
| Actually do the evaluation. More...
|
|
void | visualize (const cv::Mat &sp_segmentation, const cv::Mat >_segmentation, const cv::Mat &image, std::string name, int t=0) |
| Visualize given segmentation. More...
|
|
void | correlate (const cv::Mat &mat_results, const std::vector< std::string > &metric_order, cv::Mat &mat_correlation, std::string &csv_correlation) |
| Compute correlation between all metrics. More...
|
|
int | countStatistics (int gt_max) |
| Count the number of statistics to be used. More...
|
|
void | validateStatistics () |
| Validate and correct statistics. More...
|
|
void | summaryHeader (const std::vector< int > >, std::stringstream &output) |
| Add the summary header to output. More...
|
|
void | summarize (const std::vector< int > >, const cv::Mat &data, int j, cv::Mat &mat_summary, std::stringstream &output) |
| Summarize a specific column of the evaluation data (corresponding to a particular metric). More...
|
|
float | computeMean (const std::vector< int > gt, const cv::Mat &data, int j, std::vector< float > &mean, float &mean_min, float &mean_max) |
| Compute mean statistic. More...
|
|
float | comuteMedian (const std::vector< int > gt, const cv::Mat &data, int j, std::vector< float > &median, float &median_min, float &median_max) |
| Compute median statistic. More...
|
|
void | comuteMedianFirstAndThirdQuartile (const std::vector< int > gt, const cv::Mat &data, int j, std::vector< float > &median, std::vector< float > &first_q, std::vector< float > &thrid_q, float &median_min, float &first_q_min, float &third_q_min, float &median_max, float &first_q_max, float &second_q_max) |
| Compute median, first quartile and third quartile. More...
|
|
void | comuteMinMax (const std::vector< int > gt, const cv::Mat &data, int j, std::vector< float > &min, std::vector< float > &max, float &min_min, float &max_min, float &min_max, float &max_max) |
| Compute min/max over all ground truth segmentations. More...
|
|
float | computeStandardDeviation (const std::vector< int > gt, const cv::Mat &data, int j, const std::vector< float > &mean, std::vector< float > &std, float &std_min, float &std_max) |
| Compute standard deviation over all ground truth segmentations. More...
|
|
Given a directory of superpixel segmentations and a directory of ground truth segmentations, this class is used to generate a CSV file of statistics of different metrics.
Copyright (c) 2016, David Stutz Contact: david.nosp@m..stu.nosp@m.tz@rw.nosp@m.th-a.nosp@m.achen.nosp@m..de, davidstutz.de All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- Author
- David Stutz
EvaluationSummary::EvaluationSummary |
( |
boost::filesystem::path |
sp_directory, |
|
|
boost::filesystem::path |
gt_directory, |
|
|
boost::filesystem::path |
img_directory |
|
) |
| |
Create an evaluation summary for the given directory.
The directory is assumed to contain several superpixel segmentations as CSV files. The files are assumed to be named according to the ground truth files, see below.
In addition, a directory containing ground truth segmentations as CSV files needs to be provided.
- Parameters
-
[in] | sp_directory | directory containing superpixel segmentations as CSV files |
[in] | gt_directory | directory containing ground truth segmentations as CSV files |
[in] | img_directory | directory containing the corresponding images as JPEG or PNG |
Copyright (c) 2016, David Stutz Contact: david.nosp@m..stu.nosp@m.tz@rw.nosp@m.th-a.nosp@m.achen.nosp@m..de, davidstutz.de All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.