fix(src): typo

pull/356/head
libowen.eric 2021-12-28 17:34:24 +08:00 committed by Vladimir Mandic
parent 9bc8832166
commit da48dcb449
5 changed files with 7 additions and 7 deletions

View File

@ -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,

View File

@ -216,7 +216,7 @@ export async function predict(input: Tensor, config: Config): Promise<HandResult
}
}
}
for (let i = 0; i < cache.hands.length; i++) { // replace deteced boxes with calculated boxes in final output
for (let i = 0; i < cache.hands.length; i++) { // replace detected boxes with calculated boxes in final output
const bbox = box.calc(cache.hands[i].keypoints, outputSize);
cache.hands[i].box = bbox.box;
cache.hands[i].boxRaw = bbox.boxRaw;

View File

@ -41,7 +41,7 @@ export function join(faces: Array<FaceResult>, bodies: Array<BodyResult>, 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]

View File

@ -44,7 +44,7 @@ export function validate(defaults: Partial<Config>, config: Partial<Config>, 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) => {

View File

@ -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';