Skip to content

Commit 21085a3

Browse files
explicitly export from index files
1 parent 3ed6b10 commit 21085a3

File tree

5 files changed

+31
-25
lines changed

5 files changed

+31
-25
lines changed

src/globalApi/DetectFacesTasks.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@ import { DetectAllFaceLandmarksTask, DetectSingleFaceLandmarksTask } from './Det
1010
import { nets } from './nets';
1111
import { FaceDetectionOptions } from './types';
1212

13-
export function detectSingleFace(
14-
input: TNetInput,
15-
options: FaceDetectionOptions = new SsdMobilenetv1Options()
16-
): DetectSingleFaceTask {
17-
return new DetectSingleFaceTask(input, options)
18-
}
19-
20-
export function detectAllFaces(
21-
input: TNetInput,
22-
options: FaceDetectionOptions = new SsdMobilenetv1Options()
23-
): DetectAllFacesTask {
24-
return new DetectAllFacesTask(input, options)
25-
}
26-
2713
export class DetectFacesTaskBase<TReturn> extends ComposableTask<TReturn> {
2814
constructor(
2915
protected input: TNetInput,

src/globalApi/allFaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ITinyYolov2Options, TinyYolov2Options } from 'tfjs-tiny-yolov2';
44
import { FullFaceDescription } from '../classes';
55
import { IMtcnnOptions, MtcnnOptions } from '../mtcnn/MtcnnOptions';
66
import { SsdMobilenetv1Options } from '../ssdMobilenetv1';
7-
import { detectAllFaces } from './DetectFacesTasks';
7+
import { detectAllFaces } from './detectFaces';
88

99
// export allFaces API for backward compatibility
1010

src/globalApi/detectFaces.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { TNetInput } from 'tfjs-image-recognition-base';
2+
3+
import { SsdMobilenetv1Options } from '../ssdMobilenetv1/SsdMobilenetv1Options';
4+
import { DetectAllFacesTask, DetectSingleFaceTask } from './DetectFacesTasks';
5+
import { FaceDetectionOptions } from './types';
6+
7+
export function detectSingleFace(
8+
input: TNetInput,
9+
options: FaceDetectionOptions = new SsdMobilenetv1Options()
10+
): DetectSingleFaceTask {
11+
return new DetectSingleFaceTask(input, options)
12+
}
13+
14+
export function detectAllFaces(
15+
input: TNetInput,
16+
options: FaceDetectionOptions = new SsdMobilenetv1Options()
17+
): DetectAllFacesTask {
18+
return new DetectAllFacesTask(input, options)
19+
}

src/globalApi/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export * from './allFaces'
22
export * from './ComposableTask'
33
export * from './ComputeFaceDescriptorsTasks'
4+
export * from './detectFaces'
45
export * from './DetectFacesTasks'
56
export * from './DetectFaceLandmarksTasks'
67
export * from './FaceMatcher'

src/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ export {
66

77
export * from 'tfjs-image-recognition-base';
88

9-
export * from './classes';
9+
export * from './classes/index';
10+
export * from './dom/index'
11+
export * from './faceLandmarkNet/index';
12+
export * from './faceRecognitionNet/index';
13+
export * from './globalApi/index';
14+
export * from './mtcnn/index';
15+
export * from './ssdMobilenetv1/index';
16+
export * from './tinyFaceDetector/index';
17+
export * from './tinyYolov2/index';
1018

11-
export * from './dom'
12-
export * from './euclideanDistance';
13-
export * from './faceLandmarkNet';
14-
export * from './faceRecognitionNet';
15-
export * from './globalApi';
16-
export * from './mtcnn';
17-
export * from './ssdMobilenetv1';
18-
export * from './tinyFaceDetector';
19-
export * from './tinyYolov2';
19+
export * from './euclideanDistance';

0 commit comments

Comments
 (0)