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