rpmcruz / igrabcut

Interactive segmentation tool using GrabCut

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iGrabCut

Interactive image segmentation tool using GrabCut.

The code is less than 100 lines. It is a little tool that combines the GrabCut algorithm with a simple interface for manual segmentation. It asks for which file(s) to segment (multiple files may be provided for batch segmentation), then you select the bounding box of the object to segment, and finally use mouse strokes (left-click=foreground, right-click=background) to guide the GrabCut algorithm. Just close the window or press enter/escape to go to the next image. The segmentations are saved in the same folder as the original images with the -seg.png suffix.

Animated screenshot

Usage: Download and run python main.py.

Limitations: The tool was developed for a specific application where the images are grayscale and there is only one object to segment. You need to adjust accordingly.

Credits:

About

Interactive segmentation tool using GrabCut


Languages

Language:Python 100.0%