Can a neural network tell if an image is mirrored? – Visual Chirality

AI Coffee Break with Letitia · Beginner ·📄 Research Papers Explained ·5y ago

Key Takeaways

This video explains how neural networks can detect if an image is mirrored, covering Visual Chirality and its impact on data augmentation

Full Transcript

hello and welcome to this ai coffee break this time we will discuss a very important phenomenon in our world reflection but most importantly we will see how this paper entitled visual chirality analyzes mirroring images when training deep neural networks and how this can affect how these algorithms are trained to perceive our visual reality but first a little introduction of the notions of chirality and data augmentation if you are an expert on these topics already feel free to skip to the next chapter in the video so let's start with chirality every human has experienced what mirroring is perhaps the first time as a baby looking into a mirror physicists and mathematicians understand this phenomenon pretty well and can describe it formally to reflect this image of a face everything one needs to do is to multiply all coordinates by almost an identity matrix almost because the reflection matrix has a catch a minus for the x dimension does making the image go the other way with neural networks processing images the way they handle reflections is very different especially for classical image processing architectures like the convolutional neural network or short cnn but first we need to understand convolutions the convolution operation does something similar to what happens in our eyes it bundles information from image regions together learning parameters that determine how exactly to sum this information up in this architecture convolutions ensure the so called shift invariance meaning that if we have the same pattern or object at a different position in the image like this blue shape here the response will not change because the aggregating parameters stay the same by construction this makes sense as we want to detect a dog independently of its exact position in the image so in this case of a convolutional architecture no other parameters are learnt when shifting but something very different happens when the image is mirrored convolutional neural networks are not invariant to reflections this is because convolutions are very sensitive to ordering and the parameter learned for field number four is not a sensible parameter when applied to the mirrored version anymore this means that the network has to learn one set of parameters when presented with an image and a different set of parameters if presented with the same image but mirrored so while convolutions are specifically built to handle translation of the objects through the image very well there is nothing intrinsic to the network telling it the connection between the mirrored and the non-mirrored version of an image but this however has the following implication if the cnn has to learn different parameters for the image and for the mirrored version it means that the network can do useful parameter updates from both versions and because more training data is always a good bet for deep learning researchers thought if we mirror images we can double our training set if we mirror on the other axis we have now four times as many images and of course this does not make sense for some kind of images that have a preference for the sky to stay upwards but anyway here it is reflection one way to do data augmentation and it is cool or this is the state where this paper here came in to scold us all a little bit because we were so busy augmenting the data sets with reflected images that we did not think about how this might impact the statistics in the data and how we know machine learning is all about fitting the data in very many different ways from linear regression to deep neural models so surprise surprise if we change the data distribution by mirroring our super duper fitting machine might notice that so how can we detect mirroring with a neural network if mirroring happened we as humans can detect it thanks to special objects with the chiral property take for example a left hand if we mirror it we have a right hand but if we try to overlap it with the original we cannot unless we mirror this reflection again these special objects that help us humans detect mirroring are called chiral in the geometrical sense but can computer vision models detect this chirality too well it seems they can to prove this the authors define the concept of visual chirality because what holds for geometric chirality does not necessarily hold for images take the example of a left hand if mirrored it might be as well a right hand in an image it would not necessarily mean that the image has been flipped so instead the authors start with defining visual i chirality if we want to estimate the distribution d of x where x is our data it might be for example the images we usually perform data augmentation by applying a transformation t to the data x this transformation could be the reflection for example for i chiral data this equation here would hold meaning that there would be no difference of the distribution of the data before and after the transformation then the degree in which an image x would violate this equation is a measure for visual chirality so to recapitulate a human hand would be geometrically chiral but not visually chiral but what would be visual chiral then well clocks text but also let's not spoil everything and let the neural network show us what it looks at to tell mirrored images apart from non-mirrored ones for this the authors train a widely used cnn a resnet to classify reflected from non-reflected images and the network gets pretty good at it reaching accuracies up to 90 when testing on the test subset of the instagram data set when being applied to other images a little out of domain it still performs better than random chance at telling mirrored images from non-mirrored images apart they also visualize the discriminative regions of the image giving us a hint at what the network is focusing on when giving the answer it looks at smartphones it watches shirt colors and pockets but also they show that chirality is present in face images too on the applied ffhq data set here seems to be a hint for chirality because the pictures imply that the majority of people part their hair from left to right also gaze is a hint for chirality suggesting a bias in gaze direction possibly because of ocular dominance these are high level features that give away the visual chirality of the image even more interestingly the authors also detect low-level chiral cues they are artifacts from image processing steps like compression i look at you jpeg and make the images chiral these effects are imperceptible to humans but this is something that the neural network could capture so all this time we were using image reflection for data augmentation in computer vision and not many of us were looking at the subtleties like this paper does this is my favorite kind of paper it has a lot of insight gained with a very simple idea and it was always lurking in the mirror when we were not looking great job if you like this paper at least as much as the coffee bean does check out the link in the description below if you like this video do not forget to hit the like and subscribe at hands and let me know in the comments what topic you want miss coffee bean to explain next [Music] you

Original Description

What if a neural network can tell if an image is mirrored or not? How can image flipping and mirroring affect data augmentation in computer vision? "Visual Chirality" paper explained. ➡️ AI Coffee Break Merch! 🛍️ https://aicoffeebreak.creator-spring.com/ Outline: * 00:00 Visual Chirality Paper * 00:30 Convolutions and Chirality * 03:09 Data augmentation * 04:29 Visual chirality * 06:51 Where to look? ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 🔥 Optionally, pay us a coffee to boost our Coffee Bean production! ☕ Patreon: https://www.patreon.com/AICoffeeBreak Ko-fi: https://ko-fi.com/aicoffeebreak ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 📄 Paper explained: Zhiqiu Lin, Jin Sun, Abe Davis, and Noah Snavely. "Visual Chirality." In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12295-12303. 2020. https://openaccess.thecvf.com/content_CVPR_2020/papers/Lin_Visual_Chirality_CVPR_2020_paper.pdf 🔗 Links: YouTube: https://www.youtube.com/AICoffeeBreak Twitter: https://twitter.com/AICoffeeBreak Reddit: https://www.reddit.com/r/AICoffeeBreak/ #AICoffeeBreak #MsCoffeeBean #VisualChirality #MachineLearning #AI #research Video and thumbnail contains emojis designed by OpenMoji – the open-source emoji and icon project. License: CC BY-SA 4.0
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from AI Coffee Break with Letitia · AI Coffee Break with Letitia · 11 of 60

