本スライドは、弊社の梅本により弊社内の技術勉強会で使用されたものです。
近年注目を集めるアーキテクチャーである「Transformer」の解説スライドとなっております。
"Arithmer Seminar" is weekly held, where professionals from within and outside our company give lectures on their respective expertise.
The slides are made by the lecturer from outside our company, and shared here with his/her permission.
Arithmer株式会社は東京大学大学院数理科学研究科発の数学の会社です。私達は現代数学を応用して、様々な分野のソリューションに、新しい高度AIシステムを導入しています。AIをいかに上手に使って仕事を効率化するか、そして人々の役に立つ結果を生み出すのか、それを考えるのが私たちの仕事です。
Arithmer began at the University of Tokyo Graduate School of Mathematical Sciences. Today, our research of modern mathematics and AI systems has the capability of providing solutions when dealing with tough complex issues. At Arithmer we believe it is our job to realize the functions of AI through improving work efficiency and producing more useful results for society.
本スライドは、弊社の梅本により弊社内の技術勉強会で使用されたものです。
近年注目を集めるアーキテクチャーである「Transformer」の解説スライドとなっております。
"Arithmer Seminar" is weekly held, where professionals from within and outside our company give lectures on their respective expertise.
The slides are made by the lecturer from outside our company, and shared here with his/her permission.
Arithmer株式会社は東京大学大学院数理科学研究科発の数学の会社です。私達は現代数学を応用して、様々な分野のソリューションに、新しい高度AIシステムを導入しています。AIをいかに上手に使って仕事を効率化するか、そして人々の役に立つ結果を生み出すのか、それを考えるのが私たちの仕事です。
Arithmer began at the University of Tokyo Graduate School of Mathematical Sciences. Today, our research of modern mathematics and AI systems has the capability of providing solutions when dealing with tough complex issues. At Arithmer we believe it is our job to realize the functions of AI through improving work efficiency and producing more useful results for society.
cvpaper.challenge の Meta Study Group 発表スライド
cvpaper.challenge はコンピュータビジョン分野の今を映し、トレンドを創り出す挑戦です。論文サマリ・アイディア考案・議論・実装・論文投稿に取り組み、凡ゆる知識を共有します。2019の目標「トップ会議30+本投稿」「2回以上のトップ会議網羅的サーベイ」
http://xpaperchallenge.org/cv/
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matchingharmonylab
公開URL:https://arxiv.org/pdf/2404.19174
出典:Guilherme Potje, Felipe Cadar, Andre Araujo, Renato Martins, Erickson R. ascimento: XFeat: Accelerated Features for Lightweight Image Matching, Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2023)
概要:リソース効率に優れた特徴点マッチングのための軽量なアーキテクチャ「XFeat(Accelerated Features)」を提案します。手法は、局所的な特徴点の検出、抽出、マッチングのための畳み込みニューラルネットワークの基本的な設計を再検討します。特に、リソースが限られたデバイス向けに迅速かつ堅牢なアルゴリズムが必要とされるため、解像度を可能な限り高く保ちながら、ネットワークのチャネル数を制限します。さらに、スパース下でのマッチングを選択できる設計となっており、ナビゲーションやARなどのアプリケーションに適しています。XFeatは、高速かつ同等以上の精度を実現し、一般的なラップトップのCPU上でリアルタイムで動作します。
セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 3 体以上の物体の組み立てが挙げられる.一般に,複数物体を同時に組み立てる際は,対象の部品をそれぞれロボットアームまたは治具でそれぞれ独立に保持することで組み立てを遂行すると考えられる.ただし,この方法ではロボットアームや治具を部品数と同じ数だけ必要とし,部品数が多いほどコスト面や設置スペースの関係で無駄が多くなる.この課題に対して音𣷓らは組み立て対象物に働く接触力等の解析により,治具等で固定されていない対象物が組み立て作業中に運動しにくい状態となる条件を求めた.すなわち,環境中の非把持対象物のロバスト性を考慮して,組み立て作業条件を検討している.本研究ではこの方策に基づいて,複数物体の組み立て作業を単腕マニピュレータで実行することを目的とする.このとき,対象物のロバスト性を考慮することで,仮組状態の複数物体を同時に扱う手法を提案する.作業対象としてパイプジョイントの組み立てを挙げ,簡易な道具を用いることで単腕マニピュレータで複数物体を同時に把持できることを示す.さらに,作業成功率の向上のために RGB-D カメラを用いた物体の位置検出に基づくロボット制御及び動作計画を実装する.
This paper discusses assembly operations using a single manipulator and a parallel gripper to simultaneously
grasp multiple objects and hold the group of temporarily assembled objects. Multiple robots and jigs generally operate
assembly tasks by constraining the target objects mechanically or geometrically to prevent them from moving. It is
necessary to analyze the physical interaction between the objects for such constraints to achieve the tasks with a single
gripper. In this paper, we focus on assembling pipe joints as an example and discuss constraining the motion of the
objects. Our demonstration shows that a simple tool can facilitate holding multiple objects with a single gripper.
2. そもそも異常とは︖
n 学習しているクラス以外のクラスのこと (Out-of-distribution)
n よくある問題設定で,多数の論⽂が存在する
n 学習したクラスの物体中のキズやよごれ
n データセットが最近までなかった or 問題が難しいため,
この異常に関する論⽂は極めて少ない
n MVTec AD — A Comprehensive Real-World Dataset for
Unsupervised Anomaly Detection (CVPR 2019)
n データセット論⽂
訓練データ テストデータ
正常 異常
3. 学習しているクラス以外のクラスを検知する問題設定は主に2つ
n Out-of-distribution detection: 異常を⾒つける
n One-class classification: ⼀つのクラスの正常データを利⽤して,それ以外の異常データを検知する
n Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection (ICLR 2018)
n Deep Anomaly Detection Using Geometric Transformations (NIPS 2018)
n OCGAN- One-class Novelty Detection Using GANs with Constrained Latent Representations (CVPR 2019)
n Multi-class classification: 複数のクラスの正常データを利⽤して,それ以外の異常データを検知する
n A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks(ICLR 2017)
n Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks(ICLR 2018)
n Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samples (ICLR 2018)
n A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks (NIPS 2018)
n Learning Confidence for Out-of-Distribution Detection in Neural Networks
n Predictive Uncertainty Estimation via Prior Networks (NIPS 2018)
n Deep Anomaly Detection with Outlier Exposure (ICLR 2019)
n Open Set Recognition: 異常を⾒つける ∧ 正常を正しく分類できる
n Towards Open Set Deep Networks (CVPR 2016)
n Generative OpenMax for Multi-Class Open Set Classification
n Open Set Learning with Counterfactual Images (ECCV 2018)
n C2AE- Class Conditioned Auto-Encoder for Open-set Recognition (CVPR 2019)
n Classification-Reconstruction Learning for Open-Set Recognition (CVPR 2019)
5. One-class classification の主な⽅法は3つ
n 再構成したときのロスを使う (PCA, Robust-PCA, deep autoencoders, ADGAN…)
n 再構成ベースの⼿法で学習された表現を使う
n One Class SVM を⽤いる
異常画像は再構成がうまくいかないはず,というアイデア
再構成画像テスト画像
L2ロス
7. One-class classification の主な⽅法は3つ
n 再構成したときのロスを使う
n 再構成ベースの⼿法で学習された表現を使う
n One Class SVM を⽤いる (SVDD, Deep SVDD...)
訓練データができるだけ⼩さい超球内に⼊るような写像を学習し
超球外であれば異常画像である,というアイデア
8. Multi-class classification の主な⽅法
n 識別結果を利⽤する
n キャリブレーションの利⽤
n Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks(ICLR 2018)
n A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks (NIPS 2018)
n OODデータの利⽤
n Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samples (ICLR 2018)
n Deep Anomaly Detection with Outlier Exposure (ICLR 2019)
n 不確かさの利⽤
n Predictive Uncertainty Estimation via Prior Networks (NIPS 2018)
n Learning Confidence for Out-of-Distribution Detection in Neural Networks
←ソフトマックス層の⼀層前の可視化
識別ロスを利⽤すると,OODは基本的にあいまいな分類結果
となるため,検知ができる
9. Open Set Recognition とは
n Open set recognitionとは N+1分類のこと
n Nクラスの正常データの分類に加え,テスト時にのみ現れる未知のデータを検知する
n ⼿法はMulti-class classificationのものと近いものが多い
17. Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection (ICLR 2018)
n ⼿法:
n 次元削減と再構成の情報を利⽤してOODを判定するネットワーク(右図)を提案した
n 再構成誤差最⼩化 + GMMの混合⽐をNNで推定してMLEを⾏うことで,E2Eな学習を可能にした
n 定性的な実験(左図):
n ⾚が異常サンプル,⻘が正常サンプル,縦軸が再構成誤差,横軸が1次元に圧縮したときの値
n 異常サンプルは,低次元で値が異なり,再構成が難しいことがわかる
18. Deep Anomaly Detection Using Geometric Transformations (NIPS 2018)
n ⼿法:
n 正常な画像なら幾何変換(回転,flipなど)した場合その変換をあてられるはずというアイデア
n 幾何変換で条件づけたときの対数尤度を使ったスコアを定義し,スコアが低いものを異常とみなす
n 結果: AUROCを使って評価し,OC-SVM, DAGMM, DSEBM, ADGANに⼤きく差をつけてSOTA
𝑇#(𝑥) 𝑇'(𝑥) 𝑇((𝑥) 𝑇)(𝑥)
例えば,訓練時に猫の画像(正常画像)の回転を
学習しても,テスト時に⼊⼒された
⽝の画像(異常画像)の回転はわからないはず
ということを利⽤する
詳しくは https://www.slideshare.net/DeepLearningJP2016/
dldeep-anomaly-detection-using-geometric-transformations-138639162
19. OCGAN- One-class Novelty Detection Using GANs with
Constrained Latent Representations (CVPR 2019)
n ⼿法: 例えば8の画像のみで訓練したモデルが,ほかのクラスの画像もすべて8に再構成する
ことによって,元の画像との誤差から異常を検知する
n 結果: CIFAR10では既存⼿法よりも若⼲のAUROCの向上
アイデアは⾯⽩いけど
結果は微妙だなあと思った
20. n ⼿法詳細: OCGANは4つの構造が含まれる
n Denoising autoencoder: 再構成するため
n Latent Discriminator: Adversarial Autoencoderのように,Encoderの出⼒を −1,1 -
に近づけることで,
潜在空間を限定する
n Visual Discriminator: −1,1 -
から⽣成したものがすべて学習データのみのデータになるようにする
n Classifier: 再構成したデータを正常,⽣成したデータを異常として学習させた後,Classifierは
Decoderが正常データを⽣成するように勾配を伝える
22. A Baseline for Detecting Misclassified and Out-of-Distribution
Examples in Neural Networks (ICLR 2017)
n 貢献
n multi-class classification分類のときの分布外検出の問題設定を提供し,ベースライン⼿法を提案した
n 提案⼿法: ソフトマックスの出⼒の最⼤値をOODの指標として使う
n アイデア: OODは予測分類が曖昧になるはず
n ex) 3クラスのとき,[0.9, 0.05, 0.05]→正常, [0.3, 0.3, 0.4]→異常
23. Enhancing The Reliability of Out-of-distribution Image Detection in
Neural Networks(ICLR 2018)
n 提案⼿法
n Baseline⼿法の改良(温度ソフトマックスを使う)
n 異常データと正常データの境界を広くするための前処理
n 結果: Baselineと⼤きく差を広げてSOTA
n ハイパラは検証⽤データ(若⼲のOODデータ)を利⽤してチューニングする
24. A Simple Unified Framework for Detecting Out-of-Distribution
Samples and Adversarial Attacks (NIPS 2018)
n 提案⼿法:
n 訓練分布から離れたところのサンプルを検出できるように,ソフトマックス層の⼀層前の出⼒の分布
を正規分布であることを仮定し,そこからどれだけ離れているかという⽅法でOOD検知を⾏う
n さらに,精度向上のため,キャリブレーションと特徴アンサンブルを⾏う
n 結果: OOD検知 + 敵対的攻撃でSOTA
詳しくは https://www.slideshare.net/ssuser9eb780/nips-2018-139360134
25. Training Confidence-calibrated Classifiers for Detecting Out-of-
Distribution Samples (ICLR 2018)
n 提案⼿法
n OODサンプルの予測を⼀様分布に近づけるというキャリブレーションを⾏う
n しかし,⼀般にはOODの分布をサンプルをカバーするようなサンプルはとれないので,GANを利
⽤する(GeneratorのサンプルをOODだと⾒⽴てる)
n OODを利⽤した定性的実験
n ⼀般に,下式のKL項を追加すると,分類精度は落ちるが,訓練データ(正常データ)に近い範囲で
OODデータを訓練データとして利⽤すれば,精度は落ちない → GANを利⽤する
26. Learning Confidence for Out-of-Distribution Detection in Neural Networks (2018)
n 提案⼿法: 分類確率だけでなく,信頼度を出⼒するようなモデルを提案した
n ⾃信がないときには本当のyを参照でき,それを答えとすることができる
n 参照したときには信頼度が減る
n 答えを参照するときにはペナルティがあり,その分ロスが増えるようになる
トイデータにおける信頼度のプロット
27. Predictive Uncertainty Estimation via Prior Networks (NIPS 2018)
n 提案⼿法: 事前分布のパラメータをNNで推定し,以下の(c)のデータを検知するモデルの提案
n (a): 正常データを正しく予測できるとき(confident)
n (b): 正常データだが,どのラベルに属しているかわからないとき(known-unknown)
n (c): 異常データ(unknown-unknown)
詳しくは https://www.slideshare.net/DeepLearningJP2016/
dlestimating-predictive-uncertainty-via-prior-networks
𝑥∗
𝑦∗
𝛼 𝜇
[0, 1, 0][0.05, 0.9, 0.05]
Prior Networks
29. Towards Open Set Deep Networks (CVPR 2016)
n 深層学習を使ったOSR問題を解こうとした最初の論⽂
n ⼿法 (Openmax):
n Activation vector (logit)のクラスごとの平均を利⽤してワイブ
ル分布でフィッティングする
n AVが与えられたときの割引率ωをもとめ,分布内確率を割り
引くことで,分布外確率を求める
n 結果: ILSVRC2012のデータセットを利⽤し,softmaxを
使った⽅法よりも精度向上
30. Open Set Learning with Counterfactual Images (ECCV 2018)
n ⼿法:
n 訓練データに近い(第⼀項)が,どの訓練データにも属さない(第⼆項)ようなデータをGANで作り出す
n Cは分類器で,クラスごとのlogitsのmaxの値が⼩さくなるようにしている
n 作ったデータを利⽤して,K+1クラス⽬を予測する新しい分類器を訓練
32. C2AE- Class Conditioned Auto-Encoder for Open-set Recognition (CVPR 2019)
n ⼿法
n 1: Encoderで正常データを分類できるように学習
n 2: 条件付きAEで再構成が⾏えるように学習
n さらに,実際と異なるクラスの条件を利⽤した再構成を⾏
い,しきい値を決定する
n 3: クラス分の条件付き再構成を⾏い,再構成誤差の最⼩
値がしきい値を下回ったら正常,上回ったら異常とする
33. n 訓練データのみからしきい値τを決めることができることを⽰す図
n 左図: match condition vectorsとnon-match condition vectorsを利⽤したときの再構成誤差のヒストグラム
n 右図: 正常データと異常データの再構成誤差のヒストグラム
n 結果: 既存⼿法を⼤きく引き離してSOTA