[{"data":1,"prerenderedAt":140},["ShallowReactive",2],{"page:\u002Farticles\u002Fgroupimg-image-clustering":3},{"id":4,"title":5,"author":6,"body":10,"cover":126,"date":127,"description":128,"extension":129,"head":130,"layout":133,"meta":134,"navigation":135,"path":136,"seo":137,"stem":138,"__hash__":139},"pages\u002Farticles\u002F13.groupimg-image-clustering.md","Organize Photos by Similarity with groupImg",{"name":7,"avatarUrl":8,"link":9},"Likun Cai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103620968?v=4","https:\u002F\u002Fgithub.com\u002FAlchemist-Aloha",{"type":11,"value":12,"toc":124},"minimark",[13,17,34,37,87,101,108,111,120],[14,15,5],"h1",{"id":16},"organize-photos-by-similarity-with-groupimg",[18,19,20,21,25,26,33],"p",{},"The public ",[22,23,24],"code",{},"groupImg"," repository is a fork of ",[27,28,32],"a",{"href":29,"rel":30},"https:\u002F\u002Fgithub.com\u002Fvictorqribeiro\u002FgroupImg",[31],"nofollow","victorqribeiro\u002FgroupImg",", a Python utility created to make a huge recovered-photo collection easier to inspect. It uses k-means clustering to divide images into groups based on visual similarity.",[18,35,36],{},"After installing the repository's requirements, the command-line version accepts an absolute image directory:",[38,39,44],"pre",{"className":40,"code":41,"language":42,"meta":43,"style":43},"language-bash shiki shiki-themes github-light github-dark","pip install -r requirements.txt\npython groupimg.py -f \u002Fhome\u002Fuser\u002FPictures\u002F -k 5\n","bash","",[22,45,46,66],{"__ignoreMap":43},[47,48,51,55,59,63],"span",{"class":49,"line":50},"line",1,[47,52,54],{"class":53},"sScJk","pip",[47,56,58],{"class":57},"sZZnC"," install",[47,60,62],{"class":61},"sj4cs"," -r",[47,64,65],{"class":57}," requirements.txt\n",[47,67,69,72,75,78,81,84],{"class":49,"line":68},2,[47,70,71],{"class":53},"python",[47,73,74],{"class":57}," groupimg.py",[47,76,77],{"class":61}," -f",[47,79,80],{"class":57}," \u002Fhome\u002Fuser\u002FPictures\u002F",[47,82,83],{"class":61}," -k",[47,85,86],{"class":61}," 5\n",[18,88,89,92,93,96,97,100],{},[22,90,91],{},"-k"," chooses the number of output groups. The optional ",[22,94,95],{},"-s"," flag adds image size as a feature, which can help separate thumbnails from full-resolution photos. By default the tool copies files; ",[22,98,99],{},"-m"," switches to moving them, so it is safer to begin without that flag.",[18,102,103,104,107],{},"The repository also includes a small GUI launched with ",[22,105,106],{},"python groupImgGUI.py",". It exposes the folder, cluster count, resampling size, copy-versus-move choice, and size feature without requiring the CLI syntax.",[18,109,110],{},"K-means does not understand the meaning of a photograph. It simply places feature vectors into nearby clusters, so the result is a browsing aid rather than a perfect semantic album. That modest goal is exactly why the script is useful: turn one impossible directory into several smaller piles that a person can review.",[18,112,113,114,119],{},"Browse the ",[27,115,118],{"href":116,"rel":117},"https:\u002F\u002Fgithub.com\u002FAlchemist-Aloha\u002FgroupImg",[31],"Alchemist-Aloha groupImg fork"," for the source and original project history.",[121,122,123],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":43,"searchDepth":68,"depth":68,"links":125},[],"\u002Farticles\u002Fgroupimg-cover.webp","2026-08-12T00:13:00.000Z","Use k-means clustering to divide an unwieldy image collection into smaller groups of visually similar files.","md",{"title":131},{"groupImg":132},"Organize Large Photo Collections by Similarity","page",{},true,"\u002Farticles\u002Fgroupimg-image-clustering",{"title":5,"description":128},"articles\u002F13.groupimg-image-clustering","V34e4sLFHJWY194_kq5u9hjcHO_vo7nO-rH7gnzkhJs",1786980373684]