Session Ready
Exercise

Superpixel segmentation

In this exercise, you will apply unsupervised segmentation to the same image, before it's passed to a face detection machine learning model.

So you will reduce this image from \(265 \times 191 = 50,615\) pixels down to \(400\) regions.

Young woman
Already preloaded as face_image.

The show_image() function has been preloaded for you as well.

Instructions
100 XP
  • Import the slic() function from the segmentation module.
  • Import the label2rgb() function from the color module.
  • Obtain the segmentation with 400 regions using slic().
  • Put segments on top of original image to compare with label2rgb().