Skip to contents

Automatically delineate faces using dlib shape predictor models.

Usage

dlib_auto_delin(
  stimuli,
  model = c("dlib7", "dlib70"),
  replace = FALSE,
  model_path = NULL
)

Arguments

stimuli

list of class stimlist

model

Which of the built-in models (dlib7, dlib70)

replace

if FALSE, only gets templates for images with no template

model_path

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

Value

stimlist with templates

Examples

if (FALSE) {
  auto_dlib7 <- demo_stim() |>
    dlib_auto_delin(replace = TRUE) # replace existing templates

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

  c(auto_dlib7, auto_dlib70) |>
    draw_tem() |>
    plot(nrow = 1)
}