10
10
11
11
<br >
12
12
13
- ** Live Demo** : < https://vladmandic.github.io/face-api/example/webcam.html >
13
+ ** Live Demo** : < https://vladmandic.github.io/face-api/demo/webcam.html >
14
+
15
+ <br >
16
+
17
+ ## Documentation
18
+
19
+ - [ ** Tutorial** ] ( TUTORIAL.md )
20
+ - [ ** API Specification** ] ( https://justadudewhohacks.github.io/face-api.js/docs/globals.html )
14
21
15
22
<br >
16
23
@@ -26,6 +33,7 @@ And since original Face-API was open-source, I've released this version as well
26
33
27
34
Changes ended up being too large for a simple pull request
28
35
and it ended up being a full-fledged version on its own
36
+
29
37
Plus many features were added since original inception
30
38
31
39
<br ><hr ><br >
@@ -37,64 +45,75 @@ Plus many features were added since original inception
37
45
### Browser
38
46
39
47
Browser example that uses static images and showcases both models
40
- as well as all of the extensions is included in ` /example /index.html `
48
+ as well as all of the extensions is included in ` /demo /index.html `
41
49
Example can be accessed directly using Git pages using URL:
42
- < https://vladmandic.github.io/face-api/example /index.html >
50
+ < https://vladmandic.github.io/face-api/demo /index.html >
43
51
44
- Browser example that uses live webcam is included in ` /example /webcam.html `
52
+ Browser example that uses live webcam is included in ` /demo /webcam.html `
45
53
Example can be accessed directly using Git pages using URL:
46
- < https://vladmandic.github.io/face-api/example /webcam.html >
54
+ < https://vladmandic.github.io/face-api/demo /webcam.html >
47
55
48
56
49
57
<br >
50
58
59
+ ** Demo using FaceAPI to process images**
51
60
* Note: Photos shown below are taken by me*
52
61
53
- ![ screenshot] ( example/screenshot.png )
62
+ ![ screenshot] ( demo/screenshot-images.png )
63
+
64
+ ** Demo using FaceAPI to process live webcam**
65
+
66
+ ![ screenshot] ( demo/screenshot-webcam.png )
54
67
55
68
<br >
56
69
57
70
### NodeJS
58
71
59
72
Two NodeJS examples are:
60
73
61
- - ` /example/node-singleprocess.js ` : Regular usage of ` FaceAPI ` from ` NodeJS `
62
- - ` /example/node-multiprocess.js ` : Multiprocessing showcase that uses pool of worker processes (` node-multiprocess-worker.js `
63
- Main starts fixed pool of worker processes with each worker having it's instance of ` FaceAPI `
64
- Workers communicate with main when they are ready and main dispaches job to each ready worker until job queue is empty
74
+ - ` /demo/node-singleprocess.js ` :
75
+ Regular usage of ` FaceAPI ` from ` NodeJS `
76
+ - ` /demo/node-multiprocess.js ` :
77
+ Multiprocessing showcase that uses pool of worker processes
78
+ (` node-multiprocess-worker.js ` )
79
+ Main starts fixed pool of worker processes with each worker having
80
+ it's instance of ` FaceAPI `
81
+ Workers communicate with main when they are ready and main dispaches
82
+ job to each ready worker until job queue is empty
65
83
66
84
``` json
67
- 2020-12 -08 08 :30:01 INFO: @vladmandic/face-api version 0.9.1
68
- 2020-12 -08 08 :30:01 INFO: User: vlado Platform: linux Arch: x64 Node: v15.0.1
69
- 2020-12 -08 08 :30:01 INFO: FaceAPI multi-process test
70
- 2020-12 -08 08 :30:01 STATE: Main: started worker: 265238
71
- 2020-12 -08 08 :30:01 STATE: Main: started worker: 265244
72
- 2020-12 -08 08 :30:02 STATE: Worker: PID: 265238 TensorFlow/JS 2.7 .0 FaceAPI 0.9.1 Backend: tensorflow
73
- 2020-12 -08 08 :30:02 STATE: Worker: PID: 265244 TensorFlow/JS 2.7 .0 FaceAPI 0.9.1 Backend: tensorflow
74
- 2020-12 -08 08 :30:02 STATE: Main: dispatching to worker: 265238
75
- 2020-12 -08 08 :30:02 STATE: Main: dispatching to worker: 265244
76
- 2020-12 -08 08 :30:02 DATA: Worker received message: 265238 { image: 'example/sample (1) .jpg' }
77
- 2020-12 -08 08 :30:02 DATA: Worker received message: 265244 { image: 'example/sample (2) .jpg' }
78
- 2020-12 -08 08 :30:04 DATA: Main: worker finished: 265238 detected faces: 3
79
- 2020-12 -08 08 :30:04 STATE: Main: dispatching to worker: 265238
80
- 2020-12 -08 08 :30:04 DATA: Main: worker finished: 265244 detected faces: 3
81
- 2020-12 -08 08 :30:04 STATE : Main: dispatching to worker: 265244
82
- 2020-12 -08 08 :30:04 DATA : Worker received message: 265238 { image: 'example/sample (3).jpg' }
83
- 2020-12 -08 08 :30:04 DATA: Worker received message: 265244 { image: 'example/sample (4) .jpg' }
84
- 2020-12 -08 08 :30:06 DATA: Main: worker finished: 265238 detected faces: 3
85
- 2020-12 -08 08 :30:06 STATE: Main: dispatching to worker: 265238
86
- 2020-12 -08 08 :30:06 DATA: Worker received message: 265238 { image: 'example/sample (5) .jpg' }
87
- 2020-12 -08 08 :30:06 DATA: Main: worker finished: 265244 detected faces: 4
88
- 2020-12 -08 08 :30:06 STATE: Main: dispatching to worker: 265244
89
- 2020-12 -08 08 :30:06 DATA: Worker received message: 265244 { image: 'example/sample (6) .jpg' }
90
- 2020-12 -08 08 :30:07 DATA: Main: worker finished: 265238 detected faces: 5
91
- 2020-12 -08 08 :30:07 STATE: Main: worker exit: 265238 0
92
- 2020-12 -08 08 :30:08 DATA: Main: worker finished: 265244 detected faces: 4
93
- 2020-12 -08 08 :30:08 INFO: Processed 12 images in 6826 ms
94
- 2020-12 -08 08 :30:08 STATE: Main: worker exit: 265244 0
85
+ 2021 -03 -14 08 :42:03 INFO: @vladmandic/face-api version 1.0.2
86
+ 2021 -03 -14 08 :42:03 INFO: User: vlado Platform: linux Arch: x64 Node: v15.7.0
87
+ 2021 -03 -14 08 :42:03 INFO: FaceAPI multi-process test
88
+ 2021 -03 -14 08 :42:03 STATE: Main: started worker: 1888019
89
+ 2021 -03 -14 08 :42:03 STATE: Main: started worker: 1888025
90
+ 2021 -03 -14 08 :42:04 STATE: Worker: PID: 1888025 TensorFlow/JS 3.3 .0 FaceAPI 1.0.2 Backend: tensorflow
91
+ 2021 -03 -14 08 :42:04 STATE: Worker: PID: 1888019 TensorFlow/JS 3.3 .0 FaceAPI 1.0.2 Backend: tensorflow
92
+ 2021 -03 -14 08 :42:04 STATE: Main: dispatching to worker: 1888019
93
+ 2021 -03 -14 08 :42:04 STATE: Main: dispatching to worker: 1888025
94
+ 2021 -03 -14 08 :42:04 DATA: Worker received message: 1888019 { image: 'demo/sample1 .jpg' }
95
+ 2021 -03 -14 08 :42:04 DATA: Worker received message: 1888025 { image: 'demo/sample2 .jpg' }
96
+ 2021 -03 -14 08 :42:06 DATA: Main: worker finished: 1888025 detected faces: 3
97
+ 2021 -03 -14 08 :42:06 STATE: Main: dispatching to worker: 1888025
98
+ 2021 -03 -14 08 :42:06 DATA: Worker received message: 1888025 { image: 'demo/sample3.jpg' }
99
+ 2021 -03 -14 08 :42:06 DATA : Main: worker finished: 1888019 detected faces: 3
100
+ 2021 -03 -14 08 :42:06 STATE : Main: dispatching to worker: 1888019
101
+ 2021 -03 -14 08 :42:06 DATA: Worker received message: 1888019 { image: 'demo/sample4 .jpg' }
102
+ 2021 -03 -14 08 :42:07 DATA: Main: worker finished: 1888025 detected faces: 3
103
+ 2021 -03 -14 08 :42:07 STATE: Main: dispatching to worker: 1888025
104
+ 2021 -03 -14 08 :42:07 DATA: Worker received message: 1888025 { image: 'demo/sample5 .jpg' }
105
+ 2021 -03 -14 08 :42:08 DATA: Main: worker finished: 1888019 detected faces: 4
106
+ 2021 -03 -14 08 :42:08 STATE: Main: dispatching to worker: 1888019
107
+ 2021 -03 -14 08 :42:08 DATA: Worker received message: 1888019 { image: 'demo/sample6 .jpg' }
108
+ 2021 -03 -14 08 :42:09 DATA: Main: worker finished: 1888025 detected faces: 5
109
+ 2021 -03 -14 08 :42:09 STATE: Main: worker exit: 1888025 0
110
+ 2021 -03 -14 08 :42:09 DATA: Main: worker finished: 1888019 detected faces: 4
111
+ 2021 -03 -14 08 :42:09 INFO: Processed 15 images in 5944 ms
112
+ 2021 -03 -14 08 :42:09 STATE: Main: worker exit: 1888019 0
95
113
```
96
114
97
- Note that ` @tensorflow/tfjs-node ` or ` @tensorflow/tfjs-node-gpu ` must be installed before using NodeJS example
115
+ Note that ` @tensorflow/tfjs-node ` or ` @tensorflow/tfjs-node-gpu `
116
+ must be installed before using NodeJS example
98
117
99
118
<br ><hr ><br >
100
119
@@ -127,7 +146,8 @@ Defaults are:
127
146
128
147
Bundled ` TFJS ` can be used directly via export: ` faceapi.tf `
129
148
130
- Reason for additional ` nobundle ` version is if you want to include a specific version of TFJS and not rely on pre-packaged one
149
+ Reason for additional ` nobundle ` version is if you want to
150
+ include a specific version of TFJS and not rely on pre-packaged one
131
151
132
152
` FaceAPI ` is compatible with TFJS 2.0+
133
153
@@ -302,21 +322,19 @@ npm run dev
302
322
303
323
By default it starts HTTP server on port 8000 and HTTPS server on port 8001 and can be accessed as:
304
324
305
- - <https://localhost:8001/example /index.html>
306
- - <https://localhost:8001/example /webcam.html>
325
+ - <https://localhost:8001/demo /index.html>
326
+ - <https://localhost:8001/demo /webcam.html>
307
327
308
328
` ` ` json
309
- 2021 - 01 - 10 08 : 39 : 00 INFO : @vladmandic/ face- api version 0.10 .2
310
- 2021 - 01 - 10 08 : 39 : 00 INFO : User: vlado Platform: linux Arch: x64 Node : v15.4 .0
311
- 2021 - 01 - 10 08 : 39 : 00 INFO : Build: file startup all target: es2018
312
- 2021 - 01 - 10 08 : 39 : 00 STATE : HTTP server listening: 8000
313
- 2021 - 01 - 10 08 : 39 : 00 STATE : HTTP2 server listening: 8001
314
- 2021 - 01 - 10 08 : 39 : 00 STATE : Monitoring: [ ' package.json' , ' config.js' , ' example' , ' src' , [length]: 4 ]
315
- 2021 - 01 - 10 08 : 39 : 00 STATE : Monitoring: [ ' package.json' , ' config.js' , ' example' , ' src' , [length]: 4 ]
316
- 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' }
317
- 2021 - 01 - 10 08 : 39 : 01 STATE : Build for: browserBundle type: iife: { imports: 160 , importBytes: 1797487 , outputBytes: 1699552 , outputFiles: ' dist/face-api.js' }
318
- 2021 - 01 - 10 08 : 39 : 01 STATE : Build for: browserBundle type: esm: { imports: 160 , importBytes: 1797487 , outputBytes: 1697086 , outputFiles: ' dist/face-api.esm.js' }
319
- 2021 - 01 - 10 08 : 39 : 01 INFO : Compile: [ ' src/index.ts' , [length]: 1 ]
329
+ 2021 - 03 - 14 08 : 41 : 09 INFO : @vladmandic/ face- api version 1.0 .2
330
+ 2021 - 03 - 14 08 : 41 : 09 INFO : User: vlado Platform: linux Arch: x64 Node : v15.7 .0
331
+ 2021 - 03 - 14 08 : 41 : 09 INFO : Build: file startup all target: es2018
332
+ 2021 - 03 - 14 08 : 41 : 09 STATE : HTTP server listening: 8000
333
+ 2021 - 03 - 14 08 : 41 : 09 STATE : HTTP2 server listening: 8001
334
+ 2021 - 03 - 14 08 : 41 : 09 STATE : Monitoring: [ ' package.json' , ' demo' , ' src' , [length]: 3 ]
335
+ 2021 - 03 - 14 08 : 41 : 10 STATE : Build for: browserBundle type: tfjs: { modules: 1258 , moduleBytes: 4040087 , imports: 7 , importBytes: 276 , outputBytes: 1072314 , outputFiles: ' dist/tfjs.esm.js' }
336
+ 2021 - 03 - 14 08 : 41 : 10 STATE : Build for: browserBundle type: iife: { imports: 160 , importBytes: 1305679 , outputBytes: 1151683 , outputFiles: ' dist/face-api.js' }
337
+ 2021 - 03 - 14 08 : 41 : 10 STATE : Build for: browserBundle type: esm: { imports: 160 , importBytes: 1305679 , outputBytes: 1151520 , outputFiles: ' dist/face-api.esm.js' }
320
338
` ` `
321
339
322
340
<br>
@@ -349,26 +367,28 @@ npm run build
349
367
Build process uses script ` build .js ` that creates optimized build for each target:
350
368
351
369
` ` ` text
352
- npm run build
353
-
354
- > @vladmandic/ face- api@0.8 .9 build / home/ vlado/ dev/ face- api
355
- > rimraf dist/* && node ./build.js
370
+ > @vladmandic/ face- api@1.0 .2 build
371
+ > rimraf dist/* types/* typedoc/* && node server/build.js
356
372
```
357
373
358
374
```json
359
- 2021-01-10 08:42:01 INFO: @vladmandic/face-api version 0.10.2
360
- 2021-01-10 08:42:01 INFO: User: vlado Platform: linux Arch: x64 Node: v15.4.0
361
- 2021-01-10 08:42:01 INFO: Build: file startup all target: es2018
362
- 2021-01-10 08:42:01 STATE: Build for: node type: tfjs: { imports: 1, importBytes: 143, outputBytes: 1042, outputFiles: 'dist/tfjs.esm.js' }
363
- 2021-01-10 08:42:01 STATE: Build for: node type: node: { imports: 160, importBytes: 233115, outputBytes: 132266, outputFiles: 'dist/face-api.node.js' }
364
- 2021-01-10 08:42:01 STATE: Build for: nodeGPU type: tfjs: { imports: 1, importBytes: 147, outputBytes: 1046, outputFiles: 'dist/tfjs.esm.js' }
365
- 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' }
366
- 2021-01-10 08:42:01 STATE: Build for: browserNoBundle type: tfjs: { imports: 1, importBytes: 276, outputBytes: 244, outputFiles: 'dist/tfjs.esm.js' }
367
- 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' }
368
- 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' }
369
- 2021-01-10 08:42:02 STATE: Build for: browserBundle type: iife: { imports: 160, importBytes: 1797487, outputBytes: 1699552, outputFiles: 'dist/face-api.js' }
370
- 2021-01-10 08:42:02 STATE: Build for: browserBundle type: esm: { imports: 160, importBytes: 1797487, outputBytes: 1697086, outputFiles: 'dist/face-api.esm.js' }
371
- 2021-01-10 08:42:02 INFO: Compile: [ 'src/index.ts', [length]: 1 ]```
375
+ 2021-03-14 08:39:21 INFO: @vladmandic/face-api version 1.0.2
376
+ 2021-03-14 08:39:21 INFO: User: vlado Platform: linux Arch: x64 Node: v15.7.0
377
+ 2021-03-14 08:39:21 INFO: Build: file startup all target: es2018
378
+ 2021-03-14 08:39:21 STATE: Build for: node type: tfjs: { imports: 1, importBytes: 143, outputBytes: 731, outputFiles: 'dist/tfjs.esm.js' }
379
+ 2021-03-14 08:39:21 STATE: Build for: node type: node: { imports: 160, importBytes: 234096, outputBytes: 85371, outputFiles: 'dist/face-api.node.js' }
380
+ 2021-03-14 08:39:21 STATE: Build for: nodeGPU type: tfjs: { imports: 1, importBytes: 147, outputBytes: 735, outputFiles: 'dist/tfjs.esm.js' }
381
+ 2021-03-14 08:39:21 STATE: Build for: nodeGPU type: node: { imports: 160, importBytes: 234100, outputBytes: 85379, outputFiles: 'dist/face-api.node-gpu.js' }
382
+ 2021-03-14 08:39:21 STATE: Build for: nodeCPU type: tfjs: { imports: 1, importBytes: 138, outputBytes: 726, outputFiles: 'dist/tfjs.esm.js' }
383
+ 2021-03-14 08:39:21 STATE: Build for: nodeCPU type: node: { imports: 160, importBytes: 234091, outputBytes: 85370, outputFiles: 'dist/face-api.node-cpu.js' }
384
+ 2021-03-14 08:39:21 STATE: Build for: browserNoBundle type: tfjs: { imports: 1, importBytes: 276, outputBytes: 244, outputFiles: 'dist/tfjs.esm.js' }
385
+ 2021-03-14 08:39:21 STATE: Build for: browserNoBundle type: esm: { imports: 160, importBytes: 233609, outputBytes: 82634, outputFiles: 'dist/face-api.esm-nobundle.js' }
386
+ 2021-03-14 08:39:22 STATE: Build for: browserBundle type: tfjs: { modules: 1258, moduleBytes: 4040087, imports: 7, importBytes: 276, outputBytes: 1072314, outputFiles: 'dist/tfjs.esm.js' }
387
+ 2021-03-14 08:39:22 STATE: Build for: browserBundle type: iife: { imports: 160, importBytes: 1305679, outputBytes: 1151683, outputFiles: 'dist/face-api.js' }
388
+ 2021-03-14 08:39:22 STATE: Build for: browserBundle type: esm: { imports: 160, importBytes: 1305679, outputBytes: 1151520, outputFiles: 'dist/face-api.esm.js' }
389
+ 2021-03-14 08:39:22 INFO: Compile typings: [ 'src/index.ts', [length]: 1 ]
390
+ 2021-03-14 08:39:27 INFO: Update Change log: [ '/home/vlado/dev/face-api/CHANGELOG.md', [length]: 1 ]
391
+ 2021-03-14 08:39:27 INFO: Generate TypeDocs: [ 'src/index.ts', [length]: 1 ]
372
392
```
373
393
374
394
<br>
@@ -379,14 +399,7 @@ npm run build
379
399
380
400
`FaceAPI` landmark model returns 68-point face mesh as detailed in the image below:
381
401
382
- 
383
-
384
- <br>
385
-
386
- ## Documentation
387
-
388
- - [**Tutorial**](TUTORIAL.md)
389
- - [**API Documentation**](https://justadudewhohacks.github.io/face-api.js/docs/globals.html)
402
+ 
390
403
391
404
<br>
392
405
0 commit comments