Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add toxic meme detection via UDF #516

Closed
wants to merge 16 commits into from

Conversation

leungyukshing
Copy link

@leungyukshing leungyukshing commented Dec 6, 2022

Toxic Meme Detection

  1. Integrated OCR text extractor and text meme classification model to identify harmful memes in a video.
  2. Ways to create UDF to use our function
  • Run the following command:
    CREATE UDF IF NOT EXISTS HarmfulMemeDetector INPUT (data NDARRAY (3,ANYDIM,ANYDIM)) OUTPUT (labels TEXT(10)) TYPE Classification IMPL 'eva/udfs/harmful_meme_detector.py';

To test this function, please follow these steps:

  1. LOAD FILE "data/meme/meme.mp4" INTO MEMEVideoTable; (meme.mp4 is available here)
  2. SELECT id, HarmfulMemeDetector(data).labels FROM MEMEVideoTable WHERE id = 5; (test a single frame)
  3. SELECT id, HarmfulMemeDetector(data).labels FROM MEMEVideoTable WHERE id < 50; (test a clip)

@jarulraj
Copy link
Member

jarulraj commented Jan 3, 2023

Good PR! Integrated into #551

@jarulraj jarulraj closed this Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants