(Fixed) ModuleNotFoundError: No Module Named ‘face_recognition’ in Python

Quick Fix: Python raises the ImportError: No module named ‘face_recognition’ when it cannot find the library face-recognition. It occurs if you haven’t installed face-recognition explicitly with pip install face-recognition, or you have different Python versions on your computer, and face-recognition is not installed for the particular version you’re using. You also need to pip install … Read more

ModuleNotFoundError: No Module Named ‘imutils’ | Python

Quick Fix: Python raises the ImportError: No module named ‘imutils’ when it cannot find the library imutils. The most frequent source of this error is that you haven’t installed imutils explicitly with pip install imutils. Alternatively, you may have different Python versions on your computer, and imutils is not installed for the particular version you’re … Read more

How to Modify Images using Pillow

Problem Formulation and Solution Overview This article will show you how to use the Pillow Library in Python to modify and manipulate images. To make it more interesting, we have the following running scenario: Creative Prints is an online store accepting images from Photographers wishing to sell their art. The Manager would like you to … Read more

How to Convert an Image from RGB to Grayscale in Python

Problem Formulation and Solution Overview In this article, you’ll learn how to convert an image from RGB to Grayscale. Aaron, an Icelandic Photographer, has a beautiful picture of their famous Elephant Rock. He needs to convert this picture from an RGB to Grayscale representation and has asked for your assistance. πŸ’‘Note: To follow along, right-click … Read more

How to Show Images in Python

Showing pictures in Python This post will show different ways of displaying pictures in Python. The options we will explore are: PIL (Python Image Library) OpenCV (Computer Vision Library) IPython Matplotlib Library Method 1: PIL (Python Image Library) PIL is the standard library to manage images in Python. They discontinued the project in 2011, but … Read more

How to Display an Image as Grayscale in Python Matplotlib?

How to Display an Image as Grayscale in Python Matplotlib? You can convert a given image to a grayscale image using four simple steps: Import the PIL and Matplotlib libraries Open the image with PIL.Image.open(filename). Convert the opened image to grayscale using img.convert(“L”) with greyscale mode “L”. Display the image using Matplotlib’s plt.imshow(gray_img, cmap=’gray’) function. … Read more