retinanetjs
Version:
Wrapper for models built using keras-retinanet.
30 lines (29 loc) • 1.04 kB
TypeScript
import * as tf from '@tensorflow/tfjs';
/**
* This duplicates the behavior of `keras_retinanet.utils.anchors.AnchorParameters`
*/
export interface AnchorParameters {
ratios: number[];
sizes: number[];
strides: number[];
scales: number[];
}
/**
* This duplicates the behavior of `keras_retinanet.utils.anchors.AnchorParameters.default`
*/
export declare const defaultAnchorParameters: AnchorParameters;
/**
* This duplicates the behavior of `keras_retinanet.utils.anchors.shift`
* @hidden
*/
export declare function shift(shape: number[], stride: number, anchors: tf.Tensor2D): tf.Tensor2D;
/**
* This duplicates the behavior of `keras_retinanet.utils.anchors.generate_anchors`
* @hidden
*/
export declare function generateAnchors(baseSize: number, anchorParams?: AnchorParameters): tf.Tensor2D;
/**
* This duplicates the behavior of `keras_retinanet.utils.anchors.anchors_for_shape`
* @hidden
*/
export declare function anchorsForShape(inputShape: number[], anchorParams?: AnchorParameters): tf.Tensor<tf.Rank.R2>;