Skip to content

Instantly share code, notes, and snippets.

@redraw
Last active November 4, 2019 03:24
Show Gist options
  • Select an option

  • Save redraw/6232095eb39871e6ef3a26ba350f4dbe to your computer and use it in GitHub Desktop.

Select an option

Save redraw/6232095eb39871e6ef3a26ba350f4dbe to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import os
from gooey import GooeyParser, Gooey
from imagecluster import calc, io as icio, postproc
def run(args):
images, fingerprints, timestamps = icio.get_image_data(args.input)
clusters = calc.cluster(fingerprints, sim=0.5)
output_path = os.path.join(args.input, 'clusters')
postproc.make_links(clusters, output_path)
@Gooey(program_name="ImageCluster", required_cols=1)
def main():
parser = GooeyParser()
parser.add_argument("input", widget="DirChooser")
parser.add_argument("similarity", default=0.5)
args = parser.parse_args()
run(args)
if __name__ == "__main__":
main()
git+https://github.com/elcorto/imagecluster
gooey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment