Commit fd42e095 by vincent

only keep quantized models in this repo + renamed face_detection_model to ssd_mobilenetv1_model

parent b09fbe45
......@@ -2,3 +2,4 @@ node_modules
.rpt2_cache
.env*
tmp
weights_uncompressed
\ No newline at end of file
......@@ -3,7 +3,8 @@ const dataFiles = [
'test/images/*.png',
'test/data/*.json',
'test/media/*.mp4',
'weights/**/*'
'weights/**/*',
'weights_uncompressed/**/*'
].map(pattern => ({
pattern,
watched: false,
......
......@@ -7,7 +7,7 @@ import { loadWeightMap } from '../commons/loadWeightMap';
import { ConvParams, ParamMapping } from '../commons/types';
import { BoxPredictionParams, MobileNetV1, NetParams, PointwiseConvParams, PredictionLayerParams } from './types';
const DEFAULT_MODEL_NAME = 'face_detection_model'
const DEFAULT_MODEL_NAME = 'ssd_mobilenetv1_model'
function extractorsFactory(weightMap: any, paramMappings: ParamMapping[]) {
......
import * as faceapi from '../../../src';
import { FaceLandmarks5 } from '../../../src/mtcnn/FaceLandmarks5';
import { Point } from '../../../src/Point';
import { expectMaxDelta, expectPointClose, expectRectClose } from '../../utils';
......
......@@ -79,7 +79,7 @@ describe('faceDetectionNet', () => {
it('disposes all param tensors', async () => {
await expectAllTensorsReleased(async () => {
const res = await fetch('base/weights/uncompressed/face_detection_model.weights')
const res = await fetch('base/weights_uncompressed/ssd_mobilenetv1_model.weights')
const weights = new Float32Array(await res.arrayBuffer())
const net = faceapi.createFaceDetectionNet(weights)
net.dispose()
......
......@@ -211,7 +211,7 @@ describe('faceLandmarkNet', () => {
it('disposes all param tensors', async () => {
await expectAllTensorsReleased(async () => {
const res = await fetch('base/weights/uncompressed/face_landmark_68_model.weights')
const res = await fetch('base/weights_uncompressed/face_landmark_68_model.weights')
const weights = new Float32Array(await res.arrayBuffer())
const net = faceapi.createFaceLandmarkNet(weights)
net.dispose()
......
......@@ -139,7 +139,7 @@ describe('faceRecognitionNet', () => {
it('disposes all param tensors', async () => {
await expectAllTensorsReleased(async () => {
const res = await fetch('base/weights/uncompressed/face_recognition_model.weights')
const res = await fetch('base/weights_uncompressed/face_recognition_model.weights')
const weights = new Float32Array(await res.arrayBuffer())
const net = faceapi.createFaceRecognitionNet(weights)
net.dispose()
......
......@@ -67,7 +67,7 @@ describe('mtcnn', () => {
it('disposes all param tensors', async () => {
await expectAllTensorsReleased(async () => {
const res = await fetch('base/weights/uncompressed/mtcnn_model.weights')
const res = await fetch('base/weights_uncompressed/mtcnn_model.weights')
const weights = new Float32Array(await res.arrayBuffer())
const net = faceapi.createMtcnn(weights)
net.dispose()
......
......@@ -83,7 +83,7 @@ async function initNet<TNet extends NeuralNetwork<any>>(
) {
await net.load(
uncompressedFilename
? await loadNetWeights(`base/weights/uncompressed/${uncompressedFilename}`)
? await loadNetWeights(`base/weights_uncompressed/${uncompressedFilename}`)
: 'base/weights'
)
}
......@@ -115,7 +115,7 @@ export function describeWithNets(
if (withFaceDetectionNet || withAllFaces) {
await initNet<faceapi.FaceDetectionNet>(
faceDetectionNet,
!!withFaceDetectionNet && !withFaceDetectionNet.quantized && 'face_detection_model.weights'
!!withFaceDetectionNet && !withFaceDetectionNet.quantized && 'ssd_mobilenetv1_model.weights'
)
}
if (withFaceLandmarkNet || withAllFaces) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment