Class ExpressionResult#

Class Documentation#

class ExpressionResult#

Parses a “<name>.expression.json” file written by analysis/run_expression.py into a queryable in-memory structure, for the Analysis tab’s Facial Expression plugin (bbox+label overlay during playback and a per-blendshape score-over-time plot). Mirrors PoseAnalysisResult (src/analysis/pose_analysis_result.hpp) closely — same load()/is_valid()/nearest_frame() shape.

Usage:

auto result = ExpressionResult::load(jsonPath);
if (result.is_valid()) { ... }

Public Functions

ExpressionResult() = default#
inline bool is_valid() const#
inline const QString &source_video() const#
inline const QString &backend() const#
inline const QStringList &blendshape_names() const#
inline const QVector<ExpressionFrame> &frames() const#
inline const QStringList &au_names() const#

Action Unit names (py-feat backend only) — empty for the heuristic/ FER+ backends and for older files with no “au_names” field at all.

inline bool has_action_units() const#
inline bool has_any_detections() const#

True if at least one frame has at least one detected face. Distinct from is_valid() (which only means “the JSON parsed”): a result can be valid but empty if no face was detected in this camera’s footage for the whole session — mirrors PoseAnalysisResult::has_any_detections().

const ExpressionFrame *nearest_frame(int frameIndexEstimate) const#

Nearest-frame lookup by frame_index estimate, identical body to PoseAnalysisResult::nearest_frame() — frames() is stored in the ascending frame_index order run_expression.py writes them in, so this is a binary search, not a linear scan. Returns nullptr if there are no frames.

Public Static Functions

static ExpressionResult load(const QString &jsonPath)#

Parses jsonPath. Returns a default-constructed (is_valid() == false) result if the file is missing or malformed.