diff --git a/model.py b/model.py index e35d5a7..191082a 100644 --- a/model.py +++ b/model.py @@ -5,7 +5,7 @@ from PIL import Image, ImageDraw # 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) +RESIZE_DIM = 256 # Resize cropped image to this dimension (square) # Custom transform to crop a triangle from the lower right corner diff --git a/move.py b/move.py index 2b7080e..9ecba6d 100644 --- a/move.py +++ b/move.py @@ -10,8 +10,8 @@ def main(): them into data/open/ or data/closed/ based on the 'choice' field. """ data_dir = 'data' - open_dir = os.path.join(data_dir, 'open') - closed_dir = os.path.join(data_dir, 'closed') + open_dir = os.path.join(data_dir, 'labelled/open') + closed_dir = os.path.join(data_dir, 'labelled/closed') # This is an assumption based on the path found in the 'd' parameter of the image URL. # e.g., ...?d=.../data/hourly_photos/filename.jpg diff --git a/sort.py b/sort.py index 3bc5097..6d0c5d2 100644 --- a/sort.py +++ b/sort.py @@ -14,7 +14,7 @@ def sort_images(): MODEL_PATH = 'garage_door_cnn.pth' SOURCE_DIR = 'data/hourly_photos/' DEST_DIR = 'data/sorted/open/' - CONFIDENCE_THRESHOLD = 0.90 # Only copy if confidence is over this value + CONFIDENCE_THRESHOLD = 0.80 # Only copy if confidence is over this value # The classes are sorted alphabetically by ImageFolder: ['closed', 'open']