Recall & Review
beginner
What is OpenCV used for in Python?
OpenCV is a library used for computer vision tasks like image and video processing, object detection, and feature extraction. It helps computers understand visual data.
Click to reveal answer
beginner
What does PIL stand for and what is its main purpose?
PIL stands for Python Imaging Library. It is mainly used for opening, manipulating, and saving many different image file formats easily.
Click to reveal answer
intermediate
What is torchvision and how does it relate to PyTorch?
Torchvision is a package that works with PyTorch. It provides tools to load popular image datasets, pre-trained models, and image transformations to help build computer vision models.
Click to reveal answer
intermediate
How does OpenCV differ from PIL in handling images?
OpenCV focuses on advanced computer vision tasks and works with images as arrays for fast processing. PIL is simpler and mainly used for basic image editing and format conversions.
Click to reveal answer
intermediate
Name one common use case for torchvision in machine learning projects.
A common use case is loading and transforming datasets like CIFAR-10 or ImageNet, and using pre-trained models like ResNet to speed up training and improve accuracy.
Click to reveal answer
Which library is best suited for real-time video processing in Python?
✗ Incorrect
OpenCV is designed for real-time image and video processing, making it ideal for video tasks.
What is a primary feature of PIL?
✗ Incorrect
PIL is mainly used for simple image editing and converting between image formats.
Which package provides pre-trained models for image classification?
✗ Incorrect
Torchvision offers pre-trained models like ResNet and VGG for image classification.
How does OpenCV represent images internally?
✗ Incorrect
OpenCV uses NumPy arrays to represent images for fast numerical operations.
Which library would you use to apply transformations like random cropping or flipping to images in a PyTorch project?
✗ Incorrect
Torchvision.transforms provides easy-to-use image transformation functions for PyTorch.
Explain the roles of OpenCV, PIL, and torchvision in the Python computer vision ecosystem.
Think about what each library is mainly used for and how they complement each other.
You got /3 concepts.
Describe how you would choose between OpenCV, PIL, and torchvision for a new computer vision project.
Consider the project needs: speed, complexity, or deep learning integration.
You got /3 concepts.