Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TinyFaceDetector

Hierarchy

  • TinyYolov2
    • TinyFaceDetector

Index

Constructors

constructor

  • Returns TinyFaceDetector

Properties

Protected _name

_name: string

Protected _paramMappings

_paramMappings: ParamMapping[]

Protected _params

_params: TinyYolov2NetParams | undefined

boxEncodingSize

boxEncodingSize: number

config

config: TinyYolov2Config

isLoaded

isLoaded: boolean

paramMappings

paramMappings: ParamMapping[]

params

params: TinyYolov2NetParams | undefined

withClassScores

withClassScores: boolean

Static DEFAULT_FILTER_SIZES

DEFAULT_FILTER_SIZES: number[]

Accessors

anchors

  • get anchors(): Point[]
  • Returns Point[]

Methods

detect

  • Parameters

    Returns Promise<ObjectDetection[]>

dispose

  • dispose(throwOnRedispose?: undefined | false | true): void
  • Parameters

    • Optional throwOnRedispose: undefined | false | true

    Returns void

Protected extractBoxes

  • extractBoxes(outputTensor: tf.Tensor4D, inputBlobDimensions: Dimensions, scoreThreshold?: undefined | number): Promise<object[]>
  • Parameters

    • outputTensor: tf.Tensor4D
    • inputBlobDimensions: Dimensions
    • Optional scoreThreshold: undefined | number

    Returns Promise<object[]>

Protected extractParams

  • extractParams(weights: Float32Array): object
  • Parameters

    • weights: Float32Array

    Returns object

Protected extractParamsFromWeigthMap

  • extractParamsFromWeigthMap(weightMap: tf.NamedTensorMap): object
  • Parameters

    • weightMap: tf.NamedTensorMap

    Returns object

extractWeights

  • extractWeights(weights: Float32Array): void
  • Parameters

    • weights: Float32Array

    Returns void

forward

  • forward(input: TNetInput, inputSize: number): Promise<tf.Tensor4D>
  • Parameters

    Returns Promise<tf.Tensor4D>

forwardInput

  • forwardInput(input: NetInput, inputSize: number): tf.Tensor4D
  • Parameters

    • input: NetInput
    • inputSize: number

    Returns tf.Tensor4D

freeze

  • freeze(): void
  • Returns void

Protected getDefaultModelName

  • getDefaultModelName(): string
  • Returns string

getFrozenParams

  • getFrozenParams(): object[]
  • Returns object[]

getParamFromPath

  • getParamFromPath(paramPath: string): tf.Tensor
  • Parameters

    • paramPath: string

    Returns tf.Tensor

getParamList

  • getParamList(): object[]
  • Returns object[]

getTrainableParams

  • getTrainableParams(): object[]
  • Returns object[]

load

  • load(weightsOrUrl: Float32Array | string | undefined): Promise<void>
  • Parameters

    • weightsOrUrl: Float32Array | string | undefined

    Returns Promise<void>

loadFromDisk

  • loadFromDisk(filePath: string | undefined): Promise<void>
  • Parameters

    • filePath: string | undefined

    Returns Promise<void>

loadFromUri

  • loadFromUri(uri: string | undefined): Promise<void>
  • Parameters

    • uri: string | undefined

    Returns Promise<void>

loadFromWeightMap

  • loadFromWeightMap(weightMap: tf.NamedTensorMap): void
  • Parameters

    • weightMap: tf.NamedTensorMap

    Returns void

locateFaces

  • locateFaces(input: TNetInput, forwardParams: TfjsImageRecognitionBase.ITinyYolov2Options): Promise<FaceDetection[]>
  • Parameters

    • input: TNetInput
    • forwardParams: TfjsImageRecognitionBase.ITinyYolov2Options

    Returns Promise<FaceDetection[]>

reassignParamFromPath

  • reassignParamFromPath(paramPath: string, tensor: tf.Tensor): void
  • Parameters

    • paramPath: string
    • tensor: tf.Tensor

    Returns void

runMobilenet

  • runMobilenet(x: tf.Tensor4D, params: MobilenetParams): tf.Tensor4D
  • Parameters

    • x: tf.Tensor4D
    • params: MobilenetParams

    Returns tf.Tensor4D

runTinyYolov2

  • runTinyYolov2(x: tf.Tensor4D, params: DefaultTinyYolov2NetParams): tf.Tensor4D
  • Parameters

    • x: tf.Tensor4D
    • params: DefaultTinyYolov2NetParams

    Returns tf.Tensor4D

serializeParams

  • serializeParams(): Float32Array
  • Returns Float32Array

variable

  • variable(): void
  • Returns void

Generated using TypeDoc