SHARE
TWEET

Untitled

a guest Jun 25th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <body>
  2. ...
  3. <script src="https://ai-sdk.morphcast.com/v1.8.3/ai-sdk.js"></script>
  4. <script>
  5.  
  6. camera = {
  7.   getFrames(){
  8.     return new Promise(function(){
  9.        resolve(frame);
  10.     });
  11.  
  12. }
  13.  
  14. CY.loader()
  15.   .addModule(CY.modules().FACE_AGE.name)
  16.   .addModule(CY.modules().FACE_GENDER.name)
  17.   .load()
  18.   .then(({ start, stop }) => start());
  19.  
  20.  
  21. window.addEventListener('CY_AGE_RESULT',function(data){
  22.   // ..; ..
  23.    send(data.detail.output.numericAge);
  24. });
  25.  
  26. window.addEventListener('CY_GENDER_RESULT',function(data){
  27.   /*
  28.       here communicate with native app to forward gender data;
  29.   */
  30.    send(data.detail.output.gender);
  31. });
  32.  
  33.  
  34. </script>
  35. ...
  36. </body>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top