Commit 9aa6fcab authored by patil-suraj's avatar patil-suraj
Browse files

fix docs for center_crop

parent febaf863
...@@ -159,7 +159,10 @@ def parse_args(input_args=None): ...@@ -159,7 +159,10 @@ def parse_args(input_args=None):
"--center_crop", "--center_crop",
default=False, default=False,
action="store_true", action="store_true",
help="Whether to center crop images before resizing to resolution. If not set, images are randomly cropped.", help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument( parser.add_argument(
"--train_text_encoder", "--train_text_encoder",
......
...@@ -132,7 +132,13 @@ def parse_args(): ...@@ -132,7 +132,13 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop",
default=False,
action="store_true",
help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument("--train_text_encoder", action="store_true", help="Whether to train the text encoder") parser.add_argument("--train_text_encoder", action="store_true", help="Whether to train the text encoder")
parser.add_argument( parser.add_argument(
......
...@@ -210,7 +210,13 @@ def parse_args(input_args=None): ...@@ -210,7 +210,13 @@ def parse_args(input_args=None):
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop",
default=False,
action="store_true",
help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument( parser.add_argument(
"--train_batch_size", type=int, default=4, help="Batch size (per device) for the training dataloader." "--train_batch_size", type=int, default=4, help="Batch size (per device) for the training dataloader."
......
...@@ -139,7 +139,13 @@ def parse_args(input_args=None): ...@@ -139,7 +139,13 @@ def parse_args(input_args=None):
help="Placement Policy for Gemini. Valid when using colossalai as dist plan.", help="Placement Policy for Gemini. Valid when using colossalai as dist plan.",
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop",
default=False,
action="store_true",
help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument( parser.add_argument(
"--train_batch_size", type=int, default=4, help="Batch size (per device) for the training dataloader." "--train_batch_size", type=int, default=4, help="Batch size (per device) for the training dataloader."
......
...@@ -154,7 +154,13 @@ def parse_args(): ...@@ -154,7 +154,13 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop",
default=False,
action="store_true",
help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument("--train_text_encoder", action="store_true", help="Whether to train the text encoder") parser.add_argument("--train_text_encoder", action="store_true", help="Whether to train the text encoder")
parser.add_argument( parser.add_argument(
......
...@@ -130,7 +130,7 @@ def parse_args(): ...@@ -130,7 +130,7 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution."
) )
parser.add_argument( parser.add_argument(
"--train_batch_size", type=int, default=16, help="Batch size (per device) for the training dataloader." "--train_batch_size", type=int, default=16, help="Batch size (per device) for the training dataloader."
......
...@@ -138,7 +138,13 @@ def parse_args(input_args=None): ...@@ -138,7 +138,13 @@ def parse_args(input_args=None):
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop",
default=False,
action="store_true",
help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument("--train_text_encoder", action="store_true", help="Whether to train the text encoder") parser.add_argument("--train_text_encoder", action="store_true", help="Whether to train the text encoder")
parser.add_argument( parser.add_argument(
......
...@@ -134,8 +134,12 @@ def parse_args(): ...@@ -134,8 +134,12 @@ def parse_args():
) )
parser.add_argument( parser.add_argument(
"--center_crop", "--center_crop",
default=False,
action="store_true", action="store_true",
help="Whether to center crop images before resizing to resolution (if not set, random crop will be used)", help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument( parser.add_argument(
"--random_flip", "--random_flip",
......
...@@ -116,8 +116,12 @@ def parse_args(): ...@@ -116,8 +116,12 @@ def parse_args():
) )
parser.add_argument( parser.add_argument(
"--center_crop", "--center_crop",
default=False,
action="store_true", action="store_true",
help="Whether to center crop images before resizing to resolution (if not set, random crop will be used)", help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument( parser.add_argument(
"--random_flip", "--random_flip",
......
...@@ -181,8 +181,12 @@ def parse_args(): ...@@ -181,8 +181,12 @@ def parse_args():
) )
parser.add_argument( parser.add_argument(
"--center_crop", "--center_crop",
default=False,
action="store_true", action="store_true",
help="Whether to center crop images before resizing to resolution (if not set, random crop will be used)", help=(
"Whether to center crop the input images to the resolution. If not set, the images will be randomly"
" cropped. The images will be resized to the resolution first before cropping."
),
) )
parser.add_argument( parser.add_argument(
"--random_flip", "--random_flip",
......
...@@ -147,7 +147,7 @@ def parse_args(): ...@@ -147,7 +147,7 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution."
) )
parser.add_argument( parser.add_argument(
"--train_batch_size", type=int, default=16, help="Batch size (per device) for the training dataloader." "--train_batch_size", type=int, default=16, help="Batch size (per device) for the training dataloader."
......
...@@ -109,7 +109,7 @@ def parse_args(): ...@@ -109,7 +109,7 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution" "--center_crop", action="store_true", help="Whether to center crop images before resizing to resolution."
) )
parser.add_argument( parser.add_argument(
"--train_batch_size", type=int, default=16, help="Batch size (per device) for the training dataloader." "--train_batch_size", type=int, default=16, help="Batch size (per device) for the training dataloader."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment