Adjust constants
This commit is contained in:
2
model.py
2
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
|
||||
|
4
move.py
4
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
|
||||
|
2
sort.py
2
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']
|
||||
|
Reference in New Issue
Block a user