added live webcam demo
parent
952f145e98
commit
3ceec1bc5d
68
README.md
68
README.md
|
@ -6,7 +6,7 @@ This is updated **face-api.js** with latest available TensorFlow/JS as the origi
|
|||
|
||||
Forked from [face-api.js](https://github.com/justadudewhohacks/face-api.js) version **0.22.2** released on March 22nd, 2020
|
||||
|
||||
Currently based on **`TensorFlow/JS` 2.8.2**
|
||||
Currently based on **`TensorFlow/JS` 2.8.3**
|
||||
|
||||
### Why?
|
||||
|
||||
|
@ -35,6 +35,7 @@ Unfortunately, changes ended up being too large for a simple pull request on ori
|
|||
- Updated TensorFlow/JS dependencies since backends were removed from `@tensorflow/tfjs-core`
|
||||
- Updated mobileNetv1 model due to `batchNorm()` dependency
|
||||
- Added `version` class that returns JSON object with version of FaceAPI as well as linked TFJS
|
||||
- Added test/dev built-in HTTP & HTTPS Web server
|
||||
- Removed `mtcnn` and `tinyYolov2` models as they were non-functional in latest public version of `Face-API`
|
||||
*If there is a demand, I can re-implement them back.*
|
||||
|
||||
|
@ -50,8 +51,12 @@ Which means valid models are **tinyFaceDetector** and **mobileNetv1**
|
|||
|
||||
### Browser
|
||||
|
||||
Browser example that uses both models as well as all of the extensions is included in `/example/index.html`
|
||||
Example can be accessed directly using Git pages using URL: <https://vladmandic.github.io/face-api/example/>
|
||||
Browser example that uses static images and showcases both models as well as all of the extensions is included in `/example/index.html`
|
||||
Example can be accessed directly using Git pages using URL: <https://vladmandic.github.io/face-api/example/index.html>
|
||||
|
||||
Browser example that uses live webcam is included in `/example/webcam.html`
|
||||
Example can be accessed directly using Git pages using URL: <https://vladmandic.github.io/face-api/example/webcam.html>
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -242,6 +247,37 @@ And then use with:
|
|||
|
||||
Pretrained models and their weights are includes in `./model`.
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
## Test & Dev Web Server
|
||||
|
||||
Built-in test&dev web server can be started using
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
By default it starts HTTP server on port 8000 and HTTPS server on port 8001 and can be accessed as:
|
||||
- <https://localhost:8001/example/index.html>
|
||||
- <https://localhost:8001/example/webcam.html>
|
||||
|
||||
```json
|
||||
2021-01-10 08:39:00 INFO: @vladmandic/face-api version 0.10.2
|
||||
2021-01-10 08:39:00 INFO: User: vlado Platform: linux Arch: x64 Node: v15.4.0
|
||||
2021-01-10 08:39:00 INFO: Build: file startup all target: es2018
|
||||
2021-01-10 08:39:00 STATE: HTTP server listening: 8000
|
||||
2021-01-10 08:39:00 STATE: HTTP2 server listening: 8001
|
||||
2021-01-10 08:39:00 STATE: Monitoring: [ 'package.json', 'config.js', 'example', 'src', [length]: 4 ]
|
||||
2021-01-10 08:39:00 STATE: Monitoring: [ 'package.json', 'config.js', 'example', 'src', [length]: 4 ]
|
||||
2021-01-10 08:39:01 STATE: Build for: browserBundle type: tfjs: { modules: 1253, moduleBytes: 3997175, imports: 7, importBytes: 276, outputBytes: 1565414, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2021-01-10 08:39:01 STATE: Build for: browserBundle type: iife: { imports: 160, importBytes: 1797487, outputBytes: 1699552, outputFiles: 'dist/face-api.js' }
|
||||
2021-01-10 08:39:01 STATE: Build for: browserBundle type: esm: { imports: 160, importBytes: 1797487, outputBytes: 1697086, outputFiles: 'dist/face-api.esm.js' }
|
||||
2021-01-10 08:39:01 INFO: Compile: [ 'src/index.ts', [length]: 1 ]
|
||||
```
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
## Build
|
||||
|
@ -272,19 +308,21 @@ npm run build
|
|||
> @vladmandic/face-api@0.8.9 build /home/vlado/dev/face-api
|
||||
> rimraf dist/* && node ./build.js
|
||||
```
|
||||
|
||||
```json
|
||||
2020-12-02 16:31:23 INFO: @vladmandic/face-api version 0.8.9
|
||||
2020-12-02 16:31:23 INFO: User: vlado Platform: linux Arch: x64 Node: v15.0.1
|
||||
2020-12-02 16:31:23 INFO: Build: file startup all target: es2018
|
||||
2020-12-02 16:31:23 STATE: Build for: node type: tfjs: { imports: 1, importBytes: 39, outputBytes: 1042, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-12-02 16:31:23 STATE: Build for: node type: node: { imports: 160, importBytes: 228038, outputBytes: 134190, outputFiles: 'dist/face-api.node.js' }
|
||||
2020-12-02 16:31:23 STATE: Build for: nodeGPU type: tfjs: { imports: 1, importBytes: 43, outputBytes: 1046, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-12-02 16:31:23 STATE: Build for: nodeGPU type: node: { imports: 160, importBytes: 228042, outputBytes: 134198, outputFiles: 'dist/face-api.node-gpu.js' }
|
||||
2020-12-02 16:31:23 STATE: Build for: browserNoBundle type: tfjs: { imports: 1, importBytes: 1784, outputBytes: 244, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-12-02 16:31:23 STATE: Build for: browserNoBundle type: esm: { imports: 160, importBytes: 227240, outputBytes: 131024, outputFiles: 'dist/face-api.esm-nobundle.js' }
|
||||
2020-12-02 16:31:24 STATE: Build for: browserBundle type: tfjs: { modules: 1045, moduleBytes: 3718721, imports: 7, importBytes: 1784, outputBytes: 1501677, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2020-12-02 16:31:24 STATE: Build for: browserBundle type: iife: { imports: 162, importBytes: 1728673, modules: 576, moduleBytes: 1359851, outputBytes: 1903311, outputFiles: 'dist/face-api.js' }
|
||||
2020-12-02 16:31:25 STATE: Build for: browserBundle type: esm: { imports: 162, importBytes: 1728673, modules: 576, moduleBytes: 1359851, outputBytes: 1900836, outputFiles: 'dist/face-api.esm.js' }
|
||||
2021-01-10 08:42:01 INFO: @vladmandic/face-api version 0.10.2
|
||||
2021-01-10 08:42:01 INFO: User: vlado Platform: linux Arch: x64 Node: v15.4.0
|
||||
2021-01-10 08:42:01 INFO: Build: file startup all target: es2018
|
||||
2021-01-10 08:42:01 STATE: Build for: node type: tfjs: { imports: 1, importBytes: 143, outputBytes: 1042, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2021-01-10 08:42:01 STATE: Build for: node type: node: { imports: 160, importBytes: 233115, outputBytes: 132266, outputFiles: 'dist/face-api.node.js' }
|
||||
2021-01-10 08:42:01 STATE: Build for: nodeGPU type: tfjs: { imports: 1, importBytes: 147, outputBytes: 1046, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2021-01-10 08:42:01 STATE: Build for: nodeGPU type: node: { imports: 160, importBytes: 233119, outputBytes: 132274, outputFiles: 'dist/face-api.node-gpu.js' }
|
||||
2021-01-10 08:42:01 STATE: Build for: browserNoBundle type: tfjs: { imports: 1, importBytes: 276, outputBytes: 244, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2021-01-10 08:42:01 STATE: Build for: browserNoBundle type: esm: { imports: 160, importBytes: 232317, outputBytes: 129069, outputFiles: 'dist/face-api.esm-nobundle.js' }
|
||||
2021-01-10 08:42:01 STATE: Build for: browserBundle type: tfjs: { modules: 1253, moduleBytes: 3997175, imports: 7, importBytes: 276, outputBytes: 1565414, outputFiles: 'dist/tfjs.esm.js' }
|
||||
2021-01-10 08:42:02 STATE: Build for: browserBundle type: iife: { imports: 160, importBytes: 1797487, outputBytes: 1699552, outputFiles: 'dist/face-api.js' }
|
||||
2021-01-10 08:42:02 STATE: Build for: browserBundle type: esm: { imports: 160, importBytes: 1797487, outputBytes: 1697086, outputFiles: 'dist/face-api.esm.js' }
|
||||
2021-01-10 08:42:02 INFO: Compile: [ 'src/index.ts', [length]: 1 ]```
|
||||
```
|
||||
|
||||
<br>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1077,7 +1077,7 @@
|
|||
]
|
||||
},
|
||||
"package.json": {
|
||||
"bytes": 1728,
|
||||
"bytes": 1807,
|
||||
"imports": []
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
|
@ -2136,7 +2136,7 @@
|
|||
"dist/face-api.esm-nobundle.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 303708
|
||||
"bytes": 311523
|
||||
},
|
||||
"dist/face-api.esm-nobundle.js": {
|
||||
"imports": [],
|
||||
|
@ -2264,43 +2264,43 @@
|
|||
],
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 246
|
||||
"bytesInOutput": 247
|
||||
},
|
||||
"src/env/isNodejs.ts": {
|
||||
"bytesInOutput": 224
|
||||
"bytesInOutput": 229
|
||||
},
|
||||
"src/index.ts": {
|
||||
"bytesInOutput": 201
|
||||
"bytesInOutput": 206
|
||||
},
|
||||
"src/draw/index.ts": {
|
||||
"bytesInOutput": 447
|
||||
"bytesInOutput": 451
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
"bytesInOutput": 313
|
||||
},
|
||||
"src/utils/index.ts": {
|
||||
"bytesInOutput": 1561
|
||||
"bytesInOutput": 1560
|
||||
},
|
||||
"src/classes/Dimensions.ts": {
|
||||
"bytesInOutput": 394
|
||||
"bytesInOutput": 398
|
||||
},
|
||||
"src/classes/Point.ts": {
|
||||
"bytesInOutput": 472
|
||||
"bytesInOutput": 473
|
||||
},
|
||||
"src/classes/Box.ts": {
|
||||
"bytesInOutput": 3300
|
||||
"bytesInOutput": 3305
|
||||
},
|
||||
"src/classes/BoundingBox.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/classes/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
},
|
||||
"src/classes/ObjectDetection.ts": {
|
||||
"bytesInOutput": 753
|
||||
"bytesInOutput": 754
|
||||
},
|
||||
"src/classes/FaceDetection.ts": {
|
||||
"bytesInOutput": 268
|
||||
"bytesInOutput": 272
|
||||
},
|
||||
"src/ops/iou.ts": {
|
||||
"bytesInOutput": 328
|
||||
|
@ -2324,10 +2324,10 @@
|
|||
"bytesInOutput": 188
|
||||
},
|
||||
"src/classes/Rect.ts": {
|
||||
"bytesInOutput": 135
|
||||
"bytesInOutput": 136
|
||||
},
|
||||
"src/classes/FaceLandmarks.ts": {
|
||||
"bytesInOutput": 1884
|
||||
"bytesInOutput": 1888
|
||||
},
|
||||
"src/classes/FaceLandmarks5.ts": {
|
||||
"bytesInOutput": 153
|
||||
|
@ -2372,16 +2372,16 @@
|
|||
"bytesInOutput": 446
|
||||
},
|
||||
"src/draw/DrawTextField.ts": {
|
||||
"bytesInOutput": 2254
|
||||
"bytesInOutput": 2255
|
||||
},
|
||||
"src/draw/DrawBox.ts": {
|
||||
"bytesInOutput": 821
|
||||
"bytesInOutput": 825
|
||||
},
|
||||
"src/draw/drawDetections.ts": {
|
||||
"bytesInOutput": 390
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressionNet.ts": {
|
||||
"bytesInOutput": 874
|
||||
"bytesInOutput": 878
|
||||
},
|
||||
"src/dom/isMediaLoaded.ts": {
|
||||
"bytesInOutput": 151
|
||||
|
@ -2444,16 +2444,16 @@
|
|||
"bytesInOutput": 201
|
||||
},
|
||||
"src/faceFeatureExtractor/FaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 895
|
||||
"bytesInOutput": 897
|
||||
},
|
||||
"src/NeuralNetwork.ts": {
|
||||
"bytesInOutput": 3282
|
||||
"bytesInOutput": 3292
|
||||
},
|
||||
"src/faceFeatureExtractor/denseBlock.ts": {
|
||||
"bytesInOutput": 1171
|
||||
"bytesInOutput": 1176
|
||||
},
|
||||
"src/common/depthwiseSeparableConv.ts": {
|
||||
"bytesInOutput": 240
|
||||
"bytesInOutput": 244
|
||||
},
|
||||
"src/common/convLayer.ts": {
|
||||
"bytesInOutput": 229
|
||||
|
@ -2471,10 +2471,10 @@
|
|||
"bytesInOutput": 428
|
||||
},
|
||||
"src/common/extractSeparableConvParamsFactory.ts": {
|
||||
"bytesInOutput": 945
|
||||
"bytesInOutput": 946
|
||||
},
|
||||
"src/common/types.ts": {
|
||||
"bytesInOutput": 173
|
||||
"bytesInOutput": 177
|
||||
},
|
||||
"src/common/extractWeightEntryFactory.ts": {
|
||||
"bytesInOutput": 366
|
||||
|
@ -2498,10 +2498,10 @@
|
|||
"bytesInOutput": 400
|
||||
},
|
||||
"src/faceProcessor/FaceProcessor.ts": {
|
||||
"bytesInOutput": 1579
|
||||
"bytesInOutput": 1585
|
||||
},
|
||||
"src/common/fullyConnectedLayer.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/faceProcessor/extractParams.ts": {
|
||||
"bytesInOutput": 382
|
||||
|
@ -2513,7 +2513,7 @@
|
|||
"bytesInOutput": 252
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressions.ts": {
|
||||
"bytesInOutput": 527
|
||||
"bytesInOutput": 532
|
||||
},
|
||||
"src/faceExpressionNet/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
|
@ -2531,13 +2531,13 @@
|
|||
"bytesInOutput": 1723
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 20
|
||||
"bytesInOutput": 21
|
||||
},
|
||||
"src/ageGenderNet/AgeGenderNet.ts": {
|
||||
"bytesInOutput": 2554
|
||||
"bytesInOutput": 2559
|
||||
},
|
||||
"src/xception/TinyXception.ts": {
|
||||
"bytesInOutput": 1901
|
||||
"bytesInOutput": 1905
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
"bytesInOutput": 2443
|
||||
|
@ -2558,16 +2558,16 @@
|
|||
"bytesInOutput": 0
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68NetBase.ts": {
|
||||
"bytesInOutput": 2029
|
||||
"bytesInOutput": 2035
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68Net.ts": {
|
||||
"bytesInOutput": 253
|
||||
"bytesInOutput": 257
|
||||
},
|
||||
"src/faceLandmarkNet/index.ts": {
|
||||
"bytesInOutput": 50
|
||||
"bytesInOutput": 54
|
||||
},
|
||||
"src/faceFeatureExtractor/TinyFaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 888
|
||||
"bytesInOutput": 889
|
||||
},
|
||||
"src/faceFeatureExtractor/extractParamsFromWeigthMapTiny.ts": {
|
||||
"bytesInOutput": 362
|
||||
|
@ -2576,16 +2576,16 @@
|
|||
"bytesInOutput": 517
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68TinyNet.ts": {
|
||||
"bytesInOutput": 269
|
||||
"bytesInOutput": 274
|
||||
},
|
||||
"src/faceRecognitionNet/FaceRecognitionNet.ts": {
|
||||
"bytesInOutput": 1705
|
||||
"bytesInOutput": 1706
|
||||
},
|
||||
"src/faceRecognitionNet/convLayer.ts": {
|
||||
"bytesInOutput": 458
|
||||
"bytesInOutput": 463
|
||||
},
|
||||
"src/faceRecognitionNet/scaleLayer.ts": {
|
||||
"bytesInOutput": 119
|
||||
"bytesInOutput": 123
|
||||
},
|
||||
"src/faceRecognitionNet/extractParams.ts": {
|
||||
"bytesInOutput": 3405
|
||||
|
@ -2612,52 +2612,52 @@
|
|||
"bytesInOutput": 244
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1.ts": {
|
||||
"bytesInOutput": 1900
|
||||
"bytesInOutput": 1905
|
||||
},
|
||||
"src/ssdMobilenetv1/extractParams.ts": {
|
||||
"bytesInOutput": 5963
|
||||
"bytesInOutput": 5967
|
||||
},
|
||||
"src/ssdMobilenetv1/extractParamsFromWeigthMap.ts": {
|
||||
"bytesInOutput": 4319
|
||||
},
|
||||
"src/ssdMobilenetv1/mobileNetV1.ts": {
|
||||
"bytesInOutput": 1110
|
||||
"bytesInOutput": 1111
|
||||
},
|
||||
"src/ssdMobilenetv1/pointwiseConvLayer.ts": {
|
||||
"bytesInOutput": 235
|
||||
"bytesInOutput": 239
|
||||
},
|
||||
"src/ssdMobilenetv1/nonMaxSuppression.ts": {
|
||||
"bytesInOutput": 1502
|
||||
"bytesInOutput": 1504
|
||||
},
|
||||
"src/ssdMobilenetv1/outputLayer.ts": {
|
||||
"bytesInOutput": 1590
|
||||
},
|
||||
"src/ssdMobilenetv1/predictionLayer.ts": {
|
||||
"bytesInOutput": 1418
|
||||
"bytesInOutput": 1419
|
||||
},
|
||||
"src/ssdMobilenetv1/boxPredictionLayer.ts": {
|
||||
"bytesInOutput": 350
|
||||
"bytesInOutput": 354
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1Options.ts": {
|
||||
"bytesInOutput": 554
|
||||
"bytesInOutput": 555
|
||||
},
|
||||
"src/ssdMobilenetv1/index.ts": {
|
||||
"bytesInOutput": 234
|
||||
"bytesInOutput": 235
|
||||
},
|
||||
"src/tinyYolov2/const.ts": {
|
||||
"bytesInOutput": 485
|
||||
"bytesInOutput": 490
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2Base.ts": {
|
||||
"bytesInOutput": 5885
|
||||
"bytesInOutput": 5894
|
||||
},
|
||||
"src/tinyYolov2/config.ts": {
|
||||
"bytesInOutput": 1164
|
||||
"bytesInOutput": 1168
|
||||
},
|
||||
"src/tinyYolov2/convWithBatchNorm.ts": {
|
||||
"bytesInOutput": 322
|
||||
"bytesInOutput": 323
|
||||
},
|
||||
"src/tinyYolov2/leaky.ts": {
|
||||
"bytesInOutput": 178
|
||||
"bytesInOutput": 182
|
||||
},
|
||||
"src/tinyYolov2/depthwiseSeparableConv.ts": {
|
||||
"bytesInOutput": 293
|
||||
|
@ -2678,37 +2678,37 @@
|
|||
"bytesInOutput": 139
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetectorOptions.ts": {
|
||||
"bytesInOutput": 132
|
||||
"bytesInOutput": 133
|
||||
},
|
||||
"src/globalApi/ComposableTask.ts": {
|
||||
"bytesInOutput": 154
|
||||
"bytesInOutput": 159
|
||||
},
|
||||
"src/globalApi/DetectFaceLandmarksTasks.ts": {
|
||||
"bytesInOutput": 1912
|
||||
"bytesInOutput": 1926
|
||||
},
|
||||
"src/globalApi/extractFacesAndComputeResults.ts": {
|
||||
"bytesInOutput": 812
|
||||
"bytesInOutput": 816
|
||||
},
|
||||
"src/tinyFaceDetector/const.ts": {
|
||||
"bytesInOutput": 215
|
||||
"bytesInOutput": 216
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetector.ts": {
|
||||
"bytesInOutput": 624
|
||||
"bytesInOutput": 629
|
||||
},
|
||||
"src/globalApi/nets.ts": {
|
||||
"bytesInOutput": 1515
|
||||
"bytesInOutput": 1520
|
||||
},
|
||||
"src/globalApi/PredictFaceExpressionsTask.ts": {
|
||||
"bytesInOutput": 1691
|
||||
"bytesInOutput": 1700
|
||||
},
|
||||
"src/globalApi/PredictAgeAndGenderTask.ts": {
|
||||
"bytesInOutput": 1785
|
||||
"bytesInOutput": 1794
|
||||
},
|
||||
"src/globalApi/ComputeFaceDescriptorsTasks.ts": {
|
||||
"bytesInOutput": 1390
|
||||
"bytesInOutput": 1399
|
||||
},
|
||||
"src/globalApi/DetectFacesTasks.ts": {
|
||||
"bytesInOutput": 2221
|
||||
"bytesInOutput": 2225
|
||||
},
|
||||
"src/globalApi/detectFaces.ts": {
|
||||
"bytesInOutput": 224
|
||||
|
@ -2732,7 +2732,7 @@
|
|||
"bytesInOutput": 824
|
||||
}
|
||||
},
|
||||
"bytes": 129069
|
||||
"bytes": 129272
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytes": 1565414,
|
||||
"bytes": 1566890,
|
||||
"imports": []
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
|
@ -1077,7 +1077,7 @@
|
|||
]
|
||||
},
|
||||
"package.json": {
|
||||
"bytes": 1728,
|
||||
"bytes": 1807,
|
||||
"imports": []
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
|
@ -2136,7 +2136,7 @@
|
|||
"dist/face-api.esm.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1348028
|
||||
"bytes": 1452595
|
||||
},
|
||||
"dist/face-api.esm.js": {
|
||||
"imports": [],
|
||||
|
@ -2264,10 +2264,10 @@
|
|||
],
|
||||
"inputs": {
|
||||
"src/env/isNodejs.ts": {
|
||||
"bytesInOutput": 224
|
||||
"bytesInOutput": 229
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 1564181
|
||||
"bytesInOutput": 1564739
|
||||
},
|
||||
"src/draw/index.ts": {
|
||||
"bytesInOutput": 451
|
||||
|
@ -2276,28 +2276,28 @@
|
|||
"bytesInOutput": 313
|
||||
},
|
||||
"src/utils/index.ts": {
|
||||
"bytesInOutput": 1531
|
||||
"bytesInOutput": 1529
|
||||
},
|
||||
"src/classes/Dimensions.ts": {
|
||||
"bytesInOutput": 398
|
||||
},
|
||||
"src/classes/Point.ts": {
|
||||
"bytesInOutput": 472
|
||||
"bytesInOutput": 473
|
||||
},
|
||||
"src/classes/Box.ts": {
|
||||
"bytesInOutput": 3300
|
||||
"bytesInOutput": 3305
|
||||
},
|
||||
"src/classes/BoundingBox.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/classes/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
},
|
||||
"src/classes/ObjectDetection.ts": {
|
||||
"bytesInOutput": 753
|
||||
"bytesInOutput": 754
|
||||
},
|
||||
"src/classes/FaceDetection.ts": {
|
||||
"bytesInOutput": 268
|
||||
"bytesInOutput": 272
|
||||
},
|
||||
"src/ops/iou.ts": {
|
||||
"bytesInOutput": 328
|
||||
|
@ -2321,10 +2321,10 @@
|
|||
"bytesInOutput": 195
|
||||
},
|
||||
"src/classes/Rect.ts": {
|
||||
"bytesInOutput": 135
|
||||
"bytesInOutput": 136
|
||||
},
|
||||
"src/classes/FaceLandmarks.ts": {
|
||||
"bytesInOutput": 1884
|
||||
"bytesInOutput": 1888
|
||||
},
|
||||
"src/classes/FaceLandmarks5.ts": {
|
||||
"bytesInOutput": 153
|
||||
|
@ -2369,10 +2369,10 @@
|
|||
"bytesInOutput": 447
|
||||
},
|
||||
"src/draw/DrawTextField.ts": {
|
||||
"bytesInOutput": 2254
|
||||
"bytesInOutput": 2255
|
||||
},
|
||||
"src/draw/DrawBox.ts": {
|
||||
"bytesInOutput": 821
|
||||
"bytesInOutput": 825
|
||||
},
|
||||
"src/draw/drawDetections.ts": {
|
||||
"bytesInOutput": 391
|
||||
|
@ -2504,13 +2504,13 @@
|
|||
"bytesInOutput": 252
|
||||
},
|
||||
"src/faceProcessor/FaceProcessor.ts": {
|
||||
"bytesInOutput": 1543
|
||||
"bytesInOutput": 1544
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressions.ts": {
|
||||
"bytesInOutput": 527
|
||||
"bytesInOutput": 532
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressionNet.ts": {
|
||||
"bytesInOutput": 825
|
||||
"bytesInOutput": 829
|
||||
},
|
||||
"src/faceExpressionNet/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
|
@ -2558,13 +2558,13 @@
|
|||
"bytesInOutput": 159
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68NetBase.ts": {
|
||||
"bytesInOutput": 1957
|
||||
"bytesInOutput": 1958
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68Net.ts": {
|
||||
"bytesInOutput": 253
|
||||
"bytesInOutput": 257
|
||||
},
|
||||
"src/faceLandmarkNet/index.ts": {
|
||||
"bytesInOutput": 50
|
||||
"bytesInOutput": 54
|
||||
},
|
||||
"src/faceFeatureExtractor/extractParamsFromWeigthMapTiny.ts": {
|
||||
"bytesInOutput": 362
|
||||
|
@ -2573,10 +2573,10 @@
|
|||
"bytesInOutput": 517
|
||||
},
|
||||
"src/faceFeatureExtractor/TinyFaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 832
|
||||
"bytesInOutput": 833
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68TinyNet.ts": {
|
||||
"bytesInOutput": 269
|
||||
"bytesInOutput": 274
|
||||
},
|
||||
"src/faceRecognitionNet/scaleLayer.ts": {
|
||||
"bytesInOutput": 75
|
||||
|
@ -2624,7 +2624,7 @@
|
|||
"bytesInOutput": 1048
|
||||
},
|
||||
"src/ssdMobilenetv1/nonMaxSuppression.ts": {
|
||||
"bytesInOutput": 1502
|
||||
"bytesInOutput": 1504
|
||||
},
|
||||
"src/ssdMobilenetv1/outputLayer.ts": {
|
||||
"bytesInOutput": 1311
|
||||
|
@ -2636,19 +2636,19 @@
|
|||
"bytesInOutput": 1364
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1Options.ts": {
|
||||
"bytesInOutput": 554
|
||||
"bytesInOutput": 555
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1.ts": {
|
||||
"bytesInOutput": 1837
|
||||
"bytesInOutput": 1841
|
||||
},
|
||||
"src/ssdMobilenetv1/index.ts": {
|
||||
"bytesInOutput": 234
|
||||
"bytesInOutput": 235
|
||||
},
|
||||
"src/tinyYolov2/const.ts": {
|
||||
"bytesInOutput": 486
|
||||
"bytesInOutput": 491
|
||||
},
|
||||
"src/tinyYolov2/config.ts": {
|
||||
"bytesInOutput": 1169
|
||||
"bytesInOutput": 1173
|
||||
},
|
||||
"src/tinyYolov2/leaky.ts": {
|
||||
"bytesInOutput": 116
|
||||
|
@ -2669,7 +2669,7 @@
|
|||
"bytesInOutput": 588
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2Base.ts": {
|
||||
"bytesInOutput": 5763
|
||||
"bytesInOutput": 5767
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2.ts": {
|
||||
"bytesInOutput": 782
|
||||
|
@ -2678,37 +2678,37 @@
|
|||
"bytesInOutput": 139
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetectorOptions.ts": {
|
||||
"bytesInOutput": 132
|
||||
"bytesInOutput": 133
|
||||
},
|
||||
"src/globalApi/ComposableTask.ts": {
|
||||
"bytesInOutput": 155
|
||||
"bytesInOutput": 159
|
||||
},
|
||||
"src/globalApi/extractFacesAndComputeResults.ts": {
|
||||
"bytesInOutput": 772
|
||||
},
|
||||
"src/tinyFaceDetector/const.ts": {
|
||||
"bytesInOutput": 215
|
||||
"bytesInOutput": 216
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetector.ts": {
|
||||
"bytesInOutput": 626
|
||||
"bytesInOutput": 631
|
||||
},
|
||||
"src/globalApi/nets.ts": {
|
||||
"bytesInOutput": 1531
|
||||
"bytesInOutput": 1536
|
||||
},
|
||||
"src/globalApi/PredictFaceExpressionsTask.ts": {
|
||||
"bytesInOutput": 1693
|
||||
"bytesInOutput": 1702
|
||||
},
|
||||
"src/globalApi/PredictAgeAndGenderTask.ts": {
|
||||
"bytesInOutput": 1787
|
||||
"bytesInOutput": 1796
|
||||
},
|
||||
"src/globalApi/ComputeFaceDescriptorsTasks.ts": {
|
||||
"bytesInOutput": 1392
|
||||
"bytesInOutput": 1401
|
||||
},
|
||||
"src/globalApi/DetectFaceLandmarksTasks.ts": {
|
||||
"bytesInOutput": 1859
|
||||
"bytesInOutput": 1868
|
||||
},
|
||||
"src/globalApi/DetectFacesTasks.ts": {
|
||||
"bytesInOutput": 2231
|
||||
"bytesInOutput": 2235
|
||||
},
|
||||
"src/globalApi/detectFaces.ts": {
|
||||
"bytesInOutput": 228
|
||||
|
@ -2732,7 +2732,7 @@
|
|||
"bytesInOutput": 824
|
||||
}
|
||||
},
|
||||
"bytes": 1697086
|
||||
"bytes": 1698462
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytes": 1565414,
|
||||
"bytes": 1566890,
|
||||
"imports": []
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
|
@ -1077,7 +1077,7 @@
|
|||
]
|
||||
},
|
||||
"package.json": {
|
||||
"bytes": 1728,
|
||||
"bytes": 1807,
|
||||
"imports": []
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
|
@ -2136,20 +2136,20 @@
|
|||
"dist/face-api.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1348035
|
||||
"bytes": 1452603
|
||||
},
|
||||
"dist/face-api.js": {
|
||||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {
|
||||
"src/env/isNodejs.ts": {
|
||||
"bytesInOutput": 224
|
||||
"bytesInOutput": 229
|
||||
},
|
||||
"src/index.ts": {
|
||||
"bytesInOutput": 4718
|
||||
"bytesInOutput": 4722
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 1564185
|
||||
"bytesInOutput": 1564739
|
||||
},
|
||||
"src/draw/index.ts": {
|
||||
"bytesInOutput": 451
|
||||
|
@ -2158,28 +2158,28 @@
|
|||
"bytesInOutput": 313
|
||||
},
|
||||
"src/utils/index.ts": {
|
||||
"bytesInOutput": 1531
|
||||
"bytesInOutput": 1529
|
||||
},
|
||||
"src/classes/Dimensions.ts": {
|
||||
"bytesInOutput": 398
|
||||
},
|
||||
"src/classes/Point.ts": {
|
||||
"bytesInOutput": 472
|
||||
"bytesInOutput": 473
|
||||
},
|
||||
"src/classes/Box.ts": {
|
||||
"bytesInOutput": 3300
|
||||
"bytesInOutput": 3305
|
||||
},
|
||||
"src/classes/BoundingBox.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/classes/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
},
|
||||
"src/classes/ObjectDetection.ts": {
|
||||
"bytesInOutput": 753
|
||||
"bytesInOutput": 754
|
||||
},
|
||||
"src/classes/FaceDetection.ts": {
|
||||
"bytesInOutput": 268
|
||||
"bytesInOutput": 272
|
||||
},
|
||||
"src/ops/iou.ts": {
|
||||
"bytesInOutput": 328
|
||||
|
@ -2203,10 +2203,10 @@
|
|||
"bytesInOutput": 195
|
||||
},
|
||||
"src/classes/Rect.ts": {
|
||||
"bytesInOutput": 135
|
||||
"bytesInOutput": 136
|
||||
},
|
||||
"src/classes/FaceLandmarks.ts": {
|
||||
"bytesInOutput": 1884
|
||||
"bytesInOutput": 1888
|
||||
},
|
||||
"src/classes/FaceLandmarks5.ts": {
|
||||
"bytesInOutput": 153
|
||||
|
@ -2251,10 +2251,10 @@
|
|||
"bytesInOutput": 447
|
||||
},
|
||||
"src/draw/DrawTextField.ts": {
|
||||
"bytesInOutput": 2254
|
||||
"bytesInOutput": 2255
|
||||
},
|
||||
"src/draw/DrawBox.ts": {
|
||||
"bytesInOutput": 821
|
||||
"bytesInOutput": 825
|
||||
},
|
||||
"src/draw/drawDetections.ts": {
|
||||
"bytesInOutput": 391
|
||||
|
@ -2386,13 +2386,13 @@
|
|||
"bytesInOutput": 252
|
||||
},
|
||||
"src/faceProcessor/FaceProcessor.ts": {
|
||||
"bytesInOutput": 1543
|
||||
"bytesInOutput": 1544
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressions.ts": {
|
||||
"bytesInOutput": 527
|
||||
"bytesInOutput": 532
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressionNet.ts": {
|
||||
"bytesInOutput": 825
|
||||
"bytesInOutput": 829
|
||||
},
|
||||
"src/faceExpressionNet/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
|
@ -2437,13 +2437,13 @@
|
|||
"bytesInOutput": 0
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68NetBase.ts": {
|
||||
"bytesInOutput": 1957
|
||||
"bytesInOutput": 1958
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68Net.ts": {
|
||||
"bytesInOutput": 253
|
||||
"bytesInOutput": 257
|
||||
},
|
||||
"src/faceLandmarkNet/index.ts": {
|
||||
"bytesInOutput": 50
|
||||
"bytesInOutput": 54
|
||||
},
|
||||
"src/faceFeatureExtractor/extractParamsFromWeigthMapTiny.ts": {
|
||||
"bytesInOutput": 362
|
||||
|
@ -2452,10 +2452,10 @@
|
|||
"bytesInOutput": 517
|
||||
},
|
||||
"src/faceFeatureExtractor/TinyFaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 832
|
||||
"bytesInOutput": 833
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68TinyNet.ts": {
|
||||
"bytesInOutput": 269
|
||||
"bytesInOutput": 274
|
||||
},
|
||||
"src/faceRecognitionNet/scaleLayer.ts": {
|
||||
"bytesInOutput": 75
|
||||
|
@ -2503,7 +2503,7 @@
|
|||
"bytesInOutput": 1048
|
||||
},
|
||||
"src/ssdMobilenetv1/nonMaxSuppression.ts": {
|
||||
"bytesInOutput": 1502
|
||||
"bytesInOutput": 1504
|
||||
},
|
||||
"src/ssdMobilenetv1/outputLayer.ts": {
|
||||
"bytesInOutput": 1311
|
||||
|
@ -2515,19 +2515,19 @@
|
|||
"bytesInOutput": 1364
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1Options.ts": {
|
||||
"bytesInOutput": 554
|
||||
"bytesInOutput": 555
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1.ts": {
|
||||
"bytesInOutput": 1837
|
||||
"bytesInOutput": 1841
|
||||
},
|
||||
"src/ssdMobilenetv1/index.ts": {
|
||||
"bytesInOutput": 234
|
||||
"bytesInOutput": 235
|
||||
},
|
||||
"src/tinyYolov2/const.ts": {
|
||||
"bytesInOutput": 486
|
||||
"bytesInOutput": 491
|
||||
},
|
||||
"src/tinyYolov2/config.ts": {
|
||||
"bytesInOutput": 1169
|
||||
"bytesInOutput": 1173
|
||||
},
|
||||
"src/tinyYolov2/leaky.ts": {
|
||||
"bytesInOutput": 116
|
||||
|
@ -2548,7 +2548,7 @@
|
|||
"bytesInOutput": 588
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2Base.ts": {
|
||||
"bytesInOutput": 5763
|
||||
"bytesInOutput": 5767
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2.ts": {
|
||||
"bytesInOutput": 782
|
||||
|
@ -2557,37 +2557,37 @@
|
|||
"bytesInOutput": 139
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetectorOptions.ts": {
|
||||
"bytesInOutput": 132
|
||||
"bytesInOutput": 133
|
||||
},
|
||||
"src/globalApi/ComposableTask.ts": {
|
||||
"bytesInOutput": 155
|
||||
"bytesInOutput": 159
|
||||
},
|
||||
"src/globalApi/extractFacesAndComputeResults.ts": {
|
||||
"bytesInOutput": 772
|
||||
},
|
||||
"src/tinyFaceDetector/const.ts": {
|
||||
"bytesInOutput": 215
|
||||
"bytesInOutput": 216
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetector.ts": {
|
||||
"bytesInOutput": 626
|
||||
"bytesInOutput": 631
|
||||
},
|
||||
"src/globalApi/nets.ts": {
|
||||
"bytesInOutput": 1531
|
||||
"bytesInOutput": 1536
|
||||
},
|
||||
"src/globalApi/PredictFaceExpressionsTask.ts": {
|
||||
"bytesInOutput": 1693
|
||||
"bytesInOutput": 1702
|
||||
},
|
||||
"src/globalApi/PredictAgeAndGenderTask.ts": {
|
||||
"bytesInOutput": 1787
|
||||
"bytesInOutput": 1796
|
||||
},
|
||||
"src/globalApi/ComputeFaceDescriptorsTasks.ts": {
|
||||
"bytesInOutput": 1392
|
||||
"bytesInOutput": 1401
|
||||
},
|
||||
"src/globalApi/DetectFaceLandmarksTasks.ts": {
|
||||
"bytesInOutput": 1859
|
||||
"bytesInOutput": 1868
|
||||
},
|
||||
"src/globalApi/DetectFacesTasks.ts": {
|
||||
"bytesInOutput": 2231
|
||||
"bytesInOutput": 2235
|
||||
},
|
||||
"src/globalApi/detectFaces.ts": {
|
||||
"bytesInOutput": 228
|
||||
|
@ -2611,7 +2611,7 @@
|
|||
"bytesInOutput": 824
|
||||
}
|
||||
},
|
||||
"bytes": 1699552
|
||||
"bytes": 1700928
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytes": 1046,
|
||||
"bytes": 1054,
|
||||
"imports": []
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
|
@ -1077,7 +1077,7 @@
|
|||
]
|
||||
},
|
||||
"package.json": {
|
||||
"bytes": 1728,
|
||||
"bytes": 1807,
|
||||
"imports": []
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
|
@ -2136,50 +2136,50 @@
|
|||
"dist/face-api.node-gpu.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 303586
|
||||
"bytes": 311396
|
||||
},
|
||||
"dist/face-api.node-gpu.js": {
|
||||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 966
|
||||
"bytesInOutput": 971
|
||||
},
|
||||
"src/env/isNodejs.ts": {
|
||||
"bytesInOutput": 229
|
||||
"bytesInOutput": 233
|
||||
},
|
||||
"src/index.ts": {
|
||||
"bytesInOutput": 4728
|
||||
"bytesInOutput": 4729
|
||||
},
|
||||
"src/draw/index.ts": {
|
||||
"bytesInOutput": 447
|
||||
"bytesInOutput": 451
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
"bytesInOutput": 313
|
||||
},
|
||||
"src/utils/index.ts": {
|
||||
"bytesInOutput": 1561
|
||||
"bytesInOutput": 1560
|
||||
},
|
||||
"src/classes/Dimensions.ts": {
|
||||
"bytesInOutput": 394
|
||||
"bytesInOutput": 398
|
||||
},
|
||||
"src/classes/Point.ts": {
|
||||
"bytesInOutput": 472
|
||||
"bytesInOutput": 473
|
||||
},
|
||||
"src/classes/Box.ts": {
|
||||
"bytesInOutput": 3300
|
||||
"bytesInOutput": 3305
|
||||
},
|
||||
"src/classes/BoundingBox.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/classes/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
},
|
||||
"src/classes/ObjectDetection.ts": {
|
||||
"bytesInOutput": 753
|
||||
"bytesInOutput": 754
|
||||
},
|
||||
"src/classes/FaceDetection.ts": {
|
||||
"bytesInOutput": 268
|
||||
"bytesInOutput": 272
|
||||
},
|
||||
"src/ops/iou.ts": {
|
||||
"bytesInOutput": 328
|
||||
|
@ -2203,10 +2203,10 @@
|
|||
"bytesInOutput": 188
|
||||
},
|
||||
"src/classes/Rect.ts": {
|
||||
"bytesInOutput": 135
|
||||
"bytesInOutput": 136
|
||||
},
|
||||
"src/classes/FaceLandmarks.ts": {
|
||||
"bytesInOutput": 1884
|
||||
"bytesInOutput": 1888
|
||||
},
|
||||
"src/classes/FaceLandmarks5.ts": {
|
||||
"bytesInOutput": 153
|
||||
|
@ -2251,16 +2251,16 @@
|
|||
"bytesInOutput": 446
|
||||
},
|
||||
"src/draw/DrawTextField.ts": {
|
||||
"bytesInOutput": 2254
|
||||
"bytesInOutput": 2255
|
||||
},
|
||||
"src/draw/DrawBox.ts": {
|
||||
"bytesInOutput": 821
|
||||
"bytesInOutput": 825
|
||||
},
|
||||
"src/draw/drawDetections.ts": {
|
||||
"bytesInOutput": 390
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressionNet.ts": {
|
||||
"bytesInOutput": 874
|
||||
"bytesInOutput": 878
|
||||
},
|
||||
"src/dom/isMediaLoaded.ts": {
|
||||
"bytesInOutput": 151
|
||||
|
@ -2323,16 +2323,16 @@
|
|||
"bytesInOutput": 201
|
||||
},
|
||||
"src/faceFeatureExtractor/FaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 895
|
||||
"bytesInOutput": 897
|
||||
},
|
||||
"src/NeuralNetwork.ts": {
|
||||
"bytesInOutput": 3282
|
||||
"bytesInOutput": 3292
|
||||
},
|
||||
"src/faceFeatureExtractor/denseBlock.ts": {
|
||||
"bytesInOutput": 1171
|
||||
"bytesInOutput": 1176
|
||||
},
|
||||
"src/common/depthwiseSeparableConv.ts": {
|
||||
"bytesInOutput": 240
|
||||
"bytesInOutput": 244
|
||||
},
|
||||
"src/common/convLayer.ts": {
|
||||
"bytesInOutput": 229
|
||||
|
@ -2350,10 +2350,10 @@
|
|||
"bytesInOutput": 428
|
||||
},
|
||||
"src/common/extractSeparableConvParamsFactory.ts": {
|
||||
"bytesInOutput": 945
|
||||
"bytesInOutput": 946
|
||||
},
|
||||
"src/common/types.ts": {
|
||||
"bytesInOutput": 173
|
||||
"bytesInOutput": 177
|
||||
},
|
||||
"src/common/extractWeightEntryFactory.ts": {
|
||||
"bytesInOutput": 366
|
||||
|
@ -2377,10 +2377,10 @@
|
|||
"bytesInOutput": 400
|
||||
},
|
||||
"src/faceProcessor/FaceProcessor.ts": {
|
||||
"bytesInOutput": 1579
|
||||
"bytesInOutput": 1585
|
||||
},
|
||||
"src/common/fullyConnectedLayer.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/faceProcessor/extractParams.ts": {
|
||||
"bytesInOutput": 382
|
||||
|
@ -2392,7 +2392,7 @@
|
|||
"bytesInOutput": 252
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressions.ts": {
|
||||
"bytesInOutput": 527
|
||||
"bytesInOutput": 532
|
||||
},
|
||||
"src/faceExpressionNet/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
|
@ -2410,13 +2410,13 @@
|
|||
"bytesInOutput": 1723
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 20
|
||||
"bytesInOutput": 21
|
||||
},
|
||||
"src/ageGenderNet/AgeGenderNet.ts": {
|
||||
"bytesInOutput": 2554
|
||||
"bytesInOutput": 2559
|
||||
},
|
||||
"src/xception/TinyXception.ts": {
|
||||
"bytesInOutput": 1901
|
||||
"bytesInOutput": 1905
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
"bytesInOutput": 2443
|
||||
|
@ -2437,16 +2437,16 @@
|
|||
"bytesInOutput": 0
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68NetBase.ts": {
|
||||
"bytesInOutput": 2029
|
||||
"bytesInOutput": 2035
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68Net.ts": {
|
||||
"bytesInOutput": 253
|
||||
"bytesInOutput": 257
|
||||
},
|
||||
"src/faceLandmarkNet/index.ts": {
|
||||
"bytesInOutput": 50
|
||||
"bytesInOutput": 54
|
||||
},
|
||||
"src/faceFeatureExtractor/TinyFaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 888
|
||||
"bytesInOutput": 889
|
||||
},
|
||||
"src/faceFeatureExtractor/extractParamsFromWeigthMapTiny.ts": {
|
||||
"bytesInOutput": 362
|
||||
|
@ -2455,16 +2455,16 @@
|
|||
"bytesInOutput": 517
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68TinyNet.ts": {
|
||||
"bytesInOutput": 269
|
||||
"bytesInOutput": 274
|
||||
},
|
||||
"src/faceRecognitionNet/FaceRecognitionNet.ts": {
|
||||
"bytesInOutput": 1705
|
||||
"bytesInOutput": 1706
|
||||
},
|
||||
"src/faceRecognitionNet/convLayer.ts": {
|
||||
"bytesInOutput": 458
|
||||
"bytesInOutput": 463
|
||||
},
|
||||
"src/faceRecognitionNet/scaleLayer.ts": {
|
||||
"bytesInOutput": 119
|
||||
"bytesInOutput": 123
|
||||
},
|
||||
"src/faceRecognitionNet/extractParams.ts": {
|
||||
"bytesInOutput": 3405
|
||||
|
@ -2491,52 +2491,52 @@
|
|||
"bytesInOutput": 244
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1.ts": {
|
||||
"bytesInOutput": 1900
|
||||
"bytesInOutput": 1905
|
||||
},
|
||||
"src/ssdMobilenetv1/extractParams.ts": {
|
||||
"bytesInOutput": 5963
|
||||
"bytesInOutput": 5967
|
||||
},
|
||||
"src/ssdMobilenetv1/extractParamsFromWeigthMap.ts": {
|
||||
"bytesInOutput": 4319
|
||||
},
|
||||
"src/ssdMobilenetv1/mobileNetV1.ts": {
|
||||
"bytesInOutput": 1110
|
||||
"bytesInOutput": 1111
|
||||
},
|
||||
"src/ssdMobilenetv1/pointwiseConvLayer.ts": {
|
||||
"bytesInOutput": 235
|
||||
"bytesInOutput": 239
|
||||
},
|
||||
"src/ssdMobilenetv1/nonMaxSuppression.ts": {
|
||||
"bytesInOutput": 1502
|
||||
"bytesInOutput": 1504
|
||||
},
|
||||
"src/ssdMobilenetv1/outputLayer.ts": {
|
||||
"bytesInOutput": 1590
|
||||
},
|
||||
"src/ssdMobilenetv1/predictionLayer.ts": {
|
||||
"bytesInOutput": 1418
|
||||
"bytesInOutput": 1419
|
||||
},
|
||||
"src/ssdMobilenetv1/boxPredictionLayer.ts": {
|
||||
"bytesInOutput": 350
|
||||
"bytesInOutput": 354
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1Options.ts": {
|
||||
"bytesInOutput": 554
|
||||
"bytesInOutput": 555
|
||||
},
|
||||
"src/ssdMobilenetv1/index.ts": {
|
||||
"bytesInOutput": 234
|
||||
"bytesInOutput": 235
|
||||
},
|
||||
"src/tinyYolov2/const.ts": {
|
||||
"bytesInOutput": 485
|
||||
"bytesInOutput": 490
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2Base.ts": {
|
||||
"bytesInOutput": 5885
|
||||
"bytesInOutput": 5894
|
||||
},
|
||||
"src/tinyYolov2/config.ts": {
|
||||
"bytesInOutput": 1164
|
||||
"bytesInOutput": 1168
|
||||
},
|
||||
"src/tinyYolov2/convWithBatchNorm.ts": {
|
||||
"bytesInOutput": 322
|
||||
"bytesInOutput": 323
|
||||
},
|
||||
"src/tinyYolov2/leaky.ts": {
|
||||
"bytesInOutput": 178
|
||||
"bytesInOutput": 182
|
||||
},
|
||||
"src/tinyYolov2/depthwiseSeparableConv.ts": {
|
||||
"bytesInOutput": 293
|
||||
|
@ -2557,37 +2557,37 @@
|
|||
"bytesInOutput": 139
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetectorOptions.ts": {
|
||||
"bytesInOutput": 132
|
||||
"bytesInOutput": 133
|
||||
},
|
||||
"src/globalApi/ComposableTask.ts": {
|
||||
"bytesInOutput": 154
|
||||
"bytesInOutput": 159
|
||||
},
|
||||
"src/globalApi/DetectFaceLandmarksTasks.ts": {
|
||||
"bytesInOutput": 1912
|
||||
"bytesInOutput": 1926
|
||||
},
|
||||
"src/globalApi/extractFacesAndComputeResults.ts": {
|
||||
"bytesInOutput": 812
|
||||
"bytesInOutput": 816
|
||||
},
|
||||
"src/tinyFaceDetector/const.ts": {
|
||||
"bytesInOutput": 215
|
||||
"bytesInOutput": 216
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetector.ts": {
|
||||
"bytesInOutput": 624
|
||||
"bytesInOutput": 629
|
||||
},
|
||||
"src/globalApi/nets.ts": {
|
||||
"bytesInOutput": 1515
|
||||
"bytesInOutput": 1520
|
||||
},
|
||||
"src/globalApi/PredictFaceExpressionsTask.ts": {
|
||||
"bytesInOutput": 1691
|
||||
"bytesInOutput": 1700
|
||||
},
|
||||
"src/globalApi/PredictAgeAndGenderTask.ts": {
|
||||
"bytesInOutput": 1785
|
||||
"bytesInOutput": 1794
|
||||
},
|
||||
"src/globalApi/ComputeFaceDescriptorsTasks.ts": {
|
||||
"bytesInOutput": 1390
|
||||
"bytesInOutput": 1399
|
||||
},
|
||||
"src/globalApi/DetectFacesTasks.ts": {
|
||||
"bytesInOutput": 2221
|
||||
"bytesInOutput": 2225
|
||||
},
|
||||
"src/globalApi/detectFaces.ts": {
|
||||
"bytesInOutput": 224
|
||||
|
@ -2611,7 +2611,7 @@
|
|||
"bytesInOutput": 824
|
||||
}
|
||||
},
|
||||
"bytes": 132274
|
||||
"bytes": 132477
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytes": 1042,
|
||||
"bytes": 1050,
|
||||
"imports": []
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
|
@ -1077,7 +1077,7 @@
|
|||
]
|
||||
},
|
||||
"package.json": {
|
||||
"bytes": 1728,
|
||||
"bytes": 1807,
|
||||
"imports": []
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
|
@ -2136,50 +2136,50 @@
|
|||
"dist/face-api.node.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 303578
|
||||
"bytes": 311388
|
||||
},
|
||||
"dist/face-api.node.js": {
|
||||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 962
|
||||
"bytesInOutput": 967
|
||||
},
|
||||
"src/env/isNodejs.ts": {
|
||||
"bytesInOutput": 229
|
||||
"bytesInOutput": 233
|
||||
},
|
||||
"src/index.ts": {
|
||||
"bytesInOutput": 4728
|
||||
"bytesInOutput": 4729
|
||||
},
|
||||
"src/draw/index.ts": {
|
||||
"bytesInOutput": 447
|
||||
"bytesInOutput": 451
|
||||
},
|
||||
"src/draw/drawContour.ts": {
|
||||
"bytesInOutput": 313
|
||||
},
|
||||
"src/utils/index.ts": {
|
||||
"bytesInOutput": 1561
|
||||
"bytesInOutput": 1560
|
||||
},
|
||||
"src/classes/Dimensions.ts": {
|
||||
"bytesInOutput": 394
|
||||
"bytesInOutput": 398
|
||||
},
|
||||
"src/classes/Point.ts": {
|
||||
"bytesInOutput": 472
|
||||
"bytesInOutput": 473
|
||||
},
|
||||
"src/classes/Box.ts": {
|
||||
"bytesInOutput": 3300
|
||||
"bytesInOutput": 3305
|
||||
},
|
||||
"src/classes/BoundingBox.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/classes/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
},
|
||||
"src/classes/ObjectDetection.ts": {
|
||||
"bytesInOutput": 753
|
||||
"bytesInOutput": 754
|
||||
},
|
||||
"src/classes/FaceDetection.ts": {
|
||||
"bytesInOutput": 268
|
||||
"bytesInOutput": 272
|
||||
},
|
||||
"src/ops/iou.ts": {
|
||||
"bytesInOutput": 328
|
||||
|
@ -2203,10 +2203,10 @@
|
|||
"bytesInOutput": 188
|
||||
},
|
||||
"src/classes/Rect.ts": {
|
||||
"bytesInOutput": 135
|
||||
"bytesInOutput": 136
|
||||
},
|
||||
"src/classes/FaceLandmarks.ts": {
|
||||
"bytesInOutput": 1884
|
||||
"bytesInOutput": 1888
|
||||
},
|
||||
"src/classes/FaceLandmarks5.ts": {
|
||||
"bytesInOutput": 153
|
||||
|
@ -2251,16 +2251,16 @@
|
|||
"bytesInOutput": 446
|
||||
},
|
||||
"src/draw/DrawTextField.ts": {
|
||||
"bytesInOutput": 2254
|
||||
"bytesInOutput": 2255
|
||||
},
|
||||
"src/draw/DrawBox.ts": {
|
||||
"bytesInOutput": 821
|
||||
"bytesInOutput": 825
|
||||
},
|
||||
"src/draw/drawDetections.ts": {
|
||||
"bytesInOutput": 390
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressionNet.ts": {
|
||||
"bytesInOutput": 874
|
||||
"bytesInOutput": 878
|
||||
},
|
||||
"src/dom/isMediaLoaded.ts": {
|
||||
"bytesInOutput": 151
|
||||
|
@ -2323,16 +2323,16 @@
|
|||
"bytesInOutput": 201
|
||||
},
|
||||
"src/faceFeatureExtractor/FaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 895
|
||||
"bytesInOutput": 897
|
||||
},
|
||||
"src/NeuralNetwork.ts": {
|
||||
"bytesInOutput": 3282
|
||||
"bytesInOutput": 3292
|
||||
},
|
||||
"src/faceFeatureExtractor/denseBlock.ts": {
|
||||
"bytesInOutput": 1171
|
||||
"bytesInOutput": 1176
|
||||
},
|
||||
"src/common/depthwiseSeparableConv.ts": {
|
||||
"bytesInOutput": 240
|
||||
"bytesInOutput": 244
|
||||
},
|
||||
"src/common/convLayer.ts": {
|
||||
"bytesInOutput": 229
|
||||
|
@ -2350,10 +2350,10 @@
|
|||
"bytesInOutput": 428
|
||||
},
|
||||
"src/common/extractSeparableConvParamsFactory.ts": {
|
||||
"bytesInOutput": 945
|
||||
"bytesInOutput": 946
|
||||
},
|
||||
"src/common/types.ts": {
|
||||
"bytesInOutput": 173
|
||||
"bytesInOutput": 177
|
||||
},
|
||||
"src/common/extractWeightEntryFactory.ts": {
|
||||
"bytesInOutput": 366
|
||||
|
@ -2377,10 +2377,10 @@
|
|||
"bytesInOutput": 400
|
||||
},
|
||||
"src/faceProcessor/FaceProcessor.ts": {
|
||||
"bytesInOutput": 1579
|
||||
"bytesInOutput": 1585
|
||||
},
|
||||
"src/common/fullyConnectedLayer.ts": {
|
||||
"bytesInOutput": 149
|
||||
"bytesInOutput": 153
|
||||
},
|
||||
"src/faceProcessor/extractParams.ts": {
|
||||
"bytesInOutput": 382
|
||||
|
@ -2392,7 +2392,7 @@
|
|||
"bytesInOutput": 252
|
||||
},
|
||||
"src/faceExpressionNet/FaceExpressions.ts": {
|
||||
"bytesInOutput": 527
|
||||
"bytesInOutput": 532
|
||||
},
|
||||
"src/faceExpressionNet/index.ts": {
|
||||
"bytesInOutput": 0
|
||||
|
@ -2410,13 +2410,13 @@
|
|||
"bytesInOutput": 1723
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 20
|
||||
"bytesInOutput": 21
|
||||
},
|
||||
"src/ageGenderNet/AgeGenderNet.ts": {
|
||||
"bytesInOutput": 2554
|
||||
"bytesInOutput": 2559
|
||||
},
|
||||
"src/xception/TinyXception.ts": {
|
||||
"bytesInOutput": 1901
|
||||
"bytesInOutput": 1905
|
||||
},
|
||||
"src/xception/extractParams.ts": {
|
||||
"bytesInOutput": 2443
|
||||
|
@ -2437,16 +2437,16 @@
|
|||
"bytesInOutput": 0
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68NetBase.ts": {
|
||||
"bytesInOutput": 2029
|
||||
"bytesInOutput": 2035
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68Net.ts": {
|
||||
"bytesInOutput": 253
|
||||
"bytesInOutput": 257
|
||||
},
|
||||
"src/faceLandmarkNet/index.ts": {
|
||||
"bytesInOutput": 50
|
||||
"bytesInOutput": 54
|
||||
},
|
||||
"src/faceFeatureExtractor/TinyFaceFeatureExtractor.ts": {
|
||||
"bytesInOutput": 888
|
||||
"bytesInOutput": 889
|
||||
},
|
||||
"src/faceFeatureExtractor/extractParamsFromWeigthMapTiny.ts": {
|
||||
"bytesInOutput": 362
|
||||
|
@ -2455,16 +2455,16 @@
|
|||
"bytesInOutput": 517
|
||||
},
|
||||
"src/faceLandmarkNet/FaceLandmark68TinyNet.ts": {
|
||||
"bytesInOutput": 269
|
||||
"bytesInOutput": 274
|
||||
},
|
||||
"src/faceRecognitionNet/FaceRecognitionNet.ts": {
|
||||
"bytesInOutput": 1705
|
||||
"bytesInOutput": 1706
|
||||
},
|
||||
"src/faceRecognitionNet/convLayer.ts": {
|
||||
"bytesInOutput": 458
|
||||
"bytesInOutput": 463
|
||||
},
|
||||
"src/faceRecognitionNet/scaleLayer.ts": {
|
||||
"bytesInOutput": 119
|
||||
"bytesInOutput": 123
|
||||
},
|
||||
"src/faceRecognitionNet/extractParams.ts": {
|
||||
"bytesInOutput": 3405
|
||||
|
@ -2491,52 +2491,52 @@
|
|||
"bytesInOutput": 244
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1.ts": {
|
||||
"bytesInOutput": 1900
|
||||
"bytesInOutput": 1905
|
||||
},
|
||||
"src/ssdMobilenetv1/extractParams.ts": {
|
||||
"bytesInOutput": 5963
|
||||
"bytesInOutput": 5967
|
||||
},
|
||||
"src/ssdMobilenetv1/extractParamsFromWeigthMap.ts": {
|
||||
"bytesInOutput": 4319
|
||||
},
|
||||
"src/ssdMobilenetv1/mobileNetV1.ts": {
|
||||
"bytesInOutput": 1110
|
||||
"bytesInOutput": 1111
|
||||
},
|
||||
"src/ssdMobilenetv1/pointwiseConvLayer.ts": {
|
||||
"bytesInOutput": 235
|
||||
"bytesInOutput": 239
|
||||
},
|
||||
"src/ssdMobilenetv1/nonMaxSuppression.ts": {
|
||||
"bytesInOutput": 1502
|
||||
"bytesInOutput": 1504
|
||||
},
|
||||
"src/ssdMobilenetv1/outputLayer.ts": {
|
||||
"bytesInOutput": 1590
|
||||
},
|
||||
"src/ssdMobilenetv1/predictionLayer.ts": {
|
||||
"bytesInOutput": 1418
|
||||
"bytesInOutput": 1419
|
||||
},
|
||||
"src/ssdMobilenetv1/boxPredictionLayer.ts": {
|
||||
"bytesInOutput": 350
|
||||
"bytesInOutput": 354
|
||||
},
|
||||
"src/ssdMobilenetv1/SsdMobilenetv1Options.ts": {
|
||||
"bytesInOutput": 554
|
||||
"bytesInOutput": 555
|
||||
},
|
||||
"src/ssdMobilenetv1/index.ts": {
|
||||
"bytesInOutput": 234
|
||||
"bytesInOutput": 235
|
||||
},
|
||||
"src/tinyYolov2/const.ts": {
|
||||
"bytesInOutput": 485
|
||||
"bytesInOutput": 490
|
||||
},
|
||||
"src/tinyYolov2/TinyYolov2Base.ts": {
|
||||
"bytesInOutput": 5885
|
||||
"bytesInOutput": 5894
|
||||
},
|
||||
"src/tinyYolov2/config.ts": {
|
||||
"bytesInOutput": 1164
|
||||
"bytesInOutput": 1168
|
||||
},
|
||||
"src/tinyYolov2/convWithBatchNorm.ts": {
|
||||
"bytesInOutput": 322
|
||||
"bytesInOutput": 323
|
||||
},
|
||||
"src/tinyYolov2/leaky.ts": {
|
||||
"bytesInOutput": 178
|
||||
"bytesInOutput": 182
|
||||
},
|
||||
"src/tinyYolov2/depthwiseSeparableConv.ts": {
|
||||
"bytesInOutput": 293
|
||||
|
@ -2557,37 +2557,37 @@
|
|||
"bytesInOutput": 139
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetectorOptions.ts": {
|
||||
"bytesInOutput": 132
|
||||
"bytesInOutput": 133
|
||||
},
|
||||
"src/globalApi/ComposableTask.ts": {
|
||||
"bytesInOutput": 154
|
||||
"bytesInOutput": 159
|
||||
},
|
||||
"src/globalApi/DetectFaceLandmarksTasks.ts": {
|
||||
"bytesInOutput": 1912
|
||||
"bytesInOutput": 1926
|
||||
},
|
||||
"src/globalApi/extractFacesAndComputeResults.ts": {
|
||||
"bytesInOutput": 812
|
||||
"bytesInOutput": 816
|
||||
},
|
||||
"src/tinyFaceDetector/const.ts": {
|
||||
"bytesInOutput": 215
|
||||
"bytesInOutput": 216
|
||||
},
|
||||
"src/tinyFaceDetector/TinyFaceDetector.ts": {
|
||||
"bytesInOutput": 624
|
||||
"bytesInOutput": 629
|
||||
},
|
||||
"src/globalApi/nets.ts": {
|
||||
"bytesInOutput": 1515
|
||||
"bytesInOutput": 1520
|
||||
},
|
||||
"src/globalApi/PredictFaceExpressionsTask.ts": {
|
||||
"bytesInOutput": 1691
|
||||
"bytesInOutput": 1700
|
||||
},
|
||||
"src/globalApi/PredictAgeAndGenderTask.ts": {
|
||||
"bytesInOutput": 1785
|
||||
"bytesInOutput": 1794
|
||||
},
|
||||
"src/globalApi/ComputeFaceDescriptorsTasks.ts": {
|
||||
"bytesInOutput": 1390
|
||||
"bytesInOutput": 1399
|
||||
},
|
||||
"src/globalApi/DetectFacesTasks.ts": {
|
||||
"bytesInOutput": 2221
|
||||
"bytesInOutput": 2225
|
||||
},
|
||||
"src/globalApi/detectFaces.ts": {
|
||||
"bytesInOutput": 224
|
||||
|
@ -2611,7 +2611,7 @@
|
|||
"bytesInOutput": 824
|
||||
}
|
||||
},
|
||||
"bytes": 132266
|
||||
"bytes": 132469
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -109,7 +109,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/engine.js": {
|
||||
"bytes": 41114,
|
||||
"bytes": 41541,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/backends/backend.js"
|
||||
|
@ -633,7 +633,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/browser.js": {
|
||||
"bytes": 8776,
|
||||
"bytes": 8954,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/engine.js"
|
||||
|
@ -16969,7 +16969,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Bincount.js": {
|
||||
"bytes": 1386,
|
||||
"bytes": 1366,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -17120,7 +17120,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js": {
|
||||
"bytes": 5072,
|
||||
"bytes": 5062,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -17342,7 +17342,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DenseBincount.js": {
|
||||
"bytes": 1939,
|
||||
"bytes": 1919,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -17645,7 +17645,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels.js": {
|
||||
"bytes": 2748,
|
||||
"bytes": 2870,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -18787,7 +18787,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SplitV.js": {
|
||||
"bytes": 1592,
|
||||
"bytes": 1594,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -18900,7 +18900,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tile.js": {
|
||||
"bytes": 1615,
|
||||
"bytes": 1724,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -18914,7 +18914,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/TopK.js": {
|
||||
"bytes": 1425,
|
||||
"bytes": 1415,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -20251,6 +20251,17 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js": {
|
||||
"bytes": 900,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
},
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/unary_kernel.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js": {
|
||||
"bytes": 900,
|
||||
"imports": [
|
||||
|
@ -20320,7 +20331,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js": {
|
||||
"bytes": 1610,
|
||||
"bytes": 1611,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -20455,7 +20466,7 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js": {
|
||||
"bytes": 7247,
|
||||
"bytes": 7311,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-core/dist/index.js"
|
||||
|
@ -20652,6 +20663,9 @@
|
|||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RotateWithOffset.js"
|
||||
},
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js"
|
||||
},
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js"
|
||||
},
|
||||
|
@ -20735,7 +20749,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js": {
|
||||
"bytes": 73950,
|
||||
"bytes": 74064,
|
||||
"imports": [
|
||||
{
|
||||
"path": "empty:path"
|
||||
|
@ -20759,7 +20773,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js": {
|
||||
"bytes": 28294,
|
||||
"bytes": 28411,
|
||||
"imports": [
|
||||
{
|
||||
"path": "empty:path"
|
||||
|
@ -20840,7 +20854,7 @@
|
|||
"dist/tfjs.esm.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1062433
|
||||
"bytes": 1146818
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"imports": [],
|
||||
|
@ -21325,61 +21339,61 @@
|
|||
],
|
||||
"inputs": {
|
||||
"empty:/home/vlado/dev/face-api/node_modules/node-fetch/browser.js": {
|
||||
"bytesInOutput": 34
|
||||
"bytesInOutput": 39
|
||||
},
|
||||
"node_modules/seedrandom/lib/alea.js": {
|
||||
"bytesInOutput": 1260
|
||||
"bytesInOutput": 1265
|
||||
},
|
||||
"node_modules/seedrandom/lib/xor128.js": {
|
||||
"bytesInOutput": 1022
|
||||
"bytesInOutput": 1027
|
||||
},
|
||||
"node_modules/seedrandom/lib/xorwow.js": {
|
||||
"bytesInOutput": 1127
|
||||
"bytesInOutput": 1132
|
||||
},
|
||||
"node_modules/seedrandom/lib/xorshift7.js": {
|
||||
"bytesInOutput": 1279
|
||||
"bytesInOutput": 1284
|
||||
},
|
||||
"node_modules/seedrandom/lib/xor4096.js": {
|
||||
"bytesInOutput": 1478
|
||||
"bytesInOutput": 1483
|
||||
},
|
||||
"node_modules/seedrandom/lib/tychei.js": {
|
||||
"bytesInOutput": 1149
|
||||
"bytesInOutput": 1154
|
||||
},
|
||||
"empty:crypto": {
|
||||
"bytesInOutput": 33
|
||||
"bytesInOutput": 38
|
||||
},
|
||||
"node_modules/seedrandom/seedrandom.js": {
|
||||
"bytesInOutput": 2539
|
||||
"bytesInOutput": 2544
|
||||
},
|
||||
"node_modules/seedrandom/index.js": {
|
||||
"bytesInOutput": 353
|
||||
"bytesInOutput": 358
|
||||
},
|
||||
"empty:/home/vlado/dev/face-api/node_modules/string_decoder/lib/string_decoder.js": {
|
||||
"bytesInOutput": 41
|
||||
"bytesInOutput": 46
|
||||
},
|
||||
"empty:path": {
|
||||
"bytesInOutput": 31
|
||||
"bytesInOutput": 36
|
||||
},
|
||||
"empty:worker_threads": {
|
||||
"bytesInOutput": 41
|
||||
"bytesInOutput": 46
|
||||
},
|
||||
"empty:perf_hooks": {
|
||||
"bytesInOutput": 37
|
||||
"bytesInOutput": 42
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js": {
|
||||
"bytesInOutput": 70101
|
||||
"bytesInOutput": 70199
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js": {
|
||||
"bytesInOutput": 26003
|
||||
"bytesInOutput": 26105
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/backends/backend.js": {
|
||||
"bytesInOutput": 9449
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/util_base.js": {
|
||||
"bytesInOutput": 8567
|
||||
"bytesInOutput": 8547
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/environment.js": {
|
||||
"bytesInOutput": 2834
|
||||
"bytesInOutput": 2836
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/global_util.js": {
|
||||
"bytesInOutput": 657
|
||||
|
@ -21388,7 +21402,7 @@
|
|||
"bytesInOutput": 3328
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/kernel_registry.js": {
|
||||
"bytesInOutput": 1743
|
||||
"bytesInOutput": 1741
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/util.js": {
|
||||
"bytesInOutput": 2856
|
||||
|
@ -21406,13 +21420,13 @@
|
|||
"bytesInOutput": 4847
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/tensor_util.js": {
|
||||
"bytesInOutput": 1057
|
||||
"bytesInOutput": 1066
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/types.js": {
|
||||
"bytesInOutput": 1557
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/engine.js": {
|
||||
"bytesInOutput": 19459
|
||||
"bytesInOutput": 19509
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/device_util.js": {
|
||||
"bytesInOutput": 2380
|
||||
|
@ -21439,16 +21453,16 @@
|
|||
"bytesInOutput": 91
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/io_utils.js": {
|
||||
"bytesInOutput": 8137
|
||||
"bytesInOutput": 8136
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/router_registry.js": {
|
||||
"bytesInOutput": 1190
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/indexed_db.js": {
|
||||
"bytesInOutput": 5551
|
||||
"bytesInOutput": 5549
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/local_storage.js": {
|
||||
"bytesInOutput": 5867
|
||||
"bytesInOutput": 5865
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/model_management.js": {
|
||||
"bytesInOutput": 3226
|
||||
|
@ -21457,7 +21471,7 @@
|
|||
"bytesInOutput": 723
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/platforms/platform_node.js": {
|
||||
"bytesInOutput": 769
|
||||
"bytesInOutput": 774
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/buffer.js": {
|
||||
"bytesInOutput": 155
|
||||
|
@ -21478,7 +21492,7 @@
|
|||
"bytesInOutput": 729
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/browser_files.js": {
|
||||
"bytesInOutput": 5984
|
||||
"bytesInOutput": 5982
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/io/progress.js": {
|
||||
"bytesInOutput": 1114
|
||||
|
@ -21508,13 +21522,13 @@
|
|||
"bytesInOutput": 1155
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/browser.js": {
|
||||
"bytesInOutput": 3978
|
||||
"bytesInOutput": 4099
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/tensor3d.js": {
|
||||
"bytesInOutput": 525
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd_util.js": {
|
||||
"bytesInOutput": 1398
|
||||
"bytesInOutput": 1402
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd_util.js": {
|
||||
"bytesInOutput": 2589
|
||||
|
@ -21613,7 +21627,7 @@
|
|||
"bytesInOutput": 889
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/batch_to_space_nd.js": {
|
||||
"bytesInOutput": 713
|
||||
"bytesInOutput": 712
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm_util.js": {
|
||||
"bytesInOutput": 213
|
||||
|
@ -21634,7 +21648,7 @@
|
|||
"bytesInOutput": 617
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_to.js": {
|
||||
"bytesInOutput": 895
|
||||
"bytesInOutput": 894
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/ceil.js": {
|
||||
"bytesInOutput": 121
|
||||
|
@ -21688,7 +21702,7 @@
|
|||
"bytesInOutput": 784
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/depth_to_space.js": {
|
||||
"bytesInOutput": 957
|
||||
"bytesInOutput": 956
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d.js": {
|
||||
"bytesInOutput": 1149
|
||||
|
@ -21898,7 +21912,7 @@
|
|||
"bytesInOutput": 288
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/space_to_batch_nd.js": {
|
||||
"bytesInOutput": 762
|
||||
"bytesInOutput": 761
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/pool.js": {
|
||||
"bytesInOutput": 2100
|
||||
|
@ -21913,10 +21927,10 @@
|
|||
"bytesInOutput": 222
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/rand.js": {
|
||||
"bytesInOutput": 414
|
||||
"bytesInOutput": 415
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/rand_util.js": {
|
||||
"bytesInOutput": 2341
|
||||
"bytesInOutput": 2345
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/random_gamma.js": {
|
||||
"bytesInOutput": 401
|
||||
|
@ -22195,7 +22209,7 @@
|
|||
"bytesInOutput": 1078
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/linalg/band_part.js": {
|
||||
"bytesInOutput": 1006
|
||||
"bytesInOutput": 1004
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/linalg/gram_schmidt.js": {
|
||||
"bytesInOutput": 854
|
||||
|
@ -22237,25 +22251,25 @@
|
|||
"bytesInOutput": 1246
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/adadelta_optimizer.js": {
|
||||
"bytesInOutput": 2521
|
||||
"bytesInOutput": 2526
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/adagrad_optimizer.js": {
|
||||
"bytesInOutput": 1781
|
||||
"bytesInOutput": 1786
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/adam_optimizer.js": {
|
||||
"bytesInOutput": 3170
|
||||
"bytesInOutput": 3175
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/adamax_optimizer.js": {
|
||||
"bytesInOutput": 2570
|
||||
"bytesInOutput": 2575
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/sgd_optimizer.js": {
|
||||
"bytesInOutput": 1128
|
||||
"bytesInOutput": 1133
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/momentum_optimizer.js": {
|
||||
"bytesInOutput": 1846
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/rmsprop_optimizer.js": {
|
||||
"bytesInOutput": 4110
|
||||
"bytesInOutput": 4115
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer_constructors.js": {
|
||||
"bytesInOutput": 868
|
||||
|
@ -22279,7 +22293,7 @@
|
|||
"bytesInOutput": 208
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/array_ops_util.js": {
|
||||
"bytesInOutput": 1827
|
||||
"bytesInOutput": 1826
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/selu_util.js": {
|
||||
"bytesInOutput": 69
|
||||
|
@ -22294,7 +22308,7 @@
|
|||
"bytesInOutput": 1700
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/split_util.js": {
|
||||
"bytesInOutput": 777
|
||||
"bytesInOutput": 776
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/ops/segment_util.js": {
|
||||
"bytesInOutput": 1851
|
||||
|
@ -23140,13 +23154,13 @@
|
|||
"bytesInOutput": 1408
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/topology.js": {
|
||||
"bytesInOutput": 15358
|
||||
"bytesInOutput": 15371
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/input_layer.js": {
|
||||
"bytesInOutput": 2399
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/logs.js": {
|
||||
"bytesInOutput": 556
|
||||
"bytesInOutput": 561
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js": {
|
||||
"bytesInOutput": 7230
|
||||
|
@ -23164,7 +23178,7 @@
|
|||
"bytesInOutput": 651
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/user_defined_metadata.js": {
|
||||
"bytesInOutput": 1235
|
||||
"bytesInOutput": 1223
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/utils/layer_utils.js": {
|
||||
"bytesInOutput": 3552
|
||||
|
@ -23176,10 +23190,10 @@
|
|||
"bytesInOutput": 21
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/executor.js": {
|
||||
"bytesInOutput": 6455
|
||||
"bytesInOutput": 6457
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/container.js": {
|
||||
"bytesInOutput": 19972
|
||||
"bytesInOutput": 19995
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/training_utils.js": {
|
||||
"bytesInOutput": 2452
|
||||
|
@ -23188,10 +23202,10 @@
|
|||
"bytesInOutput": 8826
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/training_tensors.js": {
|
||||
"bytesInOutput": 6985
|
||||
"bytesInOutput": 6990
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/engine/training.js": {
|
||||
"bytesInOutput": 25174
|
||||
"bytesInOutput": 25215
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/models.js": {
|
||||
"bytesInOutput": 10187
|
||||
|
@ -23221,16 +23235,16 @@
|
|||
"bytesInOutput": 29664
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_recurrent.js": {
|
||||
"bytesInOutput": 9078
|
||||
"bytesInOutput": 9083
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/layers/core.js": {
|
||||
"bytesInOutput": 9931
|
||||
"bytesInOutput": 9930
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/layers/embeddings.js": {
|
||||
"bytesInOutput": 2792
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/layers/merge.js": {
|
||||
"bytesInOutput": 11966
|
||||
"bytesInOutput": 11970
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/layers/noise.js": {
|
||||
"bytesInOutput": 2316
|
||||
|
@ -23272,55 +23286,55 @@
|
|||
"bytesInOutput": 2242
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/arithmetic.js": {
|
||||
"bytesInOutput": 2949
|
||||
"bytesInOutput": 2950
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/basic_math.js": {
|
||||
"bytesInOutput": 6693
|
||||
"bytesInOutput": 6698
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/control.js": {
|
||||
"bytesInOutput": 7192
|
||||
"bytesInOutput": 7197
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/convolution.js": {
|
||||
"bytesInOutput": 6630
|
||||
"bytesInOutput": 6635
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/creation.js": {
|
||||
"bytesInOutput": 2790
|
||||
"bytesInOutput": 2795
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/dynamic.js": {
|
||||
"bytesInOutput": 1689
|
||||
"bytesInOutput": 1694
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/evaluation.js": {
|
||||
"bytesInOutput": 454
|
||||
"bytesInOutput": 459
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/graph.js": {
|
||||
"bytesInOutput": 1620
|
||||
"bytesInOutput": 1625
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/hash_table.js": {
|
||||
"bytesInOutput": 1875
|
||||
"bytesInOutput": 1880
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/image.js": {
|
||||
"bytesInOutput": 1042
|
||||
"bytesInOutput": 1047
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/logical.js": {
|
||||
"bytesInOutput": 2093
|
||||
"bytesInOutput": 2098
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/matrices.js": {
|
||||
"bytesInOutput": 1748
|
||||
"bytesInOutput": 1753
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/normalization.js": {
|
||||
"bytesInOutput": 2118
|
||||
"bytesInOutput": 2123
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/reduction.js": {
|
||||
"bytesInOutput": 2157
|
||||
"bytesInOutput": 2162
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/slice_join.js": {
|
||||
"bytesInOutput": 3448
|
||||
"bytesInOutput": 3453
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/spectral.js": {
|
||||
"bytesInOutput": 513
|
||||
"bytesInOutput": 518
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/transformation.js": {
|
||||
"bytesInOutput": 2006
|
||||
"bytesInOutput": 2010
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/operations/operation_mapper.js": {
|
||||
"bytesInOutput": 9568
|
||||
|
@ -23398,16 +23412,16 @@
|
|||
"bytesInOutput": 2405
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/executor/model_analysis.js": {
|
||||
"bytesInOutput": 2326
|
||||
"bytesInOutput": 2320
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/executor/graph_executor.js": {
|
||||
"bytesInOutput": 11934
|
||||
"bytesInOutput": 11935
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/executor/resource_manager.js": {
|
||||
"bytesInOutput": 642
|
||||
"bytesInOutput": 646
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.js": {
|
||||
"bytesInOutput": 4680
|
||||
"bytesInOutput": 4678
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/index.js": {
|
||||
"bytesInOutput": 0
|
||||
|
@ -23419,10 +23433,10 @@
|
|||
"bytesInOutput": 341
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-data/dist/dataset.js": {
|
||||
"bytesInOutput": 4804
|
||||
"bytesInOutput": 4805
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js": {
|
||||
"bytesInOutput": 10878
|
||||
"bytesInOutput": 10882
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-data/dist/util/deep_map.js": {
|
||||
"bytesInOutput": 2452
|
||||
|
@ -23482,10 +23496,10 @@
|
|||
"bytesInOutput": 231
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/backend_cpu.js": {
|
||||
"bytesInOutput": 3142
|
||||
"bytesInOutput": 3143
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/shared.js": {
|
||||
"bytesInOutput": 873
|
||||
"bytesInOutput": 877
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Abs.js": {
|
||||
"bytesInOutput": 518
|
||||
|
@ -23689,10 +23703,10 @@
|
|||
"bytesInOutput": 654
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3DGrad.js": {
|
||||
"bytesInOutput": 2223
|
||||
"bytesInOutput": 2232
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPoolGrad.js": {
|
||||
"bytesInOutput": 1586
|
||||
"bytesInOutput": 1595
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchNorm.js": {
|
||||
"bytesInOutput": 1556
|
||||
|
@ -23716,7 +23730,7 @@
|
|||
"bytesInOutput": 1951
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2D.js": {
|
||||
"bytesInOutput": 2242
|
||||
"bytesInOutput": 2250
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropFilter.js": {
|
||||
"bytesInOutput": 1722
|
||||
|
@ -23725,7 +23739,7 @@
|
|||
"bytesInOutput": 2394
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3D.js": {
|
||||
"bytesInOutput": 1993
|
||||
"bytesInOutput": 2005
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropFilterV2.js": {
|
||||
"bytesInOutput": 2291
|
||||
|
@ -23740,7 +23754,7 @@
|
|||
"bytesInOutput": 114
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/CropAndResize.js": {
|
||||
"bytesInOutput": 2909
|
||||
"bytesInOutput": 2913
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumsum.js": {
|
||||
"bytesInOutput": 1543
|
||||
|
@ -23752,7 +23766,7 @@
|
|||
"bytesInOutput": 1238
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNative.js": {
|
||||
"bytesInOutput": 2073
|
||||
"bytesInOutput": 2081
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js": {
|
||||
"bytesInOutput": 1646
|
||||
|
@ -23788,7 +23802,7 @@
|
|||
"bytesInOutput": 169
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fft_utils.js": {
|
||||
"bytesInOutput": 7749
|
||||
"bytesInOutput": 7748
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FFT.js": {
|
||||
"bytesInOutput": 621
|
||||
|
@ -23863,10 +23877,10 @@
|
|||
"bytesInOutput": 654
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3DGrad.js": {
|
||||
"bytesInOutput": 2399
|
||||
"bytesInOutput": 2412
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolGrad.js": {
|
||||
"bytesInOutput": 1813
|
||||
"bytesInOutput": 1826
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax_impl.js": {
|
||||
"bytesInOutput": 318
|
||||
|
@ -23887,10 +23901,10 @@
|
|||
"bytesInOutput": 1144
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mod.js": {
|
||||
"bytesInOutput": 250
|
||||
"bytesInOutput": 251
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js": {
|
||||
"bytesInOutput": 1224
|
||||
"bytesInOutput": 1228
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softmax.js": {
|
||||
"bytesInOutput": 1336
|
||||
|
@ -23938,7 +23952,7 @@
|
|||
"bytesInOutput": 1868
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighborGrad.js": {
|
||||
"bytesInOutput": 2137
|
||||
"bytesInOutput": 2145
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reverse.js": {
|
||||
"bytesInOutput": 648
|
||||
|
@ -23947,7 +23961,7 @@
|
|||
"bytesInOutput": 1663
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js": {
|
||||
"bytesInOutput": 218
|
||||
"bytesInOutput": 217
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Scatter_impl.js": {
|
||||
"bytesInOutput": 877
|
||||
|
@ -24028,7 +24042,7 @@
|
|||
"bytesInOutput": 2847
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js": {
|
||||
"bytesInOutput": 14129
|
||||
"bytesInOutput": 14084
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js": {
|
||||
"bytesInOutput": 2601
|
||||
|
@ -24061,7 +24075,7 @@
|
|||
"bytesInOutput": 6616
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_context.js": {
|
||||
"bytesInOutput": 12214
|
||||
"bytesInOutput": 12216
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler.js": {
|
||||
"bytesInOutput": 33777
|
||||
|
@ -24079,13 +24093,13 @@
|
|||
"bytesInOutput": 1943
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/reshape_packed_gpu.js": {
|
||||
"bytesInOutput": 1280
|
||||
"bytesInOutput": 1279
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/texture_manager.js": {
|
||||
"bytesInOutput": 6035
|
||||
"bytesInOutput": 6044
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_gpu.js": {
|
||||
"bytesInOutput": 594
|
||||
"bytesInOutput": 599
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_packed_gpu.js": {
|
||||
"bytesInOutput": 1190
|
||||
|
@ -24094,7 +24108,7 @@
|
|||
"bytesInOutput": 560
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js": {
|
||||
"bytesInOutput": 20033
|
||||
"bytesInOutput": 20045
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js": {
|
||||
"bytesInOutput": 21
|
||||
|
@ -24106,10 +24120,10 @@
|
|||
"bytesInOutput": 0
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_gpu.js": {
|
||||
"bytesInOutput": 480
|
||||
"bytesInOutput": 485
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_packed_gpu.js": {
|
||||
"bytesInOutput": 1803
|
||||
"bytesInOutput": 1808
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Identity.js": {
|
||||
"bytesInOutput": 232
|
||||
|
@ -24274,7 +24288,7 @@
|
|||
"bytesInOutput": 1379
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Bincount.js": {
|
||||
"bytesInOutput": 417
|
||||
"bytesInOutput": 397
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NotEqual.js": {
|
||||
"bytesInOutput": 181
|
||||
|
@ -24316,7 +24330,7 @@
|
|||
"bytesInOutput": 276
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js": {
|
||||
"bytesInOutput": 2435
|
||||
"bytesInOutput": 2425
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat.js": {
|
||||
"bytesInOutput": 677
|
||||
|
@ -24328,7 +24342,7 @@
|
|||
"bytesInOutput": 2022
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D_impl.js": {
|
||||
"bytesInOutput": 4688
|
||||
"bytesInOutput": 4687
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D.js": {
|
||||
"bytesInOutput": 1083
|
||||
|
@ -24361,16 +24375,16 @@
|
|||
"bytesInOutput": 3046
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/CropAndResize.js": {
|
||||
"bytesInOutput": 405
|
||||
"bytesInOutput": 406
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/cumsum_gpu.js": {
|
||||
"bytesInOutput": 1581
|
||||
"bytesInOutput": 1585
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumsum.js": {
|
||||
"bytesInOutput": 1532
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DenseBincount.js": {
|
||||
"bytesInOutput": 818
|
||||
"bytesInOutput": 798
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/depth_to_space_gpu.js": {
|
||||
"bytesInOutput": 1259
|
||||
|
@ -24382,10 +24396,10 @@
|
|||
"bytesInOutput": 2765
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu_depthwise.js": {
|
||||
"bytesInOutput": 7679
|
||||
"bytesInOutput": 7672
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNative.js": {
|
||||
"bytesInOutput": 940
|
||||
"bytesInOutput": 939
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu_depthwise.js": {
|
||||
"bytesInOutput": 3142
|
||||
|
@ -24463,7 +24477,7 @@
|
|||
"bytesInOutput": 1174
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels.js": {
|
||||
"bytesInOutput": 1276
|
||||
"bytesInOutput": 1368
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedConv2D.js": {
|
||||
"bytesInOutput": 1933
|
||||
|
@ -24472,7 +24486,7 @@
|
|||
"bytesInOutput": 1850
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_nd_gpu.js": {
|
||||
"bytesInOutput": 733
|
||||
"bytesInOutput": 737
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherNd.js": {
|
||||
"bytesInOutput": 960
|
||||
|
@ -24748,7 +24762,7 @@
|
|||
"bytesInOutput": 752
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SplitV.js": {
|
||||
"bytesInOutput": 555
|
||||
"bytesInOutput": 557
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sqrt.js": {
|
||||
"bytesInOutput": 135
|
||||
|
@ -24778,10 +24792,10 @@
|
|||
"bytesInOutput": 833
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tile.js": {
|
||||
"bytesInOutput": 510
|
||||
"bytesInOutput": 500
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/TopK.js": {
|
||||
"bytesInOutput": 454
|
||||
"bytesInOutput": 444
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unique.js": {
|
||||
"bytesInOutput": 522
|
||||
|
@ -25014,6 +25028,9 @@
|
|||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RotateWithOffset.js": {
|
||||
"bytesInOutput": 1106
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js": {
|
||||
"bytesInOutput": 48
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js": {
|
||||
"bytesInOutput": 48
|
||||
},
|
||||
|
@ -25036,7 +25053,7 @@
|
|||
"bytesInOutput": 612
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js": {
|
||||
"bytesInOutput": 546
|
||||
"bytesInOutput": 547
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sqrt.js": {
|
||||
"bytesInOutput": 46
|
||||
|
@ -25072,16 +25089,16 @@
|
|||
"bytesInOutput": 242
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js": {
|
||||
"bytesInOutput": 1412
|
||||
"bytesInOutput": 1425
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js": {
|
||||
"bytesInOutput": 494
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js": {
|
||||
"bytesInOutput": 6440
|
||||
"bytesInOutput": 6450
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js": {
|
||||
"bytesInOutput": 3425
|
||||
"bytesInOutput": 3430
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js": {
|
||||
"bytesInOutput": 21
|
||||
|
@ -25093,7 +25110,7 @@
|
|||
"bytesInOutput": 0
|
||||
}
|
||||
},
|
||||
"bytes": 1565414
|
||||
"bytes": 1566890
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,5 @@
|
|||
</head>
|
||||
<body style="font-family: monospace; background: black; color: white; font-size: 16px; line-height: 22px; margin: 0;">
|
||||
<div id="log"></div>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -110,7 +110,7 @@ async function main() {
|
|||
log('FaceAPI Test');
|
||||
|
||||
// if you want to use wasm backend location for wasm binaries must be specified
|
||||
// await faceapi.tf.setWasmPaths('../node_modules/@tensorflow/tfjs-backend-wasm/dist/')
|
||||
// await faceapi.tf.setWasmPaths('../node_modules/@tensorflow/tfjs-backend-wasm/dist/');
|
||||
// await faceapi.tf.setBackend('wasm');
|
||||
|
||||
// default is webgl backend
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>OpenImages Test</title>
|
||||
<meta http-equiv="content-type">
|
||||
<meta content="text/html">
|
||||
<meta charset="UTF-8">
|
||||
<script src="./webcam.js" type="module"></script>
|
||||
</head>
|
||||
<body style="font-family: monospace; background: black; color: white; font-size: 16px; line-height: 22px; margin: 0;">
|
||||
<video id="video" playsinline class="video"></video>
|
||||
<canvas id="canvas" class="canvas" style="position: fixed; top: 0; left: 0; z-index: 10"></canvas>
|
||||
<div id="log"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,173 @@
|
|||
import * as faceapi from '../dist/face-api.esm.js';
|
||||
|
||||
// configuration options
|
||||
const modelPath = 'https://vladmandic.github.io/face-api/model/'; // path to model folder that will be loaded using http
|
||||
const minScore = 0.1; // minimum score
|
||||
const maxResults = 5; // maximum number of results to return
|
||||
let optionsSSDMobileNet;
|
||||
|
||||
// helper function to pretty-print json object to string
|
||||
function str(json) {
|
||||
let text = '<font color="lightblue">';
|
||||
text += json ? JSON.stringify(json).replace(/{|}|"|\[|\]/g, '').replace(/,/g, ', ') : '';
|
||||
text += '</font>';
|
||||
return text;
|
||||
}
|
||||
|
||||
// helper function to print strings to html document as a log
|
||||
function log(...txt) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(...txt);
|
||||
// @ts-ignore
|
||||
document.getElementById('log').innerHTML += `<br>${txt}`;
|
||||
}
|
||||
|
||||
// helper function to draw detected faces
|
||||
function drawFaces(canvas, data, fps) {
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (!ctx) return;
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
// draw title
|
||||
ctx.font = '1.4rem sans-serif';
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.fillText(`FPS: ${fps}`, 10, 25);
|
||||
for (const person of data) {
|
||||
// draw box around each face
|
||||
ctx.lineWidth = 3;
|
||||
ctx.strokeStyle = 'deepskyblue';
|
||||
ctx.fillStyle = 'deepskyblue';
|
||||
ctx.globalAlpha = 0.4;
|
||||
ctx.beginPath();
|
||||
ctx.rect(person.detection.box.x, person.detection.box.y, person.detection.box.width, person.detection.box.height);
|
||||
ctx.stroke();
|
||||
ctx.globalAlpha = 1;
|
||||
// const expression = person.expressions.sort((a, b) => Object.values(a)[0] - Object.values(b)[0]);
|
||||
const expression = Object.entries(person.expressions).sort((a, b) => b[1] - a[1]);
|
||||
ctx.fillText(`gender ${Math.round(100 * person.genderProbability)}% ${person.gender}`, person.detection.box.x, person.detection.box.y - 45);
|
||||
ctx.fillText(`expression ${Math.round(100 * expression[0][1])}% ${expression[0][0]}`, person.detection.box.x, person.detection.box.y - 25);
|
||||
ctx.fillText(`age ${Math.round(person.age)} years`, person.detection.box.x, person.detection.box.y - 5);
|
||||
// draw face points for each face
|
||||
ctx.fillStyle = 'lightblue';
|
||||
ctx.globalAlpha = 0.5;
|
||||
const pointSize = 2;
|
||||
for (const pt of person.landmarks.positions) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(pt.x, pt.y, pointSize, 0, 2 * Math.PI);
|
||||
ctx.fill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function detectVideo(video, canvas) {
|
||||
const t0 = performance.now();
|
||||
faceapi
|
||||
.detectAllFaces(video, optionsSSDMobileNet)
|
||||
.withFaceLandmarks()
|
||||
.withFaceExpressions()
|
||||
// .withFaceDescriptors()
|
||||
.withAgeAndGender()
|
||||
.then((result) => {
|
||||
const fps = 1000 / (performance.now() - t0);
|
||||
drawFaces(canvas, result, fps.toLocaleString());
|
||||
requestAnimationFrame(() => detectVideo(video, canvas));
|
||||
return true;
|
||||
})
|
||||
.catch((err) => {
|
||||
log(`Detect Error: ${str(err)}`);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// just initialize everything and call main function
|
||||
async function setupCamera() {
|
||||
const video = document.getElementById('video');
|
||||
const canvas = document.getElementById('canvas');
|
||||
if (!video || !canvas) return null;
|
||||
|
||||
let msg = '';
|
||||
log('Setting up camera');
|
||||
// setup webcam. note that navigator.mediaDevices requires that page is accessed via https
|
||||
if (!navigator.mediaDevices) {
|
||||
log('Camera Error: access not supported');
|
||||
return null;
|
||||
}
|
||||
let stream;
|
||||
const constraints = {
|
||||
audio: false,
|
||||
video: { facingMode: 'user', resizeMode: 'crop-and-scale' },
|
||||
};
|
||||
if (window.innerWidth > window.innerHeight) constraints.video.width = { ideal: window.innerWidth };
|
||||
else constraints.video.height = { ideal: window.innerHeight };
|
||||
try {
|
||||
stream = await navigator.mediaDevices.getUserMedia(constraints);
|
||||
} catch (err) {
|
||||
if (err.name === 'PermissionDeniedError' || err.name === 'NotAllowedError') msg = 'camera permission denied';
|
||||
else if (err.name === 'SourceUnavailableError') msg = 'camera not available';
|
||||
log(`Camera Error: ${msg}: ${err.message || err}`);
|
||||
return null;
|
||||
}
|
||||
// @ts-ignore
|
||||
if (stream) video.srcObject = stream;
|
||||
else {
|
||||
log('Camera Error: stream empty');
|
||||
return null;
|
||||
}
|
||||
const track = stream.getVideoTracks()[0];
|
||||
const settings = track.getSettings();
|
||||
log(`Camera active: ${track.label} ${str(constraints)}`);
|
||||
log(`Camera settings: ${str(settings)}`);
|
||||
return new Promise((resolve) => {
|
||||
video.onloadeddata = async () => {
|
||||
// @ts-ignore
|
||||
canvas.width = video.videoWidth;
|
||||
// @ts-ignore
|
||||
canvas.height = video.videoHeight;
|
||||
// @ts-ignore
|
||||
video.play();
|
||||
detectVideo(video, canvas);
|
||||
resolve(true);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async function setupFaceAPI() {
|
||||
// load face-api models
|
||||
log('Models loading');
|
||||
await faceapi.nets.tinyFaceDetector.load(modelPath);
|
||||
await faceapi.nets.ssdMobilenetv1.load(modelPath);
|
||||
await faceapi.nets.ageGenderNet.load(modelPath);
|
||||
await faceapi.nets.faceLandmark68Net.load(modelPath);
|
||||
await faceapi.nets.faceRecognitionNet.load(modelPath);
|
||||
await faceapi.nets.faceExpressionNet.load(modelPath);
|
||||
optionsSSDMobileNet = new faceapi.SsdMobilenetv1Options({ minConfidence: minScore, maxResults });
|
||||
|
||||
// check tf engine state
|
||||
const engine = await faceapi.tf.engine();
|
||||
log(`Models loaded: ${str(engine.state)}`);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
// initialize tfjs
|
||||
log('FaceAPI WebCam Test');
|
||||
|
||||
// if you want to use wasm backend location for wasm binaries must be specified
|
||||
// await faceapi.tf.setWasmPaths('../node_modules/@tensorflow/tfjs-backend-wasm/dist/');
|
||||
// await faceapi.tf.setBackend('wasm');
|
||||
|
||||
// default is webgl backend
|
||||
await faceapi.tf.setBackend('webgl');
|
||||
|
||||
await faceapi.tf.enableProdMode();
|
||||
await faceapi.tf.ENV.set('DEBUG', false);
|
||||
await faceapi.tf.ready();
|
||||
|
||||
// check version
|
||||
log(`Version: TensorFlow/JS ${str(faceapi.tf?.version_core || '(not loaded)')} FaceAPI ${str(faceapi?.version || '(not loaded)')} Backend: ${str(faceapi.tf?.getBackend() || '(not loaded)')}`);
|
||||
log(`Flags: ${str(faceapi.tf.ENV.flags)}`);
|
||||
|
||||
setupFaceAPI();
|
||||
setupCamera();
|
||||
}
|
||||
|
||||
// start processing as soon as page is loaded
|
||||
window.onload = main;
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -156,17 +156,17 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-2.8.2.tgz",
|
||||
"integrity": "sha512-tn1OE/totTuLl2dl7girxwNik2D2O9ZknghjgJvRZegqE/8FO/ix7mo4ICzMq9cHpW/bVCFKCwqu1PjAx3lkzw==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-2.8.3.tgz",
|
||||
"integrity": "sha512-wJYOaEW9V2woCvTs2vqOtYdb1fr6koVO9YiMXroeRP4BQS3o7x17HtguSVQyQt1mROORbJ1Ji6n63Bc1mZa4rQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.2",
|
||||
"@tensorflow/tfjs-backend-webgl": "2.8.2",
|
||||
"@tensorflow/tfjs-converter": "2.8.2",
|
||||
"@tensorflow/tfjs-core": "2.8.2",
|
||||
"@tensorflow/tfjs-data": "2.8.2",
|
||||
"@tensorflow/tfjs-layers": "2.8.2",
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.3",
|
||||
"@tensorflow/tfjs-backend-webgl": "2.8.3",
|
||||
"@tensorflow/tfjs-converter": "2.8.3",
|
||||
"@tensorflow/tfjs-core": "2.8.3",
|
||||
"@tensorflow/tfjs-data": "2.8.3",
|
||||
"@tensorflow/tfjs-layers": "2.8.3",
|
||||
"argparse": "^1.0.10",
|
||||
"chalk": "^4.1.0",
|
||||
"core-js": "3",
|
||||
|
@ -175,9 +175,9 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-backend-cpu": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-2.8.2.tgz",
|
||||
"integrity": "sha512-/puqtocadSmwW+ntiuW6UMhcYk1laMTr1hoWqyvMinaVwxSZwOyfRqDyF9snxHLfCW3uS8HX02LRqh9B4AzD0A==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-2.8.3.tgz",
|
||||
"integrity": "sha512-kMUONKdIknwacUZPR1hIKVba1F8gyiYr7NpzNOf/L7y5li87iRVBcMtYoNn/dEfJ8R/wO6SDeYlDRuDcXXNFlA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/seedrandom": "2.4.27",
|
||||
|
@ -185,22 +185,22 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-backend-wasm": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-2.8.2.tgz",
|
||||
"integrity": "sha512-smt06cLHJMmiOu0laNhS1xOug9EtWz0Orm/MBELFwYfmJC5u95wAX83Ix9zBEu/wsyP0PFAdX4zEN8BCaez7kA==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-2.8.3.tgz",
|
||||
"integrity": "sha512-YPTyHmQuOQM8j1WsICbo78Y/yFUYKj05ZF6yaQWBaTg2YSHLjrkoI1a37P0M1ELoHU7CV6hKigQJG3zhM5SJvg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.2",
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.3",
|
||||
"@types/emscripten": "~0.0.34"
|
||||
}
|
||||
},
|
||||
"@tensorflow/tfjs-backend-webgl": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-2.8.2.tgz",
|
||||
"integrity": "sha512-jfc2mjfwqMvjXDCYvrXwGY1i9MK+1P4COiCnT1r5rMl6IssSNH2WqvaqJFtRWGtgp/QiBY69B6wM6qSJIkOSeg==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-2.8.3.tgz",
|
||||
"integrity": "sha512-II+g0LOcudD2NA4X1990EfrCQhkPyJcgoCjRbV8Y4JBJn5kv6SyOGiE15exyQBqTMBxNTwjXukUf9N4x89Lgag==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.2",
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.3",
|
||||
"@types/offscreencanvas": "~2019.3.0",
|
||||
"@types/seedrandom": "2.4.27",
|
||||
"@types/webgl-ext": "0.0.30",
|
||||
|
@ -209,15 +209,15 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-converter": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-2.8.2.tgz",
|
||||
"integrity": "sha512-JJPrS2SClMEnvoC/vBOUlWa03UBl6ZZRIeddjgTo+V1CJyvtYr+njySz9lX5HoCBtrcrLkMcd+1IYFKtgFH1Cg==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-2.8.3.tgz",
|
||||
"integrity": "sha512-Z107Q8/aNyhBd9E1lN6+aZg/uBWvmFSV8AmZrt7MfvDeAPOSyNTj0L9xYF5fxjlWb9ligLlOIbPkTRJ37vsXYw==",
|
||||
"dev": true
|
||||
},
|
||||
"@tensorflow/tfjs-core": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-2.8.2.tgz",
|
||||
"integrity": "sha512-r3Df7phzNa80uoTtlcBGJ/rf+kweSKgN1/VmBT7b53womzoYlw3fQHlZ1WKUbHL9kOf2Zt4y2PPcBiKUQYQC+Q==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-2.8.3.tgz",
|
||||
"integrity": "sha512-wbVuT7clJZIvtYcJPtIX4M49xCC/ccWpHIN+jRWoSBZxR3PJJ9pkh36nBq65aaBsdr5SL6v02oQ2vc7jfjdI3Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/offscreencanvas": "~2019.3.0",
|
||||
|
@ -228,9 +228,9 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-data": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-2.8.2.tgz",
|
||||
"integrity": "sha512-hC/lQe65YCGx0GVWDR/Wf4/B2E9HfWwegWmQ0RzVzcmakF3Y4tOdLRo5vTaar80Un374Uu3ARG/h7YBvneKFCQ==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-2.8.3.tgz",
|
||||
"integrity": "sha512-Rxd4NfKvFQODf0+pMAoCuYWFf8XbaxUbr2gC/06uFnRXrWiTCuKWCSOqAg0lx7V6FLkscmKZNTD7iz0kAr32Og==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node-fetch": "^2.1.2",
|
||||
|
@ -238,19 +238,19 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-layers": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-2.8.2.tgz",
|
||||
"integrity": "sha512-bEYwMeBuiWl+fB5fBmhqwxjjbwBme7KgTDCquOyHoP1P01HZNBAmyJIDCtpqGHBJuGHBOpFga/DBl+9yF7gR6g==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-2.8.3.tgz",
|
||||
"integrity": "sha512-nl3GnLCqofFnswcPjXV+u5P7GLUCQh0xFKVXnjIGPFIemttQNG0BYSVL18EIV53fnMEv9RZ9mC4DF2LgvWg3yg==",
|
||||
"dev": true
|
||||
},
|
||||
"@tensorflow/tfjs-node": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node/-/tfjs-node-2.8.2.tgz",
|
||||
"integrity": "sha512-y6b2kv/esRJmeQuucOGYlBVqHH+e/w6O5aD5n0jmK355wxCsulsqCLGnKTK0i1jWYLYL64Osl7VXfq+IaKxS7w==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node/-/tfjs-node-2.8.3.tgz",
|
||||
"integrity": "sha512-CLsFew+kAvfQsgbHVhYz7NKztFtWHkHS9A7iYELMfY4tMkKQ4T+l0jkKcwouvDrUxJMVYnFeOGUQCRHKflxrbw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs": "2.8.2",
|
||||
"@tensorflow/tfjs-core": "2.8.2",
|
||||
"@tensorflow/tfjs": "2.8.3",
|
||||
"@tensorflow/tfjs-core": "2.8.3",
|
||||
"adm-zip": "^0.4.11",
|
||||
"google-protobuf": "^3.9.2",
|
||||
"https-proxy-agent": "^2.2.1",
|
||||
|
@ -272,13 +272,13 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-node-gpu": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node-gpu/-/tfjs-node-gpu-2.8.2.tgz",
|
||||
"integrity": "sha512-HqoUAD5Dd7fc9TyCPjfSzE8AmMXKgZPTr/ESM29sCR/SqD6VNG4x3kzb9XM/IH5Yi2UiX1cL/AhX0f/nP2OMqQ==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node-gpu/-/tfjs-node-gpu-2.8.3.tgz",
|
||||
"integrity": "sha512-/JVBQ54bIh/okr8jAsRpumxjT7W0q65rEVBJKhzsvDceGRn4VMauyxpho2s8fmwNX+0Rgr3CRID9j+fLYRRsBQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs": "2.8.2",
|
||||
"@tensorflow/tfjs-core": "2.8.2",
|
||||
"@tensorflow/tfjs": "2.8.3",
|
||||
"@tensorflow/tfjs-core": "2.8.3",
|
||||
"adm-zip": "^0.4.11",
|
||||
"google-protobuf": "^3.9.2",
|
||||
"https-proxy-agent": "^2.2.1",
|
||||
|
@ -318,9 +318,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.14.19",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.19.tgz",
|
||||
"integrity": "sha512-4nhBPStMK04rruRVtVc6cDqhu7S9GZai0fpXgPXrFpcPX6Xul8xnrjSdGB4KPBVYG/R5+fXWdCM8qBoiULWGPQ==",
|
||||
"version": "14.14.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
|
||||
"integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node-fetch": {
|
||||
|
@ -358,13 +358,13 @@
|
|||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.1.tgz",
|
||||
"integrity": "sha512-fABclAX2QIEDmTMk6Yd7Muv1CzFLwWM4505nETzRHpP3br6jfahD9UUJkhnJ/g2m7lwfz8IlswcwGGPGiq9exw==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.12.0.tgz",
|
||||
"integrity": "sha512-wHKj6q8s70sO5i39H2g1gtpCXCvjVszzj6FFygneNFyIAxRvNSVz9GML7XpqrB9t7hNutXw+MHnLN/Ih6uyB8Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/experimental-utils": "4.11.1",
|
||||
"@typescript-eslint/scope-manager": "4.11.1",
|
||||
"@typescript-eslint/experimental-utils": "4.12.0",
|
||||
"@typescript-eslint/scope-manager": "4.12.0",
|
||||
"debug": "^4.1.1",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"regexpp": "^3.0.0",
|
||||
|
@ -399,28 +399,28 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.1.tgz",
|
||||
"integrity": "sha512-mAlWowT4A6h0TC9F+J5pdbEhjNiEMO+kqPKQ4sc3fVieKL71dEqfkKgtcFVSX3cjSBwYwhImaQ/mXQF0oaI38g==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.12.0.tgz",
|
||||
"integrity": "sha512-MpXZXUAvHt99c9ScXijx7i061o5HEjXltO+sbYfZAAHxv3XankQkPaNi5myy0Yh0Tyea3Hdq1pi7Vsh0GJb0fA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/scope-manager": "4.11.1",
|
||||
"@typescript-eslint/types": "4.11.1",
|
||||
"@typescript-eslint/typescript-estree": "4.11.1",
|
||||
"@typescript-eslint/scope-manager": "4.12.0",
|
||||
"@typescript-eslint/types": "4.12.0",
|
||||
"@typescript-eslint/typescript-estree": "4.12.0",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.11.1.tgz",
|
||||
"integrity": "sha512-BJ3jwPQu1jeynJ5BrjLuGfK/UJu6uwHxJ/di7sanqmUmxzmyIcd3vz58PMR7wpi8k3iWq2Q11KMYgZbUpRoIPw==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.12.0.tgz",
|
||||
"integrity": "sha512-9XxVADAo9vlfjfoxnjboBTxYOiNY93/QuvcPgsiKvHxW6tOZx1W4TvkIQ2jB3k5M0pbFP5FlXihLK49TjZXhuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "4.11.1",
|
||||
"@typescript-eslint/types": "4.11.1",
|
||||
"@typescript-eslint/typescript-estree": "4.11.1",
|
||||
"@typescript-eslint/scope-manager": "4.12.0",
|
||||
"@typescript-eslint/types": "4.12.0",
|
||||
"@typescript-eslint/typescript-estree": "4.12.0",
|
||||
"debug": "^4.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -442,29 +442,29 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.11.1.tgz",
|
||||
"integrity": "sha512-Al2P394dx+kXCl61fhrrZ1FTI7qsRDIUiVSuN6rTwss6lUn8uVO2+nnF4AvO0ug8vMsy3ShkbxLu/uWZdTtJMQ==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.12.0.tgz",
|
||||
"integrity": "sha512-QVf9oCSVLte/8jvOsxmgBdOaoe2J0wtEmBr13Yz0rkBNkl5D8bfnf6G4Vhox9qqMIoG7QQoVwd2eG9DM/ge4Qg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.11.1",
|
||||
"@typescript-eslint/visitor-keys": "4.11.1"
|
||||
"@typescript-eslint/types": "4.12.0",
|
||||
"@typescript-eslint/visitor-keys": "4.12.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.11.1.tgz",
|
||||
"integrity": "sha512-5kvd38wZpqGY4yP/6W3qhYX6Hz0NwUbijVsX2rxczpY6OXaMxh0+5E5uLJKVFwaBM7PJe1wnMym85NfKYIh6CA==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.12.0.tgz",
|
||||
"integrity": "sha512-N2RhGeheVLGtyy+CxRmxdsniB7sMSCfsnbh8K/+RUIXYYq3Ub5+sukRCjVE80QerrUBvuEvs4fDhz5AW/pcL6g==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.1.tgz",
|
||||
"integrity": "sha512-tC7MKZIMRTYxQhrVAFoJq/DlRwv1bnqA4/S2r3+HuHibqvbrPcyf858lNzU7bFmy4mLeIHFYr34ar/1KumwyRw==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.12.0.tgz",
|
||||
"integrity": "sha512-gZkFcmmp/CnzqD2RKMich2/FjBTsYopjiwJCroxqHZIY11IIoN0l5lKqcgoAPKHt33H2mAkSfvzj8i44Jm7F4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.11.1",
|
||||
"@typescript-eslint/visitor-keys": "4.11.1",
|
||||
"@typescript-eslint/types": "4.12.0",
|
||||
"@typescript-eslint/visitor-keys": "4.12.0",
|
||||
"debug": "^4.1.1",
|
||||
"globby": "^11.0.1",
|
||||
"is-glob": "^4.0.1",
|
||||
|
@ -500,12 +500,12 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.1.tgz",
|
||||
"integrity": "sha512-IrlBhD9bm4bdYcS8xpWarazkKXlE7iYb1HzRuyBP114mIaj5DJPo11Us1HgH60dTt41TCZXMaTCAW+OILIYPOg==",
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.12.0.tgz",
|
||||
"integrity": "sha512-hVpsLARbDh4B9TKYz5cLbcdMIOAoBYgFPCSP9FFS/liSF+b33gVNq8JHY3QGhHNVz85hObvL7BEYLlgx553WCw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.11.1",
|
||||
"@typescript-eslint/types": "4.12.0",
|
||||
"eslint-visitor-keys": "^2.0.0"
|
||||
}
|
||||
},
|
||||
|
@ -580,6 +580,16 @@
|
|||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"anymatch": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
|
||||
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
|
@ -653,6 +663,12 @@
|
|||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"binary-extensions": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
|
||||
"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
|
@ -673,13 +689,13 @@
|
|||
}
|
||||
},
|
||||
"call-bind": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
|
||||
"integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.1.tgz",
|
||||
"integrity": "sha512-tvAvUwNcRikl3RVF20X9lsYmmepsovzTWeJiXjO0PkJp15uy/6xKFZOQtuiSULwYW+6ToZBprphCgWXC2dSgcQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.0"
|
||||
"get-intrinsic": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"callsites": {
|
||||
|
@ -698,6 +714,22 @@
|
|||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz",
|
||||
"integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"anymatch": "~3.1.1",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.3.1",
|
||||
"glob-parent": "~5.1.0",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.5.0"
|
||||
}
|
||||
},
|
||||
"chownr": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
||||
|
@ -929,9 +961,9 @@
|
|||
}
|
||||
},
|
||||
"esbuild": {
|
||||
"version": "0.8.29",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.29.tgz",
|
||||
"integrity": "sha512-UDsEoeXuctVgG2hEts1Hwq2jYDGqV7nksEHEZaiCy2v+lXF5ButX4ErPAJAFi5ZNKKW+6Pom93pArV7hki6HnQ==",
|
||||
"version": "0.8.31",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.31.tgz",
|
||||
"integrity": "sha512-7EIU0VdUxltwivjVezX3HgeNzeIVR1snkrAo57WdUnuBMykdzin5rTrxwCDM6xQqj0RL/HjOEm3wFr2ijHKeaA==",
|
||||
"dev": true
|
||||
},
|
||||
"escalade": {
|
||||
|
@ -1404,6 +1436,13 @@
|
|||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz",
|
||||
"integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
|
@ -1519,9 +1558,9 @@
|
|||
}
|
||||
},
|
||||
"globby": {
|
||||
"version": "11.0.1",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
|
||||
"integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
|
||||
"version": "11.0.2",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz",
|
||||
"integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-union": "^2.1.0",
|
||||
|
@ -1655,6 +1694,15 @@
|
|||
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
||||
"dev": true
|
||||
},
|
||||
"is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-callable": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
|
||||
|
@ -1930,9 +1978,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz",
|
||||
"integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==",
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
|
||||
"integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^3.2.6",
|
||||
|
@ -1997,6 +2045,12 @@
|
|||
"validate-npm-package-license": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
||||
"dev": true
|
||||
},
|
||||
"npm-bundled": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
|
||||
|
@ -2316,6 +2370,15 @@
|
|||
"util-deprecate": "~1.0.1"
|
||||
}
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"regenerator-runtime": {
|
||||
"version": "0.13.7",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||
|
@ -2560,9 +2623,9 @@
|
|||
}
|
||||
},
|
||||
"table": {
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/table/-/table-6.0.6.tgz",
|
||||
"integrity": "sha512-OInCtPmDNieVBkVFi6C8RwU2S2H0h8mF3e3TQK4nreaUNCpooQUkI+A/KuEkm5FawfhWIfNqG+qfelVVR+V00g==",
|
||||
"version": "6.0.7",
|
||||
"resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
|
||||
"integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^7.0.2",
|
||||
|
@ -2634,15 +2697,15 @@
|
|||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
|
||||
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
|
||||
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
|
||||
"dev": true
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "3.17.1",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz",
|
||||
"integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==",
|
||||
"version": "3.19.1",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.19.1.tgz",
|
||||
"integrity": "sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
|
|
22
package.json
22
package.json
|
@ -11,7 +11,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "node --trace-warnings example/node-singleprocess.js",
|
||||
"build": "rimraf dist/* types/* && node ./build.js",
|
||||
"dev": "npm install && node server/dev.js",
|
||||
"build": "rimraf dist/* types/* && node server/build.js",
|
||||
"lint": "eslint src/**/*"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -40,14 +41,15 @@
|
|||
"@vladmandic/pilogger": "^0.2.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tensorflow/tfjs": "^2.8.2",
|
||||
"@tensorflow/tfjs-backend-wasm": "^2.8.2",
|
||||
"@tensorflow/tfjs-node": "^2.8.2",
|
||||
"@tensorflow/tfjs-node-gpu": "^2.8.2",
|
||||
"@types/node": "^14.14.19",
|
||||
"@typescript-eslint/eslint-plugin": "^4.11.1",
|
||||
"@typescript-eslint/parser": "^4.11.1",
|
||||
"esbuild": "^0.8.29",
|
||||
"@tensorflow/tfjs": "^2.8.3",
|
||||
"@tensorflow/tfjs-backend-wasm": "^2.8.3",
|
||||
"@tensorflow/tfjs-node": "^2.8.3",
|
||||
"@tensorflow/tfjs-node-gpu": "^2.8.3",
|
||||
"@types/node": "^14.14.20",
|
||||
"@typescript-eslint/eslint-plugin": "^4.12.0",
|
||||
"@typescript-eslint/parser": "^4.12.0",
|
||||
"chokidar": "^3.5.0",
|
||||
"esbuild": "^0.8.31",
|
||||
"eslint": "^7.17.0",
|
||||
"eslint-config-airbnb-base": "^14.2.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
|
@ -55,7 +57,7 @@
|
|||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"tslib": "^2.0.3",
|
||||
"tslib": "^2.1.0",
|
||||
"typescript": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
micro http2 server with file monitoring and automatic app rebuild
|
||||
- can process concurrent http requests
|
||||
- monitors specified filed and folders for changes
|
||||
- triggers library and application rebuild
|
||||
- any build errors are immediately displayed and can be corrected without need for restart
|
||||
- passthrough data compression
|
||||
*/
|
||||
|
||||
const process = require('process');
|
||||
const fs = require('fs');
|
||||
const zlib = require('zlib');
|
||||
const http = require('http');
|
||||
const http2 = require('http2');
|
||||
const path = require('path');
|
||||
// eslint-disable-next-line node/no-unpublished-require, import/no-extraneous-dependencies
|
||||
const chokidar = require('chokidar');
|
||||
const log = require('@vladmandic/pilogger');
|
||||
const build = require('./build.js');
|
||||
|
||||
// app configuration
|
||||
// you can provide your server key and certificate or use provided self-signed ones
|
||||
// self-signed certificate generated using:
|
||||
// openssl req -x509 -newkey rsa:4096 -nodes -keyout https.key -out https.crt -days 365 -subj "/C=US/ST=Florida/L=Miami/O=@vladmandic"
|
||||
// client app does not work without secure server since browsers enforce https for webcam access
|
||||
const options = {
|
||||
key: fs.readFileSync('server/https.key'),
|
||||
cert: fs.readFileSync('server/https.crt'),
|
||||
root: '..',
|
||||
default: 'example/index.html',
|
||||
httpPort: 8000,
|
||||
httpsPort: 8001,
|
||||
monitor: ['package.json', 'example', 'src'],
|
||||
};
|
||||
|
||||
// just some predefined mime types
|
||||
const mime = {
|
||||
'.html': 'text/html',
|
||||
'.js': 'text/javascript',
|
||||
'.css': 'text/css',
|
||||
'.json': 'application/json',
|
||||
'.png': 'image/png',
|
||||
'.jpg': 'image/jpg',
|
||||
'.gif': 'image/gif',
|
||||
'.ico': 'image/x-icon',
|
||||
'.svg': 'image/svg+xml',
|
||||
'.wav': 'audio/wav',
|
||||
'.mp4': 'video/mp4',
|
||||
'.woff': 'application/font-woff',
|
||||
'.ttf': 'application/font-ttf',
|
||||
'.wasm': 'application/wasm',
|
||||
};
|
||||
|
||||
// watch filesystem for any changes and notify build when needed
|
||||
async function watch() {
|
||||
const watcher = chokidar.watch(options.monitor, {
|
||||
persistent: true,
|
||||
ignorePermissionErrors: false,
|
||||
alwaysStat: false,
|
||||
ignoreInitial: true,
|
||||
followSymlinks: true,
|
||||
usePolling: false,
|
||||
useFsEvents: false,
|
||||
atomic: true,
|
||||
});
|
||||
// single event handler for file add/change/delete
|
||||
watcher
|
||||
.on('add', (evt) => build.build(evt, 'add'))
|
||||
.on('change', (evt) => build.build(evt, 'modify'))
|
||||
.on('unlink', (evt) => build.build(evt, 'remove'))
|
||||
.on('error', (err) => log.error(`Client watcher error: ${err}`))
|
||||
.on('ready', () => log.state('Monitoring:', options.monitor));
|
||||
}
|
||||
|
||||
// get file content for a valid url request
|
||||
function handle(url) {
|
||||
return new Promise((resolve) => {
|
||||
let obj = { ok: false };
|
||||
obj.file = url;
|
||||
if (!fs.existsSync(obj.file)) resolve(null);
|
||||
obj.stat = fs.statSync(obj.file);
|
||||
if (obj.stat.isFile()) obj.ok = true;
|
||||
if (!obj.ok && obj.stat.isDirectory()) {
|
||||
obj.file = path.join(obj.file, options.default);
|
||||
// @ts-ignore
|
||||
obj = handle(obj.file);
|
||||
}
|
||||
resolve(obj);
|
||||
});
|
||||
}
|
||||
|
||||
// process http requests
|
||||
async function httpRequest(req, res) {
|
||||
handle(path.join(__dirname, options.root, decodeURI(req.url)))
|
||||
.then((result) => {
|
||||
// get original ip of requestor, regardless if it's behind proxy or not
|
||||
// eslint-disable-next-line dot-notation
|
||||
const forwarded = (req.headers['forwarded'] || '').match(/for="\[(.*)\]:/);
|
||||
const ip = (Array.isArray(forwarded) ? forwarded[1] : null) || req.headers['x-forwarded-for'] || req.ip || req.socket.remoteAddress;
|
||||
if (!result || !result.ok) {
|
||||
res.writeHead(404, { 'Content-Type': 'text/html' });
|
||||
res.end('Error 404: Not Found\n', 'utf-8');
|
||||
log.warn(`${req.method}/${req.httpVersion}`, res.statusCode, req.url, ip);
|
||||
} else {
|
||||
const ext = String(path.extname(result.file)).toLowerCase();
|
||||
const contentType = mime[ext] || 'application/octet-stream';
|
||||
const accept = req.headers['accept-encoding'] ? req.headers['accept-encoding'].includes('br') : false; // does target accept brotli compressed data
|
||||
res.writeHead(200, {
|
||||
// 'Content-Length': result.stat.size, // not using as it's misleading for compressed streams
|
||||
'Content-Language': 'en', 'Content-Type': contentType, 'Content-Encoding': accept ? 'br' : '', 'Last-Modified': result.stat.mtime, 'Cache-Control': 'no-cache', 'X-Powered-By': `NodeJS/${process.version}`,
|
||||
});
|
||||
const compress = zlib.createBrotliCompress({ params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 5 } }); // instance of brotli compression with level 5
|
||||
const stream = fs.createReadStream(result.file);
|
||||
if (!accept) stream.pipe(res); // don't compress data
|
||||
else stream.pipe(compress).pipe(res); // compress data
|
||||
|
||||
// alternative methods of sending data
|
||||
/// 2. read stream and send by chunk
|
||||
// const stream = fs.createReadStream(result.file);
|
||||
// stream.on('data', (chunk) => res.write(chunk));
|
||||
// stream.on('end', () => res.end());
|
||||
|
||||
// 3. read entire file and send it as blob
|
||||
// const data = fs.readFileSync(result.file);
|
||||
// res.write(data);
|
||||
log.data(`${req.method}/${req.httpVersion}`, res.statusCode, contentType, result.stat.size, req.url, ip);
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.catch((err) => log.error('handle error:', err));
|
||||
}
|
||||
|
||||
// app main entry point
|
||||
async function main() {
|
||||
log.header();
|
||||
await watch();
|
||||
// @ts-ignore
|
||||
const server1 = http.createServer(options, httpRequest);
|
||||
server1.on('listening', () => log.state('HTTP server listening:', options.httpPort));
|
||||
server1.listen(options.httpPort);
|
||||
const server2 = http2.createSecureServer(options, httpRequest);
|
||||
server2.on('listening', () => log.state('HTTP2 server listening:', options.httpsPort));
|
||||
server2.listen(options.httpsPort);
|
||||
await build.build('all', 'startup');
|
||||
}
|
||||
|
||||
main();
|
|
@ -0,0 +1,31 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
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
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,52 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
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
|
||||
qIRta3H9KNw2Mhpkm77TtUSV/W5aOmY=
|
||||
-----END PRIVATE KEY-----
|
Loading…
Reference in New Issue