2020-12-23 18:58:47 +01:00
|
|
|
import * as tf from '../../dist/tfjs.esm';
|
2020-12-23 17:26:55 +01:00
|
|
|
import { Dimensions } from '../classes/Dimensions';
|
|
|
|
import { ObjectDetection } from '../classes/ObjectDetection';
|
|
|
|
import { NetInput } from '../dom/NetInput';
|
|
|
|
import { TNetInput } from '../dom/types';
|
|
|
|
import { NeuralNetwork } from '../NeuralNetwork';
|
|
|
|
import { TinyYolov2Config } from './config';
|
|
|
|
import { ITinyYolov2Options } from './TinyYolov2Options';
|
|
|
|
import { DefaultTinyYolov2NetParams, MobilenetParams, TinyYolov2NetParams } from './types';
|
|
|
|
export declare class TinyYolov2Base extends NeuralNetwork<TinyYolov2NetParams> {
|
|
|
|
static DEFAULT_FILTER_SIZES: number[];
|
|
|
|
private _config;
|
|
|
|
constructor(config: TinyYolov2Config);
|
|
|
|
get config(): TinyYolov2Config;
|
|
|
|
get withClassScores(): boolean;
|
|
|
|
get boxEncodingSize(): number;
|
|
|
|
runTinyYolov2(x: tf.Tensor4D, params: DefaultTinyYolov2NetParams): tf.Tensor4D;
|
|
|
|
runMobilenet(x: tf.Tensor4D, params: MobilenetParams): tf.Tensor4D;
|
|
|
|
forwardInput(input: NetInput, inputSize: number): tf.Tensor4D;
|
|
|
|
forward(input: TNetInput, inputSize: number): Promise<tf.Tensor4D>;
|
|
|
|
detect(input: TNetInput, forwardParams?: ITinyYolov2Options): Promise<ObjectDetection[]>;
|
|
|
|
protected getDefaultModelName(): string;
|
|
|
|
protected extractParamsFromWeigthMap(weightMap: tf.NamedTensorMap): {
|
|
|
|
params: TinyYolov2NetParams;
|
2020-12-23 18:58:47 +01:00
|
|
|
paramMappings: import("../common/types").ParamMapping[];
|
2020-12-23 17:26:55 +01:00
|
|
|
};
|
|
|
|
protected extractParams(weights: Float32Array): {
|
|
|
|
params: TinyYolov2NetParams;
|
2020-12-23 18:58:47 +01:00
|
|
|
paramMappings: import("../common/types").ParamMapping[];
|
2020-12-23 17:26:55 +01:00
|
|
|
};
|
|
|
|
protected extractBoxes(outputTensor: tf.Tensor4D, inputBlobDimensions: Dimensions, scoreThreshold?: number): Promise<any>;
|
|
|
|
private extractPredictedClass;
|
|
|
|
}
|