https://github.com/dashesy/imagesorter
Sort images in a directory based on similarity features and dedup
https://github.com/dashesy/imagesorter
Last synced: 8 months ago
JSON representation
Sort images in a directory based on similarity features and dedup
- Host: GitHub
- URL: https://github.com/dashesy/imagesorter
- Owner: dashesy
- License: bsd-2-clause
- Created: 2022-10-22T02:15:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T05:05:36.000Z (about 3 years ago)
- Last Synced: 2025-03-02T19:24:47.995Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imagesorter
Sort images in a folder based on similarity features.
The default featurizer is 'mobilenet+resnet18' hybrid, which performs the best combining OD and Classification features.
# Usage
```bash
python sort.py /path/to/input/directory/ /path/to/output/directory/
```
To use different featurizer
```bash
python sort.py /path/to/input/directory /path/to/output/directory/ --featurizer mobilenet
```
Decrease the dedup threshold to deduplicate more
```bash
python sort.py /path/to/input/directory /path/to/output/directory/ --dedup 0.99
```
# TODO
1. Paralelize and cache to disk to handle large number of images. (Currently fine up to few hundreds)
2. Add option to minimize the cost function (max sum path) for maximum similarity sort. Can start from current sort as a good initial condition.