Challenge - 5 Problems
Computer Vision Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the main goal of computer vision?
Computer vision helps machines understand images and videos. What is the main goal of teaching machines to see?
Attempts:
2 left
💡 Hint
Think about what seeing means for humans and how machines might do the same.
✗ Incorrect
Computer vision aims to help machines recognize and interpret visual data, similar to how humans see and understand the world.
❓ Predict Output
intermediate1:30remaining
Output of image pixel normalization code
What is the output of this Python code that normalizes pixel values of an image array?
Computer Vision
import numpy as np image = np.array([[0, 128], [255, 64]]) normalized = image / 255 print(normalized)
Attempts:
2 left
💡 Hint
Division by 255 converts pixel values to a 0-1 range as floats.
✗ Incorrect
Dividing the numpy array by 255 converts each pixel to a float between 0 and 1. The exact float values are decimals, not rounded.
❓ Model Choice
advanced2:00remaining
Best model type for object detection in images
You want to build a system that finds and labels objects in photos. Which model type is best suited for this task?
Attempts:
2 left
💡 Hint
Object detection needs spatial understanding of images.
✗ Incorrect
CNNs with region proposal networks like Faster R-CNN are designed to detect and classify objects within images effectively.
❓ Metrics
advanced1:30remaining
Choosing the right metric for image classification accuracy
You trained a model to classify images into categories. Which metric best shows how often the model predicts the correct category?
Attempts:
2 left
💡 Hint
Think about a metric that measures correct predictions over total predictions.
✗ Incorrect
Accuracy measures the proportion of correct predictions out of all predictions, ideal for classification tasks.
🔧 Debug
expert2:30remaining
Why does this image preprocessing code raise an error?
What error does this code raise and why?
import cv2
image = cv2.imread('photo.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
resized = cv2.resize(gray, (100, 100))
print(resized.shape)
Computer Vision
import cv2 image = cv2.imread('photo.jpg') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) resized = cv2.resize(gray, (100, 100)) print(resized.shape)
Attempts:
2 left
💡 Hint
Check if the image file was loaded correctly before processing.
✗ Incorrect
If 'photo.jpg' is missing or path is wrong, cv2.imread returns None. Passing None to cvtColor causes an error.