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.
Semantic and instance segmentation is possible with five lines of code.
Install PixelLib and its dependencies:
Install the latest version tensorflow(tensorflow 2.0) with:
pip3 install tensorflow
Install opencv-python with:
pip3 install opencv-python
Install scikit-image with:
pip3 install scikit-image
Install Pillow with:
pip3 install pillow
pip3 install pixellib
import pixellib from pixellib.semantic import semantic_segmentation segment_image = semantic_segmentation() segment_image.load_pascalvoc_model("deeplabv3_xception_tf_dim_ordering_tf_kernels.h5") segment_image.segmentAsPascalvoc("path_to_image", output_image_name = "path_to_output_image")