Transformers for Vision Tasks

The TWIML AI Podcast with Sam Charrington · Intermediate ·🧠 Large Language Models ·4y ago

Key Takeaways

The video discusses Transformers for Vision Tasks, covering their applications and implementations in computer vision, specifically highlighting the use of transformer models for image and video processing.

Full Transcript

i think your next point is maybe closer to home for machine learning and computer vision and it's uh it's a big one that has a lot of people talking uh and it involves uh transformers not the the robots of course but the transformer networks that we all know and love uh what are you seeing there yeah uh i mean this has definitely been a highlight for 2021 computer vision we have seen transformers finally coming into computer vision transformers is actually not uh like in natural language processing nlp uh researchers that have been working with transformers for a few years now um but they have finally made it to um into computer vision um and it has been an extra exciting times because we now sort of are seeing this line of work where we are slowly replacing cnns uh with transformers and i do for you know various recognition tasks um and in particular we've also seen uh what is exciting about transformers and computer vision is their impact when it comes to working with extremely large-scale data um so it's still quite unknown to us whether transformers work well in the low data regime this is something that is the answer is not out yet but we definitely know that for large data we're talking hundreds of millions of images and more transformers are quite impactful and is the idea that transformers can create more robust representations based on lots of data than a convolutional networks yeah so i think that the um so again this is uh we don't we don't quite know you know and like theory behind these things is kind of always unclear but uh so the the main uh sort of highlight is that so cnns which is the predominance or the tools that we used before uh to represent um our visual inputs uh had were had inductive biases and this comes from exactly the structure of convolutions and the image grid now transformers take a completely different approach they actually treat images like a sequence of uh tokens so this can be patches of images so like like a small neighborhood of the image um and they uh and the only inductive bible that comes into transformers is through this um this serialization as you would say of the image and the pose embedding that comes in when we are processing these inputs but other than that everything all operations are sort of global with an attentions uh being cast into these representations so there is no other inductive biases in these networks whatsoever so that means that they have the potential to be a lot more powerful because you're constraining them less uh but in order to achieve that you need more data so um so it is a much more it is much closer to to to actually having a true function function approximators like we you know what we say like mlps are great function approximators but um with cnns that was a little bit taken away because of that particular structure and that transformers are bringing this back to life which is an exciting exciting and has proven also to work in for images and how would you characterize where we are are we in the you know just kind of demonstrating that it's possible to make it work stage or have transformers in computer vision demonstrated you know state-of-the-art results or um you know either better results on um you know known tasks or tasks that we were doing pretty well on or you know allowing us to uh perform tasks that we weren't able to perform well with cnns i love that question and i hope that my answer is not going to anger people but um you know i it's a great it's a great question and i hope and i wish we asked it actually more often um so you know before i answer that i'm just going to go a little bit to the nlp world and say why i think transformers are have had and tremendous success um i think it's partly due to two reasons first is that you know in nlp uh you can actually get a lot of data um and that's what works like bird have shown where you you know kind of crawl the web and you get all all sources of text data there's a lot of that there's a lot of that out there yeah and now you show how and it can be anything you know any any text whatsoever whatever content and you feed that to the beast called transformers and it builds a representation so that's fantastic and a first great milestone and the second one is that they have all these fantastic tasks diverse tasks like question answering um text generation uh or text fill like they their tasks are endless and they are very different from each other and they have shown that even in those very diverse tests having a global representation coming from you know learning through self-supervised learning with a lot of data is helps all these tasks significantly now envision um in computer vision things are not quite like that folks that follow computer vision probably have a sense for where this is going exactly correct so you know we are kind of in a weird awkward phase where we kind of want us to sort of replicate that line of work from nlp we're very much inspired and and looking up to them but we don't have exactly first of all we don't have a big data set our biggest data set is something like imagenet and i'm talking about public data set here uh something like imagenet which is one million images and imaging has been a fantastic data to serve the community for 10 years but the problem with imagenet is that first of all it's been around for now quite a while it's a frozen dataset so nothing changes so as we develop new ideas on a dataset that is constant and kind of frozen time we tend to sometimes our idea is overfitting on that data set and these um a lot of a lot of the gains that we see in images don't actually transfer and that makes sense you know we've been we've been dealing with this data for a while now um i would actually say that maybe we've trained more models on pixels on imagenet but you know i'm not going to get there um and then the other question of course is what are our downstream tasks that we're showing that performance in and this is another sort of sore point for for us computer vision people where we're also seeing a little bit of uh of a you know kind of sad state where we know we have our object detection and maybe our our segmentation but they're all essentially classification tasks we don't have the richness in output and in test that nlp has all of our like our pre-training is classification our downstream task or classification so it's really hard to tell if we're actually making progress or not so this is something i think that it is for the community to think about uh i guess a couple of reactions to that one is maybe the the second one um informs the first but you know there's classification but then um is the idea that all of the the complex problems that we think of like uh you know bounding boxes and all these other things that kind of just boil down to classification it so at the end of the day it's all classification even if it you know looks uh more complex correct so there isn't that's that's absolutely true and um i mean our most complex task i would say maybe is objection because it involves sort of maybe predicting intermediate boxes and then on top of that you want to predict classify the object type or maybe predict other 2d properties by classifying the pixels within those boxes but even that is cast as a class and what about things like uh like vqa visual question answering is that more do you think of that more of an nlp task than a vision task or the only thing i have to say there is that um and this was also a point made by you know clip a gray paper that came out last year is that even there the data sets are very small and we really can't tell how effective these methods are because we really don't have a good sense of these tasks um and in you know i mentioned clip which is a prime example that showed that all the gains for transformers came when they downloaded that huge data set of theirs like i think it was 250 million if image text pairs we don't exactly know the source where the data set is from but um we know it's from the web and this is how and they were only able to show that amazing property of capturing jointly images and text when training on such a huge data set um so this is sort of the what we aspire to to get to um having training on such large images uh and of course that comes with a lot of other questions about you know are we doing our due diligence and making sure that this is a good you know data set in terms of ethics in terms of like content like are we making sure that it's uh unbiased data and so forth uh which brings of course new challenges but i feel that for we need to move to that scale or otherwise we're going to kind of be stuck in our little imagenet sort of standard regime which is not a good state to be in yeah yeah i think the the data set side of that was my second question and that was we you know we hear about and see new image data on the one hand we hear about and see new image data sets you know all the time they tend to be specialized and fairly small you know on the other side just like nlp had access to the web uh vision has access to the web there are tons of uh vision or there are tons of images on the web you know do you think that the in order to get beyond kind of image net and classification you know we need to define like unsupervised problems or semi-supervised problems uh beyond just kind of simple label you know supervised learning types of problems is that the big um you know one of the big barriers yeah i think that's definitely one big barrier um you know the the problem with vision and actually with all datasets is that um collecting a large-scale dataset by crawling the web and just releasing it is almost impossible and maybe for a good reason as in you know you have to make sure that you have consent from the creators of the images to actually release them you also want to make sure that uh you know we are now entering the stage with in ai where it's no longer opportunistic we need to be very cognizant of the data so we're using the models we're putting out there how they can have like maybe they can have potential harm and so these are all aspects of our work and we're responsible for it it's not like someone else is responsible so there is actually releasing and collecting and releasing a large data set is is a huge responsibility um that comes in a lot of work and that might be a roadblock to seeing larger data that's coming out i don't have a solution to that problem but i feel that you know if there is motivation to go there i think we'll make that happen and i think that we also need and this is maybe my own personal opinion we need to rethink the problem that we're solving these pretext tasks that you know are commonly referred to as sort of the the task that you try to solve either in supervised learning uh for example in bert it was filling in the like you know masking words and filling them in we've seen recently uh work from actually you know my lab and coming in colleagues where they do the same exact the same thing but they're trying to they mask out patches of the image and they try to fill them in um these are all this is a great task but it is still still sort of you know constrained to be on just in predicting pixels we need to go we need to enrich in are these pretext tasks if we want to maybe solve for richer downstream tasks moving beyond classification i don't think that having a simple pre-text test will solve complicated tasks down the line like you know maybe 3d reasoning or 3d understanding which is a field that i've been working on i do think that there's limitation in transferring that so we need to account for that and so but i think it's a good first step i think that we just need to broaden our horizons a little bit and what problems we're solving how we're solving and how we're thinking about building representations either through self-supervised learning or through supervised learning with labels but move out of this you know image to single object label let's say

Original Description

This is a video about Transformers for Vision Tasks 00:00 Transformers for Vision Tasks
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from The TWIML AI Podcast with Sam Charrington · The TWIML AI Podcast with Sam Charrington · 0 of 60

← Previous Next →
1 Engineering Practical Machine Learning Systems with Xavier Amatriain - #3
Engineering Practical Machine Learning Systems with Xavier Amatriain - #3
The TWIML AI Podcast with Sam Charrington
2 How to Build Confidence as an ML Developer with Siraj Raval - #2
How to Build Confidence as an ML Developer with Siraj Raval - #2
The TWIML AI Podcast with Sam Charrington
3 Open Source Data Science Masters, Hybrid AI, Algorithmic Ethics & More with Clare Corthell - #1
Open Source Data Science Masters, Hybrid AI, Algorithmic Ethics & More with Clare Corthell - #1
The TWIML AI Podcast with Sam Charrington
4 Interactive AI, Plus Improving ML Education with Charles Isbell - #4
Interactive AI, Plus Improving ML Education with Charles Isbell - #4
The TWIML AI Podcast with Sam Charrington
5 Machine Learning for the Stars & Productizing AI with Joshua Bloom - #5
Machine Learning for the Stars & Productizing AI with Joshua Bloom - #5
The TWIML AI Podcast with Sam Charrington
6 Generating Labeled Training Data for Your ML/AI Models with Angie Hugeback - #6
Generating Labeled Training Data for Your ML/AI Models with Angie Hugeback - #6
The TWIML AI Podcast with Sam Charrington
7 Explaining the Predictions of Machine Learning Models with Carlos Guestrin - #7
Explaining the Predictions of Machine Learning Models with Carlos Guestrin - #7
The TWIML AI Podcast with Sam Charrington
8 Deep Learning: Modular in Theory, Inflexible in Practice with Diogo Almeida - #8
Deep Learning: Modular in Theory, Inflexible in Practice with Diogo Almeida - #8
The TWIML AI Podcast with Sam Charrington
9 Emotional AI: Teaching Computers Empathy with Pascale Fung - #9
Emotional AI: Teaching Computers Empathy with Pascale Fung - #9
The TWIML AI Podcast with Sam Charrington
10 Statistics vs Semantics for Natural Language Processing with Francisco Webber - #10
Statistics vs Semantics for Natural Language Processing with Francisco Webber - #10
The TWIML AI Podcast with Sam Charrington
11 Building AI Products with Hilary Mason - #11
Building AI Products with Hilary Mason - #11
The TWIML AI Podcast with Sam Charrington
12 Reprogramming the Human Genome with AI, w/ Brendan Frey - #12
Reprogramming the Human Genome with AI, w/ Brendan Frey - #12
The TWIML AI Podcast with Sam Charrington
13 Understanding Deep Neural Networks with Dr. James McCaffery - #13
Understanding Deep Neural Networks with Dr. James McCaffery - #13
The TWIML AI Podcast with Sam Charrington
14 Scaling Deep Learning: Systems Challenges & More with Shubho Sengupta - #14
Scaling Deep Learning: Systems Challenges & More with Shubho Sengupta - #14
The TWIML AI Podcast with Sam Charrington
15 Domain Knowledge in Machine Learning Models for Sustainability with Stefano Ermon - #15
Domain Knowledge in Machine Learning Models for Sustainability with Stefano Ermon - #15
The TWIML AI Podcast with Sam Charrington
16 Machine Learning in Cybersecurity with Evan Wright - #16
Machine Learning in Cybersecurity with Evan Wright - #16
The TWIML AI Podcast with Sam Charrington
17 Interactive Machine Learning Systems with Alekh Agarwal - #17
Interactive Machine Learning Systems with Alekh Agarwal - #17
The TWIML AI Podcast with Sam Charrington
18 Location-Based Intelligence for Smarter Marketing with Klustera - #18
Location-Based Intelligence for Smarter Marketing with Klustera - #18
The TWIML AI Podcast with Sam Charrington
19 AI-Powered Customer Support with HelloVera - #18
AI-Powered Customer Support with HelloVera - #18
The TWIML AI Podcast with Sam Charrington
20 Using AI to Simplify the Programming of Robots with Cambrian Intelligence - #18
Using AI to Simplify the Programming of Robots with Cambrian Intelligence - #18
The TWIML AI Podcast with Sam Charrington
21 Increasing Efficiency of Healthcare Insurance Billing with NLP, w/ Behold.ai - #18
Increasing Efficiency of Healthcare Insurance Billing with NLP, w/ Behold.ai - #18
The TWIML AI Podcast with Sam Charrington
22 Creating a Worldwide Financial Knowledge Graph with AlphaVertex - #18
Creating a Worldwide Financial Knowledge Graph with AlphaVertex - #18
The TWIML AI Podcast with Sam Charrington
23 From Particle Physics to Audio AI with Scott Stephenson - #19
From Particle Physics to Audio AI with Scott Stephenson - #19
The TWIML AI Podcast with Sam Charrington
24 Selling AI to the Enterprise with Kathryn Hume - #20
Selling AI to the Enterprise with Kathryn Hume - #20
The TWIML AI Podcast with Sam Charrington
25 Engineering the Future of AI with Ruchir Puri - #21
Engineering the Future of AI with Ruchir Puri - #21
The TWIML AI Podcast with Sam Charrington
26 Deep Neural Nets for Visual Recognition with Matt Zeiler - #22
Deep Neural Nets for Visual Recognition with Matt Zeiler - #22
The TWIML AI Podcast with Sam Charrington
27 Introducing Psycholinguistics into AI with Dominique Simmons- #23
Introducing Psycholinguistics into AI with Dominique Simmons- #23
The TWIML AI Podcast with Sam Charrington
28 Reinforcement Learning: The Next Frontier of Gaming with Danny Lange - #24
Reinforcement Learning: The Next Frontier of Gaming with Danny Lange - #24
The TWIML AI Podcast with Sam Charrington
29 Offensive vs Defensive Data Science with Deep Varma - #25
Offensive vs Defensive Data Science with Deep Varma - #25
The TWIML AI Podcast with Sam Charrington
30 Global AI Trends with Ben Lorica - #26
Global AI Trends with Ben Lorica - #26
The TWIML AI Podcast with Sam Charrington
31 Intelligent Autonomous Robots with Ilia Baranov - #27
Intelligent Autonomous Robots with Ilia Baranov - #27
The TWIML AI Podcast with Sam Charrington
32 Reinforcement Learning Deep Dive with Pieter Abbeel  - #28
Reinforcement Learning Deep Dive with Pieter Abbeel - #28
The TWIML AI Podcast with Sam Charrington
33 Robotic Perception and Control with Chelsea Finn  - #29
Robotic Perception and Control with Chelsea Finn - #29
The TWIML AI Podcast with Sam Charrington
34 Natural Language Understanding for Amazon Alexa with Zornitsa Kozareva - #30
Natural Language Understanding for Amazon Alexa with Zornitsa Kozareva - #30
The TWIML AI Podcast with Sam Charrington
35 The Power of Probabilistic Programming with Ben Vigoda - #33
The Power of Probabilistic Programming with Ben Vigoda - #33
The TWIML AI Podcast with Sam Charrington
36 Intel Nervana Update + Productizing AI Research with Naveen Rao and Hanlin Tang - #31
Intel Nervana Update + Productizing AI Research with Naveen Rao and Hanlin Tang - #31
The TWIML AI Podcast with Sam Charrington
37 Video Object Detection at Scale with Reza Zadeh - #34
Video Object Detection at Scale with Reza Zadeh - #34
The TWIML AI Podcast with Sam Charrington
38 Enhancing Customer Experiences with Emotional AI, w/ Rana el Kaliouby - #35
Enhancing Customer Experiences with Emotional AI, w/ Rana el Kaliouby - #35
The TWIML AI Podcast with Sam Charrington
39 Expressive AI-Generated Music With Google's Performance RNN with Doug Eck  - #32
Expressive AI-Generated Music With Google's Performance RNN with Doug Eck - #32
The TWIML AI Podcast with Sam Charrington
40 Smart Buildings & IoT with Yodit Stanton - #36
Smart Buildings & IoT with Yodit Stanton - #36
The TWIML AI Podcast with Sam Charrington
41 Deep Robotic Learning with Sergey Levine - #37
Deep Robotic Learning with Sergey Levine - #37
The TWIML AI Podcast with Sam Charrington
42 Deep Learning for Warehouse Operations with Calvin Seward - #38
Deep Learning for Warehouse Operations with Calvin Seward - #38
The TWIML AI Podcast with Sam Charrington
43 Cognitive Biases in Data Science with Drew Conway - #39
Cognitive Biases in Data Science with Drew Conway - #39
The TWIML AI Podcast with Sam Charrington
44 Data Pipelines at Zymergen with Airflow, w/ Erin Shellman - #41
Data Pipelines at Zymergen with Airflow, w/ Erin Shellman - #41
The TWIML AI Podcast with Sam Charrington
45 Web Scale Engineering for Machine Learning with Sharath Rao - #40
Web Scale Engineering for Machine Learning with Sharath Rao - #40
The TWIML AI Podcast with Sam Charrington
46 Marrying Physics-Based and Data-Driven ML Models with Josh Bloom - #42
Marrying Physics-Based and Data-Driven ML Models with Josh Bloom - #42
The TWIML AI Podcast with Sam Charrington
47 Machine Teaching for Better Machine Learning with Mark Hammond - #43
Machine Teaching for Better Machine Learning with Mark Hammond - #43
The TWIML AI Podcast with Sam Charrington
48 LSTMs, Plus a Deep Learning History Lesson with Jürgen Schmidhuber  - #44
LSTMs, Plus a Deep Learning History Lesson with Jürgen Schmidhuber - #44
The TWIML AI Podcast with Sam Charrington
49 Learning From Simulated & Unsupervised Images through Adversarial Training - TWiML Online Meetup
Learning From Simulated & Unsupervised Images through Adversarial Training - TWiML Online Meetup
The TWIML AI Podcast with Sam Charrington
50 Jennifer Prendki Interview - Agile Machine Learning - TWiML Talk #46
Jennifer Prendki Interview - Agile Machine Learning - TWiML Talk #46
The TWIML AI Podcast with Sam Charrington
51 Evolutionary Algorithms in Machine Learning with Risto Miikkulainen - #47
Evolutionary Algorithms in Machine Learning with Risto Miikkulainen - #47
The TWIML AI Podcast with Sam Charrington
52 Learning Long-Term Dependencies with Gradient Descent is Difficult - TWiML Online  Meetup
Learning Long-Term Dependencies with Gradient Descent is Difficult - TWiML Online Meetup
The TWIML AI Podcast with Sam Charrington
53 Word2Vec & Friends with Bruno Gonçalves -#48
Word2Vec & Friends with Bruno Gonçalves -#48
The TWIML AI Podcast with Sam Charrington
54 Symbolic and Subsymbolic Natural Language Processing with Jonathan Mugan  - #49
Symbolic and Subsymbolic Natural Language Processing with Jonathan Mugan - #49
The TWIML AI Podcast with Sam Charrington
55 Bayesian Optimization for Hyperparameter Tuning with Scott Clark - #50
Bayesian Optimization for Hyperparameter Tuning with Scott Clark - #50
The TWIML AI Podcast with Sam Charrington
56 Intel Nervana DevCloud with Naveen Rao & Scott Apeland - #51
Intel Nervana DevCloud with Naveen Rao & Scott Apeland - #51
The TWIML AI Podcast with Sam Charrington
57 AI-Powered Conversational Interfaces with Paul Tepper - #52
AI-Powered Conversational Interfaces with Paul Tepper - #52
The TWIML AI Podcast with Sam Charrington
58 Topological Data Analysis with Gunnar Carlsson - #53
Topological Data Analysis with Gunnar Carlsson - #53
The TWIML AI Podcast with Sam Charrington
59 ML Use Cases at Think Big Analytics with Mo Patel & Laura Frølich - #54
ML Use Cases at Think Big Analytics with Mo Patel & Laura Frølich - #54
The TWIML AI Podcast with Sam Charrington
60 Ray:A Distributed Computing Platform for Reinforcement Learning with Ion Stoica -#55
Ray:A Distributed Computing Platform for Reinforcement Learning with Ion Stoica -#55
The TWIML AI Podcast with Sam Charrington

