Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Developing Kaggle Notebooks

You're reading from   Developing Kaggle Notebooks Pave your way to becoming a Kaggle Notebooks Grandmaster

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781805128519
Length 370 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Gabriel Preda Gabriel Preda
Author Profile Icon Gabriel Preda
Gabriel Preda
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing Kaggle and Its Basic Functions FREE CHAPTER 2. Getting Ready for Your Kaggle Environment 3. Starting Our Travel – Surviving the Titanic Disaster 4. Take a Break and Have a Beer or Coffee in London 5. Get Back to Work and Optimize Microloans for Developing Countries 6. Can You Predict Bee Subspecies? 7. Text Analysis Is All You Need 8. Analyzing Acoustic Signals to Predict the Next Simulated Earthquake 9. Can You Find Out Which Movie Is a Deepfake? 10. Unleash the Power of Generative AI with Kaggle Models 11. Closing Our Journey: How to Stay Relevant and on Top 12. Other Books You May Enjoy
13. Index

Video data exploration

In this section, we will visualize a few samples of files, and then we will begin performing object detection to try to capture the features from the images that might have some anomalies when processed to create deepfakes. These are mostly the eyes, mouths, and figures.

We will start by visualizing sample files, both genuine images and deepfakes. We will then apply the first algorithm introduced previously for face, eye, and mouth detection, the one based on Haar cascade. We then follow with the alternative algorithm, based on MTCNN.

Visualizing sample files

The following code block selects a few video files from the set of fake videos and then visualizes an image capture from them, using the display_image_from_video function from the utility script video_utils:

fake_train_sample_video = list(meta_train_df.loc[meta_train_df.label=='FAKE'].sample(3).index)
for video_file in fake_train_sample_video:
    display_image_from_video(os.path...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime