From the course: Deep Learning and Computer Vision: Object Detection with PyTorch
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Basics of image processing - PyTorch Tutorial
From the course: Deep Learning and Computer Vision: Object Detection with PyTorch
Basics of image processing
- [Instructor] Welcome to this video on Image Processing. Image processing is the core foundation of working with visual data in computer vision. In this video, we will load, preprocess, and apply basing operations to images using PyTorch, all within the GitHub Codespaces environment. Let us start by loading an image through PyTorch. We can use the PIL library along with the Torchvision to load an image and display it. Actually, before feeding images into a model, we need to preprocess them. This involves resizing, converting the image to a tensor, and normalizing it to match the input distribution that a model expects. Let's move forward and apply these transformations using Torchvision transforms. Now, we have completed the steps to resize the image to 256-by-256 shape converted into a tensor for PyTorch to handle and normalized it using standard values from ImageNet-trained models. Let us explore some basic image operations such as flipping, rotating, and cropping. These…