fmtree.image package

Submodules

fmtree.image.dup module

class fmtree.image.dup.ArgsConfig(recursive: bool, path: pathlib2.Path, output_json: None | pathlib2.Path, remove_inplace: bool, out_dir: None | pathlib2.Path, dont_print_stats: bool, num_workers: int, hash_method: fmtree.image.dup.HashMethod)

Bases: object

dont_print_stats: bool
hash_method: HashMethod
num_workers: int
out_dir: None | Path
output_json: None | Path
path: Path
recursive: bool
remove_inplace: bool
class fmtree.image.dup.DuplicateImageSearcher(path: Path, hash_func: average_hash | phash | dhash | colorhash | whash | crop_resistant_hash, num_workers: int = 1)

Bases: object

run()
class fmtree.image.dup.HashComputer(hash_func: average_hash | phash | dhash | colorhash | whash | crop_resistant_hash)

Bases: object

hash_func: average_hash | phash | dhash | colorhash | whash | crop_resistant_hash
class fmtree.image.dup.HashMethod(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AverageHashing = 'avg-hash'
ColorHashing = 'color-hash'
CropResistantHashing = 'crop-resistant-hash'
DifferenceHashing = 'difference-hash'
PerceptualHashing = 'perceptual-hash'
WaveletHashing = 'wavelet-hash'
class fmtree.image.dup.ImageHash(hash_: numpy.ndarray, file_node: fmtree.core.node.FileNode)

Bases: object

file_node: FileNode
hash_: ndarray
fmtree.image.dup.compute_hash_diff(hash_func: ~typing.Callable[[<module 'PIL.Image' from '/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/PIL/Image.py'>], ~numpy.ndarray], img1: <module 'PIL.Image' from '/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/PIL/Image.py'>, img2: <module 'PIL.Image' from '/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/PIL/Image.py'>)
fmtree.image.dup.get_hash_function(hash_method: HashMethod) average_hash | phash | dhash | colorhash | whash | crop_resistant_hash
fmtree.image.dup.main(args: ArgsConfig)
fmtree.image.dup.verify_args(args: ArgsConfig)

Module contents