Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
We Distribute
  1. Home
  2. Fediverse
  3. PieFed's PDQ image hashing service is available to be used by any fedi platform

PieFed's PDQ image hashing service is available to be used by any fedi platform

Scheduled Pinned Locked Moved Fediverse
fediverse
2 Posts 2 Posters 6 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fxomt@lemmy.dbzer0.comF This user is from outside of this forum
    fxomt@lemmy.dbzer0.comF This user is from outside of this forum
    fxomt@lemmy.dbzer0.com
    wrote last edited by
    #1

    cross-posted from: https://piefed.social/post/761023

    PieFed uses PDQ hashing to generate a fingerprint of an image and can use that fingerprint to detect other posts that use the same or fairly similar images, for moderation purposes. Hashes are added to a block list which stops the image from being re-posted in future. Demo

    PieFed does not generate PDQ hashes itself - it uses a separate service to do it. Several different instances could be using the same hashing service which will be more efficient than everyone running their own. When an image is being federated around the URL of it will be sent to the hashing service by multiple different fedi instances and only the first will be slow as all the subsequent requests will be served from a cache.

    Get the code from https://github.com/rimu/pdqhash-python

    By doing a GET request for https://yourdomain.tld/pdq-hash?image_url=url_to_image_to_hash you will receive JSON like this:

    { 
        "pdq_hash_binary": "100100100011...",  
        "quality": 100  
    }  
    

    The quality score (0–100) indicates how well the image content supports a reliable perceptual hash.

    Higher scores mean better contrast, edges, and texture in the image. PieFed accepts anything > 70.

    Link Preview Image
    GitHub - rimu/pdqhash-python: Python bindings for Facebook's PDQ hash, with REST API

    Python bindings for Facebook's PDQ hash, with REST API - rimu/pdqhash-python

    favicon

    GitHub (github.com)

    asudox@lemmy.asudox.devA 1 Reply Last reply
    1
    61
    • System shared this topic
    • fxomt@lemmy.dbzer0.comF fxomt@lemmy.dbzer0.com

      cross-posted from: https://piefed.social/post/761023

      PieFed uses PDQ hashing to generate a fingerprint of an image and can use that fingerprint to detect other posts that use the same or fairly similar images, for moderation purposes. Hashes are added to a block list which stops the image from being re-posted in future. Demo

      PieFed does not generate PDQ hashes itself - it uses a separate service to do it. Several different instances could be using the same hashing service which will be more efficient than everyone running their own. When an image is being federated around the URL of it will be sent to the hashing service by multiple different fedi instances and only the first will be slow as all the subsequent requests will be served from a cache.

      Get the code from https://github.com/rimu/pdqhash-python

      By doing a GET request for https://yourdomain.tld/pdq-hash?image_url=url_to_image_to_hash you will receive JSON like this:

      { 
          "pdq_hash_binary": "100100100011...",  
          "quality": 100  
      }  
      

      The quality score (0–100) indicates how well the image content supports a reliable perceptual hash.

      Higher scores mean better contrast, edges, and texture in the image. PieFed accepts anything > 70.

      Link Preview Image
      GitHub - rimu/pdqhash-python: Python bindings for Facebook's PDQ hash, with REST API

      Python bindings for Facebook's PDQ hash, with REST API - rimu/pdqhash-python

      favicon

      GitHub (github.com)

      asudox@lemmy.asudox.devA This user is from outside of this forum
      asudox@lemmy.asudox.devA This user is from outside of this forum
      asudox@lemmy.asudox.dev
      wrote last edited by
      #2

      Is this similar to blurhash?

      I'm certain you can achieve this with blurhash as well, and also get the benefits of blurhash.

      1 Reply Last reply
      2
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      Powered by NodeBB Contributors
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups