2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

DETR について調査中

Last updated at Posted at 2023-06-21

Visual Transformerの一つであるDETRについての情報をたどろうと思う。

DETR が着目される理由

  • Transformerベースの技術であること
  • 手動でのハイパーパラメータ設計 が大幅に減っていること。
  • CNNでは物体の輪郭よりも物体のテクスチャが判断に影響している比率が高いが #1、DETRでは、物体の輪郭の判断への比率が高いことが知られている。

この記事には、新規な情報も、十分整理された内容もありません。

まずは日本語の解説記事

DTERの解説と推論に関しては、DETRのGitHubページ 8 にチュートリアル用のノートブック「DETR’s hands on Colab Notebook」、「Standalone Colab Notebook」 へのリンクを紹介しています。

[DL輪読会]End-to-End Object Detection with Transformers

PyTorchとDetection Transformer (DETR)で作る物体認識モデル

Youtube
DETR: End-to-End Object Detection with Transformers | Paper Explained
論文についての説明

How to Train Object Detection Transformer on Custom Dataset

Review: Faster R-CNN (Object Detection)

上記の記事にある計算量と精度の比較

検出さえできればいいという場合には

方法1: colab の環境にあるipynb を実行してみる。

方法2: 上記のipynbファイルをから要点を抜き出してpython スクリプトを作る。

  • ただし、DETRはYOLOXなどに比べて推論の実行速度が速くないので、GPUのあるPCでの利用を推奨する。

github

webpage

COCO Fotmat のデータで学習ができる。

  • このため、pytorchを用いてされている最近のyoloシリーズで容易したデータをそのまま、学習・評価データに転用できそうです。
path/to/coco/
  annotations/  # annotation json files
  train2017/    # train images
  val2017/      # val images

colob DETR minimal example (with DetrFeatureExtractor).ipynb

DETRのリポジトリのREADME.md の中に学習のための手順が書いてある。
https://github.com/facebookresearch/detr#training

python -m torch.distributed.launch --nproc_per_node=8 --use_env main.py --coco_path /path/to/coco 

DETR をカスタムデータで学習させる例

書籍

Vision Transformer入門

qiita の参考記事

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?