|
@@ -0,0 +1,48 @@
|
|
|
+import os
|
|
|
+
|
|
|
+from cvargparse import GPUParser, Arg
|
|
|
+from chainer_addons.links import PoolingType
|
|
|
+
|
|
|
+from finetune.parser import default_factory
|
|
|
+
|
|
|
+
|
|
|
+def parse_args():
|
|
|
+
|
|
|
+ parser = GPUParser(default_factory([
|
|
|
+
|
|
|
+ PoolingType.as_arg("pooling",
|
|
|
+ help_text="type of pre-classification pooling"),
|
|
|
+
|
|
|
+ # Arg("--triplet_loss", action="store_true",
|
|
|
+ # help="Use triplet loss"),
|
|
|
+
|
|
|
+
|
|
|
+ # Arg("--normalize", action="store_true",
|
|
|
+ # help="normalize features after cbil- or alpha-poolings"),
|
|
|
+
|
|
|
+ # Arg("--subset", "-s", type=int, nargs="*", default=[-1], help="select specific classes"),
|
|
|
+ # Arg("--no_sacred", action="store_true", help="do save outputs to sacred"),
|
|
|
+
|
|
|
+ # Arg("--use_parts", action="store_true",
|
|
|
+ # help="use parts, if present"),
|
|
|
+ # Arg("--simple_parts", action="store_true",
|
|
|
+ # help="use simple parts classifier, that only concatenates the features"),
|
|
|
+ # Arg("--no_global", action="store_true",
|
|
|
+ # help="use parts only, no global feature"),
|
|
|
+
|
|
|
+
|
|
|
+ # Arg("--parts_in_bb", action="store_true", help="take only uniform regions where the centers are inside the bounding box"),
|
|
|
+
|
|
|
+ # Arg("--rnd_select", action="store_true", help="hide random uniform regions of the image"),
|
|
|
+ # Arg("--recurrent", action="store_true", help="observe all parts in recurrent manner instead of the whole image at once"),
|
|
|
+
|
|
|
+ # ## AlphaPooling options
|
|
|
+ # Arg("--init_alpha", type=int, default=1, help="initial parameter for alpha pooling"),
|
|
|
+ # Arg("--kappa", type=float, default=1., help="Learning rate factor for alpha pooling"),
|
|
|
+ # Arg("--switch_epochs", type=int, default=0, help="train alpha pooling layer and the rest of the network alternating")
|
|
|
+ ])
|
|
|
+ )
|
|
|
+
|
|
|
+ parser.init_logger()
|
|
|
+
|
|
|
+ return parser.parse_args()
|