Instructions to use unity/inference-engine-blaze-face with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- unity-sentis
How to use unity/inference-engine-blaze-face with unity-sentis:
string modelName = "[Your model name here].sentis"; Model model = ModelLoader.Load(Application.streamingAssetsPath + "/" + modelName); IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model); // Please see provided C# file for more details
- Notebooks
- Google Colab
- Kaggle
Upload RunBlazeFace.cs
Browse files- RunBlazeFace.cs +3 -3
RunBlazeFace.cs
CHANGED
|
@@ -31,7 +31,7 @@ public class RunBlazeFace : MonoBehaviour
|
|
| 31 |
// 6 optional sprite images (left eye, right eye, nose, mouth, left ear, right ear)
|
| 32 |
public Sprite[] markerTextures;
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
//
|
| 37 |
public Texture2D _inputImage;
|
|
@@ -187,8 +187,8 @@ public class RunBlazeFace : MonoBehaviour
|
|
| 187 |
}
|
| 188 |
for (int j = 0; j < 6 * 8 * 8; j++)
|
| 189 |
{
|
| 190 |
-
offsets[n++] = (j / 6) % 8 - 7f;
|
| 191 |
-
offsets[n++] = (j / 6 / 8) - 7f;
|
| 192 |
n += 2;
|
| 193 |
}
|
| 194 |
return offsets;
|
|
|
|
| 31 |
// 6 optional sprite images (left eye, right eye, nose, mouth, left ear, right ear)
|
| 32 |
public Sprite[] markerTextures;
|
| 33 |
|
| 34 |
+
public string videoName = "chatting.mp4";
|
| 35 |
|
| 36 |
//
|
| 37 |
public Texture2D _inputImage;
|
|
|
|
| 187 |
}
|
| 188 |
for (int j = 0; j < 6 * 8 * 8; j++)
|
| 189 |
{
|
| 190 |
+
offsets[n++] = 2 * ((j / 6) % 8) - 7f;
|
| 191 |
+
offsets[n++] = 2 * ((j / 6 / 8)) - 7f;
|
| 192 |
n += 2;
|
| 193 |
}
|
| 194 |
return offsets;
|