server-json/node_modules/face-api.js/build/es6/mtcnn/pyramidDown.js
2024-11-01 08:00:42 +00:00

15 lines
No EOL
489 B
JavaScript

import { CELL_SIZE } from './config';
export function pyramidDown(minFaceSize, scaleFactor, dims) {
var height = dims[0], width = dims[1];
var m = CELL_SIZE / minFaceSize;
var scales = [];
var minLayer = Math.min(height, width) * m;
var exp = 0;
while (minLayer >= 12) {
scales.push(m * Math.pow(scaleFactor, exp));
minLayer = minLayer * scaleFactor;
exp += 1;
}
return scales;
}
//# sourceMappingURL=pyramidDown.js.map