@masumdev/rn-camera-ai-tflite 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +374 -2
- package/lib/commonjs/detector/TFLiteFaceRecognizer.js +690 -0
- package/lib/commonjs/detector/TFLiteFaceRecognizer.js.map +1 -0
- package/lib/commonjs/detector/TFLiteObjectDetector.js +392 -0
- package/lib/commonjs/detector/TFLiteObjectDetector.js.map +1 -0
- package/lib/commonjs/detector/index.js +39 -0
- package/lib/commonjs/detector/index.js.map +1 -0
- package/lib/commonjs/detector/modelLoader.js +139 -0
- package/lib/commonjs/detector/modelLoader.js.map +1 -0
- package/lib/commonjs/index.js +39 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/parser/blazeFaceParser.js +771 -0
- package/lib/commonjs/parser/blazeFaceParser.js.map +1 -0
- package/lib/commonjs/parser/index.js +28 -0
- package/lib/commonjs/parser/index.js.map +1 -0
- package/lib/commonjs/parser/outputParser.js +196 -0
- package/lib/commonjs/parser/outputParser.js.map +1 -0
- package/lib/commonjs/types/index.js +17 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/resize-plugin.d.ts +20 -0
- package/lib/commonjs/types/tflite.js +6 -0
- package/lib/commonjs/types/tflite.js.map +1 -0
- package/lib/module/detector/TFLiteFaceRecognizer.js +684 -0
- package/lib/module/detector/TFLiteFaceRecognizer.js.map +1 -0
- package/lib/module/detector/TFLiteObjectDetector.js +386 -0
- package/lib/module/detector/TFLiteObjectDetector.js.map +1 -0
- package/lib/module/detector/index.js +6 -0
- package/lib/module/detector/index.js.map +1 -0
- package/lib/module/detector/modelLoader.js +133 -0
- package/lib/module/detector/modelLoader.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/parser/blazeFaceParser.js +756 -0
- package/lib/module/parser/blazeFaceParser.js.map +1 -0
- package/lib/module/parser/index.js +5 -0
- package/lib/module/parser/index.js.map +1 -0
- package/lib/module/parser/outputParser.js +192 -0
- package/lib/module/parser/outputParser.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/resize-plugin.d.ts +20 -0
- package/lib/module/types/tflite.js +4 -0
- package/lib/module/types/tflite.js.map +1 -0
- package/lib/typescript/commonjs/detector/TFLiteFaceRecognizer.d.ts +59 -0
- package/lib/typescript/commonjs/detector/TFLiteFaceRecognizer.d.ts.map +1 -0
- package/lib/typescript/commonjs/detector/TFLiteObjectDetector.d.ts +41 -0
- package/lib/typescript/commonjs/detector/TFLiteObjectDetector.d.ts.map +1 -0
- package/lib/typescript/commonjs/detector/index.d.ts +4 -0
- package/lib/typescript/commonjs/detector/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/detector/modelLoader.d.ts +23 -0
- package/lib/typescript/commonjs/detector/modelLoader.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +4 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/parser/blazeFaceParser.d.ts +68 -0
- package/lib/typescript/commonjs/parser/blazeFaceParser.d.ts.map +1 -0
- package/lib/typescript/commonjs/parser/index.d.ts +3 -0
- package/lib/typescript/commonjs/parser/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/parser/outputParser.d.ts +17 -0
- package/lib/typescript/commonjs/parser/outputParser.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/index.d.ts +2 -0
- package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/tflite.d.ts +233 -0
- package/lib/typescript/commonjs/types/tflite.d.ts.map +1 -0
- package/lib/typescript/module/detector/TFLiteFaceRecognizer.d.ts +59 -0
- package/lib/typescript/module/detector/TFLiteFaceRecognizer.d.ts.map +1 -0
- package/lib/typescript/module/detector/TFLiteObjectDetector.d.ts +41 -0
- package/lib/typescript/module/detector/TFLiteObjectDetector.d.ts.map +1 -0
- package/lib/typescript/module/detector/index.d.ts +4 -0
- package/lib/typescript/module/detector/index.d.ts.map +1 -0
- package/lib/typescript/module/detector/modelLoader.d.ts +23 -0
- package/lib/typescript/module/detector/modelLoader.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +4 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/parser/blazeFaceParser.d.ts +68 -0
- package/lib/typescript/module/parser/blazeFaceParser.d.ts.map +1 -0
- package/lib/typescript/module/parser/index.d.ts +3 -0
- package/lib/typescript/module/parser/index.d.ts.map +1 -0
- package/lib/typescript/module/parser/outputParser.d.ts +17 -0
- package/lib/typescript/module/parser/outputParser.d.ts.map +1 -0
- package/lib/typescript/module/types/index.d.ts +2 -0
- package/lib/typescript/module/types/index.d.ts.map +1 -0
- package/lib/typescript/module/types/tflite.d.ts +233 -0
- package/lib/typescript/module/types/tflite.d.ts.map +1 -0
- package/package.json +121 -4
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import type { CameraProcessor, FaceLandmark } from '@masumdev/rn-camera-ai';
|
|
2
|
+
/**
|
|
3
|
+
* Universal source specification for TensorFlow Lite models.
|
|
4
|
+
* - number: Local asset bundle required via require('./model.tflite')
|
|
5
|
+
* - { url: string }: Remote HTTPS URL or local file:/// URI
|
|
6
|
+
* - string: Direct local filesystem path
|
|
7
|
+
*/
|
|
8
|
+
export type TFLiteModelSource = number | {
|
|
9
|
+
url: string;
|
|
10
|
+
} | string;
|
|
11
|
+
/**
|
|
12
|
+
* Minimal interface representing an active TensorFlow Lite interpreter instance.
|
|
13
|
+
*/
|
|
14
|
+
export interface TensorflowModel {
|
|
15
|
+
runSync(inputs: (ArrayBuffer | ArrayBufferView)[]): (ArrayBuffer | Float32Array | number[])[];
|
|
16
|
+
run?(inputs: (ArrayBuffer | ArrayBufferView)[]): Promise<(ArrayBuffer | Float32Array | number[])[]>;
|
|
17
|
+
readonly delegates?: readonly string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Options controlling model loading and hardware delegate resolution.
|
|
21
|
+
*/
|
|
22
|
+
export interface ModelLoaderOptions {
|
|
23
|
+
/** Whether to request GPU delegate acceleration (default: true) */
|
|
24
|
+
useGpu?: boolean;
|
|
25
|
+
/** Explicit operating system platform ('android' or 'ios') */
|
|
26
|
+
platform?: 'android' | 'ios' | string;
|
|
27
|
+
/** Callback triggered when requested hardware delegate falls back to CPU */
|
|
28
|
+
onDelegateFallback?: (requested: string, fallback: string) => void;
|
|
29
|
+
/** Optional custom model loader function for dependency injection or testing */
|
|
30
|
+
loadModel?: (source: TFLiteModelSource, delegates: string[]) => Promise<TensorflowModel>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Result returned upon successful model loading and delegate negotiation.
|
|
34
|
+
*/
|
|
35
|
+
export interface LoadedModelResult {
|
|
36
|
+
/** Initialized model instance */
|
|
37
|
+
model: TensorflowModel;
|
|
38
|
+
/** Active hardware delegate negotiated */
|
|
39
|
+
activeDelegate: 'gpu' | 'cpu';
|
|
40
|
+
/** Validated model source */
|
|
41
|
+
source: TFLiteModelSource;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Configuration options for initializing a TFLiteObjectDetector instance.
|
|
45
|
+
*/
|
|
46
|
+
export interface TFLiteObjectDetectorConfig {
|
|
47
|
+
/** Target TensorFlow Lite model source */
|
|
48
|
+
model: TFLiteModelSource;
|
|
49
|
+
/** Human-readable class labels as array or index-to-name dictionary */
|
|
50
|
+
labels?: string[] | Record<number, string>;
|
|
51
|
+
/** Optional offset applied to raw class index (e.g. -1 if index 0 is background) */
|
|
52
|
+
labelOffset?: number;
|
|
53
|
+
/** Minimum confidence threshold in range [0, 1] (default: 0.50) */
|
|
54
|
+
confidenceThreshold?: number;
|
|
55
|
+
/** Maximum number of top detections to return (default: 10) */
|
|
56
|
+
maxResults?: number;
|
|
57
|
+
/** Whether to attempt GPU acceleration (default: true) */
|
|
58
|
+
useGpu?: boolean;
|
|
59
|
+
/** Frame rate limit in frames per second (default: 15) */
|
|
60
|
+
targetFps?: number;
|
|
61
|
+
/** Target model input tensor width in pixels (default: 300) */
|
|
62
|
+
inputWidth?: number;
|
|
63
|
+
/** Target model input tensor height in pixels (default: 300) */
|
|
64
|
+
inputHeight?: number;
|
|
65
|
+
/** Callback triggered when GPU delegate fails and falls back to CPU */
|
|
66
|
+
onDelegateFallback?: (requested: string, fallback: string) => void;
|
|
67
|
+
/** Optional custom model loader function for testing or custom runtime */
|
|
68
|
+
loadModel?: (source: TFLiteModelSource, delegates: string[]) => Promise<TensorflowModel>;
|
|
69
|
+
/** Explicit platform target */
|
|
70
|
+
platform?: 'android' | 'ios' | string;
|
|
71
|
+
/** Optional custom resize plugin instance */
|
|
72
|
+
resizePlugin?: {
|
|
73
|
+
resize(frame: unknown, options: unknown): {
|
|
74
|
+
buffer?: ArrayBuffer;
|
|
75
|
+
toArrayBuffer?: () => ArrayBuffer;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Pluggable camera processor contract for TensorFlow Lite object detection.
|
|
81
|
+
*/
|
|
82
|
+
export interface TFLiteObjectDetector extends CameraProcessor {
|
|
83
|
+
/** Active hardware delegate utilized for inference */
|
|
84
|
+
readonly activeDelegate: 'gpu' | 'cpu';
|
|
85
|
+
/** Current confidence threshold */
|
|
86
|
+
readonly confidenceThreshold?: number;
|
|
87
|
+
/** Current maximum results limit */
|
|
88
|
+
readonly maxResults?: number;
|
|
89
|
+
/** Dynamically updates the detection confidence threshold */
|
|
90
|
+
setConfidenceThreshold(threshold: number): void;
|
|
91
|
+
/** Dynamically updates the maximum results limit */
|
|
92
|
+
setMaxResults(maxResults: number): void;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Options controlling standard 4-tensor output decoding.
|
|
96
|
+
*/
|
|
97
|
+
export interface ParseOptions {
|
|
98
|
+
/** Minimum detection confidence score (default: 0.50) */
|
|
99
|
+
confidenceThreshold?: number;
|
|
100
|
+
/** Maximum number of detections to retain (default: 10) */
|
|
101
|
+
maxResults?: number;
|
|
102
|
+
/** Class label array or dictionary mapping */
|
|
103
|
+
labels?: string[] | Record<number, string>;
|
|
104
|
+
/** Index offset applied before label lookup (default: 0) */
|
|
105
|
+
labelOffset?: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Alias for ParseOptions for backwards and contract compatibility.
|
|
109
|
+
*/
|
|
110
|
+
export type ParseDetectionOptions = ParseOptions;
|
|
111
|
+
/**
|
|
112
|
+
* Accepted representation for the 4 standard TFLite output tensors.
|
|
113
|
+
*/
|
|
114
|
+
export type TFLiteOutputs = [
|
|
115
|
+
ArrayBuffer | Float32Array | number[],
|
|
116
|
+
ArrayBuffer | Float32Array | number[],
|
|
117
|
+
ArrayBuffer | Float32Array | number[],
|
|
118
|
+
ArrayBuffer | Float32Array | number[] | number
|
|
119
|
+
] | (ArrayBuffer | Float32Array | number[] | number | unknown[])[];
|
|
120
|
+
/**
|
|
121
|
+
* 2D SSD anchor center coordinate in normalized [0..1] space for BlazeFace decoding.
|
|
122
|
+
*/
|
|
123
|
+
export interface BlazeFaceAnchor {
|
|
124
|
+
/** Normalized horizontal center [0, 1] */
|
|
125
|
+
x: number;
|
|
126
|
+
/** Normalized vertical center [0, 1] */
|
|
127
|
+
y: number;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Options for decoding MediaPipe BlazeFace raw output tensors.
|
|
131
|
+
*/
|
|
132
|
+
export interface BlazeFaceDecodeOptions {
|
|
133
|
+
/** Minimum face detection confidence score in [0, 1] (default: 0.5) */
|
|
134
|
+
confidenceThreshold?: number;
|
|
135
|
+
/** Non-Maximum Suppression IoU threshold in [0, 1] (default: 0.3) */
|
|
136
|
+
iouThreshold?: number;
|
|
137
|
+
/** Maximum number of faces to return (default: 5) */
|
|
138
|
+
maxResults?: number;
|
|
139
|
+
/** Model input width in pixels (default: 128) */
|
|
140
|
+
inputWidth?: number;
|
|
141
|
+
/** Model input height in pixels (default: 128) */
|
|
142
|
+
inputHeight?: number;
|
|
143
|
+
/** Camera source frame height / width aspect ratio for portrait de-squishing (e.g. 1280/720) */
|
|
144
|
+
frameAspectRatio?: number;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Enrolled face identity profile stored for real-time face recognition.
|
|
148
|
+
*/
|
|
149
|
+
export interface EnrolledFaceProfile {
|
|
150
|
+
/** Unique profile identifier */
|
|
151
|
+
id: string;
|
|
152
|
+
/** Display name of the enrolled person */
|
|
153
|
+
name: string;
|
|
154
|
+
/** L2-normalized embedding vector */
|
|
155
|
+
embedding: number[];
|
|
156
|
+
/** Creation timestamp (epoch ms) */
|
|
157
|
+
createdAt: number;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Configuration options for initializing a TFLiteFaceRecognizer processor.
|
|
161
|
+
*/
|
|
162
|
+
export interface TFLiteFaceRecognizerConfig {
|
|
163
|
+
/** MediaPipe BlazeFace detector model source (192x192 or 128x128) */
|
|
164
|
+
model: TFLiteModelSource;
|
|
165
|
+
/** Optional secondary TFLite face embedding model source (e.g. MobileFaceNet 112x112) */
|
|
166
|
+
embeddingModel?: TFLiteModelSource;
|
|
167
|
+
/** Optional MediaPipe 468-point 3D Face Mesh TFLite model source (face_landmark.tflite 192x192) */
|
|
168
|
+
faceMeshModel?: TFLiteModelSource;
|
|
169
|
+
/** Optional dedicated passive anti-spoofing TFLite model source (e.g. MiniFASNet 80x80 / 128x128) */
|
|
170
|
+
antiSpoofModel?: TFLiteModelSource;
|
|
171
|
+
/** Whether to compute hybrid active + passive liveness metrics per face (default: true) */
|
|
172
|
+
enableLiveness?: boolean;
|
|
173
|
+
/** Minimum passive liveness confidence threshold in [0, 1] to classify a face as live (default: 0.62) */
|
|
174
|
+
livenessThreshold?: number;
|
|
175
|
+
/** Minimum face detection confidence threshold in [0, 1] (default: 0.55) */
|
|
176
|
+
confidenceThreshold?: number;
|
|
177
|
+
/** Minimum cosine similarity threshold in [0, 1] to recognize an enrolled identity (default: 0.65) */
|
|
178
|
+
similarityThreshold?: number;
|
|
179
|
+
/** Non-Maximum Suppression IoU overlap threshold in [0, 1] (default: 0.3) */
|
|
180
|
+
iouThreshold?: number;
|
|
181
|
+
/** Maximum faces to detect per frame (default: 5) */
|
|
182
|
+
maxResults?: number;
|
|
183
|
+
/** Target frame rate in FPS (default: 24) */
|
|
184
|
+
targetFps?: number;
|
|
185
|
+
/** Detector model input width (default: 128) */
|
|
186
|
+
inputWidth?: number;
|
|
187
|
+
/** Detector model input height (default: 128) */
|
|
188
|
+
inputHeight?: number;
|
|
189
|
+
/** Whether to request GPU acceleration (default: true) */
|
|
190
|
+
useGpu?: boolean;
|
|
191
|
+
/** Initial list of enrolled face profiles */
|
|
192
|
+
initialFaces?: EnrolledFaceProfile[];
|
|
193
|
+
/** Callback triggered when hardware delegate falls back to CPU */
|
|
194
|
+
onDelegateFallback?: (requested: string, fallback: string) => void;
|
|
195
|
+
/** Optional custom model loader function for testing or custom runtime */
|
|
196
|
+
loadModel?: (source: TFLiteModelSource, delegates: string[]) => Promise<TensorflowModel>;
|
|
197
|
+
/** Explicit operating system platform target */
|
|
198
|
+
platform?: 'android' | 'ios' | string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Pluggable camera processor for real-time Face Detection, 6 Facial Landmarks, and Identity Recognition.
|
|
202
|
+
*/
|
|
203
|
+
export interface TFLiteFaceRecognizer extends CameraProcessor {
|
|
204
|
+
/** Active hardware delegate utilized for inference */
|
|
205
|
+
readonly activeDelegate: 'gpu' | 'cpu';
|
|
206
|
+
/** Current face detection confidence threshold */
|
|
207
|
+
readonly confidenceThreshold: number;
|
|
208
|
+
/** Current cosine similarity threshold for identity matching */
|
|
209
|
+
readonly similarityThreshold: number;
|
|
210
|
+
/** Current passive liveness threshold */
|
|
211
|
+
readonly livenessThreshold: number;
|
|
212
|
+
/** Dynamically updates face detection confidence threshold */
|
|
213
|
+
setConfidenceThreshold(threshold: number): void;
|
|
214
|
+
/** Dynamically updates cosine similarity threshold for identity matching */
|
|
215
|
+
setSimilarityThreshold(threshold: number): void;
|
|
216
|
+
/** Dynamically updates passive liveness verification threshold */
|
|
217
|
+
setLivenessThreshold(threshold: number): void;
|
|
218
|
+
/** Enrolls a face profile from the most recently detected face in the camera stream */
|
|
219
|
+
enrollLastDetectedFace(name: string): EnrolledFaceProfile | null;
|
|
220
|
+
/** Enrolls a face profile with an explicit embedding vector */
|
|
221
|
+
enrollFace(name: string, embedding: Float32Array | number[]): EnrolledFaceProfile;
|
|
222
|
+
/** Removes an enrolled face profile by ID */
|
|
223
|
+
removeEnrolledFace(id: string): boolean;
|
|
224
|
+
/** Clears all enrolled face profiles */
|
|
225
|
+
clearEnrolledFaces(): void;
|
|
226
|
+
/** Returns all currently enrolled face profiles */
|
|
227
|
+
getEnrolledFaces(): EnrolledFaceProfile[];
|
|
228
|
+
/** Returns whether a valid face embedding was captured from a recent camera frame */
|
|
229
|
+
hasRecentFaceEmbedding(): boolean;
|
|
230
|
+
/** Returns the most recently detected facial landmarks if available */
|
|
231
|
+
getLastDetectedLandmarks?(): FaceLandmark[] | null;
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=tflite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tflite.d.ts","sourceRoot":"","sources":["../../../../src/types/tflite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,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+
"version": "0.1.0",
|
|
4
|
+
"description": "TensorFlow Lite object detection adapter for @masumdev/rn-camera-ai using react-native-fast-tflite.",
|
|
5
|
+
"main": "lib/commonjs/index.js",
|
|
6
|
+
"module": "lib/module/index.js",
|
|
7
|
+
"types": "lib/typescript/module/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./lib/typescript/module/index.d.ts",
|
|
12
|
+
"default": "./lib/module/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./lib/typescript/commonjs/index.d.ts",
|
|
16
|
+
"default": "./lib/commonjs/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "bob build",
|
|
27
|
+
"clean": "rm -rf lib",
|
|
28
|
+
"prepublishOnly": "bun run build",
|
|
29
|
+
"test": "bun test",
|
|
30
|
+
"test:coverage": "bun test --coverage"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"react-native",
|
|
34
|
+
"expo",
|
|
35
|
+
"tflite",
|
|
36
|
+
"tensorflow-lite",
|
|
37
|
+
"fast-tflite",
|
|
38
|
+
"vision-camera",
|
|
39
|
+
"object-detection",
|
|
40
|
+
"ai"
|
|
41
|
+
],
|
|
42
|
+
"author": "Ma'sum",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"homepage": "https://lib.masumdev.id/rn-camera-ai/tflite-adapter/",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/masumrpg/nodejs-lib.git",
|
|
48
|
+
"directory": "packages/rn-camera-ai-tflite"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/masumrpg/nodejs-lib/issues"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@masumdev/rn-camera-ai": "workspace:*"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@babel/core": "^7.25.0",
|
|
58
|
+
"@babel/preset-env": "^7.25.0",
|
|
59
|
+
"@react-native/babel-preset": "^0.86.0",
|
|
60
|
+
"@types/react": "~19.3.0",
|
|
61
|
+
"react-native-builder-bob": "^0.43.0",
|
|
62
|
+
"react-native-fast-tflite": "^3.0.1",
|
|
63
|
+
"react-native-nitro-image": "0.15.2",
|
|
64
|
+
"react-native-nitro-modules": "^0.37.0",
|
|
65
|
+
"react-native-vision-camera": "5.2.4",
|
|
66
|
+
"react-native-worklets": "0.13.0",
|
|
67
|
+
"typescript": "^5.0.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@masumdev/rn-camera-ai": "*",
|
|
71
|
+
"react": ">=18",
|
|
72
|
+
"react-native": "*",
|
|
73
|
+
"react-native-fast-tflite": ">=3.0.0",
|
|
74
|
+
"react-native-nitro-image": "*",
|
|
75
|
+
"react-native-nitro-modules": "^0.37.0",
|
|
76
|
+
"react-native-vision-camera": ">=5.0.0",
|
|
77
|
+
"react-native-worklets": "0.13.x"
|
|
78
|
+
},
|
|
79
|
+
"peerDependenciesMeta": {
|
|
80
|
+
"react-native-fast-tflite": {
|
|
81
|
+
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"react-native-nitro-image": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"react-native-nitro-modules": {
|
|
87
|
+
"optional": true
|
|
88
|
+
},
|
|
89
|
+
"react-native-vision-camera": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"react-native-worklets": {
|
|
93
|
+
"optional": true
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public"
|
|
98
|
+
},
|
|
99
|
+
"react-native-builder-bob": {
|
|
100
|
+
"source": "src",
|
|
101
|
+
"output": "lib",
|
|
102
|
+
"targets": [
|
|
103
|
+
[
|
|
104
|
+
"commonjs",
|
|
105
|
+
{
|
|
106
|
+
"esm": true
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
"module",
|
|
111
|
+
{
|
|
112
|
+
"esm": true
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
"typescript",
|
|
117
|
+
{
|
|
118
|
+
"project": "tsconfig.json"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|