All Projects → Kazuhito00 → GrabCut-Annotation-Tool

Kazuhito00 / GrabCut-Annotation-Tool

Licence: Apache-2.0 license
OpenCVのGrabCut()を利用したセマンティックセグメンテーション向けアノテーションツール(Annotation tool using GrabCut() of OpenCV. It can be used to create datasets for semantic segmentation.)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to GrabCut-Annotation-Tool

etos-deepcut
Deep Extreme Cut http://www.vision.ee.ethz.ch/~cvlsegmentation/dextr . a tool to do automatically object segmentation from extreme points.
Stars: ✭ 24 (-11.11%)
Mutual labels:  semantic-segmentation, grabcut
pingmote
Cross-platform Python global emote picker to quickly insert custom images/gifs
Stars: ✭ 24 (-11.11%)
Mutual labels:  pillow, pysimplegui
dice-simulator
A Python simple Dice Simulator just for fun
Stars: ✭ 17 (-37.04%)
Mutual labels:  pysimplegui
ESANet
ESANet: Efficient RGB-D Semantic Segmentation for Indoor Scene Analysis
Stars: ✭ 154 (+470.37%)
Mutual labels:  semantic-segmentation
SAFNet
[IROS 2021] Implementation of "Similarity-Aware Fusion Network for 3D Semantic Segmentation"
Stars: ✭ 19 (-29.63%)
Mutual labels:  semantic-segmentation
FotoKilof
GUI for ImageMagick
Stars: ✭ 114 (+322.22%)
Mutual labels:  pillow
semantic-tsdf
Semantic-TSDF for Self-driving Static Scene Reconstruction
Stars: ✭ 14 (-48.15%)
Mutual labels:  semantic-segmentation
PySimpleGUI
Launched in 2018. It's 2022 and PySimpleGUI is actively developed & supported. Create complex windows simply. Supports tkinter, Qt, WxPython, Remi (in browser). Create GUI applications trivially with a full set of widgets. Multi-Window applications are also simple. 3.4 to 3.11 supported. 325+ Demo programs & Cookbook for rapid start. Extensive d…
Stars: ✭ 10,846 (+40070.37%)
Mutual labels:  pysimplegui
tapmap
Command line keyboard heatmap generator.
Stars: ✭ 19 (-29.63%)
Mutual labels:  pillow
LinkNet tensorflow
TensorFlow implementation of LinkNet
Stars: ✭ 16 (-40.74%)
Mutual labels:  semantic-segmentation
SegFormer
Official PyTorch implementation of SegFormer
Stars: ✭ 1,264 (+4581.48%)
Mutual labels:  semantic-segmentation
MINet
Multi-scale Interaction for Real-time LiDAR Data Segmentation on an Embedded Platform (RA-L)
Stars: ✭ 28 (+3.7%)
Mutual labels:  semantic-segmentation
mix3d
Mix3D: Out-of-Context Data Augmentation for 3D Scenes (3DV 2021 Oral)
Stars: ✭ 183 (+577.78%)
Mutual labels:  semantic-segmentation
unet-pytorch
This is the example implementation of UNet model for semantic segmentations
Stars: ✭ 17 (-37.04%)
Mutual labels:  semantic-segmentation
AdaptationSeg
Curriculum Domain Adaptation for Semantic Segmentation of Urban Scenes, ICCV 2017
Stars: ✭ 128 (+374.07%)
Mutual labels:  semantic-segmentation
CAP augmentation
Cut and paste augmentation for object detection and instance segmentation
Stars: ✭ 93 (+244.44%)
Mutual labels:  semantic-segmentation
Polyp-Segmentation-using-UNET-in-TensorFlow-2.0
Implementing polyp segmentation using the U-Net and CVC-612 dataset.
Stars: ✭ 52 (+92.59%)
Mutual labels:  semantic-segmentation
FaPN
[ICCV 2021] FaPN: Feature-aligned Pyramid Network for Dense Image Prediction
Stars: ✭ 173 (+540.74%)
Mutual labels:  semantic-segmentation
map-floodwater-satellite-imagery
This repository focuses on training semantic segmentation models to predict the presence of floodwater for disaster prevention. Models were trained using SageMaker and Colab.
Stars: ✭ 21 (-22.22%)
Mutual labels:  semantic-segmentation
Swin-Transformer-Semantic-Segmentation
This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Semantic Segmentation.
Stars: ✭ 856 (+3070.37%)
Mutual labels:  semantic-segmentation