This video teaches how to apply Transformers to vision tasks, including image and video processing, and discusses the benefits and challenges of using transformer models in computer vision. By the end of this video, viewers will understand how to implement attention mechanisms and transformer models in their own computer vision projects.

Key Takeaways
  1. Choose a transformer model for vision tasks
  2. Preprocess images or videos for input into the model
  3. Implement attention mechanisms in the model
  4. Train and fine-tune the model
  5. Evaluate the model's performance on vision tasks
💡 Transformer models can be effectively applied to vision tasks, including image and video processing, by leveraging attention mechanisms and pre-trained models.

Related Reads

📰
CogniConsole: Externalizing Inference-Time Control as a Formal Abstraction for Reliable LLM Interactions
Learn how to improve LLM reliability by externalizing inference-time control using CogniConsole, a formal abstraction for reliable interactions
ArXiv cs.AI
📰
A Formalization of the Mean-Field Derivation of the Vlasov Equation: AI-Assisted Lean Formalization as a Strategy Game
Learn how to formalize mathematical proofs using AI-assisted Lean formalization, a strategy game that turns LaTeX documents into Lean proof assistant code
ArXiv cs.AI
📰
Neuro-Agentic Control: A Deep Learning-based LLM-Powered Agentic AI Framework for Controlling Security Controls
Learn how to control security controls using a deep learning-based LLM-powered agentic AI framework, enhancing industrial IoT security
ArXiv cs.AI
📰
MedRealMM: A Real-World Multimodal Benchmark for Chinese Online Medical Consultation
Learn about MedRealMM, a real-world multimodal benchmark for Chinese online medical consultation, and how it improves evaluation of clinical responses
ArXiv cs.AI
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →