Version: | 0.1.2 |
Title: | Tool for Annotating Images in Preparation for Analysis |
Description: | A tool to help create shiny apps for selecting and annotating elements of images. Users must supply images, questions, and answer choices. The user interface is a dynamic shiny app, that displays the images and questions and answer choices. The data generated can be saved to a file that can be used for subsequent analysis. The original purpose was to annotate still images from tennis video for face recognition and emotion detection purposes. |
Depends: | R (≥ 3.2.0) |
Imports: | shiny, utils |
Suggests: | testthat, knitr, rmarkdown, tidyverse, ggplot2, purrr, shinydashboard |
URL: | https://github.com/srkobakian/taipan |
BugReports: | https://github.com/srkobakian/taipan/issues |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
ByteCompile: | true |
RoxygenNote: | 6.1.0 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2018-09-27 02:17:07 UTC; steff |
Author: | Stephanie Kobakian [aut, cre], Mitchell O'Hara-Wild [aut] |
Maintainer: | Stephanie Kobakian <stephanie.kobakian@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2018-09-27 04:50:03 UTC |
Build a taipan application
Description
This function produces all necessary files for a shiny app. It requires a list of questions to ask users, the location of the images to display and the directory for the folder of shiny app files. Changes can be made to the appearance by altering the css in the folder.
Usage
buildTaipan(questions, images, appdir, launch = TRUE,
overwrite = FALSE, skip_check = FALSE, ext_restricted = TRUE)
Arguments
questions |
a |
images |
a vector of image locations, can be local or URLs |
appdir |
location to export the completed app |
launch |
launch the app from the new directory after build is completed |
overwrite |
replace the contents of the supplied location with the completed app |
skip_check |
if TRUE, the requirement for user input to overwrite an existing app is removed |
ext_restricted |
if TRUE only JPEG (JPG), PNG, GIF, SVG are acceptable image formats, all other types will be removed |
Examples
## Not run:
library(taipan)
library(shiny)
questions <- taipanQuestions(
scene = div(radioButtons("graphic", label = "2D Graphic",
choices = list("Live image", "2D Graphic")),
radioButtons("bg", label = "Background",
choices = list("Crowd",
"Court", "Logo wall", "Not applicable")),
radioButtons("person", label = "Detectable Person",
choices = list("Yes", "No")),
radioButtons("shotangle", label = "Shot angle",
choices = list("Level with players",
"Birds eye",
"Upward angle")),
radioButtons("situation", label = "Situation",
choices = list("Court in play",
"Court player close-up",
"Court close-up not player",
"Crowd",
"Off court close up of player",
"Transition"))),
selection = div(radioButtons("detect", label = "Detect Face",
choices = list("Player" ,
"Other staff on court", "Fan", "None")),
radioButtons("obscured", label = "Face obscured",
choices = list("Yes", "No")),
radioButtons("lighting", label = "Lighting",
choices = list("Direct sunlight", "Shaded", "Partially shaded")),
radioButtons("headangle", label = "Head angle",
choices = list("Front on", "Back of head",
"Profile", "Other")),
radioButtons("glasses", label = "Glasses",
choices = list("Yes", "No")),
radioButtons("visorhat", label = "Visor/hat",
choices = list("Yes", "No")))
)
images =
c("https://raw.githubusercontent.com/srkob1/taipan/master/sample_images/blue_player.png",
"https://raw.githubusercontent.com/srkob1/taipan/master/sample_images/pink_player.png",
"https://raw.githubusercontent.com/srkob1/taipan/master/sample_images/red_player.png",
"https://raw.githubusercontent.com/srkob1/taipan/master/sample_images/yellow_player.png",
"https://raw.githubusercontent.com/srkob1/taipan/master/sample_images/disgruntled_player.png")
buildTaipan(
questions = questions,
images = images,
appdir = file.path(tempdir(), "taipan")
)
## End(Not run)
Prepare a set of questions for taipan
Description
Produces a set of scene and selection questions suitable for use in
buildTaipan
Usage
taipanQuestions(scene, selection)
Arguments
scene |
a shiny UI object containing shiny inputs and web elements. These questions relate to the entire image. |
selection |
a shiny UI object containing shiny inputs and web elements. These questions relate to each selected area of an image. There is no limit on how many times these questions will be asked. |
Examples
## Not run:
questions <- taipanQuestions(
scene = div(radioButtons("graphic", label = "2D Graphic",
choices = list("Live image", "2D Graphic")),
radioButtons("bg", label = "Background",
choices = list("Crowd",
"Court", "Logo wall", "Not applicable")),
radioButtons("person", label = "Detectable Person",
choices = list("Yes", "No")),
radioButtons("shotangle", label = "Shot angle",
choices = list("Level with players",
"Birds eye",
"Upward angle")),
radioButtons("situation", label = "Situation",
choices = list("Court in play",
"Court player close-up",
"Court close-up not player",
"Crowd",
"Off court close up of player",
"Transition"))),
selection = div(radioButtons("detect", label = "Detect Face",
choices = list("Player" ,
"Other staff on court", "Fan", "None")),
radioButtons("obscured", label = "Face obscured",
choices = list("Yes", "No")),
radioButtons("lighting", label = "Lighting",
choices = list("Direct sunlight", "Shaded", "Partially shaded")),
radioButtons("headangle", label = "Head angle",
choices = list("Front on", "Back of head",
"Profile", "Other")),
radioButtons("glasses", label = "Glasses",
choices = list("Yes", "No")),
radioButtons("visorhat", label = "Visor/hat",
choices = list("Yes", "No")))
)
## End(Not run)