read_face_selection: Read faces chosen in the browser

View source: R/view_faces.R

read_face_selectionR Documentation

Read faces chosen in the browser

Description

Reads the file that Export selection in view_faces(select = TRUE) downloads, or the code in the line that Copy R code gives in a notebook, and returns the chosen faces.

Usage

read_face_selection(file, faces)

Arguments

file

Path of the exported selection-<task>.json file, its text (as copied from the page), or the "te-selection:..." code in the line that Copy R code gives in a notebook.

faces

The same data frame that was passed to view_faces, or the full detect_faces result it was taken from.

Value

The chosen rows of faces, which face_scores scores and face_selection in image_scores, image_scores_dir and video_scores accepts.

See Also

view_faces

Examples

## Not run: 
faces <- detect_faces(system.file("extdata", "two-people.jpg", package = "transforEmotion"))
view_faces(faces, select = TRUE)
chosen <- read_face_selection("~/Downloads/selection-faces-20261011-101500.json", faces)

## End(Not run)


transforEmotion documentation built on Oct. 26, 2026, 5:07 p.m.