From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by mail.toke.dk (Postfix) with ESMTPS id 0C6EDA67F90 for ; Sun, 5 May 2024 21:36:43 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=d94VNqVR Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-de603e3072dso1447948276.1 for ; Sun, 05 May 2024 12:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714937742; x=1715542542; darn=lists.galene.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YYGyygNHr5vKxGaKonpWAfFmnLG3uHD1VPkmtsrn7I4=; b=d94VNqVRu2rWfwD6IVxNOH8XGsU8FekVq2b/LuCz3zkxUmIJ8el9VyB+OyHeC72svv pyC5A9jNA2aNzGt/rEFSnrKgeY22wojknVIly9luipuJvsW6YQeC6VOkmeB2fr4JRcOx kHkTBnr23dEtSkdKi79nxu8FBpnHW/mUf5FPk+QEFQcuUCV5o6AsaVWtNav1JIS8yNfM 2qSzbD0Py0eXOWlzxI+X05eHzGcFbM5PiIvGZfJd6l080HAggmhHuOsmJASH5JThUFc5 tmtOsz5FixRDJaAhAjJO6bHjvNQHIKkf24q46Ia+nk29C7XkaL0NJcg5xebWjO5I0d3D fZLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714937742; x=1715542542; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YYGyygNHr5vKxGaKonpWAfFmnLG3uHD1VPkmtsrn7I4=; b=FaVmTJQngCzJNNPtuhxcbeHc1vzpRA3YTBmR2Tnt8hWK4PpM/R9V3HsRxUrnQp+btC VAVTmqnedSUpr5YgiDxw4r+6ETnrD9D+SwJzgcP46Y2HLmiSixL+7fdZv5rC++43dY5u V7AkOgDUWnjwQuv4fATag+c7RjKc4G68uH7ya8BgwZ3B1mR+dL7+vkc1TvBwo6vagaB9 U3NfreD/tYV8OsZ29T+FxPQwtNLhsf0wMLBBetqvHq7k/GUj2mAW8X3YQLJ+NhJQDyLh hX1NtpxRTP1xPO/ypO5TQVR2lehMCQu01JVMESFRcVxGvXcmJk3KbOeV8E5GYWCdRxRV i4iQ== X-Gm-Message-State: AOJu0Yw9wjLHBDrSoKvkrCkV5UqNmuY+sX2FK1S0MGNd9ug+Sl0eNxCc mwb++guYwEEM6xTNMahOtVZKufCA/ftqaoBAoPr7gDtYChRjIogjWofNwNODPdaFbFrQj8Qi6+y hlT05cWl+c4nx0ezTZcW8Qqnn1WpNPZAy X-Google-Smtp-Source: AGHT+IGx+JveqQRuNPuerxTd6PDioo7ZkUGIfOPCrDujuEuKSQ74aZTu1kwTMdXITRYyEvu6+5xDh9FFCrcbZ7p0LhE= X-Received: by 2002:a25:858e:0:b0:de6:17e7:ddd1 with SMTP id x14-20020a25858e000000b00de617e7ddd1mr9439219ybk.34.1714937741815; Sun, 05 May 2024 12:35:41 -0700 (PDT) MIME-Version: 1.0 References: <87msp4dqaj.wl-jch@irif.fr> In-Reply-To: <87msp4dqaj.wl-jch@irif.fr> From: Francis Bolduc Date: Sun, 5 May 2024 15:35:31 -0400 Message-ID: To: Juliusz Chroboczek Content-Type: text/plain; charset="UTF-8" Message-ID-Hash: DCBTTM72A327HBZZOQPVD3TCTLFIYHKC X-Message-ID-Hash: DCBTTM72A327HBZZOQPVD3TCTLFIYHKC X-MailFrom: fbolduc@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: galene@lists.galene.org X-Mailman-Version: 3.3.9 Precedence: list Subject: [Galene] Re: Blur background List-Id: =?utf-8?q?Gal=C3=A8ne_videoconferencing_server_discussion_list?= Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Juliusz, Yes, loading 3rdparty libraries is conceptually insecure. I initially tried to download the Javascript libraries and wasm modules to serve them via Galene, but failed because they refer to each other via full URL instead of relative paths when you load them. I also tried to download their source code and build them myself, but my head exploded when I saw the kind of build system those libraries have. So I resorted to this hack for my own purposes, knowing full well that it would not be merged. > > async function start() { > > + > > + offscreen = new OffscreenCanvas(1920, 1080); > > + > > + segmenter = await bodySegmentation.createSegmenter( > > + bodySegmentation.SupportedModels.MediaPipeSelfieSegmentation, > > + { > > + runtime: 'mediapipe', > > + solutionPath: > > 'https://cdn.jsdelivr.net/npm/@mediapipe/selfie_segmentation', > > + modelType: 'general' > > + } > > + ); > > This should be done lazily, in the filter, not at startup. Not sure what you mean. How would you do this?