auto_delin: Face++ Auto-Delineation

Description Usage Arguments Details Value Examples

View source: R/auto_delin.R

Description

Automatically delineate faces using Face++ (an external service). Since each delineation counts against a daily limit, you need to set up your own Face++ account (see details below).

Usage

1
auto_delin(stimuli, style = c("fpp106", "fpp83"), replace = FALSE, face = 1)

Arguments

stimuli

list of class stimlist

style

Which service and number of landmarks

replace

if FALSE, only gets templates for images with no template

face

which face to delineate if there is more than 1

Details

To use Face++ auto-delineation, you need to get your own free API key from https://faceplusplus.com. After signing up for an account, go to https://console.faceplusplus.com/app/apikey/list and request a free API key. Add the key and secret to your .Renviron file as follows:

FACEPLUSPLUS_KEY="1234567890abcdefghijk"

FACEPLUSPLUS_SECRET="1234567890abcdefghijk"

Value

stimlist with templates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  # requires an API key in .Renviron
  auto_high <- demo_stim()[1] %>%
    auto_delin(replace = TRUE) # replace existing templates

  auto_low <- demo_stim()[1] %>%
    auto_delin(style = "fpp83", replace = TRUE)

  c(auto_high, auto_low) %>% draw_tem() %>% plot()

## End(Not run)

facelab/webmorph documentation built on April 11, 2021, 6:34 a.m.