View source: R/assess_overlap.R
assess_overlap | R Documentation |
The workhorse function in the vvipr app. Users should not need to call this directly. The function is based on sf geometries for assessing the performance of image classification models implemented with VIAME software (https://www.viametoolkit.org/)
assess_overlap(truth, prediction, conf.thresh = 0.2, over1 = 0.5, over2 = 0.5)
truth |
A path identifying the user-selected .csv data file representing the truth annotations as output by VIAME software for the set of images under analysis |
prediction |
A path identifying the user-selected .csv data file representing the model predictions as output by VIAME software for the set of images under analysis |
conf.thresh |
A numeric value from 0 to 0.99 that specifies the minimum value for including model predictions in the analysis. Predictions with confidence levels below the threshold will be eliminated from the analysis. |
over1 |
A numeric value from 0 to 1 that specifies the minimum proportion of a truth annotation that must be covered by a model prediction. Predictions that do not meet this threshold will be assigned a status of 'false positive' |
over2 |
A numeric value from 0 to 1 that specifies the minimum proportion of a prediction area that must overlap with a truth annotation. Predictions that do not meet this threshold will be assigned a status of 'false positive'. Note that predictions that fail to meet the 'over1' threshold, but do meet the 'over2 threshold will be assigned a 'true positive' status |
The function requires input of two files, as output by VIAME, and the setting of 3 thresholds for assigning a model prediction as a false positve. The images used for the truth and prediction files should be the exact same.
The function returns a list containing a data frame of model results, a list of class sf with geometries for each image and class, a vector of polygon IDs for all false positives that were detected, and a data frame with CLASS and INDEX headers identifying classes in the data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.