Skip to contents

Flattens MegaDetector/SpeciesNet JSON files to a table format. Data is split by detection, with images potentially having more than one row of data if more than one detection was found. Images with no detections will have only one record here, with no detection (bbox) information.

Usage

megadet_flatten(json, map_names = TRUE)

Arguments

json

character vector or nested list object from jsonlite::read_json(). The JSON file or loaded JSON data to filter on.

map_names

boolean. If MegaDetector and SpeciesNet names should be mapped from numeric values to the values provided in the detection_categories and classification_categories tags. These are typically gross (human, animal, vehicle) and taxonomic classifications respectively.

Value

a dataframe with all data from the images tag of the JSON file.