Skip to content

Commit

Permalink
[FIX] Multidetection bugs [QUAL] Update reactThreeFiber demo packages…
Browse files Browse the repository at this point in the history
… [NN] Upgrade all neural networks
  • Loading branch information
xavierjs committed Nov 12, 2021
1 parent 3ba5e3c commit c434b47
Show file tree
Hide file tree
Showing 24 changed files with 769 additions and 539 deletions.
60 changes: 35 additions & 25 deletions README.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion demos/canvas2D/fromVideoFile/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@

<body onload="main()">
<canvas width="600" height="600" id='jeeFaceFilterCanvas'></canvas>
<video id='myVideo' style='display: none' src='video.mp4' playsinline preload autoplay loop></video>
<video id='myVideo' style='display: none' playsinline preload autoplay loop>
<source src='video.mp4' type='video/mp4'/>
</video>
<div id='notice'>Click or Touch <br/> to start!</div>
</body>
</html>
Expand Down
2 changes: 2 additions & 0 deletions demos/canvas2D/fromVideoFile/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
let VIDEOELEMENT = null;


function main(){ // entry point
VIDEOELEMENT = document.getElementById('myVideo');

Expand All @@ -11,6 +12,7 @@ function main(){ // entry point
}
}


function start(){ // launched when the video is loaded
let CVD = null; // return of Canvas2DDisplay

Expand Down
5 changes: 4 additions & 1 deletion demos/threejs/cube2cv/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function detect_callback(faceIndex, isDetected) {
}
}


// build the 3D. called once when Jeeliz Face Filter is OK:
function init_threeScene(spec) {
spec.threeCanvasId = 'threeCanvas'; // enable 2 canvas mode
Expand All @@ -25,7 +26,8 @@ function init_threeScene(spec) {

// CREATE THE CAMERA:
THREECAMERA = JeelizThreeHelper.create_camera();
} // end init_threeScene()
}


// entry point:
function main(){
Expand All @@ -37,6 +39,7 @@ function main(){
})
}


function init_faceFilter(videoSettings){
JEELIZFACEFILTER.init({
antialias: false,
Expand Down
2 changes: 1 addition & 1 deletion demos/threejs/cubeExpr/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function main(){
function init_faceFilter(videoSettings){
JEELIZFACEFILTER.init({
canvasId: 'jeeFaceFilterCanvas',
NNCPath: '../../../neuralNets/NN_4EXPR_0.json', // This neural network model has learnt 4 expressions
NNCPath: '../../../neuralNets/NN_4EXPR_1.json', // This neural network model has learnt 4 expressions

maxFacesDetected: 1,
callbackReady: function(errCode, spec){
Expand Down
4 changes: 4 additions & 0 deletions demos/threejs/multiCubes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ const SETTINGS = {
maxFaces: 4, // max number of detected faces
};


// some globalz:
let THREECAMERA = null;


// callback: launched if a face is detected or lost
function detect_callback(faceIndex, isDetected){
if (isDetected){
Expand All @@ -17,6 +19,7 @@ function detect_callback(faceIndex, isDetected){
}
}


// build the 3D. called once when Jeeliz Face Filter is OK
function init_threeScene(spec){
const threeStuffs = JeelizThreeHelper.init(spec, detect_callback);
Expand All @@ -34,6 +37,7 @@ function init_threeScene(spec){
THREECAMERA = JeelizThreeHelper.create_camera();
}


// Entry point, launched by body.onload():
function main(){
JEELIZFACEFILTER.init({
Expand Down
334 changes: 169 additions & 165 deletions dist/jeelizFaceFilter.js

Large diffs are not rendered by default.

338 changes: 171 additions & 167 deletions dist/jeelizFaceFilter.module.js

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions dist/jeelizFaceFilter.moduleES6.js

Large diffs are not rendered by default.

334 changes: 169 additions & 165 deletions dist/jeelizFaceFilter.moduleNoDOM.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions neuralNets/NN_4EXPR_1.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion neuralNets/NN_DEFAULT.json
100755 → 100644

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions neuralNets/NN_LIGHT_1.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions neuralNets/NN_STANDARD_1.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions neuralNets/NN_STANDARD_2.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions neuralNets/NN_VERYLIGHT_1.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion reactThreeFiberDemo/config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = merge(common, {
*/
devServer: {
historyApiFallback: true,
contentBase: paths.build,
static: paths.build,
open: true,
compress: true,
hot: true,
Expand Down
12 changes: 6 additions & 6 deletions reactThreeFiberDemo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"copy-webpack-plugin": "^6.0.3",
"cross-env": "^7.0.2",
"css-loader": "^4.3.0",
"cssnano": "^4.1.10",
"cssnano": "^5.0.10",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.0.4",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^0.11.1",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"node-sass": "^4.14.0",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"postcss-loader": "^4.0.1",
"postcss-preset-env": "^6.7.0",
"react-hot-loader": "^4.13.0",
Expand All @@ -37,16 +37,16 @@
"terser-webpack-plugin": "^4.1.0",
"url-loader": "^4.0.0",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.4.0",
"webpack-merge": "^5.1.4"
},
"repository": {
"type": "git",
"url": "[email protected]:jeeliz/jeelizFaceFilter"
},
"dependencies": {
"facefilter": "^2.1.8",
"facefilter": "^3.0.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-three-fiber": "^6.0.13",
Expand Down

0 comments on commit c434b47

Please sign in to comment.