1 AI Coffee Break - Channel Trailer
AI Coffee Break - Channel Trailer
AI Coffee Break with Letitia
2 How to check if a neural network has learned a specific phenomenon?
How to check if a neural network has learned a specific phenomenon?
AI Coffee Break with Letitia
3 A brief history of the Transformer architecture in NLP
A brief history of the Transformer architecture in NLP
AI Coffee Break with Letitia
4 Our paper at CVPR 2020 - MUL Workshop and ACL 2020 - ALVR Workshop
Our paper at CVPR 2020 - MUL Workshop and ACL 2020 - ALVR Workshop
AI Coffee Break with Letitia
5 The Transformer neural network architecture EXPLAINED. “Attention is all you need”
The Transformer neural network architecture EXPLAINED. “Attention is all you need”
AI Coffee Break with Letitia
6 Transformer combining Vision and Language? ViLBERT - NLP meets Computer Vision
Transformer combining Vision and Language? ViLBERT - NLP meets Computer Vision
AI Coffee Break with Letitia
7 Pre-training of BERT-based Transformer architectures explained – language and vision!
Pre-training of BERT-based Transformer architectures explained – language and vision!
AI Coffee Break with Letitia
8 GPT-3 explained with examples. Possibilities, and implications.
GPT-3 explained with examples. Possibilities, and implications.
AI Coffee Break with Letitia
9 Adversarial Machine Learning explained! | With examples.
Adversarial Machine Learning explained! | With examples.
AI Coffee Break with Letitia
10 BERTology meets Biology | Solving biological problems with Transformers
BERTology meets Biology | Solving biological problems with Transformers
AI Coffee Break with Letitia
Can a neural network tell if an image is mirrored? – Visual Chirality
Can a neural network tell if an image is mirrored? – Visual Chirality
AI Coffee Break with Letitia
12 The ultimate intro to Graph Neural Networks. Maybe.
The ultimate intro to Graph Neural Networks. Maybe.
AI Coffee Break with Letitia
13 Can language models understand? Bender and Koller argument.
Can language models understand? Bender and Koller argument.
AI Coffee Break with Letitia
14 GANs explained | Generative Adversarial Networks video with showcase!
GANs explained | Generative Adversarial Networks video with showcase!
AI Coffee Break with Letitia
15 What nobody tells you about MULTIMODAL Machine Learning! 🙊 THE definition.
What nobody tells you about MULTIMODAL Machine Learning! 🙊 THE definition.
AI Coffee Break with Letitia
16 Multimodal Machine Learning models do not work. Here is why. Part 1/2 – The SYMPTOMS
Multimodal Machine Learning models do not work. Here is why. Part 1/2 – The SYMPTOMS
AI Coffee Break with Letitia
17 Why Multimodal Machine Learning models do not work. Part 2/2 – The CAUSES
Why Multimodal Machine Learning models do not work. Part 2/2 – The CAUSES
AI Coffee Break with Letitia
18 An image is worth 16x16 words: ViT | Vision Transformer explained
An image is worth 16x16 words: ViT | Vision Transformer explained
AI Coffee Break with Letitia
19 AI understanding language!? A roadmap to natural language understanding.
AI understanding language!? A roadmap to natural language understanding.
AI Coffee Break with Letitia
20 "What Can We Do to Improve Peer Review in NLP?" 👀
"What Can We Do to Improve Peer Review in NLP?" 👀
AI Coffee Break with Letitia
21 The curse of dimensionality. Or is it a blessing?
The curse of dimensionality. Or is it a blessing?
AI Coffee Break with Letitia
22 PCA explained with intuition, a little math and code
PCA explained with intuition, a little math and code
AI Coffee Break with Letitia
23 Data-efficient Image Transformers EXPLAINED! Facebook AI's DeiT paper
Data-efficient Image Transformers EXPLAINED! Facebook AI's DeiT paper
AI Coffee Break with Letitia
24 OpenAI's DALL-E explained. How GPT-3 creates images from descriptions.
OpenAI's DALL-E explained. How GPT-3 creates images from descriptions.
AI Coffee Break with Letitia
25 Leaking training data from GPT-2. How is this possible?
Leaking training data from GPT-2. How is this possible?
AI Coffee Break with Letitia
26 OpenAI’s CLIP explained! | Examples, links to code and pretrained model
OpenAI’s CLIP explained! | Examples, links to code and pretrained model
AI Coffee Break with Letitia
27 Transformers can do both images and text. Here is why.
Transformers can do both images and text. Here is why.
AI Coffee Break with Letitia
28 UMAP explained | The best dimensionality reduction?
UMAP explained | The best dimensionality reduction?
AI Coffee Break with Letitia
29 NVIDIA Jarvis (now NVIDIA Riva) meets Ms. Coffee Bean
NVIDIA Jarvis (now NVIDIA Riva) meets Ms. Coffee Bean
AI Coffee Break with Letitia
30 Transformer in Transformer: Paper explained and visualized | TNT
Transformer in Transformer: Paper explained and visualized | TNT
AI Coffee Break with Letitia
31 [RANT] Adversarial attack on OpenAI’s CLIP? Are we the fools or the foolers?
[RANT] Adversarial attack on OpenAI’s CLIP? Are we the fools or the foolers?
AI Coffee Break with Letitia
32 Pattern Exploiting Training explained! | PET, iPET, ADAPET
Pattern Exploiting Training explained! | PET, iPET, ADAPET
AI Coffee Break with Letitia
33 Deep Learning for Symbolic Mathematics!? | Paper EXPLAINED
Deep Learning for Symbolic Mathematics!? | Paper EXPLAINED
AI Coffee Break with Letitia
34 FNet: Mixing Tokens with Fourier Transforms – Paper Explained
FNet: Mixing Tokens with Fourier Transforms – Paper Explained
AI Coffee Break with Letitia
35 Are Pre-trained Convolutions Better than Pre-trained Transformers? – Paper Explained
Are Pre-trained Convolutions Better than Pre-trained Transformers? – Paper Explained
AI Coffee Break with Letitia
36 "Please Commit More Blatant Academic Fraud" – A fellow PhD student's response.
"Please Commit More Blatant Academic Fraud" – A fellow PhD student's response.
AI Coffee Break with Letitia
37 Scaling Vision Transformers? How much data can a transformer get? #Shorts
Scaling Vision Transformers? How much data can a transformer get? #Shorts
AI Coffee Break with Letitia
38 How cross-modal are vision and language models really? 👀 Seeing past words. [Own work]
How cross-modal are vision and language models really? 👀 Seeing past words. [Own work]
AI Coffee Break with Letitia
39 Charformer: Fast Character Transformers via Gradient-based Subword Tokenization +Tokenizer explained
Charformer: Fast Character Transformers via Gradient-based Subword Tokenization +Tokenizer explained
AI Coffee Break with Letitia
40 Positional embeddings in transformers EXPLAINED | Demystifying positional encodings.
Positional embeddings in transformers EXPLAINED | Demystifying positional encodings.
AI Coffee Break with Letitia
41 Adding vs. concatenating positional embeddings & Learned positional encodings
Adding vs. concatenating positional embeddings & Learned positional encodings
AI Coffee Break with Letitia
42 Self-Attention with Relative Position Representations – Paper explained
Self-Attention with Relative Position Representations – Paper explained
AI Coffee Break with Letitia
43 Saddle points vs. local minima in high dimensional spaces | ❓ #AICoffeeBreakQuiz #Shorts
Saddle points vs. local minima in high dimensional spaces | ❓ #AICoffeeBreakQuiz #Shorts
AI Coffee Break with Letitia
44 What is the model identifiability problem? | Explained in 60 seconds! | ❓ #AICoffeeBreakQuiz #Shorts
What is the model identifiability problem? | Explained in 60 seconds! | ❓ #AICoffeeBreakQuiz #Shorts
AI Coffee Break with Letitia
45 Data leakage during data preparation? | Using AntiPatterns to avoid MLOps Mistakes
Data leakage during data preparation? | Using AntiPatterns to avoid MLOps Mistakes
AI Coffee Break with Letitia
46 Is today's AI smarter than YOU? #Shorts
Is today's AI smarter than YOU? #Shorts
AI Coffee Break with Letitia
47 Convolution vs Cross-Correlation. How most CNNs do not compute convolutions. | ❓ #Shorts
Convolution vs Cross-Correlation. How most CNNs do not compute convolutions. | ❓ #Shorts
AI Coffee Break with Letitia
48 Why do we care about cross-correlations vs convolutions | ❓ #AICoffeeBreakQuiz #Shorts
Why do we care about cross-correlations vs convolutions | ❓ #AICoffeeBreakQuiz #Shorts
AI Coffee Break with Letitia
49 The convolution is not shift invariant. | Invariance vs Equivariance | ❓ #AICoffeeBreakQuiz #Shorts
The convolution is not shift invariant. | Invariance vs Equivariance | ❓ #AICoffeeBreakQuiz #Shorts
AI Coffee Break with Letitia
50 How to increase the receptive field in CNNs? | #AICoffeeBreakQuiz #Shorts
How to increase the receptive field in CNNs? | #AICoffeeBreakQuiz #Shorts
AI Coffee Break with Letitia
51 What is tokenization and how does it work? Tokenizers explained.
What is tokenization and how does it work? Tokenizers explained.
AI Coffee Break with Letitia
52 Foundation Models | On the opportunities and risks of calling pre-trained models “Foundation Models”
Foundation Models | On the opportunities and risks of calling pre-trained models “Foundation Models”
AI Coffee Break with Letitia
53 How modern search engines work – Vector databases explained! | Weaviate open-source
How modern search engines work – Vector databases explained! | Weaviate open-source
AI Coffee Break with Letitia
54 Eyes tell all: How to tell that an AI generated a face?
Eyes tell all: How to tell that an AI generated a face?
AI Coffee Break with Letitia
55 Swin Transformer paper animated and explained
Swin Transformer paper animated and explained
AI Coffee Break with Letitia
56 Data BAD | What Will it Take to Fix Benchmarking for NLU?
Data BAD | What Will it Take to Fix Benchmarking for NLU?
AI Coffee Break with Letitia
57 SimVLM explained | What the paper doesn’t tell you
SimVLM explained | What the paper doesn’t tell you
AI Coffee Break with Letitia
58 Generalization – Interpolation – Extrapolation in Machine Learning: Which is it now!?
Generalization – Interpolation – Extrapolation in Machine Learning: Which is it now!?
AI Coffee Break with Letitia
59 Do Transformers process sequences of FIXED or of VARIABLE length? | #AICoffeeBreakQuiz
Do Transformers process sequences of FIXED or of VARIABLE length? | #AICoffeeBreakQuiz
AI Coffee Break with Letitia
60 The efficiency misnomer | Size does not matter | What does the number of parameters mean in a model?
The efficiency misnomer | Size does not matter | What does the number of parameters mean in a model?
AI Coffee Break with Letitia

Related Reads

Up next
Welcome to the Next Temperamental Era
Charles Schwab
Watch →