title: Objects Extraction from an Image using Python
body: <p>I'm trying to implement a python program to remove the background and extract the object/objects in the foreground from any given static image (as shown in the attached images). This is similar to "iPhoneX Portrait Effect" or "Bokeh Effect". However, instead of blurring the background one needs to completely remove it.</p>
  
  <p>In short, I want to extract objects from any given image and also create a mask. Below are the examples of both respectively:</p>
  
  <p><strong>Object Extraction:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/hsuAD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hsuAD.jpg" alt="Object Extraction"></a></p>
  
  <p><strong>Image Mask:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/dL13O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dL13O.jpg" alt="enter image description here"></a></p>
  
  <p>I have somewhere listened to Google's DeepLab, but I don't know how to start with it.</p>
  
  <p>Can someone help me, please!
  Any step by step tutorial will be very appreciated.</p>
  
  <p>Thanks in advance!</p>