JSPM

ai.natml.vision.yunet

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q48214F
  • License BSD-3-Clause

Ultra-high performance face detection in Unity Engine.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ai.natml.vision.yunet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    YuNet

    YuNet high performance face detection from libfacedetection.

    Installing YuNet

    Add the following items to your Unity project's Packages/manifest.json:

    {
      "scopedRegistries": [
        {
          "name": "NatML",
          "url": "https://registry.npmjs.com",
          "scopes": ["ai.natml"]
        }
      ],
      "dependencies": {
        "ai.natml.vision.yunet": "1.0.3"
      }
    }

    Detecting Faces in an Image

    First, create the YuNet predictor:

    // Create the YuNet predictor
    var predictor = await YuNetPredictor.Create();

    Then detect faces in the image:

    // Create image feature
    Texture2D image = ...;
    // Detect faces
    Rect[] faces = predictor.Predict(image);

    Requirements

    • Unity 2022.3+

    Quick Tips

    Thank you very much!