Giter VIP home page Giter VIP logo

Comments (12)

plmok61 avatar plmok61 commented on May 24, 2024 3

Apologies, I was testing out different versions to see if it would fix the issue. When I am back in the office on Monday I will get new screenshots from one of our Windows 10 users with the same version

from human.

augchan42 avatar augchan42 commented on May 24, 2024

What version of typescript does the browser bundle use? Recently had a pr to fix a build issue related to typescript 5.3 and typedoc, had to downgrade to typescript 5.1 for build to work.
EDIT: update wrong typescript version (previously 2.x, should be 5.x)

from human.

vladmandic avatar vladmandic commented on May 24, 2024

it would be helpfull to see inspector screenshots as above for both TS and JS builds so we can compare them and possibly spot the difference. note that i cannot go an recreate your entire project for purpose of troubleshooting.

also, are you using skipLibCheck=true? its highly recommended for TS projects so your build does NOT try to recompile already compiled libraries.

from human.

plmok61 avatar plmok61 commented on May 24, 2024

@vladmandic Yes skipLibCheck is set to true for us. I'm not exactly sure what you wanted me to screen shot with the inspector, can you please give me an example? I've created gists for the bundles from running the apps in ngrok in case that is helpful.

JS
https://gist.github.com/plmok61/46fc91891666f0a9c10551684a524107

TS
https://gist.github.com/plmok61/8f390264e46341e20741d78a8531aa15

@augchan42 we have typescript 4.9.5 in the simplified app,

from human.

vladmandic avatar vladmandic commented on May 24, 2024

Screenshot exactly like you've posted, but for both TS app and JS app.

from human.

plmok61 avatar plmok61 commented on May 24, 2024

Oh sorry I misunderstood. I though you meant screenshots of the actual built JS which seemed kind of odd.

Here are the JS screenshots:

JS-screenshot

JS-screenshot2

JS-screenshot3

And here are the TS screenshot
TS-screenshot1

TS-screenshot2

TS-screenshot3

from human.

vladmandic avatar vladmandic commented on May 24, 2024

first of all, TS and JS projects are using different versions of Human - there is no point of comparing if we're not even looking at the same thing.

from human.

plmok61 avatar plmok61 commented on May 24, 2024

Great catch on the versions. Typescript is not the issue after all.

It looks like version 3.1.2 is the culprit. We had ^3.0.6 in our package.json. When we installed the exact version of 3.0.7 in our staging app, face detection in Chrome Windows 10 once again works. We then installed 3.1.2 and had no faces detected.

We also noticed that 3.2.0 was just release so we tested it in staging as well and encountered the same no faces detected issue.

Are there any important improvements/fixes that we are missing out on by using 3.0.7? It seems to serve our purposes well.

from human.

vladmandic avatar vladmandic commented on May 24, 2024

versions 3.1 and 3.2 are primarily to support latest versions of typescript, node and tfjs, so no explicit need to upgrade.
if 3.0 works and 3.1 doesn't it could be due to backend math precision and/or optimizations in newer tfjs.
according to screenshots, you're running using webgpu backend, could you try as a test setting backend to webgl and see if that changes the results?

from human.

plmok61 avatar plmok61 commented on May 24, 2024

We just tested 3.1.2 with backend set to webgl. We get some typescript errors from the config but face detection now works in windows 10 chrome.

This is our config.

{
  backend: 'webgl',
  gesture: {
    enabled: false,
  },
  hand: {
    enabled: false,
  },
  body: {
    enabled: false,
  },
  segmentation: {
    enabled: false,
  },
  face: {
    antispoof: {
      enabled: true,
    },
    liveness: {
      enabled: true,
    },
    iris: {
      enabled: true,
    },
    emotion: {
      enabled: true,
    },
    mesh: {
      enabled: true,
    },
    detector: {
      rotation: true,
    },
  },
}

We will continue to use 3.0.7 for now but it is nice to know that we are able to upgrade if we need to. Thank you for all your help!

from human.

vladmandic avatar vladmandic commented on May 24, 2024

webgpu is still work-in-progress, i'm surprised that chrome enabled it by default in latest versions, i would have left it for beta/dev for a while longer. math optimizations are changing weekly and likely some math results are different on 3 or 4th level behind decimal point, but enough to throw the model off.

anyhow, i'll close the issue for now, but feel free to post here with any further questions.

from human.

Bobo100 avatar Bobo100 commented on May 24, 2024

I recently encountered a similar problem while developing a simple test website.

On one of my computers, whenever I upload an image for human face detection, it always returns an empty array (No face detection).

This issue persists regardless of which web browser I use.
I have tested it with versions 3.0.7, 3.1.2, and the latest version 3.2.0 of the software, and the problem remains consistent.

However, the same website functions correctly on other computers and mobile devices.
So, I'm also puzzled why the same code and the same image (a frontal face photo) produce completely different results.

I have also tested two demo websites provided by the author on the problematic computer:

Demo Website 1: The issue of 'No face detection' consistently occurs on this URL.
Demo Website 2: However, on this URL, the application runs smoothly

The solution that worked for me was modifying the backend setting to 'wasm'.
backend: 'wasm'
After making this change, the face detection started working as expected.

from human.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.