{"id":17840556,"url":"https://github.com/lessthanzero/workshop-demo-1","last_synced_at":"2025-07-16T19:33:47.820Z","repository":{"id":34616575,"uuid":"38565425","full_name":"lessthanzero/workshop-demo-1","owner":"lessthanzero","description":"Face tracker for BHSAD workshop","archived":false,"fork":false,"pushed_at":"2015-07-05T10:40:28.000Z","size":27296,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T14:09:01.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lessthanzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-05T10:39:46.000Z","updated_at":"2015-07-05T10:40:29.000Z","dependencies_parsed_at":"2022-08-17T21:01:00.505Z","dependency_job_id":null,"html_url":"https://github.com/lessthanzero/workshop-demo-1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lessthanzero/workshop-demo-1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanzero%2Fworkshop-demo-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanzero%2Fworkshop-demo-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanzero%2Fworkshop-demo-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanzero%2Fworkshop-demo-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lessthanzero","download_url":"https://codeload.github.com/lessthanzero/workshop-demo-1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanzero%2Fworkshop-demo-1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265534719,"owners_count":23783878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T21:01:11.454Z","updated_at":"2025-07-16T19:33:47.802Z","avatar_url":"https://github.com/lessthanzero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"clmtrackr\n======\n\n![tracked face](http://auduno.github.com/clmtrackr/media/clmtrackr_03.jpg)\n\n**clmtrackr** is a javascript library for fitting facial models to faces in videos or images. It currently is an implementation of *constrained local models* fitted by *regularized landmark mean-shift*, as described in [Jason M. Saragih's paper](http://dl.acm.org/citation.cfm?id=1938021). **clmtrackr** tracks a face and outputs the coordinate positions of the face model as an array, following the numbering of the model below:\n\n[![facemodel_numbering](http://auduno.github.com/clmtrackr/media/facemodel_numbering_new_small.png)](http://auduno.github.com/clmtrackr/media/facemodel_numbering_new.png)\n\n[Reference](http://auduno.github.io/clmtrackr/docs/reference.html) - [Overview](http://auduno.tumblr.com/post/61888277175/fitting-faces)\n\nThe library provides some generic face models that were trained on [the MUCT database](http://www.milbo.org/muct/) and some additional self-annotated images. Check out [clmtools](https://github.com/auduno/clmtools) for building your own models.\n\nThe library requires [jsfeat.js](https://github.com/inspirit/jsfeat) (for initial face detection) and [numeric.js](http://numericjs.com) (for matrix math).\n\nFor tracking in video, it is recommended to use a browser with WebGL support, though the library should work on any modern browser.\n\nFor some more information about Constrained Local Models, take a look at Xiaoguang Yan's [excellent tutorial](https://sites.google.com/site/xgyanhome/home/projects/clm-implementation/ConstrainedLocalModel-tutorial%2Cv0.7.pdf?attredirects=0), which was of great help in implementing this library.\n\n### Examples ###\n\n* [Tracking in image](http://auduno.github.io/clmtrackr/clm_image.html)\n* [Tracking in video](http://auduno.github.io/clmtrackr/clm_video.html)\n* [Face substitution](http://auduno.github.io/clmtrackr/examples/facesubstitution.html)\n* [Face masking](http://auduno.github.io/clmtrackr/face_mask.html)\n* [Realtime face deformation](http://auduno.github.io/clmtrackr/examples/facedeform.html)\n* [Emotion detection](http://auduno.github.io/clmtrackr/examples/clm_emotiondetection.html)\n* [Caricature](http://auduno.github.io/clmtrackr/examples/caricature.html)\n\n### Usage ###\n\nDownload the minified library [clmtrackr.js](https://github.com/auduno/clmtrackr/raw/dev/clmtrackr.js) and one of the models, and include them in your webpage. **clmtrackr** depends on [*numeric.js*](https://github.com/sloisel/numeric/) and [*jsfeat.js*](https://github.com/inspirit/jsfeat), but these are included in the minified library.\n\n```html\n/* clmtrackr libraries */\n\u003cscript src=\"js/clmtrackr.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/model_pca_20_svm.js\"\u003e\u003c/script\u003e\n```\n\nThe following code initiates the clmtrackr with the model we included, and starts the tracker running on a video element.\n\n```html\n\u003cvideo id=\"inputVideo\" width=\"400\" height=\"300\" autoplay loop\u003e\n  \u003csource src=\"./media/somevideo.ogv\" type=\"video/ogg\"/\u003e\n\u003c/video\u003e\n\u003cscript type=\"text/javascript\"\u003e\n  var videoInput = document.getElementById('inputVideo');\n  \n  var ctracker = new clm.tracker();\n  ctracker.init(pModel);\n  ctracker.start(videoInput);\n\u003c/script\u003e\n```\n\nYou can now get the positions of the tracked facial features as an array via ```getCurrentPosition()```:\n\n```html\n\u003cscript type=\"text/javascript\"\u003e\n  function positionLoop() {\n    requestAnimationFrame(positionLoop);\n    var positions = ctracker.getCurrentPosition();\n    // positions = [[x_0, y_0], [x_1,y_1], ... ]\n    // do something with the positions ...\n  }\n  positionLoop();\n\u003c/script\u003e\n```\n\nYou can also use the built in function ```draw()``` to draw the tracked facial model on a canvas :\n\n```html\n\u003ccanvas id=\"drawCanvas\" width=\"400\" height=\"300\"\u003e\u003c/canvas\u003e\n\u003cscript type=\"text/javascript\"\u003e\n  var canvasInput = document.getElementById('canvas');\n  var cc = canvasInput.getContext('2d');\n  function drawLoop() {\n    requestAnimationFrame(drawLoop);\n    cc.clearRect(0, 0, canvasInput.width, canvasInput.height);\n    ctracker.draw(canvasInput);\n  }\n  drawLoop();\n\u003c/script\u003e\n```\n\nSee the complete example [here](http://auduno.github.com/clmtrackr/example.html).\n\n### License ###\n\n**clmtrackr** is distributed under the [MIT License](http://www.opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flessthanzero%2Fworkshop-demo-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flessthanzero%2Fworkshop-demo-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flessthanzero%2Fworkshop-demo-1/lists"}