From da48dcb449aeeffe9599f419a004f8b4aad6f45b Mon Sep 17 00:00:00 2001 From: "libowen.eric" Date: Tue, 28 Dec 2021 17:34:24 +0800 Subject: [PATCH] fix(src): typo --- src/config.ts | 6 +++--- src/hand/handtrack.ts | 2 +- src/util/persons.ts | 2 +- src/util/util.ts | 2 +- src/warmup.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config.ts b/src/config.ts index a78460af..435bc715 100644 --- a/src/config.ts +++ b/src/config.ts @@ -9,11 +9,11 @@ export interface GenericConfig { modelPath: string, /** how many max frames to go without re-running model if cached results are acceptable */ skipFrames: number, - /** how many max miliseconds to go without re-running model if cached results are acceptable */ + /** how many max milliseconds to go without re-running model if cached results are acceptable */ skipTime: number, } -/** Dectector part of face configuration */ +/** Detector part of face configuration */ export interface FaceDetectorConfig extends GenericConfig { /** is face rotation correction performed after detecting face? */ rotation: boolean, @@ -68,7 +68,7 @@ export interface FaceConfig extends GenericConfig { /** Configures all body detection specific options */ export interface BodyConfig extends GenericConfig { - /** maximum numboer of detected bodies */ + /** maximum number of detected bodies */ maxDetected: number, /** minimum confidence for a detected body before results are discarded */ minConfidence: number, diff --git a/src/hand/handtrack.ts b/src/hand/handtrack.ts index 0b7d01ea..2b4e6dff 100644 --- a/src/hand/handtrack.ts +++ b/src/hand/handtrack.ts @@ -216,7 +216,7 @@ export async function predict(input: Tensor, config: Config): Promise, bodies: Array, hands: else if (gesture['hand'] !== undefined && gesture['hand'] === person.hands?.right?.id) person.gestures?.push(gesture); } - // create new overarching box from all boxes beloning to person + // create new overarching box from all boxes belonging to person const x: number[] = []; const y: number[] = []; const extractXY = (box: Box | undefined) => { // extract all [x, y] coordinates from boxes [x, y, width, height] diff --git a/src/util/util.ts b/src/util/util.ts index 2febb95e..f9fd2bf0 100644 --- a/src/util/util.ts +++ b/src/util/util.ts @@ -44,7 +44,7 @@ export function validate(defaults: Partial, config: Partial, par return msgs; } -// helper function: perform deep merge of multiple objects so it allows full inheriance with overrides +// helper function: perform deep merge of multiple objects so it allows full inheritance with overrides export function mergeDeep(...objects) { const isObject = (obj) => obj && typeof obj === 'object'; return objects.reduce((prev, obj) => { diff --git a/src/warmup.ts b/src/warmup.ts index f0574124..31da0e59 100644 --- a/src/warmup.ts +++ b/src/warmup.ts @@ -1,5 +1,5 @@ /** - * Warmup algorithm that uses embedded images to excercise loaded models for faster future inference + * Warmup algorithm that uses embedded images to exercise loaded models for faster future inference */ import { log, now, mergeDeep } from './util/util';