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:
2025-07-31 16:52:23 -06:00
parent 078c893770
commit c1d11ea3f7
3 changed files with 11 additions and 10 deletions

View File

@@ -1,6 +1,13 @@
import torch.nn as nn
from PIL import Image, ImageDraw
# --- Model and Transform Constants ---
# For the custom crop transform. User can adjust these.
TRIANGLE_CROP_WIDTH = 556
TRIANGLE_CROP_HEIGHT = 1184
RESIZE_DIM = 64 # Resize cropped image to this dimension (square)
# Custom transform to crop a triangle from the lower right corner
class CropLowerRightTriangle(object):
"""