Skip to content

Commit fd42e09

Browse files
only keep quantized models in this repo + renamed face_detection_model to ssd_mobilenetv1_model
1 parent b09fbe4 commit fd42e09

18 files changed

+12
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
.rpt2_cache
33
.env*
4-
tmp
4+
tmp
5+
weights_uncompressed

karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const dataFiles = [
33
'test/images/*.png',
44
'test/data/*.json',
55
'test/media/*.mp4',
6-
'weights/**/*'
6+
'weights/**/*',
7+
'weights_uncompressed/**/*'
78
].map(pattern => ({
89
pattern,
910
watched: false,

src/faceDetectionNet/loadQuantizedParams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { loadWeightMap } from '../commons/loadWeightMap';
77
import { ConvParams, ParamMapping } from '../commons/types';
88
import { BoxPredictionParams, MobileNetV1, NetParams, PointwiseConvParams, PredictionLayerParams } from './types';
99

10-
const DEFAULT_MODEL_NAME = 'face_detection_model'
10+
const DEFAULT_MODEL_NAME = 'ssd_mobilenetv1_model'
1111

1212
function extractorsFactory(weightMap: any, paramMappings: ParamMapping[]) {
1313

test/tests/e2e/expectedResults.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as faceapi from '../../../src';
2-
import { FaceLandmarks5 } from '../../../src/mtcnn/FaceLandmarks5';
32
import { Point } from '../../../src/Point';
43
import { expectMaxDelta, expectPointClose, expectRectClose } from '../../utils';
54

test/tests/e2e/faceDetectionNet.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('faceDetectionNet', () => {
7979

8080
it('disposes all param tensors', async () => {
8181
await expectAllTensorsReleased(async () => {
82-
const res = await fetch('base/weights/uncompressed/face_detection_model.weights')
82+
const res = await fetch('base/weights_uncompressed/ssd_mobilenetv1_model.weights')
8383
const weights = new Float32Array(await res.arrayBuffer())
8484
const net = faceapi.createFaceDetectionNet(weights)
8585
net.dispose()

test/tests/e2e/faceLandmarkNet.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ describe('faceLandmarkNet', () => {
211211

212212
it('disposes all param tensors', async () => {
213213
await expectAllTensorsReleased(async () => {
214-
const res = await fetch('base/weights/uncompressed/face_landmark_68_model.weights')
214+
const res = await fetch('base/weights_uncompressed/face_landmark_68_model.weights')
215215
const weights = new Float32Array(await res.arrayBuffer())
216216
const net = faceapi.createFaceLandmarkNet(weights)
217217
net.dispose()

test/tests/e2e/faceRecognitionNet.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describe('faceRecognitionNet', () => {
139139

140140
it('disposes all param tensors', async () => {
141141
await expectAllTensorsReleased(async () => {
142-
const res = await fetch('base/weights/uncompressed/face_recognition_model.weights')
142+
const res = await fetch('base/weights_uncompressed/face_recognition_model.weights')
143143
const weights = new Float32Array(await res.arrayBuffer())
144144
const net = faceapi.createFaceRecognitionNet(weights)
145145
net.dispose()

test/tests/e2e/mtcnn.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('mtcnn', () => {
6767

6868
it('disposes all param tensors', async () => {
6969
await expectAllTensorsReleased(async () => {
70-
const res = await fetch('base/weights/uncompressed/mtcnn_model.weights')
70+
const res = await fetch('base/weights_uncompressed/mtcnn_model.weights')
7171
const weights = new Float32Array(await res.arrayBuffer())
7272
const net = faceapi.createMtcnn(weights)
7373
net.dispose()

test/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async function initNet<TNet extends NeuralNetwork<any>>(
8383
) {
8484
await net.load(
8585
uncompressedFilename
86-
? await loadNetWeights(`base/weights/uncompressed/${uncompressedFilename}`)
86+
? await loadNetWeights(`base/weights_uncompressed/${uncompressedFilename}`)
8787
: 'base/weights'
8888
)
8989
}
@@ -115,7 +115,7 @@ export function describeWithNets(
115115
if (withFaceDetectionNet || withAllFaces) {
116116
await initNet<faceapi.FaceDetectionNet>(
117117
faceDetectionNet,
118-
!!withFaceDetectionNet && !withFaceDetectionNet.quantized && 'face_detection_model.weights'
118+
!!withFaceDetectionNet && !withFaceDetectionNet.quantized && 'ssd_mobilenetv1_model.weights'
119119
)
120120
}
121121
if (withFaceLandmarkNet || withAllFaces) {

weights/face_detection_model-weights_manifest.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

weights/ssd_mobilenetv1_model-weights_manifest.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
-21.2 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1.89 MB
Binary file not shown.
-60.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)