          This method dynamically assigns the functions that will be used to run
          the core process of sorting, optionally grouping, renaming/moving into
          folders. After the functions are assigned they are executed.
          """
          __sort_method = self.arguments.sort_method.lower()
          __group_method = self.arguments.group_method.lower()
          final_process = self.arguments.final_process.lower()
  
          # Assign the methods that will be used for processing the files
          sort_method = self.set_process_method("sort", __sort_method)
          group_method = self.set_process_method("group", __group_method)
          final_method = self.set_process_method("final_process", final_process)
  
          img_list = getattr(self, sort_method)()
          if "group" in final_process:
              # Check if non-dissim sort method and group method are not the same
              if __sort_method.replace('-dissim', '') != __group_method:
 
</s> remove         if "group" in final_process:
 </s> add         if "group" in final_method: </s> remove             if __sort_method.replace('-dissim', '') != __group_method:
 </s> add             if group_method.replace('group_', '') not in sort_method: </s> remove         if self.arguments.output_dir.lower() == "__default":
            self.arguments.output_dir = self.arguments.input_dir
 </s> add         if self.args.output_dir.lower() == "--default":
            self.args.output_dir = self.args.input_dir </s> remove     @staticmethod
    def set_process_method(prefix, method):
        _method = re.sub(r'-', r'_', method)
        return prefix + "_" + _method

 </s> add  </s> remove         parser.add_argument('-i', '--input',
                            dest="input_dir",
                            default="input_dir",
                            help="Input directory of aligned faces.",
                            required=True)

        parser.add_argument('-o', '--output',
                            dest="output_dir",
                            default="__default",
                            help="Output directory for sorted aligned faces.")

        parser.add_argument('-f', '--final-process',
                            type=str,
                            choices=("folders", "rename"),
                            dest='final_process',
                            default="rename",
                            help="'folders': files are sorted using the "
                                 "-s/--sort-by method, then they are "
                                 "organized into folders using the "
                                 "-g/--group-by grouping method. "
                                 "'rename': files are sorted using the "
                                 "-s/--sort-by then they are renamed."
                                 "Default: rename")

        parser.add_argument('-t', '--ref_threshold',
                            type=float,
                            dest='min_threshold',
                            default=-1.0,
                            help="Float value. "
                                 "Minimum threshold to use for grouping "
                                 "comparison with 'face' and 'hist' methods. "
                                 "The lower the value the more discriminating "
                                 "the grouping is. "
                                 "For face 0.6 should be enough, with 0.5 "
                                 "being very discriminating. "
                                 "For face-cnn 7.2 should be enough, with 4 "
                                 "being very discriminating. "
                                 "For hist 0.3 should be enough, with 0.2 "
                                 "being very discriminating. "
                                 "Be careful setting a value that's too "
                                 "low in a directory with many images, as "
                                 "this could result in a lot of directories "
                                 " being created. "
                                 "Defaults: face 0.6, face-cnn 7.2, hist 0.3")

        parser.add_argument('-b', '--bins',
                            type=int,
                            dest='num_bins',
                            default=5,
                            help="Integer value. "
                                 "Number of folders that will be used to " 
                                 "group by blur. Folder 0 will be the least "
                                 "blurry, while the last folder will be the "
                                 "blurriest. If the number of images doesn't "
                                 "divide evenly into the number of bins, the "
                                 "remaining images get put in the last bin as "
                                 "they will be the blurriest by definition. "
                                 "Default value: 5")

        parser.add_argument('-k', '--keep',
                            action='store_true',
                            dest='keep_original',
                            default=False,
                            help="Keeps the original files in the input "
                                 "directory. Be careful when using this with "
                                 "rename grouping and no specified output "
                                 "directory as this would keep the original "
                                 "and renamed files in the same directory.")

        parser.add_argument('-l', '--log-changes',
                            action='store_true',
                            dest='log_changes',
                            default=False,
                            help="Logs file renaming changes if grouping by "
                                 "renaming, or it logs the file "
                                 "copying/movement if grouping by folders. "
                                 "If no log file is specified with "
                                 "'--log-file', then a 'sort_log.json' file "
                                 "will be created in the input directory.")

        parser.add_argument('-lf', '--log-file',
                            dest='log_file',
                            default='__default',
                            help="Specify a log file to use for saving the "
                                 "renaming or grouping information. "
                                 "Default: sort_log.json")

        parser.add_argument('-s', '--sort-by',
                            type=str,
                            choices=("blur", "face", "face-cnn",
                                     "face-cnn-dissim", "face-dissim", "face-yaw", "hist",
                                     "hist-dissim"),
                            dest='sort_method',
                            default="hist",
                            help="Sort by method. "
                                 "Choose how images are sorted. "
                                 "Default: hist")

        parser.add_argument('-g', '--group-by',
                            type=str,
                            choices=("blur", "face", "face-cnn", "hist"),
                            dest='group_method',
                            default="__default",
                            help="Group by method. "
                                 "When -fp/--final-processing by folders "
                                 "choose the how the images are grouped after "
                                 "sorting. "
                                 "Default: non-dissim version of "
                                 "-s/--sort-by method")
 </s> add         for option in self.argument_list:
            args = option['opts']
            kwargs = {key: option[key] for key in option.keys() if key != 'opts'}
            parser.add_argument(*args, **kwargs)
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
          This method dynamically assigns the functions that will be used to run
          the core process of sorting, optionally grouping, renaming/moving into
          folders. After the functions are assigned they are executed.
          """
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
        sort_method = self.args.sort_method.lower()
        group_method = self.args.group_method.lower()
        final_method = self.args.final_process.lower()
  
          img_list = getattr(self, sort_method)()
          if "group" in final_process:
              # Check if non-dissim sort method and group method are not the same
              if __sort_method.replace('-dissim', '') != __group_method:
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 GUI v0.2.1b (#352)

* Code refactor

* Console Added

* Add graphing with matplotlib

* Add GUI preview support

* Improve import handling.

* Add GUI integration for tools.py (Launch tools.py with the gui command)

* Reformat to conform to PEP8.

* Add Tooltips, 

* Make panels user adjustable

* Fix convert.py Sharpen default value 
tools/sort.py