Coder Social home page Coder Social logo

cameratrapdetector's People

Contributors

burnsal avatar mikeyecology avatar rsmiller74 avatar tabakm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cameratrapdetector's Issues

species accuracy

First, I love the R interface. Very helpful and I think this has great potential! I wanted to provide feedback on accuracy. It's my understand more training data will be used in the future, but for now, I'm have issues with accuracy. I'm not expecting a fix here, just providing a baseline for the future.

For test data, I'm using 50 camera trap images manually assigned as coyote (Canis latrans), 50 images manually assigned as domestic cat (Felis catus), and 50 assigned as striped skunk (Mephitis mephitis). Each species was analyzed separately. Code for the coyote test provided, only thing that changed between tests was the folder of photos.

Accuracy:
Skunk: 20%
Coyote 4%
Cat: 0%

Coyote Code and Results:

library(CameraTrapDetectoR)
library(tidyverse)

#### COYOTE #####
predictions <-
    deploy_model(
        data_dir = "Cuddeback Coyotes",
        model_type = 'species',
        recursive = FALSE,
        file_extensions = c('.jpg', '.JPG'),
        labeled = FALSE,
        make_plots = TRUE,
        plot_label = TRUE,
        output_dir = NULL,
        sample50 = T,
        write_bbox_csv = FALSE,
        score_threshold = 0.6,
        h = 307,
        w = 408,
        lty = 1,
        lwd = 2,
        col = 'red'
    )

predictions_long <- predictions %>% select(-filename) %>%
pivot_longer(
  cols = 1:77, # columns that should pivot from wide to long (unquoted)
  names_to = "species", # name of the new category column as a quoted string
  values_to = "count" # name of the new value column as a quoted string
)

predictions_long %>% group_by(species) %>% summarize(count = sum(count)) %>% arrange(desc(count))

image

Cat Results:

image

Skunk Results:

image

error downloading data from shiny app

> runShiny("deploy")
Loading required package: shiny

Listening on http://127.0.0.1:3486
trying URL 'https://www.dropbox.com/s/r1pazpf8db2o003/fasterrcnn_5classes.pt?raw=1'
Warning in utils::download.file(url, path, mode = "wb") :
  cannot open URL 'https://www.dropbox.com/s/r1pazpf8db2o003/fasterrcnn_5classes.pt?raw=1': HTTP status was '404 Not Found'
Warning: Error in utils::download.file: cannot open URL 'https://www.dropbox.com/s/r1pazpf8db2o003/fasterrcnn_5classes.pt?raw=1'
  2: shiny::runApp
  1: runShiny

Got the package installed and running (didn't work until I upgraded from R v 3.6 to v4), got the shiny app to run, then hit this snag. Typo perhaps?

Installation error

Hello, I'm running into an error when trying to install the package:

devtools::install_github("https://github.com/TabakM/CameraTrapDetectoR.git")

I get the following:

Downloading GitHub repo TabakM/CameraTrapDetectoR@HEAD
Running R CMD build...

  • checking for file ‘/private/var/folders/xv/cvcp0zgj2y36w7dnft857yg80000gn/T/Rtmp24RclB/remotes1ae46b3d3866/TabakM-CameraTrapDetectoR-5ba4769/DESCRIPTION’ ... OK
  • preparing ‘CameraTrapDetectoR’:
  • checking DESCRIPTION meta-information ... OK
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building ‘CameraTrapDetectoR_0.1.0.tar.gz’
  • installing source package ‘CameraTrapDetectoR’ ...
    ** using staged installation
    ** R
    Error in parse(outFile) :
    /private/var/folders/xv/cvcp0zgj2y36w7dnft857yg80000gn/T/RtmpF4CIz5/R.INSTALL2db2760f4fb6/CameraTrapDetectoR/R/deploy_model.R:507:1: unexpected '}'
    506: }
    507: }
    ^
    ERROR: unable to collate and parse R files for package ‘CameraTrapDetectoR’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/CameraTrapDetectoR’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/xv/cvcp0zgj2y36w7dnft857yg80000gn/T//Rtmp24RclB/file1ae441e78b/CameraTrapDetectoR_0.1.0.tar.gz’ had non-zero exit status`

Session info:

R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.4

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] nlme_3.1-157 fs_1.5.2 usethis_2.1.6 lubridate_1.8.0
[5] devtools_2.4.3 rprojroot_2.0.3 tools_4.2.0 utf8_1.2.2
[9] R6_2.5.1 rpart_4.1.16 DBI_1.1.2 colorspace_2.0-3
[13] nnet_7.3-17 withr_2.5.0 tidyselect_1.1.2 gridExtra_2.3
[17] prettyunits_1.1.1 processx_3.7.0 curl_4.3.2 compiler_4.2.0
[21] cli_3.3.0 desc_1.4.1 scales_1.2.0 callr_3.7.0
[25] stringr_1.4.0 digest_0.6.29 rmarkdown_2.14 pkgconfig_2.0.3
[29] htmltools_0.5.2 parallelly_1.31.1 sessioninfo_1.2.2 fastmap_1.1.0
[33] rlang_1.0.3 rstudioapi_0.13 generics_0.1.2 dplyr_1.0.9
[37] ModelMetrics_1.2.2.2 magrittr_2.0.3 Matrix_1.4-1 Rcpp_1.0.9
[41] munsell_0.5.0 fansi_1.0.3 lifecycle_1.0.1 stringi_1.7.6
[45] pROC_1.18.0 yaml_2.3.5 MASS_7.3-56 brio_1.1.3
[49] pkgbuild_1.3.1 plyr_1.8.7 recipes_0.2.0 grid_4.2.0
[53] parallel_4.2.0 listenv_0.8.0 crayon_1.5.1 lattice_0.20-45
[57] splines_4.2.0 knitr_1.39 ps_1.7.1 pillar_1.7.0
[61] future.apply_1.9.0 reshape2_1.4.4 codetools_0.2-18 stats4_4.2.0
[65] pkgload_1.2.4 glue_1.6.2 evaluate_0.15 data.table_1.14.2
[69] remotes_2.4.2 vctrs_0.4.1 foreach_1.5.2 testthat_3.1.4
[73] gtable_0.3.0 purrr_0.3.4 future_1.25.0 assertthat_0.2.1
[77] cachem_1.0.6 ggplot2_3.3.6 xfun_0.31 gower_1.0.0
[81] prodlim_2019.11.13 vip_0.3.2 class_7.3-20 survival_3.3-1
[85] timeDate_3043.102 tibble_3.1.7 iterators_1.0.14 memoise_2.0.1
[89] hardhat_0.2.0 lava_1.6.10 globals_0.15.0 ellipsis_0.3.2
[93] caret_6.0-92 ipred_0.9-12

workflow

Hi

Great work on this, I just started testing and it seems it will save us a LOT of time. I was wondering if you're planning a function that would subset pictures, ie run the general model first, then subset mammals only for example, and then run the family/species model.

Error loading torchvision.dll

I am getting an error that the torchvision.dll can not be loaded (the file downloaded and is present in the Cache folder). Same error on two different machines. Visual C++ was installed. R version is 4.1.3, 64bit. Any suggestions?

Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/Mathias/AppData/Local/CameraTrapDetector/CameraTrapDetector/Cache/torchvision.dll': LoadLibrary failure: The specified procedure could not be found.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.