From the course: Advanced AI: Transformers for Computer Vision
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
A transformed image
From the course: Advanced AI: Transformers for Computer Vision
A transformed image
- [Instructor] Unlike many other machine learning problems one of the best things about working with computer vision problems is that you can see changes to the data for yourself. So now that we've created these image, train, and validation pipelines, let's see whether an image looks any different when applying a train transformation or a validation transformation. So let's take a sample image. And this is an image of tulips, and let's go ahead and run the next cell and we should get an error. Now, the reason we get an error is because the PyTorch tensors has its tensors in a certain format. So it's the number of channels followed by the number of rows, and then the columns. While as a matplotlib, which is our plotting library, expects the images with first, the number of rows, then the number of columns, and finally the number of channels. So we can rejig the format of our PyTorch tensors by using the permute…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Getting set up2m 8s
-
(Locked)
Getting the data1m 12s
-
(Locked)
Using datasets6m 21s
-
(Locked)
Using a pretrained model without fine-tuning6m 17s
-
(Locked)
Defining a model1m 58s
-
(Locked)
Preprocessing images3m 39s
-
(Locked)
A transformed image3m 15s
-
(Locked)
Getting images in the correct format4m 21s
-
(Locked)
-
-