This package is currently in pre-release. Some functions may not be 100% tested and many features are in development.
Viewing this page on Github? See the website here.
camRa is an R package aimed at providing utilities for managing and manipulating camera trap-related data. CamRa includes utility functions to help with analyzing and editing MegaDetector/SpeciesNet files, obtaining data from the Living Library of Alexandria (LILA), edit and calculate metrics for images (cropping, calculating difference images, luminosity, etc.), interfacing with Timelapse, and other general utilities for camera trap image data.
See the function reference section on the camRa website for information on individual functions.
-
MegaDetector/SpeciesNet: Filtering and grabbing data from JSON files, updating/merging classification categories and related descriptions, converting JSON files to flat tables for easier analysis, and convenient nested indexing into JSON data without using extract operators.
-
LILA: Show datasets available through LILA, request lists of files available in S3 buckets by dataset, and download files using S3.
-
Images: Calculate metrics such as luminosity and differences between two images, convert between bounding box formats, crop images using bounding box data, draw bounding boxes on images, and apply functions on image data to extract summary metrics.
-
Timelapse: Extract database tables to data frames and update/overwrite database table columns from R.
camRa tries to mainly use functions that can be chained together or used together in the same workflow. For example, the following workflow uses a combination of camRa functions to pre-filter images before someone begins tagging them using Timelapse.
- Expanded manipulation of JSON data. Ex: merging JSON files, removing SpeciesNet information to have only MegaDetector data in the file, validating that JSON files are COCO compliant/have MegaDetector or SpeciesNet data.
- Automated SpeciesNet taxonomy support (coinciding with recent related functionality in Timelapse).
- More image manipulation functions Ex: sectional image matching as an alternative to OCR text extraction, ability to a censor sections of images you want to exclude from other image functions but cannot be cropped (like camera company logos), checking if bounding boxes intersect (to remove erroneous bboxes), easy hash comparisons for images.
- More functions related to Timelapse (image processing program) database and template files.
- Convenient implementations of common but annoying data processing tasks (TBD, make some suggestions!).
- More vignettes!
camRa is not currently in CRAN, but a development version can be installed from Github using one of the options below:
#Depricated, use for older R versions
devtools::install_github("oxyppgyn/camRa")#Most up-to-date method
pak::pak("oxyppgyn/camRa")Don’t forget to import after!
library(camRa)I’m always looking for more things to add to the package. If you have an idea that fits the scope of the package (i.e., is similar to other things already included related to camera trap data) please open an issue on Github using the “Feature Request” tag.
