Blur, color, grayscale and create a virtual background for a video with PixelLib

Photo by Author

PixelLib is a library created to enable easy implementation of object segmentation in real life applications. PixelLib supports image tuning, which is the ability to alter the background of any image. PixelLib now supports video tuning, which is the ability to alter the background of videos and camera’s feeds. PixelLib employs the technique of object segmentation to perform excellent foreground and background subtraction. PixelLib makes use of deeplabv3+ model trained on pascalvoc dataset and the dataset supports 20 object categories.

person,bus,car,aeroplane, bicycle, ,motorbike,bird, boat, bottle,  cat, chair, cow, dinningtable, dog, horse pottedplant, sheep, sofa, train, tv

Background effects supported are…


Original Photo by Joanna Nix-Walkup on Unsplash

Computer vision is the medium through which computers see and identify objects. The goal of computer vision is to make it possible for computers to analyze objects in images and videos, to solve different vision problems. Object Segmentation has paved way for convenient analysis of objects in images and videos, contributing immensely to different fields, such as medical, vision in self driving cars and background editing in images and videos.

PixelLib is a library created for easy integration of image and video segmentation in real life applications. PixelLib has employed the powerful techniques of object segmentation to make computer vision…


Blur, color, grayscale and change the background of any image with a picture using PixelLib

Photo Collage by Author

Image segmentation has a lot of amazing applications that solve different computer vision problems. PixelLib is a library created to ensure easy integration of image segmentation in real life applications. PixelLib now supports a feature known as image tuning.

Image Tuning: It is the change in the background of an image through image segmentation. The key role of image segmentation is to remove the objects segmented from the image and place them in the new background created. This is done by producing a mask for the image and combining it with the modified background. We make use of deeplabv3+ model…


Train your dataset with 7 Lines of Code to implement instance segmentation and object detection.

Image’s source: Wikicommons.com(CC0)

Image Segmentation is an important field in computer vision, it is applied in different fields of life. PixelLib is a library created to allow easy application of segmentation to real life problems. It supports instance segmentation of objects with Coco model. Segmentation with coco model is limited as you cannot perform segmentation beyond the 80 classes available in coco. It is now possible to train your custom objects’ segmentation model with PixelLib Library with just 7 Lines of Code.

Install PixelLib and its dependencies:

Install Tensorflow with:(PixelLib supports tensorflow 2.0 and above)

  • pip3 install tensorflow

Install imgaug with:

  • pip3 install…

Labelme is one of the most convenient annotation tool for polygon annotation. This article explains how to use labelme for annotation of objects.

Install labelme and its dependencies.

On Windows:

  • pip3 install pyqt5
  • pip3 install labelme

On Ubuntu 14.04 / Ubuntu 16.04:

  • sudo apt-get install python3-pyqt5
  • sudo pip3 install labelme

On Ubuntu 19.10+ / Debian (sid) use:

  • sudo apt-get install labelme

On macOs

  • brew install pyqt5
  • pip3 install labelme

In your PC’s command prompt just type labelme and labelme’s GUI will be displayed as a separate window.

labelme

Semantic segmentation of 150 classes of objects with PixelLib

It is now possible to perform segmentation on 150 classes of objects using ade20k model with PixelLib. Ade20k model is a deeplabv3+ model trained on ade20k dataset, a dataset with 150 classes of objects. Thanks to tensorflow deeplab’s model zoo, I extracted ade20k model from its tensorflow model checkpoint.

Install the latest version tensorflow (tensorflow 2.0) with:

  • pip3 install tensorflow

Install Pixellib:

  • pip3 install pixellib — upgrade

Implementation of Semantic Segmentation with PixelLib:

The code to implement semantic segmentation with deeplabv3+ model is trained on ade20k dataset.

We shall observe each line of code:

import pixellib
from pixellib.semantic import semantic_segmentation…

Semantic and instance segmentation of videos

The first version of PixelLib is built to perform Image Segmentation using few lines of Code. I am excited to announce that the newly released version of PixelLib supports Video Segmentation with five lines of code.

If you have not read the article on Image Segmentation With PixelLib, click here.

Install tensorflow with:

  • pip3 install tensorflow

Install PixelLib with:

  • pip3 install pixellib — upgrade

Semantic Segmentation of Videos:

Segmentation of videos with pascal voc model:

We shall explain each line of code below.

import pixellibfrom pixellib.semantic import semantic_segmentationsegment_video = semantic_segmentation()

We imported in the class for performing…


Semantic and Instance Segmentation with PixelLib.

Computer vision is evolving on a daily basis. Popular computer vision techniques such as image classification and object detection have been used extensively to solve a lot of computer vision problems. In image classification, an entire image is classified. Object detection extends image classification by detecting the location of individual objects present in an image.

Image Segmentation:

Some computer vision problems require deeper understanding of the contents in the images. Classification and object detection may not be suitable to solve these problems. …


Orangelib is a library built for the purpose of achieving easy implementation of computer vision in real problems.

In the articleClassification of Oranges With Orangelib” , we discussed how to classify oranges with Orangelib.

Orangelib-- 0.4.0: this is the latest version of Orangelib. It had been upgraded to perform prediction on more classes of fruits:Apples and Bananas. Multiple predictions on images had also been integrated.

With Orangelib, you can easily classify the following classes of fruits using few lines of code:

  • Oranges
  • Bananas
  • Apples

Install Orangelib with:

  • pip install orangelib

If installed, upgrade to the latest version with:

  • pip install…

Classification problem is one of the major challenges in machine learning. Computer vision is an important aspect of classification problem in which objects recognized by a computer can be classified into specific categories.
Implementing computer vision can be challenging, such as training a model to perform accurate prediction on an object. Training a model to accurately recognize a specific object can be tasking and it becomes more tasking to implement a computer vision model that will be able to classify the difference between one object and another.

Orangelib:
Orangelib is a simple library created to facilitate easy implementation of computer…

Ayoola Olafenwa (she/her)

A DeepLearning practitioner. Creator of PixelLib https://github.com/ayoolaolafenwa/PixelLib

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store