Comparison of Image and Video Hashing Algorithm Use Cases: pHash, PDQ, TMK+PDQF

Comparative analysis of the technical characteristics and application scenarios of three mainstream hashing algorithms: pHash, PDQ, and TMK+PDQF.

Aug 29, 2025 11:34 151 reads About 265 words About 1 min read

Conclusion first: pHash is better suited for image-level deduplication and similarity search; PDQ is a high-bit image fingerprint for photos; TMK+PDQF (and its vPDQ implementation) is a fingerprinting algorithm for video that includes temporal information.

The official documentation also provides audio and video interfaces, but the video component returns a frame-level hash sequence. In essence, it is “frame-by-frame image hashing” and lacks explicit temporal encoding, so it is typically used for lightweight screening rather than highly robust video matching.

pHash

pHash is an open-source perceptual hashing library that has long been used for image similarity search. It provides image hash implementations such as DCT and Marr wavelet, making it suitable for image deduplication and near-duplicate retrieval scenarios.

PDQ

PDQ is Meta’s open-source “photo-hashing” algorithm. It outputs a 256-bit image fingerprint and is designed for fast, thresholdable matching of image content. It is widely used in content risk control and cross-platform shared databases.

In video scenarios, PDQ can be used as a component for “frame-by-frame fingerprinting,” but the official video approach more strongly recommends combining it with temporal modeling (see TMK+PDQF/vPDQ).

TMK+PDQF (including vPDQ)

TMK+PDQF is a video similarity algorithm: after computing PDQF (the floating-point version of PDQ) features for each frame, it constructs two fixed-length descriptors using temporal kernels. During retrieval, it first compares the global layer and then the temporal layer to improve the robustness of video-level matching.

Industry benchmarks and documentation position TMK+PDQF (and the later vPDQ) as an open-source video fingerprinting solution for near-duplicate and segment-level video matching under re-encoding, resolution changes, and bitrate changes.