refactor: centralize transform constants in model.py
Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
7
sort.py
7
sort.py
@@ -5,7 +5,8 @@ from PIL import Image
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from model import CropLowerRightTriangle, GarageDoorCNN
|
||||
from model import (CropLowerRightTriangle, GarageDoorCNN, TRIANGLE_CROP_WIDTH,
|
||||
TRIANGLE_CROP_HEIGHT, RESIZE_DIM)
|
||||
|
||||
def sort_images():
|
||||
# --- Configuration ---
|
||||
@@ -13,10 +14,6 @@ def sort_images():
|
||||
SOURCE_DIR = 'data/hourly_photos/'
|
||||
DEST_DIR = 'data/sorted/open/'
|
||||
|
||||
# These must match the parameters used during training
|
||||
TRIANGLE_CROP_WIDTH = 556
|
||||
TRIANGLE_CROP_HEIGHT = 1184
|
||||
RESIZE_DIM = 64
|
||||
|
||||
# The classes are sorted alphabetically by ImageFolder: ['closed', 'open']
|
||||
CLASS_NAMES = ['closed', 'open']
|
||||
|
Reference in New Issue
Block a user