Skip to content

RequieMa/dup_image_finder

Repository files navigation

dup_image_finder

Pub Version Pub Points License GitHub Workflow Status

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.1

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.encodeImages("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 from encodeImages
    • maxDistanceThreshold defines the maximum bit difference
    • scores if true, the end-result will show how close the image is to the query image
    • searchMethod 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

  1. Fork repository
  2. Create feature branch:
    git checkout -b feat/your-feature
  3. 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

About

Find duplicate images using Dart

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages