-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a webworkers for increased performance and updated build system. #83
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi @Skylion007 do you have an example of your modified version online for testing? I hope this great improvement will be merged soon. |
Thanks for the PR, code is now merged, sorry for the delay! |
auduno
pushed a commit
that referenced
this pull request
Jul 5, 2017
commit a2d0209e09f1a24cd1e1796d87672e5bf2ff1860 Merge: 4dcb8ef 86f46a3 Author: Audun Mathias Øygard <amoygard@gmail.com> Date: Sat May 13 09:45:56 2017 +0200 Merge parts of branch 'dev' of https://github.com/jsio-private/clmtrackr into jsio-private-dev Conflicts: Gruntfile.js clmtrackr.js clmtrackr.min.js docs/param_model/dat.gui.min.js examples/clm_image.html examples/clm_video.html examples/example.html examples/ext_js/mosse.js examples/face_deformation_video.html examples/face_mask.html examples/js/libs/Stats.js examples/js/libs/entire_face_filter.js examples/js/libs/frontalface.js examples/js/libs/jquery.imgareaselect.pack.js examples/js/libs/jquery.min.js examples/js/libs/left_eye_filter.js examples/js/libs/mosse.js examples/js/libs/nose_filter.js examples/js/libs/numeric-1.2.6.js examples/js/libs/numeric-1.2.6.min.js examples/js/libs/right_eye_filter.js examples/js/libs/utils.js js/clm.js js/face_deformer.js js/svmfilter_webgl.js js/utils/mosse.js package.json commit 86f46a3 Author: Ivan Reshetnikov <keenn2007@gmail.com> Date: Wed Oct 19 02:24:55 2016 +0200 fixed compatibility issues with jsdom environment commit 0fedb8b Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 23 16:18:06 2016 -0700 use jsio-webpack for building commit 1ea34f2 Merge: 82921c6 05ac5b9 Author: Joe Brown <sparkyjoe94@aim.com> Date: Thu Sep 22 14:45:31 2016 -0700 Merge pull request #2 from jsio-private/threejs-deformer Threejs deformer commit 05ac5b9 Author: yofreke <sparkyjoe94@aim.com> Date: Thu Sep 22 11:58:46 2016 -0700 creepy HSV blend mask shader commit 17bdc93 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 19:48:37 2016 -0700 use ShaderMaterial for mask commit e01a501 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 17:22:11 2016 -0700 functional three face masking commit 97bc5e6 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 16:52:07 2016 -0700 better performance commit 75e03cd Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 16:33:57 2016 -0700 add typings to tracking commit 9f043f7 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 16:32:15 2016 -0700 threejs mesh mask working commit 3ac9092 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 12:50:07 2016 -0700 make IDeformer an abstract class with basic implementation commit 94bc65f Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 21 11:38:39 2016 -0700 add TS support for twgl deformer commit 82921c6 Author: yofreke <sparkyjoe94@aim.com> Date: Tue Sep 20 13:23:04 2016 -0700 reduce array churn. favor shift over splice for removing first element commit 5a99353 Author: yofreke <sparkyjoe94@aim.com> Date: Tue Sep 20 12:28:33 2016 -0700 dont append svmfilter_webgl canvas to dom commit b3efceb Author: yofreke <sparkyjoe94@aim.com> Date: Tue Sep 20 12:22:05 2016 -0700 lint svmfilter_webgl commit b3d6214 Author: Ivan Reshetnikov <keenn2007@gmail.com> Date: Tue Sep 20 20:44:13 2016 +0200 fixed bad import commit b462239 Author: Ivan Reshetnikov <keenn2007@gmail.com> Date: Thu Sep 15 09:58:18 2016 +0200 size reduction commit 861c86b Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 16:47:00 2016 -0700 move webgl-utils.js in to js/utils/webgl commit 562cc11 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 16:15:37 2016 -0700 add generateModelJsons to npm scripts commit 852fc5a Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 16:08:08 2016 -0700 svmfilter_webgl uses glsl-template loader commit fa54b59 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 15:07:15 2016 -0700 use glsl-template-loader commit f2ae43e Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 12:56:41 2016 -0700 fix _calcTracking std dev math error (and cleanup) commit 6f05bfe Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 11:40:14 2016 -0700 pick c116b7e commit c5f8e27 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 19 11:37:15 2016 -0700 add stubs for examples from auduno/gh-pages commit 7dee40f Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 18:05:03 2016 -0700 minify images. fix missing mask textures on gh-pages commit 9d23258 Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 17:46:49 2016 -0700 fix publicPath for deployed examples commit 8df859d Merge: c37985e a4cae2d Author: Joe Brown <sparkyjoe94@aim.com> Date: Fri Sep 16 17:43:08 2016 -0700 Merge pull request #1 from jsio-private/react-examples Reactify examples commit a4cae2d Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 17:42:29 2016 -0700 add publish functionality commit 01b2864 Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 17:41:41 2016 -0700 favor webm videos commit 5d5a074 Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 17:40:40 2016 -0700 re-encode examples/media/franck.ogv. Add webm alternates for videos commit a7566c4 Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 15:38:23 2016 -0700 implement examples componentWillUnmount commit d688837 Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 14:48:05 2016 -0700 abstracted VideoExample commit 497276b Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 13:00:41 2016 -0700 remove old example files commit 8b6583a Author: yofreke <sparkyjoe94@aim.com> Date: Fri Sep 16 12:58:33 2016 -0700 ported face_mask.html commit c948d3b Author: yofreke <sparkyjoe94@aim.com> Date: Thu Sep 15 17:49:22 2016 -0700 ported face_deformation_video example commit d1605c0 Author: yofreke <sparkyjoe94@aim.com> Date: Thu Sep 15 15:28:01 2016 -0700 react clm_video.html commit 298a9ea Author: yofreke <sparkyjoe94@aim.com> Date: Thu Sep 15 14:41:54 2016 -0700 add manual selection to clm image example commit 62945f0 Author: yofreke <sparkyjoe94@aim.com> Date: Thu Sep 15 13:43:57 2016 -0700 better abstractions for VideoContainer. implemented basic clm image example (no manual selection yet) commit f1d2ee9 Author: yofreke <sparkyjoe94@aim.com> Date: Thu Sep 15 11:19:44 2016 -0700 initial react example code commit c37985e Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 14 20:13:55 2016 -0700 more deformer cleanup commit 376f1a5 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 14 19:14:15 2016 -0700 clean up deformer some commit 5efd95f Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 14 18:43:10 2016 -0700 move twgl deformer in to clm commit 24e4052 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 14 12:27:35 2016 -0700 linting commit f832136 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 14 11:49:30 2016 -0700 faster findFace worker postMessage Use transferList to send imageData ArrayBuffer, which transfers ownership instead of serializing / deserialzing commit ba19e81 Author: yofreke <sparkyjoe94@aim.com> Date: Wed Sep 14 11:23:17 2016 -0700 single JsfeatFace instance per tracker commit e5ab47d Author: yofreke <sparkyjoe94@aim.com> Date: Tue Sep 13 18:33:58 2016 -0700 fix getUserMedia: Illegal invocation commit 3cb409f Author: yofreke <sparkyjoe94@aim.com> Date: Tue Sep 13 17:32:36 2016 -0700 JsfeatFace extends EventEmitter commit e4c9af3 Author: yofreke <sparkyjoe94@aim.com> Date: Tue Sep 13 16:51:40 2016 -0700 refactor some of: utils, jsfeat, Tracker commit 9a9831e Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 18:42:29 2016 -0700 fix track throwing errors (MosseFilter was returning NaN) commit 6928dcc Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 17:03:57 2016 -0700 Tracker extends EventEmitter commit f87ddc7 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 14:31:36 2016 -0700 fix models json commit cd36b71 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 13:45:45 2016 -0700 add build to postinstall, production build goes to `dist/clmtrackr.js` instead of min commit d6c7ec9 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 13:09:58 2016 -0700 minor restructure commit f885f47 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 12:53:50 2016 -0700 initial es6 translation commit 45f5f43 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 10:55:40 2016 -0700 fix web worker - add worker-loader, use inline option - format jsfeat_detect.worker.js to match worker-loader expectations - use correct jsfeat version (package.json was using a version that is too new) - ignore intermediate `dist/*.worker.js` in gitignore commit 0901691 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 10:36:52 2016 -0700 move built files to `dist/` commit 2bcfb0a Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 10:07:53 2016 -0700 use webpack for build commit 90b79c1 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 10:00:37 2016 -0700 fix broken json commit 37e56b3 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 09:33:14 2016 -0700 hand-pick: #83 commit fcb8d39 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 09:09:47 2016 -0700 delete trailing whitespace commit c06b4f0 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 08:57:05 2016 -0700 run build commit bf1e3e6 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 08:55:53 2016 -0700 hand-pick: #53 commit 2b3f324 Author: yofreke <sparkyjoe94@aim.com> Date: Mon Sep 12 08:54:41 2016 -0700 hand-pick: #45 commit f291076 Author: Andy Dayton <amdayton@gmail.com> Date: Sun Jan 24 00:53:08 2016 -0500 remove grunt, etc from dependencies commit bedc242 Author: Andy Dayton <amdayton@gmail.com> Date: Sun Jan 24 00:43:06 2016 -0500 rebuilt files commit 05dcf41 Author: Andy Dayton <amdayton@gmail.com> Date: Sun Jan 24 00:23:18 2016 -0500 Added documentation for browserify example commit 9f69208 Author: Andy Dayton <amdayton@gmail.com> Date: Sun Jan 24 00:06:15 2016 -0500 Update main field in package.json to point to built version commit f867652 Author: Andy Dayton <amdayton@gmail.com> Date: Sun Jan 24 00:05:14 2016 -0500 Renamed src back to js to keep closer to original repo name commit f716c67 Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 23:56:56 2016 -0500 A bit of cleanup commit 149766e Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 23:28:03 2016 -0500 Fixed minification step of build commit 15079b1 Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 23:24:44 2016 -0500 Got build working correctly commit c1d215c Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 23:04:53 2016 -0500 wip, but got browserify example working commit 5024a6c Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 21:35:34 2016 -0500 Updated build to include npm versions commit 53276ef Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 21:22:33 2016 -0500 Updated to use built version of clmtracker commit b257955 Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 15:50:01 2016 -0500 switched numeric.js over to npm dependency commit 8e077cd Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 15:42:53 2016 -0500 Updated remaining examples to use npm jsfeat commit e68ad32 Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 15:36:40 2016 -0500 Had to update jsfeat_detect to work with npm version of jsfeat commit 7b3a52b Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 15:08:23 2016 -0500 Dat as npm dependency commit 1a9947a Author: Andy Dayton <amdayton@gmail.com> Date: Sat Jan 23 14:50:13 2016 -0500 Installed blog.js and filesaver.js as npm dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been trying to use this library in a project where performance is absolutely crucial as it runs on mobile. So far I have been struggling due to the large amount of lag caused by the detectFace function. This becomes extremely noticeable on low framerates. I found @sagrimson and it greatly improved performance on the device. Unfortunately, he/she never made a pull request and made all their changes to the already build clmtrackr file. I decided to improve on the changes he made and also rebundle so that it complies with the current Grunt build system.
Since I modified js_feat from @auduno original authorship I decided to move it into the /js/ folder since it now requires a callback to return. I also put the new worker in there for the same reason. Unfortunately, I had to pack a bunch of dependencies into the worker such as JSFeat so I modified the build script so it wouldn't include them twice. I am open to any other changes that need to be made for the pull request to be accepted.
I also updated some grunt modules because some of the old ones were causing build issues and performance has been markedly improved.
This should help fix #70