Skip to content

UMass-Rescue/2025-project-hma-clip-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HMA Demo with CLIP Extension

This project serves as a practical demonstration on how to extend the capabilities of Hasher-Matcher-Actioner (HMA). If you are interested in building upon the foundational HMA tool, you can explore the main HMA repository for more insights and community collaborations.

This demo showcases a specific implementation using the CLIP python threatexchange extension and work as a guide on how to customize HMA to suit your needs. This demo leverages Docker Compose for easy deployment and orchestration, making it ideal for both development and production environments.

Introduction

Hasher-Matcher-Actioner (HMA) is a content moderation tool by Meta that uses hashing technology for copy detection. This technology allows platforms to share digital fingerprints of content, enhancing their ability to detect and moderate harmful material.

This demo extends HMA to incorporate the CLIP python ThreatExchange extension, which provides semantic embeddings that bridge text and image data. Allowing to match content with similar meaning rather than similar visual components.

Getting Started

To get this demo up and running, follow these steps:

Prerequisites

  • Docker and Docker Compose installed on your machine.

Setup and Run

  1. Clone the Repository
   git clone [your-repository-url]
   cd [repository-name]
  1. Launch the Services

Use Docker Compose to build and start the services defined in the docker-compose.yml:

    docker compose up --build

This command builds the Docker image and starts the services defined, including the application and the database.

Configuration

The omm_config.py file in the build directory is essential for the application's configuration. Adjust this file according to your needs to fit your use case.

Using the Demo

With the services running, you can interact with the HMA-CLIP extension through the REST API. The application is available at http://localhost:5005/, and API usage details are documented within the HMA repository.

Contributions and Feedback

We welcome contributions and feedback on this demo. If you have improvements or encounter issues, please submit a pull request or raise an issue in this GitHub repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.8%
  • Dockerfile 31.2%