summaryrefslogtreecommitdiff
path: root/options/dataset_options.py
diff options
context:
space:
mode:
Diffstat (limited to 'options/dataset_options.py')
-rw-r--r--options/dataset_options.py164
1 files changed, 164 insertions, 0 deletions
diff --git a/options/dataset_options.py b/options/dataset_options.py
new file mode 100644
index 0000000..2547d11
--- /dev/null
+++ b/options/dataset_options.py
@@ -0,0 +1,164 @@
+from .base_options import BaseOptions
+
+class DatasetOptions(BaseOptions):
+ def initialize(self):
+ # BaseOptions.initialize(self)
+ # type = int, float, str OR action='store_true'
+
+ # self.parser.add_argument(
+ # '--',
+ # type=int,
+ # default=0,
+ # help=''
+ # )
+
+ self.parser.add_argument(
+ '--in_dir',
+ type=str,
+ required=True,
+ help='input directory'
+ )
+
+ self.parser.add_argument(
+ '--out_dir',
+ type=str,
+ required=True,
+ help='output directory'
+ )
+
+ self.parser.add_argument(
+ '--split',
+ action='store_true',
+ help='construct train/test/split for this output, as A'
+ )
+
+ self.parser.add_argument(
+ '--ab',
+ action='store_true',
+ help='construct test split into directory A and B, where B = in_dir'
+ )
+
+ self.parser.add_argument(
+ '--mov',
+ action='store_true',
+ help='generate video from output directory'
+ )
+
+ self.parser.add_argument(
+ '--scp',
+ action='store_true',
+ help='scp this file somewhere'
+ )
+
+ self.parser.add_argument(
+ '--scp-to',
+ type=str,
+ default="jules@asdf.us:asdf/neural/",
+ help='scp destination'
+ )
+
+ ## IMAGE FILTERS
+
+ ### GRAYSCALE
+
+ self.parser.add_argument(
+ '--grayscale',
+ action='store_true',
+ help='convert image to grayscale first'
+ )
+
+ ### CLAHE
+
+ self.parser.add_argument(
+ '--clahe',
+ action='store_true',
+ help='apply clahe contrast correction'
+ )
+
+ self.parser.add_argument(
+ '--clip-limit',
+ default=2.0,
+ type=float,
+ help='clip limit for clahe algorithm (1.0 is subtle, 4.0 is aggressive)'
+ )
+
+ ### POSTERIZE
+
+ self.parser.add_argument(
+ '--posterize',
+ action='store_true',
+ help='posterize image'
+ )
+
+ self.parser.add_argument(
+ '--spatial-window',
+ default=16,
+ type=int,
+ help='spatial window for quantize'
+ )
+
+ self.parser.add_argument(
+ '--color-window',
+ default=64,
+ type=int,
+ help='color window for quantize'
+ )
+
+ ### BRIGHTNESS GRADIENT
+
+ self.parser.add_argument(
+ '--brightness-gradient',
+ action='store_true',
+ help='gradiate from first frame to last (done in Lab colorspace)'
+ )
+
+ self.parser.add_argument(
+ '--brightness-sigma',
+ default=64,
+ type=int,
+ help='width of brightness gradient along L axis'
+ )
+
+ ### BLUR
+
+ self.parser.add_argument(
+ '--blur',
+ default=0,
+ type=int,
+ help='blur image by N'
+ )
+
+ self.parser.add_argument(
+ '--blur-sigma',
+ default=0.0,
+ type=float,
+ help='blur sigma'
+ )
+
+ ### CANNY EDGE DETECTION
+
+ self.parser.add_argument(
+ '--canny',
+ action='store_true',
+ help='do canny edge detection on image'
+ )
+
+ self.parser.add_argument(
+ '--canny_lo',
+ default=100,
+ type=int,
+ help='canny low threshold'
+ )
+
+ self.parser.add_argument(
+ '--canny_high',
+ default=200,
+ type=int,
+ help='canny high threshold'
+ )
+
+ def parse(self):
+ if not self.initialized:
+ self.initialize()
+ self.opt = self.parser.parse_args()
+ return self.opt \ No newline at end of file