Complete the code to create a default box (anchor) size for SSD.
default_box_size = [1]The default box size is usually a fraction of the image size, such as 0.2 (20%).
Complete the code to calculate the number of default boxes per feature map location in SSD.
num_default_boxes = [1]SSD typically uses 6 default boxes per location to cover different aspect ratios.
Fix the error in the code to compute the scale of the default box for the k-th feature map layer in SSD.
scale_k = s_min + (s_max - s_min) * [1] / (m - 1)
The standard formula assumes k starts from 0: s_k = s_min + (s_max - s_min) * k / (m - 1), giving s_min for first layer and s_max for last.
Fill both blanks to create a dictionary comprehension that maps each default box to its aspect ratio and scale in SSD.
default_boxes = {i: ([1], [2]) for i in range(num_default_boxes)}Each default box uses the i-th aspect ratio and scale from their lists.
Fill all three blanks to filter predicted boxes with confidence above threshold and sort by confidence in SSD post-processing.
filtered_boxes = [(box, conf) for box, conf in zip(predicted_boxes, confidences) if conf [1] [2]] sorted_boxes = sorted(filtered_boxes, key=lambda x: x[[3]], reverse=True)
We keep (box, conf) pairs with confidence > 0.5 and sort by confidence at index 1.