Exploring Deepfakes: Deploy powerful AI techniques for face replacement and more with this comprehensive guide
- Length: 192 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2023-03-28
- ISBN-10: 1801810699
- ISBN-13: 9781801810692
- Sales Rank: #2554955 (See Top 100 Books)
Master the innovative world of deepfakes and generative AI for face replacement with this full-color guide
Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Understand what deepfakes are, their history, and how to use the technology ethically
- Get well-versed with the workflow and processes involved to create your own deepfakes
- Learn how to apply the lessons and techniques of deepfakes to your own problems
Book Description
Applying Deepfakes will allow you to tackle a wide range of scenarios creatively.
Learning from experienced authors will help you to intuitively understand what is going on inside the model. You’ll learn what deepfakes are and what makes them different from other machine learning techniques, and understand the entire process from beginning to end, from finding faces to preparing them, training the model, and performing the final swap.
We’ll discuss various uses for face replacement before we begin building our own pipeline. Spending some extra time thinking about how you collect your input data can make a huge difference to the quality of the final video. We look at the importance of this data and guide you with simple concepts to understand what your data needs to really be successful.
No discussion of deepfakes can avoid discussing the controversial, unethical uses for which the technology initially became known. We’ll go over some potential issues, and talk about the value that deepfakes can bring to a variety of educational and artistic use cases, from video game avatars to filmmaking.
By the end of the book, you’ll understand what deepfakes are, how they work at a fundamental level, and how to apply those techniques to your own needs.
What you will learn
- Gain a clear understanding of deepfakes and their creation
- Understand the risks of deepfakes and how to mitigate them
- Collect efficient data to create successful deepfakes
- Get familiar with the deepfakes workflow and its steps
- Explore the application of deepfakes methods to your own generative needs
- Improve results by augmenting data and avoiding overtraining
- Examine the future of deepfakes and other generative AIs
- Use generative AIs to increase video content resolution
Who this book is for
This book is for AI developers, data scientists, and anyone looking to learn more about deepfakes or techniques and technologies from Deepfakes to help them generate new image data. Working knowledge of Python programming language and basic familiarity with OpenCV, Pillow, Pytorch, or Tensorflow is recommended to get the most out of the book.
Cover Preface Title Page Copyright Contributors Table of Contents Part 1: Understanding Deepfakes Chapter 1: Surveying Deepfakes Introducing deepfakes Exploring the uses of deepfakes Entertainment Parody Education Advertisements Discovering how deepfakes work Generative auto-encoders Assessing the limitations of generative AI Resolution Training required for each face pair Training data Looking at existing deepfake software Faceswap DeepFaceLab First Order Model Reface Summary Chapter 2: Examining Deepfake Ethics and Dangers The unethical origin of deepfakes Being an ethical deepfaker Consent Respect Deception Putting it into practice The dangers of deepfakes Reputation Politics Avoiding consequences by claiming manipulation Preventing damage from deepfakes Starving the model of data Authenticating any genuine media Deepfake detection Public relations Public awareness Summary Chapter 3: Acquiring and Processing Data Why data is important Understanding the value of variety Pose Expression Lighting Bringing this variety together Sourcing data Filming your own data Getting data from historical sources Improving your data Linear color Data matching Upscaling Summary Chapter 4: The Deepfake Workflow Technical requirements Identifying suitable candidates for a swap Preparing the training images Extracting faces from your source data Curating training images Training a model Setting up Launching and monitoring training Manual intervention Applying a trained model to perform a swap The alignments file Cleaning the alignments file Fixing the alignments file Using the Preview tool Generating the swap Summary Part 2: Getting Hands-On with the Deepfake Process Chapter 5: Extracting Faces Technical requirements Getting image files from a video Running extract on frame images face_alignments.json face_bbox_{filename}_{face number}.png face_aligned_{filename}_{face number}.png face_mask_{filename}_{face number}.png Getting hands-on with the code Initialization Image preparation Face detection Face landmarking/aligning Summary Exercises Chapter 6: Training a Deepfake Model Technical requirements Understanding convolutional layers Getting hands-on with AI Defining our upscaler Creating the encoder Building the decoders Exploring the training code Creating our models Looping over the training Teaching the network Saving results Summary Exercises Chapter 7: Swapping the Face Back into the Video Technical requirements Preparing to convert video Getting hands-on with the convert code Initialization Loading the AI Preparing data The conversion loop Creating the video from images Summary Exercises Part 3: Where to Now? Chapter 8: Applying the Lessons of Deepfakes Technical requirements Aligning other types of images Finding an aligner Using the library Using the landmarks to align The power of masking images Types of masking Finding a usable mask for your object Examining an example Getting data under control Defining your rules Evolving your rules Dealing with errors Summary Chapter 9: The Future of Generative AI Generating text Recent developments Building sentences The future of text generation Improving image quality Various tactics The future of image quality upgrading Text-guided image generation CLIP Image generation with CLIP The future of image generation Generating sound Voice swapping Text-guided music generation The future of sound generation Deepfakes Sound generation Text-guided image generation Improving image quality Text generation The future of deepfakes The future of AI ethics Summary Index About Packt Other Books You May Enjoy
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Exploring Deepfakes: Deploy powerful AI techniques for face replacement and more with this comprehensive guide
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.