dup_image_finder
A cross-platform pure Dart library for detecting duplicate images using various methods (e.g. hashing, CNN), supporting multiple image formats and efficient similarity comparison.
Compatibility: Dart ^3.6.0
π Getting Started
Installation
Method 1 (Recommended) With Dart:
dart pub add dup_image_finder
With Flutter:
flutter pub add dup_image_finder
Method 2
Add to pubspec.yaml
:
dependencies:
dup_image_finder: ^0.1.2
Then run:
dart pub get
Basic Usage
import 'package:dup_image_finder/dup_image_finder.dart';
final dupImageFinder = DupImageFinder(useML: false, hasher: AHash());
final hashMap = dupImageFinder.encodeImagesFromDir("FolderName");
final result = dupImageFinder.findDuplicates(hashMap);
π¦ Features
-
Core Feature 1: Encode Images From A Folder
- Allow to encode images recursively
final hashMap = dupImageFinder.encodeImages("FolderName", recursive: true);
-
Core Feature 2: Find Duplicated Images For The Folder
hashMap
fromencodeImages
maxDistanceThreshold
defines the maximum bit differencescores
if true, the end-result will show how close the image is to the query imagesearchMethod
currently only support BK-Tree (Later will also support Brute Force)
final result = dupImageFinder.findDuplicates( hashMap, maxDistanceThreshold: 10, scores: true, searchMethod: "bktree", );
π§ͺ Testing
π€ Contributing
Workflow
- Fork repository
- Create feature branch:
git checkout -b feat/your-feature
- Follow Conventional Commits:
git commit -m "feat: add new validation method"
Code Style
Follow the Effective Dart and analysis_options.yaml
π Documentation
π License
BSD 3-Clause "New" or "Revised" License Β© 2025 RequieMa
Full text at LICENSE
π§ Maintenance Status
Basic functionalities are under development.
Please report issues via GitHub Issues
Acknowledgement
This project was conceptually inspired by:
- imagededup - A Python library for finding duplicate images
Libraries
- dup_image_finder
- Support for doing something awesome.