vladmandic/human

TypeError: Human is not a constructor

fenix272 opened this issue · 3 comments

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?

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.

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

<script type="text/javascript" src="js/human/human.js"></script>

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!!

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.