vladmandic / human

Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gaze Tracking, Gesture Recognition
https://vladmandic.github.io/human/demo/index.html
MIT License
2.38k stars 325 forks source link

TypeError: Human is not a constructor #455

Closed fenix272 closed 7 months ago

fenix272 commented 7 months ago

I just downloaded your library from the main page, i included in the hml file: <script type="text/javascript" src="js/human/human.js"></script> then in the js file i did:

 const config = {
      debug: false,
      backend: 'webgl', //webgl
      async: true,
      cacheSensitivity: 0,
      deallocate: true,
      filter: { enabled: false },
      body: { enabled: false },
      hand: { enabled: false },
      object: { enabled: false },
      segmentation: { enabled: false },
      gesture: { enabled: false },
      modelBasePath: '../models',
      warmup: 'face',
      face: {
        enabled: true,
        detector: {
          enabled: true,
          modelPath: 'blazeface.json',
          rotation: true,
          maxDetected: 20,
          skipFrames: Number.MAX_SAFE_INTEGER,
          skipTime: 1000,
          minConfidence: 0.2,
          iouThreshold: 0.1,
          return: false,
          videoOptimized: false

        },
        description: { enabled: true, minConfidence: .3,  modelPath: 'faceres.json', },
        mesh: {
          enabled: true,
          modelPath: 'facemesh.json',
        },
        antispoof: { enabled: false },
        emotion: { enabled: false },
        iris: { enabled: false },
        videoOptimized: false,
        liveness: {
          enabled: false,
          skipFrames: 99,
          skipTime: 4000,
          modelPath: 'liveness.json',
        },
      },
       filter: {
        enabled: true,
        equalization: false,
        width: 320,
        height: 0,
        flip: false,
        return: true,
        brightness: 0,
        contrast: 0,
        sharpness: 0,
        blur: 0,
        saturation: 0,
        hue: 0,
        negative: false,
        sepia: false,
        vintage: false,
        kodachrome: false,
        technicolor: false,
        polaroid: false,
        pixelate: 0,
      },
    };
    const human = new Human(config);

But i get this error "TypeError: Human is not a constructor". What's wrong?

vladmandic commented 7 months ago

you have skipped entire issue template and documented nothing, not even if this is a browser or nodejs environment. but in any case, js/human/human.js is entry point to BUILD the library, not to USE it. to use the library, you import from desired variation in /dist folder. which one? depends on your use-case. see demos for more details.

fenix272 commented 7 months ago

Why did you close my issue? I'm using it the browser!!!

Do you see the line above!! I took human.js from the dist folder and put into my folder. UNDERSTAND? I did like it says in the installation notes! And it DOESN"T WORK!!! REOPEN IT!!

vladmandic commented 7 months ago

did you fill issue template? no. you just dumped the log. and now you yell? at open source? talk about level of entitlement. use it or dont, not my problem with this attitude.