技術專題

晶片端生成式 AI|人物消除與場景生成

On-device Generative Vision: Person Removal and Scene Synthesis

以可重現的桌面 CPU 實驗比較 MI-GAN 與 Telea 的背景修補輸出,並規劃晶片端模型部署驗證。

成果歸屬
自主研發
專案成熟度
互動技術展示
公開證據分類
實測基準 · 可重現實驗
討論類似專案 比較 MI-GAN 實際推論結果 技術圖解
室內走廊照片上的合成人物遮住部分背景
輸入 · 走廊實拍搭配合成前景人物
MI-GAN 重建室內走廊背景的實際輸出
修補後 · MI-GAN 在桌面 CPU 上的輸出 來源

產業問題與工程挑戰

人物消除需要補回被遮住的背景。部署到裝置時,輸出品質、模型所需記憶體和運算成本都要評估。

工程限制

遮罩誤差、微小遮蔽物與跨幀一致性會改變重建品質。NPU Runtime 支援的算子、動態尺寸、精度與記憶體上限會改變部署選擇。

技術方法與架構

從遮罩、修補候選到裝置驗收
  1. 建立人物遮罩

    取得人物遮罩,檢查邊界誤差並定義補畫範圍。

  2. 比較修補候選輸出

    建立可比較的 GAN 修補或 Diffusion 場景重建候選,檢查輸出品質。

  3. 規劃裝置上的部署驗收

    轉換模型、核對 Runtime 相容性,依目標裝置與工作負載執行完整流程驗證。

工程流程圖解。公開實測涵蓋 MI-GAN 與 Telea 的桌面 CPU 靜態影像,創辦人的 Diffusion 論文提供另一項生成方法的研究背景。

實作與交付

用兩張公開領域背景與自行製作的遮罩比較 MI-GAN 和 OpenCV Telea,保留已知乾淨背景作為參照。另保留可調整遮罩邊界的瀏覽器基準。

成果

可切換場景、遮罩與修補輸出。桌面 CPU 結果同時列出延遲與遮罩內品質,揭示紋理差異影響兩種方法的相對表現。

  • 瀏覽器合成影像重建展示
  • 模型轉換與裝置驗證方法
  • 可供討論的品質及效能驗收規格

驗證與證據

兩組測試各暖機 5 次、量測 30 次。ONNX Runtime CPU 使用 4 執行緒、批次 1;計時納入前後處理。以已知乾淨背景計算遮罩內 PSNR。

兩組場景的桌面 CPU 實測。晶片端部署屬驗證規劃。

公開範圍及專案狀態

歸屬與階段
自主研發 · 互動技術展示

使用可公開模型與可公開輸入重現的自主研發專題。證據涵蓋桌面 CPU 靜態圖像推論。NPU、Diffusion、自動人物分割及全影片吞吐尚未量測。

Technical Note

On-device Generative Vision: Person Removal and Scene Synthesis

Independent Research and Development · Interactive Demonstration

Compare measured MI-GAN and Telea inpainting on a desktop CPU and scope model deployment on a target device.

Open full English page 繁體中文 Plan a project Compare measured MI-GAN outputs Technical diagram

Industry problem and engineering challenge

Removing a person requires reconstructing the background they covered. Device deployment adds constraints on output quality, memory and compute.

Engineering constraints

Mask error, fine occlusions and frame-to-frame consistency affect reconstruction. Operator compatibility, dynamic dimensions, precision and memory limits also affect NPU deployment.

Technical approach and architecture

From the mask and inpainting candidates to device validation
  1. Create the person mask

    Obtain a person mask, inspect errors at its edges and define the reconstruction region.

  2. Compare inpainting outputs

    Compare GAN-based restoration or diffusion-based reconstruction candidates under consistent quality criteria.

  3. Plan validation on the target device

    Convert the model, verify runtime compatibility, and validate the complete pipeline on the target workload and device.

Engineering workflow diagram. The public experiment covers MI-GAN and Telea on desktop CPU still images. The founder’s diffusion paper provides research context for another generation approach.

Implementation and deliverables

Use two public-domain backgrounds and controlled masks to run MI-GAN and OpenCV Telea. The clean backgrounds serve as references. An adjustable browser baseline is also available.

Outcome

Compare two scenes and their mask, reference and model output. The CPU results show both latency and image quality, including variation across scenes.

  • Browser-based synthetic reconstruction demo
  • Model conversion and device validation methods
  • Quality and performance acceptance criteria

Validation and evidence

Each measured condition uses five warm-ups and 30 runs. ONNX Runtime CPU uses four threads and batch size one. Timings include preprocessing and postprocessing. Masked PSNR uses the clean background.

Desktop CPU measurements on two scenes. Device deployment is a validation plan.

Project status and disclosure

Ownership and status
Independent Research and Development · Interactive Demonstration

Independent R&D reproduced with a public model and shareable inputs. The evidence covers desktop CPU still-image inference. NPU, diffusion, automatic person segmentation and full-video throughput await measurement.