0
0
Drone Programmingprogramming~20 mins

Why computer vision enables intelligent flight in Drone Programming - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Vision Flight Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does computer vision help drones avoid obstacles?

Imagine a drone flying through a forest. How does computer vision help it avoid hitting trees?

ABy pre-programming a fixed flight path without sensing surroundings
BBy relying only on GPS signals to know where trees are located
CBy using sound waves to map the environment instead of cameras
DBy using cameras to see the environment and detect obstacles in real time
Attempts:
2 left
💡 Hint

Think about how a drone can 'see' obstacles before hitting them.

Model Choice
intermediate
2:00remaining
Which model type is best for real-time object detection in drone flight?

For a drone that needs to detect objects quickly while flying, which model is most suitable?

AA large transformer model designed for text processing
BA deep convolutional neural network optimized for speed like YOLO
CA simple linear regression model
DA clustering algorithm like K-means
Attempts:
2 left
💡 Hint

Consider models designed for fast image recognition.

Metrics
advanced
2:00remaining
Which metric best measures a drone's object detection accuracy?

When evaluating how well a drone detects obstacles, which metric gives the best balance between detecting true obstacles and avoiding false alarms?

AF1 Score
BRecall
CPrecision
DMean Squared Error
Attempts:
2 left
💡 Hint

Think about a metric that balances both precision and recall.

🔧 Debug
advanced
2:00remaining
Why does this drone vision code fail to detect objects?

Given this simplified code snippet for object detection, why does it fail to detect any objects?

Drone Programming
def detect_objects(image):
    # supposed to return list of detected objects
    objects = []
    for pixel in image:
        if pixel > 128:
            objects.append(pixel)
    return objects

image = [50, 60, 70, 200, 210]
detected = detect_objects(image)
print(detected)
AThe code treats each pixel as an object, but pixels alone don't represent objects; detection logic is too simple
BThe loop iterates over pixels but pixels are integers, not objects; condition is valid so it detects correctly
CThe function returns an empty list because the condition pixel > 128 is never true
DThe code raises a TypeError because image is not iterable
Attempts:
2 left
💡 Hint

Think about what pixels represent versus objects in images.

Predict Output
expert
2:00remaining
What is the output of this drone image classification code?

Consider this code that classifies drone images into 'clear' or 'obstacle' based on brightness. What is printed?

Drone Programming
def classify_image(brightness_values):
    avg_brightness = sum(brightness_values) / len(brightness_values)
    if avg_brightness > 100:
        return 'clear'
    else:
        return 'obstacle'

image1 = [120, 130, 110, 115]
image2 = [90, 80, 70, 60]
print(classify_image(image1))
print(classify_image(image2))
A
clear
clear
B
obstacle
clear
C
clear
obstacle
D
obstacle
obstacle
Attempts:
2 left
💡 Hint

Calculate the average brightness for each image and compare to 100.