question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Face expression probabilities random on chrome android

See original GitHub issue

After loading and detecting face from html video element, the probability distribution is correct for a few frames (happy 0.99, sad 0.0000343) etc.

After a few processed frames, the probabilities jump all over the place (see screenshots below).

The same code works fine when using it in chrome on my desktop machine (Nvidia GTX 1060)

Android 8.0.0 Chrome 73.0.3683.90 Samsung Galaxy S7

probabilities

const model = FaceApiFaceDetectorModel.TINY_FACE_DETECTOR;
const modelBaseUrl = '/assets/tfmodels';
const minConfidence = 0.5;
const inputSize = 256;
const scoreThreshold = 0.5;
const minFaceSize = 200;

await loadFaceDetectorModel(model, modelBaseUrl);
await faceapi.loadFaceExpressionModel(modelBaseUrl);

const options = getFaceDetectorOptions(model, minConfidence, inputSize, scoreThreshold, minFaceSize);

const result = await faceapi.detectSingleFace(video, options).withFaceExpressions();

Might this be some kind of overflow?

Edit: I tried it with the sample application (examples-browser) by updating the “video face tracking” example. The result is the same: Works on desktop, random values on mobile

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
justadudewhohackscommented, May 8, 2019

Ok. All I can do for now is upgrade tfjs-core to latest, which I am working on now.

0reactions
davidstrahmcommented, May 17, 2019

Update: seems to work now on chrome mobile 74.0.3729.136

Read more comments on GitHub >

github_iconTop Results From Across the Web

Random
If two instances of Random are created with the same seed, ... The values true and false are produced with (approximately) equal probability....
Read more >
AffdexMe - Apps on Google Play
AffdexMe demonstrates the use of Affectiva's Affdex Software Developer Kit (SDK), which lets developers emotion-enable their apps and digital experiences.
Read more >
Optimizing Android Facial Expressions Using Genetic ...
Relationships between face control positions and genes. Table. Figure 4 shows the facial expression made by EveR from randomly generated genes.
Read more >
Correlating Facial Expressions and Contextual Data for Mood ...
introduces OpenFaceAndroid – an Android application based on the existing facial analysis ... facial expression recognition from pictures and videos.
Read more >
Manual: Important Classes - Random
The Random class provides you with easy ways of generating various commonly required types of random values. This page provides an overview of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found