# assign configuration config = configs[args['config']] # =============================================================================== # action: clean # =============================================================================== # # clean all automatically generated files. # if (args['action'] == 'clean'): print "\n=== deleting generated files from directory {0} ===\n".format(args['dir']) MatchboxLib.clearDirectory(args['dir']) if len(args['featdir']) > 0: MatchboxLib.clearDirectory(args['featdir']) exit() # =============================================================================== # action: extract # =============================================================================== # # extract all relevant features for the duplicate detection task # if (args['action'] == 'extract') or (args['action'] == 'all'): print "\n=== extracting features from directory {0} ===\n".format(args['dir']) MatchboxLib.extractFeatures(config, args['dir'], args['sdk'],args['threads'], args['clahe'], args['featdir'], "SIFTComparison",args['downsample'])
if len(args['featdir']) > 0: feature_directory = args['featdir'] # =============================================================================== # action: clean # =============================================================================== # # clean all automatically generated files. # if (args['action'] == 'clean'): print "\n=== deleting generated files from directory {0} ===\n".format( feature_directory) MatchboxLib.clearDirectory(feature_directory, args['verbose']) # =============================================================================== # action: extract # =============================================================================== # # extract all relevant features for the duplicate detection task # if (args['action'] == 'extract') or (args['action'] == 'all'): print "\n=== extracting features from directory {0} ===\n".format( collection_directory) MatchboxLib.extractFeatures(config, collection_directory, args['sdk'], args['threads'], args['clahe'], feature_directory, "SIFTComparison",
config = configs[args['config']] if (args['binaryonly']): args['binary'] = True # =============================================================================== # action: clean # =============================================================================== # # clean all automatically generated files. # if (args['action'] == 'clean'): print "\n=== deleting generated files from directory {0} ===\n".format(args['dir']) MatchboxLib.clearDirectory(args['dir']) if len(args['featdir']) > 0: MatchboxLib.clearDirectory(args['featdir'], args['verbose']) exit() # =============================================================================== # action: extract # =============================================================================== # # extract all relevant features for the duplicate detection task # if (args['action'] == 'extract') or (args['action'] == 'all'): print "\n=== extracting features from directory {0} ===\n".format(args['dir']) MatchboxLib.extractFeatures(config, args['dir'], args['sdk'], args['threads'], args['clahe'], args['featdir'], "SIFTComparison", args['downsample'], args['verbose'], args['binary'], args['binaryonly'])
feature_directory = collection_directory if len(args['featdir']) > 0: feature_directory = args['featdir'] # =============================================================================== # action: clean # =============================================================================== # # clean all automatically generated files. # if (args['action'] == 'clean'): print "\n=== deleting generated files from directory {0} ===\n".format(feature_directory) MatchboxLib.clearDirectory(feature_directory, args['verbose']) # =============================================================================== # action: extract # =============================================================================== # # extract all relevant features for the duplicate detection task # if (args['action'] == 'extract') or (args['action'] == 'all'): print "\n=== extracting features from directory {0} ===\n".format(collection_directory) MatchboxLib.extractFeatures(config, collection_directory, args['sdk'], args['threads'],