{"id":14384778,"url":"https://github.com/Tastenkunst/brfv4_javascript_examples","last_synced_at":"2025-08-23T18:31:00.238Z","repository":{"id":94390082,"uuid":"94611887","full_name":"Tastenkunst/brfv4_javascript_examples","owner":"Tastenkunst","description":"BRFv4 - HTML5/Javascript - examples project. Reference implementation for all other platform example packages.","archived":false,"fork":false,"pushed_at":"2019-08-29T19:31:45.000Z","size":20273,"stargazers_count":462,"open_issues_count":11,"forks_count":148,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-06-22T18:46:49.497Z","etag":null,"topics":["brfv4","detection","emscripten","face","face-detection","face-tracking","javascript","sdk","tracking","web"],"latest_commit_sha":null,"homepage":null,"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/Tastenkunst.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-06-17T08:51:48.000Z","updated_at":"2024-01-18T12:35:57.000Z","dependencies_parsed_at":"2023-04-21T08:46:50.551Z","dependency_job_id":null,"html_url":"https://github.com/Tastenkunst/brfv4_javascript_examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tastenkunst%2Fbrfv4_javascript_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tastenkunst%2Fbrfv4_javascript_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tastenkunst%2Fbrfv4_javascript_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tastenkunst%2Fbrfv4_javascript_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tastenkunst","download_url":"https://codeload.github.com/Tastenkunst/brfv4_javascript_examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":217384771,"owners_count":16168802,"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":["brfv4","detection","emscripten","face","face-detection","face-tracking","javascript","sdk","tracking","web"],"created_at":"2024-08-28T18:01:39.955Z","updated_at":"2024-08-28T18:05:25.769Z","avatar_url":"https://github.com/Tastenkunst.png","language":"JavaScript","readme":"## BRFv5 Released!\n\nBRFv4 will be discontinued in 2020.\n\nCheck out the new BRFv5 JavaScript SDK here:\n\n### [https://github.com/tastenkunst/brfv5-browser](https://github.com/tastenkunst/brfv5-browser)\n\n## Beyond Reality Face SDK - v4.1.0 (BRFv4) - Readme\n\n### What is BRFv4?\n\nIt is a real time face detection and tracking SDK. You put in image data (camera stream or single picture) and it outputs facial data.\n\n![alt text](readme_img.jpg \"BRFv4\")\n\n### Ready to try!\n\nRead the EULA (eula.txt) carefully before using the SDK. Once you decide to use BRFv4 commercially, you will get a \nseparate license agreement, that you must agree to. You can try the SDK free of charge to evaluate if it fits your projects' \nneeds. Once you decided to use BRFv4 in your project, please contact us for a commercial license:\n\n+ http://www.tastenkunst.com/#/contact\n\n### Visit us online.\n\n+ [Github](https://github.com/Tastenkunst)\n+ [Demo](https://tastenkunst.github.io/brfv4_javascript_examples/)\n+ [Docs / API](https://tastenkunst.github.io/brfv4_docs/)\n+ [What can I do with it?](https://tastenkunst.github.io/brfv4_docs/what_can_i_do_with_it.html)\n+ [Website](https://www.beyond-reality-face.com)\n+ [Facebook](https://www.facebook.com/BeyondRealityFace)\n+ [Twitter](https://twitter.com/tastenkunst)\n\n### Getting started.\n\nTo test BRFv4 simply visit the Javascript demo site:\n\n+ https://tastenkunst.github.io/brfv4_javascript_examples/\n\nThis page also includes all available packages for download.\n\n### Which platforms does it support?\n\n#### HTML5/Browser – Javascript (works in Chrome/Firefox/Edge/Opera/Safari 11)\nRun the index.html on a local server.\n\n#### iOS - ObjectiveC/C++\nOpen the Xcode project. Attach your iOS device and run the example app on your device.\n\n#### Android - Java \nOpen the Android Studio project. Attach your Android device and run the example app on your device.\n\n#### macOS - C++ utilizing OpenCV for camera access and drawing\nHave [OpenCV](http://opencv.org/) brewed (opencv3) on your system. Open the Xcode project and just run it on your Mac.\n\n#### Windows - C++ utilizing OpenCV for camera access and drawing\nGood luck in trying to compile [OpenCV](http://opencv.org/) for your Windows. Update the Visual Studio (2017) project properties that mention \nOpenCV. Then run the Release x64 target. Fingers crossed!\n\n#### Adobe AIR - Actionscript 3 on Windows, macOS, iOS and Android \nUse your preferred IDE. Add the src folder and the ANE itself to your class path and run the example class on your \ndesired device (not in a simulator). Unfortunately we had to discontinue Flash Player (SWF in browser) support.\n\n### Technical overview\n\nBRFv4 comes with the following components:\n\n+ face detection\t- Finds faces (rectangles) in an image/camera stream\n+ face tracking\t\t- Finds 68 facial landmarks/features\n+ point tracking\t- Tracks points in a webcam stream\n\nAll available packages have roughly the same content and come with a set of examples to show SDK use cases.\n\n### What image size does BRFv4 need?\n\nYou can input any image size.\n\nInternally BRFv4 uses a DYNx480 (landscape) or 480xDYN (portrait) image for the analysis. So 480px is the base size that every other input size gets scaled to, eg.\n\nlandscape:\n\n+  640 x  480 -\u003e 640 x 480 // fastest, no scaling\n+ 1280 x  720 -\u003e 854 x 480\n+ 1920 x 1080 -\u003e 854 x 480\n\nportrait:\n\n+  480 x  640 -\u003e 480 x 640 // fastest, no scaling\n+  720 x 1280 -\u003e 480 x 854\n+ 1080 x 1920 -\u003e 480 x 854\n\nBRFv4 scales the results up again, so you don't have to do that yourself.\nAll parameters named *size or *width are pixel values based on the actual image size.\neg. telling BRF what face sizes to initially detect:\n\n```markdown\nbrfManager.setFaceDetectionParams(int minFaceSize, int maxFaceSize, int stepSize, int minMergeNeighbors);\n```\nIf you work with a 640x480 camera stream, it would be something like this:\n```markdown\nbrfManager.setFaceDetectionParams(144, 432, 12, 8);\n```\nWhere as if you work with a 1280x720 camera stream, you will need something like this:\n```markdown\nbrfManager.setFaceDetectionParams(216, 648, 12, 8);\n```\nIn the examples we generalize that a bit:\n```javascript\n// We have either a landscape area (desktop), then choose height or\n// we have a portrait area (mobile), then choose width as max face size.\n\nvar maxFaceSize = _faceDetectionRoi.height;\n\nif(_faceDetectionRoi.width \u003c _faceDetectionRoi.height) {\n maxFaceSize = _faceDetectionRoi.width;\n}\n\nbrfManager.setFaceDetectionParams(maxFaceSize * 0.30, maxFaceSize * 0.90, 12, 8);\n```\nMore on that in the API, see link above.\n\n### FAQ\n\nCan I track other objects like hands or neck?\n+ No, it is tracking faces only.\n\nCan you increase the performance?\n+ We could remove some calculations in a commercial version, if you want to, but this comes at the price of reduced accuracy.\n\nCan you make the library smaller?\n+ Usually the descriptor would be 80MB and more. It's already only 9MB for most platforms. So: We could go down in 1,5MB steps, but this will also massively decrease accuracy.\nOnce you bought a license you can choose which size you want to go with.\n\n### Release notes\n\nv4.1.0 - 11th July 2018\n\n+ All: Changed 3D calculation model a bit. This might result in slightly different placement and rotationX.\n+ Info: We started to work on BRFv5 (yeha!)\n\nv4.0.1 - 09th November 2017\n\n+ JS: Added: WASM export to Javascript SDK.\n+ JS: Fix: Found a workaround for iOS 11 (in Safari) for starting the camera.\n+ JS: Updated: CreateJS to v1.0.2 (easel) and v1.0.1 (preload).\n+ JS: Updated: ThreeJS to r88.\n+ Minor cleanups\n+ Known issue: JS SDK is slow in Chrome 63 because of this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=768775\n\nv4.0.0 - 20th June 2017\n\nIt's done! After over a year of development Tastenkunst is proud to announce the release of BRFv4.\n\n+ Changed: Completely rewritten the C++ core: image handling, face detection and tracking algorithms etc.\n+ Changed: Image data can now be of any site. BRFv4 will handle the scaling internally.\n+ Changed: Point tracking and face tracking can now be done simultaneously.\n+ Changed: Face tracking algorithm changed from ASM to ERT. This comes with an increased file size though (For JS up from 2MB to 10MB)\n+ Added: Multi face tracking. It is now possible to track more than one face.\n+ Added: Example project for native Android (Java, Android Studio project)\n+ Added: Example project for macOS (C++, Xcode project, needs brewed OpenCV for camera handling and drawing)\n+ Added: Example project for Windows (C++, Visual Studio 2017 project, needs OpenCV for camera handling and drawing)\n+ Added: Adobe AIR native extension now supports Windows, macOS, iOS and Android.\n+ Removed: Support for Flash Player (SWF in Browser).\n\n### Licenses\n\nUsed Haar Cascade: haarcascade_frontalface_default.xml\n```\n\u003c!--\n    Stump-based 24x24 discrete(?) adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n////////////////////////////////////////////////////////////////////////////////////////\n\n  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n\n  By downloading, copying, installing or using the software you agree to this license.\n  If you do not agree to this license, do not download, install,\n  copy or use the software.\n\n\n                        Intel License Agreement\n                For Open Source Computer Vision Library\n\n Copyright (C) 2000, Intel Corporation, all rights reserved.\n Third party copyrights are property of their respective owners.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n   * Redistribution's of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n\n   * Redistribution's in binary form must reproduce the above copyright notice,\n     this list of conditions and the following disclaimer in the documentation\n     and/or other materials provided with the distribution.\n\n   * The name of Intel Corporation may not be used to endorse or promote products\n     derived from this software without specific prior written permission.\n\n This software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\n In no event shall the Intel Corporation or contributors be liable for any direct,\n indirect, incidental, special, exemplary, or consequential damages\n (including, but not limited to, procurement of substitute goods or services;\n loss of use, data, or profits; or business interruption) however caused\n and on any theory of liability, whether in contract, strict liability,\n or tort (including negligence or otherwise) arising in any way out of\n the use of this software, even if advised of the possibility of such damage.\n--\u003e\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTastenkunst%2Fbrfv4_javascript_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTastenkunst%2Fbrfv4_javascript_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTastenkunst%2Fbrfv4_javascript_examples/lists"}