mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-07 05:47:03 +00:00
Import the segmenter model in a more statically-analyzable way
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2024-2025 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
Please see LICENSE in the repository root for full details.
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
} from "@livekit/track-processors";
|
||||
import { ImageSegmenter } from "@mediapipe/tasks-vision";
|
||||
|
||||
import modelAssetPath from "../mediapipe/imageSegmenter/selfie_segmenter.tflite?url";
|
||||
|
||||
interface WasmFileset {
|
||||
/** The path to the Wasm loader script. */
|
||||
wasmLoaderPath: string;
|
||||
@@ -32,11 +34,6 @@ const wasmFileset: WasmFileset = {
|
||||
).href,
|
||||
};
|
||||
|
||||
const modelAssetPath = new URL(
|
||||
"../mediapipe/imageSegmenter/selfie_segmenter.tflite",
|
||||
import.meta.url,
|
||||
).href;
|
||||
|
||||
export class BlurBackgroundTransformer extends BackgroundTransformer {
|
||||
public async init({
|
||||
outputCanvas,
|
||||
|
||||
Reference in New Issue
Block a user