evaluate_image_crowns: Compute evaluation metrics for the hand-annotated images

View source: R/evaluate_image_crowns.R

evaluate_image_crownsR Documentation

Compute evaluation metrics for the hand-annotated images

Description

Submit a set of predictions to be evaluated against individual tree crowns annotated by an observer looking at the imagery.

Usage

evaluate_image_crowns(
  predictions,
  project = FALSE,
  show = TRUE,
  summarize = TRUE
)

Arguments

predictions

The format of the submission is either a csv with 5 columns: plot_name, xmin, ymin, xmax, ymax or a sf polygon object with poylgons in image coordinates. Each row contains information for one predicted bounding box. The plot column should be named the same as the files in the dataset (e.g. SJER_021), not the path to the file.

project

Whether submission coordinates need to be projected in UTM geographic coordinates. If a polygon shp submission is provided, project will be set to True.

show

Logical. Plot the overlayed annotations for each plot?

summarize

Whether to compute summary statistics (TRUE) or return raw matching data (False), see summary_statistics

Details

The NeonTreeEvaluation benchmark contains evaluation data from 22 sites from the National Ecological Observation Network. Crowns were annotated by looking at a combination of the RGB image, a LiDAR-derived canopy height model, hyperspectral reflectance and, where available, field collected data on stem location. This function is a wrapper for evaluate_plot. It first looks which plot_names match the benchmark dataset. Plots with no predictions, or which are not included, are ignored.

Value

If summarize is True, a set of summary measures from summary_statistics for the overall score, the entire site score, and the per-plot score. If False, a dataframe with the intersection-over-union scores for each prediction.

Examples

#' data("submission")
df<-submission %>% dplyr::filter(plot_name %in% c("SJER_052","TEAK_061","TEAK_057"))
results<-evaluate_image_crowns(predictions = df,project = FALSE, show=TRUE, summarize = TRUE)

weecology/NeonTreeEvaluation_package documentation built on Aug. 27, 2024, 10:53 a.m.