mirror of
https://github.com/cosyneco/MediaPipe.NET.git
synced 2025-05-17 15:36:24 +08:00

* Make ImageFrame nullable, because BlazePose can return empty frames * Add BlazePose example Co-authored-by: Darren <darren@velogicfit.com>
27 lines
785 B
C#
27 lines
785 B
C#
// Copyright (c) homuler and The Vignette Authors
|
|
// This file is part of MediaPipe.NET.
|
|
// MediaPipe.NET is licensed under the MIT License. See LICENSE for details.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using Mediapipe.Net.Util;
|
|
|
|
namespace Mediapipe.Net.Examples.BlazePose
|
|
{
|
|
public class DummyResourceManager : ResourceManager
|
|
{
|
|
public override PathResolver ResolvePath => (path) =>
|
|
{
|
|
Console.WriteLine($"PathResolver: (not) resolving path '{path}'");
|
|
return path;
|
|
};
|
|
|
|
public unsafe override ResourceProvider ProvideResource => (path) =>
|
|
{
|
|
Console.WriteLine($"ResourceProvider: providing resource '{path}'");
|
|
byte[] bytes = File.ReadAllBytes(path);
|
|
return bytes;
|
|
};
|
|
}
|
|
}
|