image-capture-class-annotation

It is a tool to save an image by specifying an area and entering a key. It is supposed to create a dataset for class classification.

領域を指定し、キーを入力することで画像を保存するツールです。

クラス分類用のデータセット作成を想定しています。

image-capture-class-annotation

Requirement

  • OpenCV 3.4.2 or later

Usage

実行方法は以下です。

起動後はマウスクリック4点で切り出し箇所の指定を行い、

キー(0~9、a~z)を押下することで「capture」ディレクトリに画像を保存します。

0~9は00~09ディレクトリを作成し、a以降は10から連番のディレクトリを作成します。

python image-capture-class-annotation.py

オプションとして以下を指定できます。

  • --device

    入力デバイス(cv2.VideoCapture)

    デフォルト:0
  • --width

    入力デバイスの幅

    デフォルト:640
  • --height

    入力デバイスの高さ

    デフォルト:480
  • --crop_width

    生成画像の幅

    デフォルト:96
  • --crop_height

    生成画像の高さ

    デフォルト:96
  • --extension

    生成画像の拡張子

    デフォルト:jpg
  • --start_count

    ファイル連番の開始数

    デフォルト:0

Author

高橋かずひと

GitHub

https://github.com/Kazuhito00/image-capture-class-annotation