<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chris Wang on Medium]]></title>
        <description><![CDATA[Stories by Chris Wang on Medium]]></description>
        <link>https://medium.com/@chriswang_60204?source=rss-d525f4c34bcc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kuLwb0b2TpwnOVvF</url>
            <title>Stories by Chris Wang on Medium</title>
            <link>https://medium.com/@chriswang_60204?source=rss-d525f4c34bcc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:25:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chriswang_60204/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Audio Driven Talking Face Models Testing and Deployment]]></title>
            <link>https://medium.com/gliacloud/audio-driven-talking-face-models-testing-and-deployment-e16ade1475f1?source=rss-d525f4c34bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e16ade1475f1</guid>
            <category><![CDATA[facial-synthesis]]></category>
            <category><![CDATA[pc-avs]]></category>
            <category><![CDATA[makeittalk]]></category>
            <category><![CDATA[speech-synthesis]]></category>
            <category><![CDATA[talking-heads]]></category>
            <dc:creator><![CDATA[Chris Wang]]></dc:creator>
            <pubDate>Mon, 29 Nov 2021 13:42:30 GMT</pubDate>
            <atom:updated>2021-11-29T13:42:30.811Z</atom:updated>
            <content:encoded><![CDATA[<h4>Audio driven talking face : 語音驅動人臉生成</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b1xc_qAQQMmE4CGl" /><figcaption>Photo by <a href="https://unsplash.com/@austindistel?utm_source=medium&amp;utm_medium=referral">Austin Distel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Audio driven talking face 的技術主要是輸入一張照片或短影片跟一段語音，透過語音特徵跟輸入影像，辨識出嘴形、表情、頭部動作等特徵，生成一個照片中人像說話的影片。</blockquote><h4>論文 &amp; 資源比較</h4><p>Audio driven talking face 是一項發展中的技術，有許多不同的實作方式，最常見可以分為兩個階段。第一階段是透過圖片與聲音，生成 talking face landmarks，第二階段則是透過影像生成的技術，把虛擬影片生成出來。也有許多 model 透過 AutoEncoder 從聲音特徵取得其他人臉的隱性特徵（頭部擺動、情緒分析），使生成結果更加貼近真人，也降低包含頭部角度、清晰度等輸入照片的限制。</p><p>在 research 之後，發現這個問題並沒有一個最好的解法，都存在一些技術上的 trade-off，所以很難選擇該從哪裡開使做起。因此我找了三個不同面向的 model 進行測試跟實作，並比較他們的效果與差異。</p><h4>The Oxford-BBC Lip Reading in the Wild (LRW) Dataset</h4><p>LRW 是一個包含許多人臉說話的影片。許多 model 都是透過這個 dataset 訓練嘴部動作的生成。後面的 PC-AVS 跟EVP的訓練都有使用到。</p><p><a href="https://www.robots.ox.ac.uk/~vgg/data/lip_reading/lrw1.html">Lip Reading in the Wild (LRW) dataset</a></p><h3>PC-AVS</h3><p><a href="https://github.com/Hangz-nju-cuhk/Talking-Face_PC-AVS">GitHub - Hangz-nju-cuhk/Talking-Face_PC-AVS: Code for Pose-Controllable Talking Face Generation by Implicitly Modularized Audio-Visual Representation (CVPR 2021)</a></p><p>PC-AVS 提供了完整的 demo 環境。特別的是除了面部表情跟嘴型之外，可以生成頭部動作，讓影片更加自然。缺點是解析度偏低，眼球也是固定的。文中也提到透過這種方法讓輸入就算是側臉也可以生成出自然的影片。</p><h4>Demo</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLootaH2CVfU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLootaH2CVfU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLootaH2CVfU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/afb3a55ccba2ceddd87e59378b03d70d/href">https://medium.com/media/afb3a55ccba2ceddd87e59378b03d70d/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4zyvnlmozlQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4zyvnlmozlQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4zyvnlmozlQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2eaffea2141ac34a4586a98b52246a55/href">https://medium.com/media/2eaffea2141ac34a4586a98b52246a55/href</a></iframe><p>從這第一個 Demo 可以看出，生成影片的頭部動作的確跟參考影片相仿。也可以看出側臉轉正的效果。但從第二個 demo 中發現，參考頭部動作影片的臉型對原來圖片也會造成影響產生變形。實作時要選擇臉型相近的參考對象。除此之外，可以發現並沒有眨眼的效果。</p><h4>解析度的限制</h4><p>生成影片的解析度是 224*224。demo 之前的 preprocessing 中要做 face alignment，也是導致解析度降低的關鍵因素之一。可以得知這個 model 對input data 的臉部位置有較嚴格的要求。</p><h4>資源使用量</h4><p>另外硬體資源方面，以上的 demo 使用 macbook pro 的 CPU 需要二十分鐘以上的時間才能完成，使用資源依比例來看相當多。如果使用 GPU 會好一些，但是仍然十分消耗資源。</p><h3>EVP</h3><p><a href="https://github.com/jixinya/EVP">GitHub - jixinya/EVP: Code for paper &#39;Audio-Driven Emotional Video Portraits&#39;.</a></p><p>使用 MEAD dataset，一個提供一個包含情緒跟不同方位的人臉影片dataset。包含60個演員在不同程度的情緒下說話的高解析度影片。 EVP 把情緒特徵分離出來，實現情緒控制的技術人臉生成。</p><h4>Train model</h4><p>使用作者提供的測試資料測試，在audio2landmark的部分可以realtime完成，令人感到十分驚艷。透過不同的emotional feature也可以達到更改情緒的效果。但是repo提供的pre-train model與 dlib不同，使用106 landmarks，為了測試其他結果，依照作者推薦使用68 landmarks 再重 train 一次，但是效果並不理想。</p><p>訓練的方法是將原本 Landmarks 的部分調整成68維，並且跟原始方法一樣使用PCA降維至16維。Model 的架構跟原來一樣，沿用 Emotion Encoder 跟Content Encoder。從下方影片中可以發現嘴形並沒有呈現出來，訓練過程也將測量準確率的指標（FLD, MLD）畫出來，發現沒有下降的趨勢。</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnkSuDoUOe0c%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnkSuDoUOe0c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnkSuDoUOe0c%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c1ee1c6b444eadf1d726d260d7acca3/href">https://medium.com/media/9c1ee1c6b444eadf1d726d260d7acca3/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fimgur.com%2F7m5bSCi%2Fembed%3Fpub%3Dtrue%26ref%3Dhttps%253A%252F%252Fembed.ly%26w%3D644&amp;display_name=Imgur&amp;url=https%3A%2F%2Fimgur.com%2F7m5bSCi&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=imgur" width="644" height="684" frameborder="0" scrolling="no"><a href="https://medium.com/media/48a237d08cf243c8ae31a69a683c7bdd/href">https://medium.com/media/48a237d08cf243c8ae31a69a683c7bdd/href</a></iframe><h3>MakeItTalk</h3><p><a href="https://github.com/yzhou359/MakeItTalk">GitHub - yzhou359/MakeItTalk</a></p><p>MakeItTalk 的 model 先透過 audio2landmark 的方式產生 talking landmarks video，並使用 image2image model 產生最後的影片。MakeItTalk 生成的影片在臉部清晰的情況下可以產生相對高品質的結果，包含準確的嘴型跟臉部、眨眼等動作，生成時間約為原始音檔的 2 至 3 倍左右，實用性相對其他 model 來說高上許多。除此之外，論文中也提到可以使用虛擬人物作為目標。缺點是頭部動作、人臉角度過大時會有失真的現象。</p><h4>Technical Limitation</h4><ul><li>最大輸出解析度：256*256</li><li>最大時長：無限制</li><li>輸出影片幀率：22 fps</li></ul><h4>Quality</h4><ul><li>輸入中文嘴型準確度較差，推測是跟訓練模型用的 dataset 有關</li><li>背景內容較複雜時容易看出扭曲</li><li>正臉效果較佳，推測與訓練用 dataset 跟人臉標記重疊有關</li></ul><h4>測試硬體規格</h4><ul><li>OS：Ubuntu 20.04</li><li>GPU：NVIDIA GeForce® RTX 2070 SUPER</li><li>GPU Memory：8 GB</li><li>Memory：32 GB</li><li>CUDA Driver：470.82.00</li><li>CUDA：11.4</li><li>cuDNN：8.x.x</li><li>Python version(local)：3.8.10</li><li>Python version(docker)：3.6.9</li></ul><h4>實際硬體用量</h4><ul><li>模型大小（GPU）：986.6 MB</li><li>GPU 記憶體用量：5 GB（4877 MB）</li><li>Inference 所需時間輸入聲音長度花費時間：</li></ul><pre>   輸入聲音時長   輸出時間<br>1. 4s           11.7s<br>2. 8s           17.6s<br>3. 9s           17.9s<br>4. 17s          27.8s</pre><h4>Web Service and Deployment</h4><p>將 MakeItTalk 製作成 API，讓使用者可以透過網路服務的方式使用人臉生成的功能。</p><p><a href="https://github.com/livingbio/MakeItTalk">GitHub - livingbio/MakeItTalk</a></p><h4>Web Service Pipeline</h4><ul><li>輸入照片跟聲音 (256*256 jpg &amp; wav)</li><li>用照片生成的 landmark 跟聲音產生影片的 landmark</li><li>生成每一個frame的影像 (image2image)</li><li>將影片回傳給使用者</li></ul><h4>FastAPI</h4><p>用 FastAPI 實作一個 POST API。使用者傳入音檔跟圖片的 url，server下載輸入並經過 model 之後上傳到 Cloudinary 空間，回傳生成影片的 url 給使用者。</p><h4>Docker</h4><p>使用 <a href="https://github.com/ufoym/deepo">deepo</a> 的 pytorch image，將 MakeItTalk 的資源安裝到容器中，讓model 可以使用gpu運行。</p><h4>Demo</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIxBoAIgtHT4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIxBoAIgtHT4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIxBoAIgtHT4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fcfd25acc3ef13021138c4004ff87d5/href">https://medium.com/media/6fcfd25acc3ef13021138c4004ff87d5/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQWlLBZXKfYk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQWlLBZXKfYk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQWlLBZXKfYk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cc0b7d44e50b4de7946a2799f17444a/href">https://medium.com/media/0cc0b7d44e50b4de7946a2799f17444a/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhIqhA6NI948%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhIqhA6NI948&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhIqhA6NI948%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4be918e3560a43e88ae80334b715fef5/href">https://medium.com/media/4be918e3560a43e88ae80334b715fef5/href</a></iframe><p>第一個 demo 可以發現背景晃動與額頭出現陰影。第三個 demo 可以看出只要可以偵測得到 Landmarks 都可以生成說話影片，但背景的植物也有失真的現象。總體而言，在背景清晰，臉部特徵清楚的狀況下，MakeItTalk 可以成功實現 talking face 的效果。</p><h3>適用場合與可能的商業應用</h3><p>大部分 Talking face generation model目前遇到的問題主要在解析度、時間跟結果的真實性上。尤其在影音媒體盛行的時代，跟真人的影音相比還是有很大的挑戰。如果能夠克服這些缺點，AI 帶來的商業價值可以更被凸顯。透過這項技術，可以使講者專注於聲音內容的表現，減少錄影造成的壓力及負擔。例如虛擬講師、播報或是報告等，都是可能的應用場景。</p><h3>Reference</h3><ul><li><a href="https://arxiv.org/pdf/2104.11116.pdf">Pose-Controllable Talking Face Generation by Implicitly Modularized Audio-Visual Representation</a></li><li><a href="https://arxiv.org/pdf/2104.07452.pdf">Audio-Driven Emotional Video Portraits</a></li><li><a href="https://wywu.github.io/projects/MEAD/support/MEAD.pdf">MEAD: A Large-scale Audio-visual Dataset for Emotional Talking-face Generation</a></li><li><a href="https://people.umass.edu/~yangzhou/MakeItTalk/MakeItTalk_SIGGRAPH_Asia_Final_round-5.pdf">speaker-aware talking-head animation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e16ade1475f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gliacloud/audio-driven-talking-face-models-testing-and-deployment-e16ade1475f1">Audio Driven Talking Face Models Testing and Deployment</a> was originally published in <a href="https://medium.com/gliacloud">GliaCloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>