gpt4 book ai didi

python - 如何根据内容将一组图像文件聚类到不同的文件夹

转载 作者:太空宇宙 更新时间:2023-11-04 06:08:42 25 4
gpt4 key购买 nike

我在一个文件夹中有一组图像,其中每个图像在白色背景上具有正方形或三角形(如 thisthis )。我想将这些图像分成不同的文件夹(请注意,我不关心检测图像是否为正方形/三角形等。我只想将这两个分开)。

我计划在未来使用更复杂的形状(例如五边形或其他非几何形状),因此我正在寻找一种无监督的方法。但主要任务始终是将一组图像聚类到不同的文件夹中。

最简单/最好的方法是什么?我查看了图像聚类算法,但它们对图像内部的颜色/形状进行聚类。就我而言,我只是想根据所具有的形状来分离这些图像文件。

感谢任何指点/帮助。

最佳答案

你可以按照这个方法:

1. Create a look-up tables with shape you are using in the images
2. Do template matching on the images stored in a single folder
3. According to the result of template matching just store them in different folders
4. You can create folders beforehand and just replace the strings in program according to the usage.

希望对你有帮助

关于python - 如何根据内容将一组图像文件聚类到不同的文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20179727/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com