Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-261

Image Size Distribution Stats

Problem

Summarize the distribution of image sizes in a dataset.

sizes is a list of [height, width] pairs. Return [min_h, max_h, min_w, max_w, mean_h, mean_w] with the means rounded to 4 decimal places.

Test cases

case 1
in: [[[100,200],[120,240],[80,160]]]
expected: [80,120,160,240,100,200]
case 2
in: [[[32,32]]]
expected: [32,32,32,32,32,32]
case 3
in: [[[50,100],[200,300],[150,200]]]
expected: [50,200,100,300,133.3333,200]
Starter codePython
def size_stats(sizes):
    # Your code here
    pass

3 test cases · run your code against them in the editor