dataeval.metrics.stats.hashstats¶
-
dataeval.metrics.stats.hashstats(images, bboxes=
None)¶ Calculates hashes for each image.
This function computes hashes from the images including exact hashes and perception-based hashes. These hash values can be used to determine if images are exact or near matches.
- Parameters:¶
- Returns:¶
A dictionary-like object containing the computed hashes for each image.
- Return type:¶
See also
DuplicatesExamples
Calculating the statistics on the images, whose shape is (C, H, W)
>>> results = hashstats(stats_images) >>> print(results.xxhash) ['6274f837b34ed9f0', '256504fdb6e3d2a4', '7dd0c56ca8474fb0', '50956ad4592f5bbc', '5ba2354079d42aa5'] >>> print(results.pchash) ['a666999999666666', 'e666999999266666', 'e666999966663299', 'e666999999266666', '96e91656e91616e9']