working server

This commit is contained in:
2026-04-28 23:33:00 +02:00
parent a271c738d7
commit 1e7d9686d4
9 changed files with 90 additions and 6 deletions
+22
View File
@@ -0,0 +1,22 @@
from PIL import Image
import os
folder = "data/train"
widths = []
heights = []
for root, _, files in os.walk(folder):
for file in files:
if file.endswith((".jpg", ".png", ".jpeg")):
path = os.path.join(root, file)
img = Image.open(path)
w, h = img.size
widths.append(w)
heights.append(h)
avg_w = sum(widths) / len(widths)
avg_h = sum(heights) / len(heights)
print("Average width:", avg_w)
print("Average height:", avg_h)