<?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[Annorita’s playground - Medium]]></title>
        <description><![CDATA[目前是一個資工研究生，在這裡留下學習過程中碰撞的痕跡，願讓步上相同旅途的程式旅人們更有餘裕欣賞一路上的風景。 - Medium]]></description>
        <link>https://medium.com/annorita?source=rss----c380b6af835c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Annorita’s playground - Medium</title>
            <link>https://medium.com/annorita?source=rss----c380b6af835c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:55:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/annorita" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[隨想］AI浪潮下將被犧牲的無名小卒]]></title>
            <link>https://medium.com/annorita/%E9%9A%A8%E6%83%B3-ai%E6%B5%AA%E6%BD%AE%E4%B8%8B%E5%B0%87%E8%A2%AB%E7%8A%A7%E7%89%B2%E7%9A%84%E7%84%A1%E5%90%8D%E5%B0%8F%E5%8D%92-15585a0d970d?source=rss----c380b6af835c---4</link>
            <guid isPermaLink="false">https://medium.com/p/15585a0d970d</guid>
            <category><![CDATA[future]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Annorita]]></dc:creator>
            <pubDate>Sun, 27 Aug 2023 15:25:16 GMT</pubDate>
            <atom:updated>2023-08-27T15:25:16.437Z</atom:updated>
            <content:encoded><![CDATA[<p> 看到一個影片討論美國好萊塢正在罷工的事，令人印象深刻的有兩件事。</p><p>第一個是Netflix拒絕提供臨時演員跟編劇更高的分潤。在疫情期間Netflix等串流平台大賺一番，但是為它工作的編劇跟臨時演員卻幾乎沒有分潤，影片中提到其中有一個熱門影集的演員一整年的分潤甚至只有27塊美金。這一切的起因是，串流平台形式太新，舊有的合約沒辦法適用。</p><p>另一件事是他們找來臨時演員把他們的臉跟身體掃描起來，然後之後用A I軟體重現這個演員，在未來無限使用。他們就只付給這個臨時演員一個上午的工資，卻可以永久使用這一位演員的肖像權。</p><p>我突然聯想到，其實我們在收集訓練資料、請人員標記的過程，跟上述掃描演員的行為，意義上沒有什麼不同。我們付了一點錢請標記員幫忙標記、撰寫訓練資料，要求他提供「對人類來說是好的答案」的判斷標準。乍看之下，我們有付錢，對方也是自願，沒什麼問題啊。可是他相當於是將他的小部分智慧、靈魂，交付給模型。模型學會之後，我們開始使用模型，其實也就是間接的在利用那些標記人員的智慧心血，但是並沒有再為此支付任何費用。</p><p>一個是請標記員指出照片裡面有什麼物件，取得他的認知；一個是拍下標記員的臉部特徵及動作，取得他的外觀。</p><p>或許侵害程度有別，但是背後的精神是一樣的：人的勞動力太貴了，我要用便宜的價錢換個方式得到你的勞動力，將其複製到機器上，並用來取代你。</p><p>我之前一直深深相信，ai 能夠解放我們的時間，促使我們去思考工作的意義，思考自己在這個世界上存在的使命。</p><p>可是現在我不那麼確定了，因為如何使用ai，控制權掌握在人類手裡。而我們已經看過太多例子，關於貪婪的企業如何將錯誤的犧牲美言成必要之惡，關於小人物在時代的洪流中如何被淹沒。</p><p>誰也沒辦法阻止AI的演進，我們也已經沒辦法再回到從前，只希望在時代的推進中，還能夠有人記得對無名小卒溫柔。</p><h3>Reference</h3><p>文中提到的影片：https://youtu.be/KEvkuZXbvDU?si=vRFR7h-vc2tCn8u0</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15585a0d970d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/annorita/%E9%9A%A8%E6%83%B3-ai%E6%B5%AA%E6%BD%AE%E4%B8%8B%E5%B0%87%E8%A2%AB%E7%8A%A7%E7%89%B2%E7%9A%84%E7%84%A1%E5%90%8D%E5%B0%8F%E5%8D%92-15585a0d970d">[隨想］AI浪潮下將被犧牲的無名小卒</a> was originally published in <a href="https://medium.com/annorita">Annorita’s playground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[paper]GroupViT:跟 pixel-wise labeling 說再見]]></title>
            <link>https://medium.com/annorita/paper-groupvit-%E8%B7%9F-pixel-wise-labeling-%E8%AA%AA%E5%86%8D%E8%A6%8B-dc9dcdd1eed9?source=rss----c380b6af835c---4</link>
            <guid isPermaLink="false">https://medium.com/p/dc9dcdd1eed9</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[paper]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Annorita]]></dc:creator>
            <pubDate>Wed, 16 Mar 2022 02:11:50 GMT</pubDate>
            <atom:updated>2022-03-16T02:22:47.725Z</atom:updated>
            <content:encoded><![CDATA[<h3>[paper] GroupViT:跟pixel-wised labeling 說再見</h3><p>Semantic Segmentation 的訓練，仰賴 pixel-level 的標記，假如一張圖片是 64 x 64，你就必須要針對 4096 個 pixel 標記出他們各是屬於哪一類。雖然有一些 tool 可以畫圖選取區塊來標記，但整體的訓練脫離不了那種笨笨的感覺，對我來說就像是只會背答案的學生一般。</p><p>因此看到 GroupViT，讓我太驚艷了！他利用 text encoder 對文字敘述做學習，並拿來和影像部分做 contrastive learning，利用文字的語意理解，讓 Semantic Segmentation 擺脫了labeling 的繁雜工作。訓練完成後，即使是 zero-shot 仍還可以做得很好。</p><p>名字中的 Group的意義則是，在多層的學習中，最底層先學習把 pixel 組成小塊小塊，例如組出貓咪的手和腳，越往上層，這些相鄰的 group 假如代表同一個物件，就會 merge 在一起，例如貓咪的手和腳都是貓咪的一部分，因此 merge 在一起。如此一來，越往上層，就越能圈出物件的全部。</p><p>那麼要怎麼決定兩個 segment 是不是屬於同一個物件呢？他們藉由比較 group token 和 segments token 的 similarity，假如是相像的，代表同一類，就可以 merge。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*Wy2i9HA-gnyEBdvNNCCrmw.png" /><figcaption>藉由不斷地 grouping 把 pixel 組起來變成 object</figcaption></figure><p>如此一來，我們就可以用強大的 NLP 語意理解，來幫助影像，圈出想要的那個區塊。</p><p>Project page: <a href="https://jerryxu.net/GroupViT/">https://jerryxu.net/GroupViT/</a></p><p>Paper: <a href="https://arxiv.org/abs/2202.11094">https://arxiv.org/abs/2202.11094</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDtJsWIUTW-Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDtJsWIUTW-Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDtJsWIUTW-Y%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/7e524112a4d40e422f7a68105dffa8f8/href">https://medium.com/media/7e524112a4d40e422f7a68105dffa8f8/href</a></iframe><p>這篇 paper 是第一作者 Jiarui 在 NVIDIA 實習時做的，上了 CVPR’22，酷斃啦！</p><p>NLP 和 CV 的組合，讓 CV 變得更強大了，也開始有了人機之間的迷幻色彩，脫離背答案的時代了。</p><p>你讀過其他 CV 和 NLP 結合的酷 paper 嗎？和我分享！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc9dcdd1eed9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/annorita/paper-groupvit-%E8%B7%9F-pixel-wise-labeling-%E8%AA%AA%E5%86%8D%E8%A6%8B-dc9dcdd1eed9">[paper]GroupViT:跟 pixel-wise labeling 說再見</a> was originally published in <a href="https://medium.com/annorita">Annorita’s playground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[假如可以直接 train 一個 classifier，為什麼我們需要 metric learning？]]></title>
            <link>https://medium.com/annorita/%E5%81%87%E5%A6%82%E5%8F%AF%E4%BB%A5%E7%9B%B4%E6%8E%A5-train-%E4%B8%80%E5%80%8B-classifier-%E7%82%BA%E4%BB%80%E9%BA%BC%E6%88%91%E5%80%91%E9%9C%80%E8%A6%81-metric-learning-f5d9efc839ba?source=rss----c380b6af835c---4</link>
            <guid isPermaLink="false">https://medium.com/p/f5d9efc839ba</guid>
            <category><![CDATA[metric-learning]]></category>
            <category><![CDATA[face-recognition]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Annorita]]></dc:creator>
            <pubDate>Thu, 01 Jul 2021 04:22:28 GMT</pubDate>
            <atom:updated>2021-07-01T04:28:58.445Z</atom:updated>
            <content:encoded><![CDATA[<p>在 AMMAI 課堂上，我學了多種 metric learning 的方法，metric learning 的目的是希望學一個好的 embedding, 可以有效的把相同 class 的 sample 聚在一起，不同 class 的 sample 盡量分開。但是假如我們已知有 N 種 class ，那 metric learning 跟直接 train 一個可以 predict N class 的 classifier 差別在哪呢？他的優勢是什麼？</p><p>我發現在 stack overflow 上 2017 年就有人討論過這個問題：</p><p><a href="https://stackoverflow.com/questions/45152749/why-do-we-use-metric-learning-when-we-can-classify">Why do we use metric learning when we can classify</a></p><p>整理一下底下的留言大概有幾個情境是 metric learning 可以做得更好的：</p><ol><li>unbalanced dataset: 假如某些 class 的 sample 數量特別少，那 training classifier 可能會完全忽略這些 class。但是 metric learning 因為是針對 sample 計算距離，比較不會受影響。</li><li>one-shot/few-shot learning：當出現一個 <strong>新的</strong> class 只擁有 <strong>一個/少量</strong> sample 時，metric learning 可以更輕易的去 adapt，學習新的 class，但是一般的 classifier 沒有辦法輕易的 extend 到新的 class。</li><li>metric learning 是 generative model, 而 classifier 是 discriminative model。 或許可以說，metric learning 只是因為他可以把 class 分開，所以可以“順便”拿來做 classification 的問題，但他還可以有其他的應用。他的功能是更強大的，因為可以把 input space 轉換到另一個 feature space, 使得 classifier 更容易工作。</li></ol><p>因為這些特性，所以 metric learning 很常被應用在人臉辨識上。假如是使用一般的 classification，那當出現一個新的員工、新的人臉需要辨識的時候（通常稱之為 open-set），我們就必須拿舊有的人臉資料庫加上這個新的人臉資料來重新訓練模型，而這是非常耗時耗資源的。想像公司裡本來有一萬個員工，每天都有 10 位新員工加入，每一次模型訓練都要花 2 天，那根本來不及即時更新人臉辨識打卡系統。但是假如是使用 metric learning，那麼當有新的員工加入，也許只需要一兩個小時的時間，就可以輕鬆成功辨識這個員工了。</p><h3>延伸閱讀</h3><ul><li>簡單的 metric learning 入門：<a href="https://towardsdatascience.com/how-to-use-metric-learning-embedding-is-all-you-need-f26e01597375">How to use metric learning: embedding is all you need</a></li><li>Metric learning 在音樂上的應用：<a href="https://arxiv.org/pdf/2008.03729.pdf">Metric Learning vs Classification for Disentangled Music Representation Learning</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5d9efc839ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/annorita/%E5%81%87%E5%A6%82%E5%8F%AF%E4%BB%A5%E7%9B%B4%E6%8E%A5-train-%E4%B8%80%E5%80%8B-classifier-%E7%82%BA%E4%BB%80%E9%BA%BC%E6%88%91%E5%80%91%E9%9C%80%E8%A6%81-metric-learning-f5d9efc839ba">假如可以直接 train 一個 classifier，為什麼我們需要 metric learning？</a> was originally published in <a href="https://medium.com/annorita">Annorita’s playground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[paper]想要dataset不一定要自己label : DALI dataset]]></title>
            <link>https://medium.com/annorita/paper-%E6%83%B3%E8%A6%81dataset%E4%B8%8D%E4%B8%80%E5%AE%9A%E8%A6%81%E8%87%AA%E5%B7%B1label-dali-dataset-110330beb393?source=rss----c380b6af835c---4</link>
            <guid isPermaLink="false">https://medium.com/p/110330beb393</guid>
            <category><![CDATA[paper]]></category>
            <category><![CDATA[lyrics]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[audio]]></category>
            <dc:creator><![CDATA[Annorita]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 11:04:36 GMT</pubDate>
            <atom:updated>2020-05-22T08:19:47.799Z</atom:updated>
            <content:encoded><![CDATA[<h3>[paper]想要dataset不一定要自己label : DALI dataset</h3><p>＊＊本文同步刊登於<a href="https://annorita.wordpress.com/2018/11/01/paper%E6%83%B3%E8%A6%81dataset%E4%B8%8D%E4%B8%80%E5%AE%9A%E8%A6%81%E8%87%AA%E5%B7%B1label-dali-dataset/">blo</a>g ＊＊</p><p><a href="http://ismir2018.ircam.fr/doc/pdfs/35_Paper.pdf">DALI: A LARGE DATASET OF SYNCHRONIZED AUDIO, LYRICS AND NOTES, AUTOMATICALLY CREATED USING TEACHER-STUDENT MACHINE LEARNING PARADIGM</a></p><p>刊登在ISMIR2018，來自法國四大國家研究中心之一CNRS（有點像高階版的中研院）,Ircam Lab的作品。</p><p>第一作者是 Gabriel Meseguer-Brocal ，他在之前也發過其他的dataset，例如<a href="http://eecs.qmul.ac.uk/~keno/40.pdf">WASABI: a Two Million Song Database Project with Audio and Cultural Metadata plus WebAudio enhanced Client Applications</a>，在DALI裡面也有運用到這一個dataset的輔助。</p><p>作者把code和dataset放在github上： <a href="https://github.com/gabolsgabs/DALI">https://github.com/gabolsgabs/DALI</a></p><p>要下載這個dataset的話，需要先填表單，才能獲取密碼下載。 （截至11/01, 2018，dataset尚未公布）</p><p>— — — — — — — — — —</p><p>Ｑ：這是哪種dataset？</p><p>有整首歌的audio、lyrics、midi notes，彼此在時間上是對齊的（time-aligned）</p><p>Ｑ：共有幾首？</p><p>5358</p><p>— — — — — — — — — —</p><p>主要使用架構：</p><ol><li>SVD（Singing Voice detection)</li><li>Teacher-student paradigm</li></ol><p>— — — — — — — — — —</p><p>四步驟 ：</p><p>Karaoke resources</p><p>– &gt; retrieving audio candidates</p><p>-&gt; Selecting and adapting</p><p>-&gt; improve and get more data ( by teacher-student paradigm)</p><p><strong>目標data形式與來源</strong></p><p>最初的data 來自 Karaoke game ，在遊戲中，使用者會跟著音樂唱歌，當唱得越準確得分就會越高。為了衡量使用者的準確度，會把他所唱的旋律跟標準答案（包含時間點跟音符的頻率）比較。</p><p>所以，這背後就存在著time-aligned的音符跟歌詞，也就是我們所想要的。</p><p>首先，我們可以拿到karaoke user 手動註解(annotated）的time-aligned的 lyrics跟notes，</p><p>註解的形式是一個triplet，包含 { time, note, test }</p><p><strong>得到候選audio</strong></p><p>接著，把每一首歌連結到WASABI資料庫，將會得到這首歌不同版本（例如：錄音室版本，cover版本）的歌名與歌手名稱組合，我們藉由這些組合，去爬youtube，得到同一首歌不同版本的影片。</p><p>這些不同版本，我們稱它叫做audio candidates，</p><p><strong>選出最適合的</strong></p><p>我們要從這些candidates中，選出一個跟標準答案(annotation)最像、audio 跟 notes之間alignment最好的版本。</p><p>詳細請看：</p><p>-&gt; 利用SVD選擇出最佳alignment版本</p><p><strong>改進並得到更多</strong></p><p>然而，由上述做法完成的dataset，並不是最佳的。</p><p>為了得到更精確alignment效果，以及更多的data，使用Teacher-student paradigm來訓練SVD</p><p>詳細請看：</p><p>-&gt; 利用teacher — student paradigm 來運用unlabeled data</p><p><strong>結果</strong></p><ul><li>利用frame accuracy 來評估SVD表現</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/0*t6cUDre3J2JXpjrJ" /></figure><ol><li>觀察teacher的表現：當training 和testing是相同dataset時，表現較好；不同時，表現就會變差。所以我們可以說，teacher歸納（generalization）的能力其實不太好。特別注意，在最後一個，J+M train的部分，同時使用了兩個dataset，結果效果比單純看一個dataset差，這個部分還沒辦法解釋為什麼。</li><li>觀察student的表現：首先，student一定是跨dataset的，因為他的training data是 DALI（baseline 產生的），並不包含J或M。兩個預測</li></ol><p>＊ 理論上，student的表現應該更好，因為他看更多的data。在J+M的部分，不管在哪一個test set， student的表現都比teacher更好，而且接近甚至超過看過答案的teacher（teacher_J_train / teacher_M_train)</p><p>＊ 在沒看過的data上，他的能力應該更好：吃teacher_M_train的student，在看J_test的時候，表現比teacher更好。（反過來就沒有比較好）</p><p>最後採取 Student(teacher_J+M_train)來做DALI，收集了5358首歌。</p><ul><li>alignment部分 ： 沒有辦法evaluation 。在找fr 跟o上面，student的表現是遠比teacher更好的，但是因為DALI沒有ground truth label annotation，所以沒辦法測量。 （這篇的目的就是要自動annotation啊)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=110330beb393" width="1" height="1" alt=""><hr><p><a href="https://medium.com/annorita/paper-%E6%83%B3%E8%A6%81dataset%E4%B8%8D%E4%B8%80%E5%AE%9A%E8%A6%81%E8%87%AA%E5%B7%B1label-dali-dataset-110330beb393">[paper]想要dataset不一定要自己label : DALI dataset</a> was originally published in <a href="https://medium.com/annorita">Annorita’s playground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swap in Pytorch]]></title>
            <link>https://medium.com/annorita/%E7%95%B6%E5%9C%A8%E4%B8%8D%E5%90%8C%E6%9E%B6%E6%A7%8B%E4%B9%8B%E9%96%93%E9%80%A3%E6%8E%A5%E8%88%87%E8%BD%89%E6%8F%9B%E6%99%82-%E6%9C%89%E6%99%82%E9%9C%80%E8%A6%81%E5%B0%87data%E7%9A%84%E7%B6%AD%E5%BA%A6%E8%AA%BF%E6%8F%9B-swap-d43a715608ad?source=rss----c380b6af835c---4</link>
            <guid isPermaLink="false">https://medium.com/p/d43a715608ad</guid>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Annorita]]></dc:creator>
            <pubDate>Fri, 12 Oct 2018 10:48:27 GMT</pubDate>
            <atom:updated>2020-05-22T08:25:08.428Z</atom:updated>
            <content:encoded><![CDATA[<h3>SWAP in Pytorch</h3><p>當在不同架構之間連接與轉換時，有時需要將data的維度調換( swap）</p><p>使用permute達成：</p><p>b = a.permute(1,0,2)</p><p>其中，括號中填入希望調換的維度順序</p><p>在這個例子裡，就是希望把 a 用 維度1, 維度0, 維度2 的順序重組，變成b</p><p>結果：</p><p>print(b,b.shape)</p><p>— — — — — — — — — — — — — — — — — — — — — — — — —</p><p>tensor([[[ 0, 1, 2, 3],</p><p>[ 8, 9, 10, 11],</p><p>[16, 17, 18, 19]],</p><p>[[ 4, 5, 6, 7],</p><p>[12, 13, 14, 15],</p><p>[20, 21, 22, 23]]]) torch.Size([2, 3, 4])</p><p>確認看看是不是我們要的：</p><p>print(b[0,0,:])</p><p>print(b[0,1,:])</p><p>print(b[0,2,:])</p><p>— — — — — — — — — — — — — — — — — — — — — — — — —</p><p>tensor([0, 1, 2, 3])</p><p>tensor([ 8, 9, 10, 11])</p><p>tensor([16, 17, 18, 19])</p><p>回顧a中的資訊</p><p>print(a[0,0,:])</p><p>print(a[1,0,:])</p><p>print(a[2,0,:])</p><p>— — — — — — — — — — — — — — — — — — — — — — — — —</p><p>tensor([0, 1, 2, 3])</p><p>tensor([ 8, 9, 10, 11])</p><p>tensor([16, 17, 18, 19])</p><p>確實是相同的。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d43a715608ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/annorita/%E7%95%B6%E5%9C%A8%E4%B8%8D%E5%90%8C%E6%9E%B6%E6%A7%8B%E4%B9%8B%E9%96%93%E9%80%A3%E6%8E%A5%E8%88%87%E8%BD%89%E6%8F%9B%E6%99%82-%E6%9C%89%E6%99%82%E9%9C%80%E8%A6%81%E5%B0%87data%E7%9A%84%E7%B6%AD%E5%BA%A6%E8%AA%BF%E6%8F%9B-swap-d43a715608ad">Swap in Pytorch</a> was originally published in <a href="https://medium.com/annorita">Annorita’s playground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[paper]直接生成出二進制的midi音樂（1）]]></title>
            <link>https://medium.com/annorita/paper-%E7%9B%B4%E6%8E%A5%E7%94%9F%E6%88%90%E5%87%BA%E4%BA%8C%E9%80%B2%E5%88%B6%E7%9A%84midi%E9%9F%B3%E6%A8%82-1-cfd28ce7ffaa?source=rss----c380b6af835c---4</link>
            <guid isPermaLink="false">https://medium.com/p/cfd28ce7ffaa</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[music-generation]]></category>
            <category><![CDATA[paper]]></category>
            <dc:creator><![CDATA[Annorita]]></dc:creator>
            <pubDate>Mon, 08 Oct 2018 01:25:48 GMT</pubDate>
            <atom:updated>2020-05-22T08:20:52.137Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>CONVOLUTIONAL GENERATIVE ADVERSARIAL NETWORKS WITH BINARY NEURONS FOR POLYPHONIC MUSIC GENERATION</em></blockquote><p><a href="https://arxiv.org/abs/1804.09399">get the paper here</a></p><p>這篇paper刊登於2018年的ISMIR （19th International Society for Music Information Retrieval Conference, Paris, France, 2018.）</p><p>出自於中研院資創中心楊奕軒老師實驗室，第一作者為董皓文（ Hao-Wen Dong）</p><p>這個作品是楊老師實驗室的系列之作</p><p>2016年的MidiNet，是個小小作曲家，一個小節一個小節的生成，考慮前一小節資訊，生成單軌單音音樂</p><p>2017年的museGAN，成了五人樂團，一次生成四個小節，並且考慮了五個音軌，還有指揮家指揮五個產生器奏出和諧的音樂</p><p>2018年，則從museGAN延伸，提出本篇paper，更改產生的形式，直接生成非0即1的piano roll，提升生成的準確性。</p><p>看完本篇paper，做個summary紀錄，如果有理解錯誤，請與我分享討論！</p><h3>目標：產生binarized的output</h3><p>無論是MidiNet或是museGAN，其基本架構都是CNN+GAN，過程中的運算，導致Generator的output是real-valued，也就是介於0到1的值。因此，需要藉由後處理來將output轉換成非0即1的形式（也就是binary），一般來說採用HT（hard thresholding）或BS（Bernoulli sampling）。</p><p>用這兩個方式的缺點有兩個，</p><p>首先，我們通常在testing stage，也就是生成音樂時，才做binary，在training stage並沒有做。因此，對Ｄ（Discriminator ）來說，generator產生的是real-value形式，真實data是binarized形式，兩者形式不同，就很好辨別。如此一來，Ｄ的本領就不是藉由音樂特性來分辨兩者，而是藉由資料形式分辨兩者，這並不是我們期望的。</p><p>另外一個缺點，則是在於取值的特性。使用HT取值時，由於在real value的 output中，接近threshold的值有很多個，就會導致取出來的音跳來跳去，不連續。而使用BS，則會讓低機率的值也取為1。</p><p>因此，本篇的改善方法是在G（generator）後面加上一個Ｒ（Refiner ），Ｒ是ＢＮ（binary neurons），其優點為：</p><p>首先，ＢＮ接在Ｇ後方，代表不論是training stage還是testing stage，皆產生binarized的值，如此一來，G產生的data和真實data都是一樣的資料形式，則Ｄ就可以專注在學習分辨音樂特性上。</p><p>其次，由於G的output（也就是Ｄ的input之一）是binarized，所以model的space 從 R^N變成2^N（其中N= time step * pitch range），這樣可以讓Ｄ更好train。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/0*jAx4AbgOSiOdjgl0" /></figure><blockquote><em>小結論：這篇文章針對binary提出了新的方法，並證明其效果較佳。</em></blockquote><p>除了提出這個BS的做法，並將之與舊方法比較之外，文中還另外提出了幾個training模式的比較。是全部一起train比較好呢？還是分階段train比較好？這將會是我的下篇文章內容。</p><p>另外，D的組合也變得比museGAN複雜了，不只考慮單一個track ，更訓練他評估tracks之間的和諧程度，以及整首歌更高層次的音樂特性。多做這些會提升模型的效果嗎？文中為此做了比較，一樣留待後續文章討論。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfd28ce7ffaa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/annorita/paper-%E7%9B%B4%E6%8E%A5%E7%94%9F%E6%88%90%E5%87%BA%E4%BA%8C%E9%80%B2%E5%88%B6%E7%9A%84midi%E9%9F%B3%E6%A8%82-1-cfd28ce7ffaa">[paper]直接生成出二進制的midi音樂（1）</a> was originally published in <a href="https://medium.com/annorita">Annorita’s playground</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>