HaoYu
    • 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
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • 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

      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.
      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
    • Engagement control
    • 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 Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control 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
Engagement control Commenting, Suggest edit, Emoji Reply
  • 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

    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.
    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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 論文筆記 ## Emotion Recognition for Cognitive Edge Computing Using Deep Learning 當資料從 sensor / IoT 大量傳輸到處理中心時 , 主要有三個挑戰 : latency, scalability, and security latency : 將 vedio data 輸入從 sensor 送到 cloud , 在 cloud 推斷結果 , 再 return 結果 , 這樣會造成許多延遲 , 此時 data scaliing 是一個有效運用資源的方法 邊緣運算 : 從 sensor / IoT 傳遞資料上去處中心時時需要大量的頻寬以及足夠的時間 , 因此 , 在連續的資料傳輸中 , 資料應該被預處理以減輕傳遞的負擔 , 可以为用户提供更少的延迟和实时体验 **Edge devices : 1 個 edge server , 一個行動通信基地台 , 數個 end devices(數據來源)** edge server 位置處於 sensor / IoT gateways 附近可以減低 latency 對深度學習進行 edge computing 在 Edge devices 中由哪一個 device 進行哪些部份的 deep learning 處理是一個潛在的課題 , 不同 devices 之間的協調以及工作分布 (這部份由排程演算法處理 ) 本文提出一個 識別人臉情緒的系統(透過深度學習以及邊緣運算) 在 end device 上捕捉人臉圖像 , 再做一些預處理 , 再透過 5G 網路送到 edge server edge server 將送來的圖片送入 pretrained 的 model Cloud server 訓練模型以及儲存 face data 在 off-period 時 , cloud server 才會跟 edge server 進行溝通 雖然現況下有很多情緒辨認系統 , 但有使用到 edge computing 的卻很少 , 即使有運用到的也沒完全運用 edge 的計算能力 這篇文章的貢獻: 1. 引入透過邊緣計算的臉部情緒辨認系統 2. 在 end device 上進行預處理 , 在 edge server 測試 , 在 cloud server 訓練 3. 使用多個數據集評估該系統 情緒分類主要有 7 種基本的情緒 , paper 選用的資料集為 JAFFE 以及 CK+ Fig.1為論文中的架構設計 ![](https://i.imgur.com/bbef5yr.png) edge server 搭載 GPU 使其有良好的算力 * off-time , 從 cloud 下載模型 * non off-time , 接收 end device 的圖片並進行推論 , 再將結果回傳 core cloud 有 global model for 情緒辨認 還有 global storage(儲存各個 end device 收集的臉部圖像 , 也是 global model 的訓練資料 ) end device 接收到推論結果的時間主要可分成 2 大部分 1. 在 end device 中進行預處理的時間(人臉偵測/剪裁/對比度增強/resize等) 2. offloading 1. 傳輸時間 (end device 傳輸 data 到 edge server的時間 + edge server 回傳結果的時間 ) 2. edge server 的推論時間 Fig.2 从边缘服务器到终端设备所需的时间 ![](https://i.imgur.com/13mgr67.png) ![](https://i.imgur.com/kP39mvV.png) 系統組件以及相對應的任務 在 end device 端 ,偵測出來的人臉圖片會被裁切成 227x227 的大小以符合模型需求,图像只包含人脸,而且数据大小很小,这样传输到边缘服务器就不会占用很多带宽或时间 在通信組件部分 1. 圖像在預處理後從 end device 傳輸到 edge server 传输到边缘服务器,这发生在预处理之后。 2. 將 edge server 判斷的情緒種類回傳給 end device 在 edge server 中 1. 當圖像傳送過來後 , 運行 CNN 並推斷結果 2. 提供可視化模型(optional) 3. 收集足夠多的圖片後 , 在 off-time 更新模型 在 cloud 通信組件中 1. 將 global DL model 從 cloud server 下載到 edge server 2. 將 edge server 中更新後的DL模型上傳到 cloud server 在 cloud server 中 使用來自不同 edge server 中的 data 去更新 global model 目前有許多的 CNN 模型都已經有出色的表現 , 然而大多數模型都是用數以百萬計的樣本訓練 , 並且有著許多的參數需要學習 ,雖然他們的準確性高 , 但不太適合計算能力低的裝置(edge server 即是如此) , 因此 , paper 開發一個新的輕型 CNN 來辨識情緒 ![](https://i.imgur.com/ERnasZ7.png) error cost function 是採用 **class cross entropy** , batch size = 5 臉部圖像使用 0.8 ~ 1.2 的縮放係數 , 旋轉 -25◦ ~ 25◦ 此模型大約有 19 萬個須學習的參數 , 此參數量跟其他現有的模型相比是非常少的 , 唯一一個現有的 model **squeezenet** 的參數量比文中提到的更少 (然而在實驗中此模型表現不好) 對於中小規模的資料量 , 自由度低的緊湊模型就可以很好的完成 , 並且也適合在 edge server 上運行 實驗使用 2 個公開的 dataset * JAFFE (213張圖片 , 7種類型 ,size 256x256) * CK+ (123人的面部情绪视频样本,这些视频的帧率在10到60帧/秒之间不等 , 图像大小为640 × 490或640 × 480) prototype * 终端设备组件,在Android 10版本上实现 * 边缘服务器组件,使用支持CUDA 10.0的NVIDIA GeForce RTX 2070 8-GB GPU驱动、用于深度学习模型的cuDNN v7.6和TensorFlow 2.0实现 * 通信组件 * 在智能手机中运行,使用 Apache HttpClient来与服务器进行通信 * 服务器使用Django运行 系统采用五倍交叉验证法进行验证,即所有的样本被随机分成相等的五倍,在每一次重复中,四倍用于训练,另一倍用于测试 训练是在云服务器上完成的,然后将训练好的模型下载到边缘服务器上。测试图像的预处理在智能手机上完成,使用训练好的CNN模型进行测试。CNN模型的测试是在边缘服务器上完成的 結果: * CK+整體正確率 96.6% * JAFFE 总体准确率为93.5% ![](https://i.imgur.com/2NTgUjU.png) 对于同一个情绪类别,激活区域可能有所不同,但主要集中在 眼睛、脸颊或嘴巴区域。在未来的工作中,我们可能需要在这些注意区域上下功夫,以提高性能 耗能比較 , 比較四種不同的系統 1. classical system (手工 feature) 2. classical system (CNN feature) 3. edge system ( 採用本文提出的 CNN模型,在边缘服务器上运行以及预处理 4. 本文系統 (在手機上進行預處理 CNN模型在边缘服务器上运行) ![](https://i.imgur.com/Lf0ecyB.png) ![](https://i.imgur.com/VaCVS2y.png) 除了本文提出的系統外 , 其他先進的系統都超過 10 M 的參數量(這在我們的方法中是大問題) , 儘管參數量少但仍達到跟其他系統相當的準確性 ![](https://i.imgur.com/4vHQIm0.png) ## Hardware-Oriented Memory-Limited Online Artifact Subspace Reconstruction (HMO-ASR) Algorithm Artifact Subspace Reconstruction(ASR) 是一种机器学习技术,广泛用于去除脑电图(EEG)中的非大脑信号 (Artifact) 即眼球运动、肌肉活动等 ASR 可用于提高信号质量, 然而,ASR算法需要相当大的内存大小,使其不足以在便携式设备、特定应用集成电路(ASIC)或现场可编程门阵列(FPGA)上进行在线 Artifact 去除,因此提出 hardware-oriented and memory-constrained online ASR (HMO-ASR) algorithm ### HMO-ASR 1. two-level window-based preprocessing 2. rejection threshold calibration processing 3. reconstruction module 下圖為 HMO-ASR算法的流程图 ![](https://i.imgur.com/Kls6ooi.png) * two-level window-based preprocessing * PCA-based preprocessing sliding window(對 sliding window 做線性降維) * z-score based preprocessing (将不同量级的数据转化为统一量度的Z-Score分值进行比较) * rejection threshold calibration processing * iterative updating * early eigenvector matrix determination module to update the corresponding rejection thresholds * reconstruction module * removes the principal components (PC) with values greater than the rejection threshold * reconstruct the data using remaining PCs * non-overlapped reconstructed samples are outputted #### two-level window-based preprocessing 對比原本的 ASR : 1. 先對 whole recording 執行 PCA 2. 使用 non-overlapping sliding window 計算 channel wised 均方根(RMS) 3. 將 RMS 轉換成 z-score 4. z-score 在 -3~5 區間定義為 clean 由於不乾淨的數據會大大影響 rejection threshold 的收斂速度 , 所以 HMO-ASR 先對 sliding window 進行 PCA (將特徵值轉成 z-score , z-score > 1.5 則刪除對應的特徵向量) ![](https://i.imgur.com/2YkGxJz.png) λ~k~是第k个排序的特征值 , m~λ~和σ~λ~分别是特征值的平均值和标准差 保留的特征向量被投射回 channel , 接著如果被送入 z-score based preprocessing 的 window 的 z-score 在 -3~5 區間 會被送往 rejection threshold calibration processing 去更新 artifact removal threshold , 否則的話 視其為不乾淨 , 送到 reconstruction module #### rejection threshold calibration processing iterative updating 大意: 更新這個 iteration 的 parameters 只會用到前一個 iteration 的東西(應該是其他論文的結論) 在每次迭代中计算协方差矩阵的平方根(sqrtm(Ci)),计算量很大。如果传入数据的特征向量和以前的数据相似,計算新的 sqrtm(Ci)的用處也不大 , 因此 , 定義一個 threshold 來評估是否需要特徵值分解來更新 sqrtm(Ci) C~i~ : updated covariance matrix E~i−1~ previous eigenvector matrix 因為 C~i~ 是實對稱矩陣(可對角化) 所以可推論 E^T^~i−1~C~i~E~i−1~ = E^T^~i−1~E~i~D~i~E^T^~i~E~i−1~ (實對稱矩陣 E^-1^~i~C~i~E~i~ = D , 其中 E^-1^ = E^T^) 如果 E~i~ 跟 E~i−1~ 相近 , 則 E^T^~i~ E~i−1~ ≈ I , 也就是說 E^T^~i−1~C~i~E~i−1~ = E^T^~i−1~E~i~D~i~E^T^~i~E~i−1~ 右半邊的式子可視為 ID~i~I (如果E~i~ 跟 E~i−1~ 相近) , 那就是說左式的非對角元素接近0 因此定義 threshold 如下 ![](https://i.imgur.com/2XZqR78.png) 如果傳入的數據滿足公式 , 則保留 E~i-1~ 以近似sqrtm(Ci)的特征向量矩阵E~i~。否则,需要进行特征值分解 Threshold Update 機制 對比原本的 ASR : 1. 使用 IIR 濾波器過濾數據的干淨部分以獲得 (Xc) 2. 計算 Xc 的 covariance matrix 的平方根的特徵向量矩陣 Ec 3. Xc 被投影到 the principal component space( Yc=E^T^~c~ * Xc ) 4. Yc are splited into several windows and the RMS values for principal components are computed within the window 5. 计算所有窗口中RMS值的平均值 μ~c~和标准差σ~c~ 6. fixed rejection threshold c 定義為 c = μc +f · σc, where f is the adjustable cutoff parameter 在HMO-ASR算法中,一旦传入的数据X∗ 满足 z-score范围,HMO-ASR就会更新 rejection thresholds μ~i~ and σ~i~ are updated by the iterative updating scheme adaptive threshold is defined as $\Gamma$~i~ = μ~i~ + f · σ~i~ 更新 rejection threshold 后,被污染的数据 X~j~ 将进入 reconstruction module 首先, 对于每个X~k~,应用PCA得到 C~k~ = E~k~D~k~E^T^~k~ 接著比較 以及 rejection thresholds $\Gamma$~i~ 從 E~i~ 投射至 E~k~ 的值(請看下面的不等式) $\lambda$~k,l~ 指的是 對角線矩陣 D~k~ 的第 l 個 element ![](https://i.imgur.com/FmqNOeq.png) 如果不等式成立 , 將對應的 E~k~ 中對應的第 l 個特徵向量用 0 向量取代掉 Reconstruct 如下 ![](https://i.imgur.com/NU1djbA.png) trunc 的反函數概念上會跟 sqrtm 以及 E^k^~t~ 互相抵消 , 即可得到重構的結果 ## Cost-Effective and Variable-Channel FastICA Hardware Architecture and Implementation for EEG Signal Processing independent component analysis (ICA) algorithm 被认为是通过脑电信号研究大脑活动的一个有用方法 ICA算法是設計用來解決 BSS 問題 , 可以将混合的信号分离出来,并揭示脑活动的信息 (但 ICA 算法的硬件設計與實現是個挑戰 ) 基于Gram-Schmidt的 whitening 可以应用于BSS问题的解决 , 使用 Gram-Schmidt 在 PCA 進行降維且为了提高灵活性,我们希望支持可变的通道选择,并为脑电信号处理提供 re-reference , synchronized average , moving average 等功能 在此架構中提出了两个重复使用的处理单元(PU),以实现低成本和可变通道的FastICA硬件实现 主要贡献总结如下: 1. 具有成本效益 的2-16 通道浮点FastICA架构,其中有两个新的重复使用的 PU,采用 Gram-Schmidt的 whitening 2. 在特定应用集成电路(ASIC)方法中实现 FastICA 硬件架构以支持可变通道 FastICA、re-reference , synchronized average , moving average 功能。 ### FastICA X : n by m mixed-signal matrix S : n by m blind-source-signal matrix **S = W^T^X** basic idea of ICA is to maximize the non-Gaussianity of W^T^X 在信號/噪音比低的時候 , FastICA 擁有快的收斂速度以及好的效能 在FastICA算法中,需要对混合信号进行预处理 , 使其 center 以及 whiten **center** ![](https://i.imgur.com/CqiaUis.png) **whiten** ![](https://i.imgur.com/q2TnuGR.png)

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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