All Projects → louisfb01 → iterative-grabcut

louisfb01 / iterative-grabcut

Licence: MIT license
This algorithm uses a rectangle made by the user to identify the foreground item. Then, the user can edit to add or remove objects to the foreground. Then, it removes the background and makes it transparent.

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to iterative-grabcut

mercury
Mercury - data visualize and discovery with Javascript, such as apache zeppelin and jupyter
Stars: ✭ 29 (-17.14%)
Mutual labels:  notebook, notebooks
UAV-Stereo-Vision
A program for controlling a micro-UAV for obstacle detection and collision avoidance using disparity mapping
Stars: ✭ 30 (-14.29%)
Mutual labels:  opencv-python, opencv2
grabcut
A MATLAB Implementation of GrabCut (Excluding Border Matting and User Editing)
Stars: ✭ 31 (-11.43%)
Mutual labels:  background-subtraction, grabcut
PlayerDetection
Player detection and ball detection in football matches using image processing(opencv).
Stars: ✭ 50 (+42.86%)
Mutual labels:  opencv-python, opencv2
go-notebook
Go-Notebook is inspired by Jupyter Project (link) in order to document Golang code.
Stars: ✭ 33 (-5.71%)
Mutual labels:  notebook, notebook-jupyter
smart-background
Automatically generate the background of the symbol picture, so you no longer have to worry about the background 自动生成符号背景,让你不再为背景头疼
Stars: ✭ 74 (+111.43%)
Mutual labels:  background-image, background
GStreamer-Python
Fetch RTSP Stream using GStreamer in Python and get image in Numpy
Stars: ✭ 81 (+131.43%)
Mutual labels:  opencv-python, opencv2
MDAPL
The de facto standard for people who are looking to learn Dyalog APL from a book. This updated version is a work in progress.
Stars: ✭ 24 (-31.43%)
Mutual labels:  notebook, notebooks
Papermill
📚 Parameterize, execute, and analyze notebooks
Stars: ✭ 4,458 (+12637.14%)
Mutual labels:  notebook, notebooks
crypto-trader
Automating crypto trading with python in a jupyter notebook
Stars: ✭ 35 (+0%)
Mutual labels:  notebook
notebooks
A docker-based starter kit for machine learning via jupyter notebooks. Designed for those who just want a runtime environment and get on with machine learning. Docker tags:
Stars: ✭ 29 (-17.14%)
Mutual labels:  notebook
visualize-voc-format-data
A simple utility programe to visualize pascal voc (format) dataset images with bounding boxes. Useful to check whether there is any error in forming annotation files.
Stars: ✭ 23 (-34.29%)
Mutual labels:  opencv-python
BlockchainEngineering
Learn to think like a blockchain designer by solving practical challenges
Stars: ✭ 21 (-40%)
Mutual labels:  notebook
nbclassic
Jupyter Notebook as a Jupyter Server extension
Stars: ✭ 35 (+0%)
Mutual labels:  notebook
workshop-spark
Código para workshops Spark com ambiente de desenvolvimento em docker
Stars: ✭ 27 (-22.86%)
Mutual labels:  notebooks
manning tf2 in action
The official code repository for "TensorFlow in Action" by Manning.
Stars: ✭ 61 (+74.29%)
Mutual labels:  notebook
camera-live-streaming
Camera Live Streaming with Flask and Open-CV
Stars: ✭ 69 (+97.14%)
Mutual labels:  opencv-python
flask-ocr
use flask and tesseract to have a basic ocr, also you need opencv2, this code use opencv2 to have a basic image process
Stars: ✭ 27 (-22.86%)
Mutual labels:  opencv-python
OpenCV-Object-Tracking
Object Tracking Using OpenCV and Python Plus Comparing different Trackers
Stars: ✭ 32 (-8.57%)
Mutual labels:  opencv-python
android-multibackground
This library can easily apply round corner、stroke、shadow and different state effects to background drawable.
Stars: ✭ 18 (-48.57%)
Mutual labels:  background

iterative-grabcut: Using simple rectangle for identifying foreground items

This algorithm uses a rectangle made by the user to identify the foreground item. Then, the user can edit to add or remove objects to the foreground. Once done, it removes the background and makes it transparent (adds alpha channel) and saves it.

This is a simple notebook implementing the GrabCut algorithm shown in the High-Quality Background Removal Without Green Screens | State of the Art Approach Explained video on What's AI's channel.

How does it work? With example

  1. Clone the repo and install the requirements in your environment using pip install -r requirements.txt
  2. Upload your image.
  3. Create a rectangle over your image including all your foreground objects.
  4. Remove the background using GrabCut algorithm.
  5. If improvement is needed, draw on the image, left click (white) = foreground and right click(black) = background.
  6. Remove the background using GrabCut algorithm.
  7. Return to step 4 or end.

Video demos

Example with one iteration to correct the first pass of the algorithm:

Example with harder picture and multiple iterations:

Results:

References:

Interactive Foreground Extraction using GrabCut Algorithm, OpenCV, (2013), https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_grabcut/py_grabcut.html

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].