Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FaceLandmarkNet

Hierarchy

Index

Constructors

constructor

Properties

Protected _faceFeatureExtractor

Protected _name

_name: string

Protected _paramMappings

_paramMappings: ParamMapping[]

Protected _params

_params: NetParams | undefined

isLoaded

isLoaded: boolean

paramMappings

paramMappings: ParamMapping[]

params

params: NetParams | undefined

Accessors

faceFeatureExtractor

Methods

detectLandmarks

  • Parameters

    Returns Promise<FaceLandmarks68 | FaceLandmarks68[]>

dispose

  • dispose(throwOnRedispose?: boolean): void
  • Parameters

    • Default value throwOnRedispose: boolean = true

    Returns void

extractClassifierParams

  • extractClassifierParams(weights: Float32Array): 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): Promise<tf.Tensor2D>
  • Parameters

    Returns Promise<tf.Tensor2D>

forwardInput

  • forwardInput(input: NetInput): tf.Tensor2D
  • Parameters

    • input: NetInput

    Returns tf.Tensor2D

freeze

  • freeze(): void
  • Returns void

Protected getClassifierChannelsIn

  • getClassifierChannelsIn(): number

Protected getClassifierChannelsOut

  • getClassifierChannelsOut(): number
  • Returns number

Protected getDefaultModelName

  • getDefaultModelName(): 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>

loadClassifierParams

  • loadClassifierParams(weights: Float32Array): 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

postProcess

  • postProcess(output: tf.Tensor2D, inputSize: number, originalDimensions: IDimensions[]): tf.Tensor2D
  • Parameters

    • output: tf.Tensor2D
    • inputSize: number
    • originalDimensions: IDimensions[]

    Returns tf.Tensor2D

reassignParamFromPath

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

    • paramPath: string
    • tensor: tf.Tensor

    Returns void

runNet

  • runNet(input: NetInput | tf.Tensor4D): tf.Tensor2D
  • Parameters

    • input: NetInput | tf.Tensor4D

    Returns tf.Tensor2D

serializeParams

  • serializeParams(): Float32Array
  • Returns Float32Array

variable

  • variable(): void
  • Returns void

Generated using TypeDoc