GithubHelp home page GithubHelp logo

balajsaleem / grabcut-coco Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 21 KB

An implementation of grabcut on coco dataset with various categories to test its accuracy

License: GNU General Public License v3.0

Python 100.00%

grabcut-coco's Introduction

coco.py

A simple program to run grabcut on various categories of COCO dataset (2017 validation dataset) and calculate the IOU. It basically compares the accuracy of grabcut on different images and objects vs the human segmented, ground truth. It also presents some images ground truth and grabcut output.]

run it using coco.py

You must have the folder structure according to coco guidelines in a folder called COCOdataset2017.

grabcut.py

A simple program for interactively removing the background from an image using the grab cut algorithm and OpenCV.

This code was derived from the Grab Cut example from the OpenCV project but is hopefully more usable for day-to-day tasks.

See the OpenCV GrabCut Tutorial for more information.

Examples

Orignal Image Result Image Orignal Image Result Image

Usage

grabcut.py <input> [output]

Instructions

  1. After seeing the input and output windows, draw a rectangle arround the object using middle mouse button and wait for segmentation in output window.
  2. Press ctrl+P to see the control pannel with the options of Mark Forgeground / Background, Reset and Save.
  3. Click the relevant option and start marking the regions with the brush using the left mouse button, you may change the thickness of the brush, from input window.
  4. Reset or Save the final annotation.

Keys

  • 0 - Select areas of sure background
  • 1 - Select areas of sure foreground
  • 2 - Select areas of probable background
  • 3 - Select areas of probable foreground
  • n - Update the segmentation
  • r - Reset the setup
  • s - Save the result
  • q - Quit

grabcut-coco's People

Contributors

balajsaleem avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.