謝朋諺
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Person Attribute Recognition - JCM > [name=謝朋諺(Adam Hsieh)] > ###### tags: `paper`,`IVA`,`PA` --- ## Reference > [谁给讲讲语音识别中的CTC方法的基本原理?](https://www.zhihu.com/question/47642307) > [CTC的直觀理解(Connectionist Temporal Classification連接時序分類),單行文本時序分類識別的端到端方法](http://nooverfit.com/wp/ctc%E7%9A%84%E7%9B%B4%E8%A7%82%E7%90%86%E8%A7%A3%EF%BC%88connectionist-temporal-classification%E8%BF%9E%E6%8E%A5%E6%97%B6%E5%BA%8F%E5%88%86%E7%B1%BB%EF%BC%89%EF%BC%8C%E5%8D%95%E8%A1%8C%E6%96%87/) --- # Sequence-based Person Attribute Recognition with Joint CTC-Attention Model [論文連結](https://arxiv.org/pdf/1811.08115.pdf) {%pdf https://arxiv.org/pdf/1811.08115.pdf %} ## Outline > [TOC] ## 摘要重點 * 結合 Attribute Recognition 與 Re-ID 的任務於一體。 * 使用 neural network 將圖像 **encode** 為 Sequences,並利用 connectionist temporal classification(CTC)loss 來訓練網路,該模型將 Attributes 標籤==對齊==映射到 Sequences 中以學習 Attributes 之間的語義關係。。 * 採用 Attention model 對 Sequences 進行 **decode**,可以實現 Sequences 比對,更好地從屬性中學習語義關係。 * 近來,已經提出了一些 Attention 方法以在 Attribute Recognition 任務中關注更重要的局部區域,但是,當顯著的局部區域定位不正確時,將會帶來==二次誤差==。 * 本文使用的 Attention model 是 ==Transformer==,該模型已成功用於翻譯任務中,在本文中利用其語言學習能力來 decode Attributes 的 Sequences。 ==Sequences 中的 Attributes 順序不會影響結果==,它可以一次預測整個 Sequences,因為它允許我們的神經網絡在任何時間間隔預測標籤。 * 主要貢獻概括如下: 1. 本文將所有 Attributes 映射為一段數字 Sequences,並將影像 encode 為 Sequences 以進行統一學習,據我們所知,這是第一次使用 CTC loss 函數進行學習 Attributes 之間的上下文。 2. JCM 使用 Attention model 來實現輸入和輸出 Sequences 的對齊過程以及從 Sequences 中提取語義資訊。 3. 進行了深入的實驗以分析我們方法的各個方面。而且,JCM 在 Attributes 識別方面具有競爭性的準確性,並證明了 Re-ID 的一些改進。 ## Methods ### Architecture ![](https://i.imgur.com/5SbERvy.png) :::info :bulb: model 的大概架構。 ::: * **JCM** model 包括 ==Base Model==、==Dense Model==、==Attention Model==。 * 輸入影像為 $224\times112$ * 詳細地來說,訓練時主要分兩種流向: 1. Attributes Recognition: 使用 ==Base Model== 對影像進行 Encode,該基本模型包含 CNN 和 RNN,然後將輸出分別放進 ==CTC Loss Model== 和 ==Attention Model==。 2. Re-ID: 也是從 ==Base Model== 提取特徵再通過 ==Dense Model== 將特徵維度減少到 ID 的數量,並且採用 Softmax Loss 訓練人的 Re-ID 任務。 * 在測試時網路會同時預測 PR 和一組 Attributes: 1. 為了預測用於 Attributes Recognition 任務的 Attribute Sequence,它通過帶有 ==Beam Search== 的 Attention Model 對已 Encode 的特徵進行 Decode。 2. 從 Base Model 的 CNN 中提取特徵,並對行人進行分類 re-ID 任務。 ### Base model & Dense model #### Base Model ![](https://i.imgur.com/yL0d7tR.png) :::info :bulb: Base Model 的具體參數如上表所示。 ::: * Base Model 由 CNN 和 Bidirectional RNN 組成。 * 本文的 CNN 採用與 Resnet50 相同的結構,但參數不同。 * 本文的 RNN 共有兩層。 * 每個 CNN Block 大致由三個 CNN Layer 組成,然後有四種 CNN Block 且也有四種 CNN Stage,而且每個新的 Stage 的第一個 CNN Block 的第一個 CNN Layer 的 stride 為 **(2,1)**,其餘都是設 **1**。 #### Dense Model * 首先將 Base Model 中 CNN 的輸出 Reshape 為 single row 向量,然後接上兩層全連接層 $FC_0$、$FC_1$ 他們的輸出分別是 $c=[c_1,c_2,...,c_{1024}]$, $z=[z_1,z_2,...,z_N]\in R^N$,其中 $N$ 就是 ID。 * 因此每個 ID label $n$ ($n\in 1,2,...,N$) 的預測機率計算為: $p(n|z)=\dfrac{exp(z_n)}{\sum^N_{i=1}exp(z_i)}$ * ID 的 cross-entropy loss 為: $L_{ID}=-\displaystyle\sum^N_{n=1}log(p(n))q(n)$ 假設 $g$ 為真實的 ID 標籤,所以對於 $q(g)=1$ 和 $q(n)=0$ 且 $n\neq g$。 #### CTC ![](https://i.imgur.com/AQuKEDh.png) :::info :bulb: 可以通過 mapping table 中對應的 Attribute Sequence 來描述一個人的外表。 * **Up.color** 和 **Low.color** 是指上半身和下半身的衣服顏色。 ::: * 為了獲得 Attributes 之間的關係,我們通過 mapping table 將語義 Attribute 標籤對應到相應的數字標籤,如上圖所示,每個人的 Attributes 由 **Attribute Sequence** $y$ 來表示,$y = [y_1,...,y_t,...,y_U],y_t\in 1,2,...,K$,$K$ 是 Attribute 的數量,$U$ 是Sequence 的長度,每個人的 Sequence 長度可以不同。 * 假設 $x$ 是從 **Base Model** encode 的特徵,且長度為 $T$、維度為 $D$,$x=[x_1,x_2,...,x_T]$,在本文中設 $T=28, D=1024$。 * ==CTC== 的關鍵是使用中間的 label,表示為 $\pi=[\pi_1,\pi_2,...,\pi_T]$,$\pi$ 屬於所有可能的標籤 sequences $Φ(y')$ 上的機率分佈,其中 $y'$ 是修改後的標籤 sequence $y$ 的值,它是通過在每個標籤與序列的開頭和結尾之間插入空白符號來實現的(即 $y=(1;5;8)$;$y=(-; 1;-;5;-;8;-)$),CTC 訓練模型以最大化 $P(y|x)$: $P(y|x)=-\displaystyle\sum_{\pi\in Φ(y')}P(\pi|x)$ > ## CTC > ![](https://i.imgur.com/jMYYigD.png) :::success :bulb: CTC 算不上是一個框架,更像是連接在神經網路後的一個歸納字符連接性的操作。 ::: > CNN 提取圖像像素特徵,RNN 提取圖像時序特徵,而 CTC 歸納字符間的連接特性。 > 因手寫字符的隨機性,人工可以標註字符出現的像素範圍,但是太過麻煩,CTC 可以告訴我們哪些像素範圍對應的字符: > ![](https://i.imgur.com/ro5MRCw.png) > 如上圖標註 “t” 的位置出現 t 字符,標註 o 的區域出現 o 字符。是的就是這樣簡單,CTC 會總結出上述標註規律,不用人工標註,你所要做的只是提供 loss 函數做模型訓練。 > ## CTC是如何工作的? > > CTC 的編碼有一個地方需要注意即是對重複字符的處理,如上述例子中的“to”,如果真實字符串是 “too”,而編碼時也為 “to”,就會和真實字符串 “to” 混淆。 > > 所以在重複字符處要引入一個佔位符號“-” 。下面是一些例子: > ![](https://i.imgur.com/G3t2yQw.png) > 然後,CTC 會計算 loss ,從而找到最可能的像素區域對應的字符。事實上,這裡 loss 的計算本質是對機率的歸納: > ![](https://i.imgur.com/rcX7a6j.png) > > 如上圖,對於最簡單的時序為 2 的($t_0, t_1$)的字符識別,可能的字符為 “a”, “b” 和 “-”,顏色越深代表機率越高。 > > 對於真實字符為空即 “” 的機率為 $0.6 \times 0.6=0.36$ > > 而真實字符為 “a” 的機率不只是 ”aa” 即 $0.4*0.4$,實際上,“aa”, “a-“ 和 “-a” 都是代表 “a”,所以,“a” 的機率為: > > $0.4\times0.4 + 0.4\times0.6 + 0.6\times0.4 = 0.16+0.24+0.24 = 0.64$ > > 所以 “a” 的機率比空 “” 的機率高!通過對機率的計算,就可以對之前的神經網絡進行反向傳播更新。 > > 最後,CTC 的 decode 也是根據機率最高的那條路徑: > ![](https://i.imgur.com/Uaj0Jxr.png) * CTC 應用在 RNN 之上。每個 RNN 輸出單元都被解釋為在特定時間觀察相應 label 的機率。標籤序列 $P(\pi |x)$ 的機率被建模為條件獨立於網絡輸出的乘積: $P(\pi |x)\thickapprox \displaystyle\prod^T_{t=1}P(\pi_t|x)=\displaystyle\prod^T_{t=1}q_t(\pi_t)$ 其中 $q_t(\pi_t)$ 定義為表示在時間 $t$ 時 RNN 輸出層 $q$ 中為 $\pi_t$ 標籤的 softmax activation。 * 為了訓練並最小化 CTC loss ,將其定義為與真實 Sequences y 的負對數值:$L_{CTC}\triangleq-lnP(y|x)$ #### Attention model * 本文著重將 Attention 機制應用在強制將 Sequence 對依賴項進行 modeling,而不必考慮它們在輸入或輸出 Sequence 中的距離,以便 Base Model 輸出的 Encode 圖像 Sequence 和 Attribute Sequence 可以對齊,並且語義可以更好地了解 Attribute Sequence 中每個 Attribute 的關係。 * 本文采用的 Attention 模型為 ==Transformer==,採用的是 ==Encoder-Decoder== 的結構。 * Encoder、Decoder 均由 ==$N=6$== 堆疊的 ==identical layers== 組成,每個 layer 裡面又有多個 sub-layers,並且每個 sub-layers 周圍使用 ==residual connections== 連接。 * 為了促進這些 residual connections 模型中所有的 sub-layer、embedding layer 維度皆是 $d_{model}=1024$, * 介於這些 sub-layer,Attention sub-layer 由平行運行的 $h$ 個 Attention layer 組成,因此,它特別適合長 Attribute Seauence 的比對。在本文中使用 $h = 8$。 * 在本文中 Encoder 的輸入來自 Base Model 輸出的編碼特徵,最大長度為 28。 * Decoder 的輸入是 Attribute Sequence 的 label,通過在 Sequence 的末端添加 $"0"$ 以致將長度增至 $28$,然後在每個 Sequence 的第一個位置添加 $"100"$ 當作開始標記。 * 在 Attention model 之後會接上全連接層 $F$,$F$ 的輸出為 $f=[f_1,f_2,...,f_K]\in R^K$,因此將每個 Attribute label $k$ ($k\in 1,2,...,K$) 的預測機率定義為 $p(k|f)$: $p(k|f)=\dfrac{exp(f_k)}{\sum^K_{i=1}exp(f_i)}$ * Attribute 的類別 cross entropy loss 為:$L_{AT}=-\displaystyle\sum^K_{k=1}log(p(k))q(k)$ #### Combine * 通過使用 **CTC loss function**、**multi-attribute classification loss** 和 **identity classification loss function** 可訓練出一個完整的 model: $L=\lambda L_{ID}+L_{CTC}+L_{AT}$ ==參數 $\lambda$ 負責平衡這三個 loss 的比例==,並且==由 Validation set 來決定==,本文是用 Market-1501 的 Validation set 決定。 ## Exprtiments ### Datasets **Market-1501 attribute dataset** * 共有 32,688 張影像來自 1,501 個人,其中 751 個人是訓練資料,750 個是測試用的資料。 * 包含了 12 種不同類型的屬性,其中 10 種是 Binary 屬性(gender, hair length, sleeve length),2 種是 multi-class 屬性 (color of upper and lower body clothing)。 **Duke attribute dataset** * 來自 8 種不鏡頭的畫面,包含 1,812 個 ID 的人,其中訓練跟測試都有 702 個 ID 的人,訓練資料有 16,522 張影像,測試資料有 17,661 張影像。 * 有 8 個 Binary 的行人屬性 (wearing a hat, wearing boots),和 2 種 multi-class 屬性。 **The PETA dataset** * 來自 10 個監視鏡頭的資料集,共有 19,000 張影像,但本文只拿其中的 8 個資料集共 13,549 張影像且有 3,268 個 ID,並隨機切出訓練資料跟測試資料集各 1,634 個 ID。 * 每個人有 61 個 Binary 的行人屬性,和 5 種 multi-class 屬性。 ### Evaluation metrics **Attributes** * 評估每個屬性的分類準確性(Market-1501、DukeMTMC-reID 和 PETA 資料集分別為 24、21 和 66 個屬性)並計算所有屬性的 ==mean accuracy==。 * 對於 Market-1501、DukeMTMC-reID 將 gallery images 用作測試集,對於 PETA 則是將 testing images 用作測試集。 **Re-ID** * 對於人員 re-ID 任務,採用了 Cumulative Matching Characteristic(CMC)曲線和 mean Average Precision(mAP)。 * 本文使用的 Cumulative Matching Result 是使用 Rank 1,而不是繪製實際曲線。 ### Implementation Details * Base Model 在 Imagenet2012 資料集上先進行預訓練,epochs 設置為 300。 * 當在行人屬性資料集上訓練整個模型時,epochs 設置為 200。 * 對於預訓練和訓練 Batch Size 皆設置為 64。 * 學習率是 1e-4,decay-rate 是 0.9。 * Optimization 使用 ADAM 來更新參數。 * Data Augmentation:在訓練時多做了左右翻轉,但在測試時不做任何事。 ### Evaluation of Attribute Recognition **Results on Market-1501 Dataset** ![](https://i.imgur.com/bpw4GEL.png) :::info :bulb: Attribute Recognition Accuracy on Market-1501. * ‘L.SLV’:袖子長度 * ‘L.LOW’:褲子或裙子長度 * ‘S.CLTH’:衣服樣式 * ‘B.PACK’:背包 * ‘H.BAG’:手提袋 * ‘C.UP’:上身衣服顏色 * ‘C.LOW’:下半身衣服顏色 ::: * 本文的方法在 12 個行人屬性上可以達到 **89.7%** 的 mA,優於目前最佳方法 AWMDN 1.2%。 * 從每個屬性的分類結果來看,本文的方法是 5 個中最好的,而且每種屬性識別率之間的差異也很小,本文表現最好是 **"hat"**,比最差的 **"hair"** 只差 **14.7%**,Sun et al. 的方法最好跟最壞分別是 **"hat"**、**"bag"**,卻差了 **29.8%**,間接證明我們的預測方法也比較統一跟穩定。 **Results on DukeMTMC-reID Dataset** ![](https://i.imgur.com/VtJQuY7.png) :::info :bulb: Attribute Recognition Accuracy on DukeMTMC-reID. * ‘C.SHOES’:是指鞋子顏色。 * 其餘的與 Market-1501 定義的一樣。 ::: * 本文方法可以在 10 個行人屬性上實現 89.0% 的 mA,比迄今為止的最佳結果 88.3% 高 0.7%。 同樣,我們方法中 10 個屬性的識別率也很接近。 **Results on PETA Dataset** ![](https://i.imgur.com/MpR4d8P.png) :::info :bulb: Attribute Recognition Accuracy on PETA. * ‘C.HAIR’:頭髮的顏色 * ‘L.HAIR’:頭髮長度 * ‘T.UP’:上身衣服類型 * ‘T.LOW’:下身衣服類型 * ‘T.SHOES’:鞋子類型 ::: * 將 65 個屬性分成 12 個類別。 * 由於 PETA 屬性過多,大部分的論文也都只會拿部分屬性來進行實驗。 * 上表可顯示本文的 mA 可以高達 90.7%,但若是跟其他論文一樣只取其中 8 種屬性做平均可以達到 91.3%。 **Examples of attribute recognition results** ![](https://i.imgur.com/YP02xqa.png) :::info :bulb: 行人屬性辨識的範例 * 紅色框表示被選出的屬性和最大的機率。 ::: * Attention Model 產生的前三個步驟的權重,這證明該模型有良好的實現 Image Sequence 與 Attribute Sequence 的對齊和語義之間的關係。 ### Evaluation of Person Re-ID ![](https://i.imgur.com/X3Vhhso.png) :::info :bulb: Person Re-ID 在 Market-1501 和 PETA 上的比較。 ::: * 如上表本次利用 re-ranking 的作法輔助我們,在 Market-1501 做到 **93.1%** 的 Rank-1。 * 由於 PETA 是多個資料集的集合,包括 single-shot 和 multi-shot,因此不會對資料集使用 re-ranking 的作法。 ### Ablation Studies - **Parameter validation:** ![](https://i.imgur.com/s2u69tk.png) :::info :bulb: Person Re-ID 對於參數 $\lambda$ 在 Market-1501 驗證集實驗的結果 ::: - 上圖顯示參數 $\lambda$ 對於 re-ID 的實驗結果,該參數是平衡 re-ID 的貢獻和 Attribute Recognition 之間的比例值。 - 在 $\lambda=4$ 效果目前最好,因此在之後的三個實驗 $\lambda$ 都設 4。 - **The effect of joint learning:** ![](https://i.imgur.com/fw6mrn4.png) :::info :bulb: 上半表格表示同時訓練 Person Attributes Reconition 跟 re-ID 以及各自訓練的結果比較。 ::: - 如上表,分別訓練兩個任務跟結合一起訓練可以發現放在一起訓練的結果會比較好! - **The features extracted from different layers:** ![](https://i.imgur.com/X3Vhhso.png) :::info :bulb: Person Re-ID 在 Market-1501 和 PETA 上的比較。 ::: - 為了評估 Person Re-ID 從網絡中不同層提取的特徵的性能,除了從 Base Model 中從 CNN 提取尺寸為 $28×2048 = 57344$ 的特徵外,我們還提取了 Dense Model 中來自 $FC_0$ 層的結果,尺寸為 1024。 - 在上表中結果中可以看出,在兩個資料集中從 Base Model 中的 CNN 提取的特徵性能 (**JCM (D, 57344)**) 要比 Dense Model 的性能 (**JCM (D, 1024)**) 好得多。 - **The effect of hybrid training:** ![](https://i.imgur.com/fw6mrn4.png) :::info :bulb: 下半表格表示同時訓練 Person Attributes Reconition 跟 re-ID 以及各自訓練的結果比較。 ::: - 本文使用了 PETA 資料集中的 8 個混合資料集去做訓練,並把其中一半樣本作為訓練集另一半作為測試集。 - 上表的下半部做了這個實驗的比較,我們拿 PETA 中最大的一個 TownCenter 資料集來做實驗,其中包含 231 個 ID 的 6,967 張戶外照片,隨機選擇 116 個 ID 作為訓練集,115 個 ID 當作測試集。 - 結果如上表發現通過 Hybrid Training 的結果在 Re-ID 上還是比較好。 - **The contribution of individual attribute:** ![](https://i.imgur.com/niQlUFe.png) :::info :bulb: Re-ID Rank-1 accuracy 在 Market-1501 資料集中,若其中一個屬性被拔掉對整個 model 的影響。 ::: - 本文一次刪除一個屬性發現,對於 Market-1501 上的 10 個屬性,大多數屬性都是必不可少的。 - 資料集上最有影響力的屬性是 **“age”** 和 **“hat”**,這導致 Rank-1 分別下降了 2.5% 和 2.7%。 - 特別是,當我們刪除一個 Attribute 時,Mapping Table 中的 Attribute 編號和順序可能會發生很大變化,從結果可以看出,這並不影響性能。因此,我們可以推斷出==我們的方法不受 Attribute Mapping Table 中 Attributes 順序的影響==。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully