auto_delin: Auto-Delineation

View source: R/dlib_auto_delin.R

auto_delinR Documentation

Auto-Delineation

Description

Automatically delineate faces using dlib in python or Face++ (an external service). Wrapper function for webmorphR::auto_delin() and dlib_auto_delin().

Usage

auto_delin(
  stimuli,
  model = c("dlib7", "dlib70", "fpp106", "fpp83"),
  replace = FALSE,
  face = 1,
  model_path = NULL
)

Arguments

stimuli

list of class stimlist

model

Which shape predictor model to use (dlib7, dlib70, fpp106, fpp83)

replace

if FALSE, only gets templates for images with no template

face

which face to delineate in each image if there is more than 1 (only for Face++)

model_path

path to a custom dlib .dat landmark file to use (model is ignored if set)

Value

stimlist with templates

Examples

## Not run: 
# requires an API key in .Renviron
  auto_fpp106 <- demo_stim() |>
    auto_delin(model = "fpp106", replace = TRUE)

  # requires debruine/webmorphR.dlib
  auto_dlib7 <- demo_stim() |>
    auto_delin(replace = TRUE)

  auto_dlib70 <- demo_stim() |>
    auto_delin(model = "dlib70", replace = TRUE)

## End(Not run)

debruine/webmorphR.dlib documentation built on Sept. 26, 2022, 10:08 a.m.