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
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.1
Then run:
dart pub get
import 'package:dup_image_finder/dup_image_finder.dart';
final dupImageFinder = DupImageFinder(useML: false, hasher: AHash());
final hashMap = dupImageFinder.encodeImages("FolderName");
final result = dupImageFinder.findDuplicates(hashMap);
-
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", );
- Fork repository
- Create feature branch:
git checkout -b feat/your-feature
- Follow Conventional Commits:
git commit -m "feat: add new validation method"
Follow the Effective Dart and analysis_options.yaml
BSD 3-Clause "New" or "Revised" License © 2025 RequieMa
Full text at LICENSE
Basic functionalities are under development.
Please report issues via GitHub Issues
This project was conceptually inspired by:
- imagededup - A Python library for finding duplicate images