-
Notifications
You must be signed in to change notification settings - Fork 4
Installation
Run the following lines of code in your R console to install CameraTrapDetectoR:
if (!require('devtools')) install.packages('devtools')
devtools::install_github("CameraTrapDetectoR/CameraTrapDetectoR")
Agree to update all necessary packages.
Before your first time using the models, we recommend manually loading the ml-verse packages to insure all necessary software has been downloaded:
library(torch)
library(torchvision)
library(torchvisionlib)
Agree to additional software downloads in the pop-up messages.
If you could not install package from github, follow these instructions to install from source
This link holds the latest version of the package. DO NOT unzip this folder.
Copy this code and paste it into your console. It will install all necessary R packages
install_dependencies <-function(packages=c('dplyr', 'exiftoolr', 'fs', 'lubridate', 'magick',
'rappdirs', 'shiny', 'shinyBS', 'shinyFiles', 'shinyjs',
'stringr', 'torch', 'torchvision', 'torchvisionlib')) {
cat(paste0("checking package installation on this computer"))
libs<-unlist(list(packages))
req<-unlist(lapply(libs,require,character.only=TRUE))
need<-libs[req==FALSE]
if(length(need)>0){
cat(paste0("The packages: ", need, "\n Need to be installed. Installing them now.\n"))
utils::install.packages(need)
lapply(need,require,character.only=TRUE)
} else{
cat("All necessary packages are installed on this computer. Proceed.\n")
}
}
install_dependencies()
- In RStudio, Click on
Packages, then clickInstall(just below and to the left ofPackages) - In the install menu, click on the arrow by
Install From - Click on
Package Achive File - Click
Browseand navigate to the zip file that you just downloaded. - click
install
Please visit the model_training repo for detailed setup instructions to run CameraTrapDetectoR from the command line locally or on high performance computing (HPC) environment.
You need to be running R version 4.1 or higher for this package to work. If you are unsure of your R version, type R.Version() into the console. Update if necessary.
Currently, if 32-bit and 64-bit versions of R are installed, it seems devtools tries to build for both of them. This yields a loading failed for 'i386' error. To force building the package for your currently running R version use the INSTALL_opts argument of install_github:
devtools::install_github("CameraTrapDetectoR/CameraTrapDetectoR", INSTALL_opts=c("--no-multiarch"))
You can install Microsoft Visual C++ from here. It is free and allows the deep learning packages to work on Windows computers. It is installed like normal software, just follow the guidance in the prompts