[Japanese/English]

GrabCut-Annotation-Tool

GrabCut-Annotation-Tool.mp4

OpenCVのGrabCut()を利用したアノテーションツールです。
セマンティックセグメンテーション向けのデータセット作成にご使用いただけます。
※GrabCutのアルゴリズムの都合上、境界がはっきりしているデータのアノテーションに向いています。

Requirement

  • opencv-python 4.5.2.54 or later
  • Pillow 7.2.0 or later
  • PySimpleGUI 4.32.1 or later

Directory

│  app.py
│  config.json
│  
├─core
│  │  gui.py
│  └─util.py
│          
├─input
│      
└─output
    ├─image
    └─annotation

app.py, core/gui.py, core/util.py

ソースコードです。

input

アノテーション対象の画像ファイルを格納するディレクトリです。

output

アノテーション結果を保存するディレクトリです。

  • image:リサイズした画像が格納されます
  • annotation:アノテーション結果が格納されます
    ※パレットモードのPNG形式で保存

Usage

次のコマンドで起動してください。

python app.py

起動時には以下オプションが指定可能です。

  • --input
    入力画像格納パス
    デフォルト:input
  • --output_image
    アノテーション結果(画像)の格納パス
    デフォルト:output/image
  • --output_annotation
    アノテーション結果(セグメンテーション画像)の格納パス
    デフォルト:output/annotation
  • --config
    ロードするコンフィグファイル
    デフォルト:config.json

Using GrabCut-Annotation-Tool

ファイル選択

ファイル一覧をクリックすることでアノテーション対象を切り替えることが出来ます。
ショートカットキー ↑、p:上のファイルへ ↓、n:下のファイルへ

初期ROI指定

「Select ROI」と表示されている時にマウス右ドラッグで初期ROIを指定できます。


ドラッグ終了後、GrabCut処理が行われます。


領域が選択されます。


後景指定

マウス右ドラッグで後景の指定が出来ます。




前景指定

「Manually label background」のチェックを外すことで前景指定に切り替えることが出来ます
ショートカットキー Ctrl


マウス右ドラッグで前景の指定が出来ます。




クラスID切り替え

Class IDのチェックボックスを押すことでクラスIDを切り替えることが出来ます。
一桁のIDはショートカットキーでの切り替えも可能です。
ショートカットキー 0-9


クラスID切り替え後はROI指定を行う必要があります。




自動保存

リサイズ画像とアノテーション画像はGrabCut処理毎に自動保存されます。


自動保存をしたくない場合は「Auto save」のチェックを外してください。
自動保存以外で保存したい場合は、キーボード「s」を押してください。


その他設定


  • Mask alpha:画像のマスク重畳表示の濃淡具合
  • Iteration:GrabCutアルゴリズムのイテレーション回数
  • Draw thickness:前景/後景指定時の線の太さ
  • Output width:出力画像の横幅
  • Output height:出力画像の縦幅

ToDo

  • メモリリーク対策
  • ROI選択時に左上→右下ドラッグ以外も可能にする
  • クラスIDをショートカットキーで選択した際にROI選択表示にする

Author

高橋かずひと(https://twitter.com/KzhtTkhs)

License

GrabCut-Annotation-Tool is under Apache-2.0 License.

サンプル画像はフリー素材ぱくたそ様の写真を利用しています。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].