Machine Learning in Linux

Machine Learning in Linux: GFPGAN – Face restoration software

Last Updated on March 6, 2023

Machine Learning is the practice of using algorithms to parse data, learn insights from that data, and then make a determination or prediction. The machine is ‘trained’ using huge amounts of data.

Deep Learning is a subset of Machine Learning that uses multi-layers artificial neural networks to deliver state-of-the-art accuracy in tasks such as object detection, speech recognition, language translation and others. Think of Machine Learning as cutting-edge, and Deep Learning as the cutting-edge of the cutting-edge.

With the availability of huge amounts of data for research and powerful machines to run your code on with distributed cloud computing and parallelism across GPU cores, Deep Learning has helped to create self-driving cars, intelligent voice assistants, pioneer medical advancements, machine translation, and much more. Deep Learning has become an indispensable tool for countless industries.

This new series looks at highly promising machine learning and deep learning software for Linux. We’ll cover a wide range of applications of this technology. We begin the series with GFPGAN, deep learning software for real-world face restoration. This software can radically improve the quality of images.

Installation

Installation is not the most straightforward. We didn’t find GFPGAN in popular Linux distro repositories. And the software has a ton of dependencies. But don’t be put off; installation is easier than expected.

First, clone the project’s repository.

$ git clone https://github.com/TencentARC/GFPGAN.git

Change into the newly created directory.

$ cd GFPGAN

Next we use pip (a package manager for Python packages) to install a whole slew of dependencies.

$ pip install basicsr
$ pip install facexlib
$ pip install -r requirements.txt
$ sudo python setup.py develop
$ pip install realesrgan

If you find that installing basicsr stalls at the preparing metadata stage, we recommend installing facexlib first. On multiple systems, this fixed the issue. It’s not clear if this is just a temporary blip.

The GitHub repository explains how to download the pre-trained models. But the software downloads the specified model for you.

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Noel
Noel
1 year ago

Did you install the software in Ubuntu?