Skip to content

krcoder123/DoxDetect-Redaction-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##DoxDetect - AI-Powered Image Redaction Tool

** Won 1st Place Overall & 1st Place AI Track at BellHacks Bay Area Hackathon**

This project is an open-source desktop application that uses AI to automatically detect and redact Personally Identifiable Information (PII) from images. It was developed for the BellHacks hackathon and is distributed under the GNU General Public License.

Want to see a demo? If you don't have an OpenAI API key, you can watch a video of the app in action by clicking the link below!

About The Project

DoxDetect scans images for sensitive info like names, dates, and ID numbers using Optical Character Recognition (OCR). It then uses the OpenAI API to determine if the text is sensitive and asks for user confirmation before redacting it with a powerful Gaussian blur.

Built With

  • Python
  • OpenAI API (GPT-3.5)
  • OpenCV
  • EasyOCR
  • Tkinter

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

You need to have Miniconda or Anaconda installed on your system. This is required to create a stable environment for the machine learning libraries.

You absolutely need a valid OpenAI API key for this application to work.

Installation

  1. Clone the repository:

    git clone https://github.com/krcoder123/DoxDetect-Redaction-Tool
    cd DoxDetect-Redaction-Tool
  2. Create the Conda Environment: This command creates an environment named doxdetect with the correct Python version and installs the most complex libraries.

    conda create --name doxdetect python=3.11 pytorch torchvision -c pytorch
  3. Activate the Environment:

    conda activate doxdetect
  4. Install Remaining Dependencies: Use pip to install the rest of the required packages.

    pip install easyocr openai opencv-python Pillow

    (Note for macOS users: The (doxdetect) environment should now be active. If you still encounter GUI errors, install the python.app package with conda install python.app.)

  5. Set Your OpenAI API Key: Set you OpenAI API Key as an environment variable in your terminal session.

    • For macOS/Linux:
      export OPENAI_API_KEY="paste-your-secret-key-here"
    • For Windows (Command Prompt):
      set OPENAI_API_KEY="paste-your-secret-key-here"

Usage

Once the environment is set up and your API key is configured, you can run the application.

  • For macOS/Linux: Use the pythonw command to launch the GUI application.

    pythonw antidox.py
  • For Windows: Use the standard python command.

    python antidox.py

Click the "Upload Image" button to select an image from your computer. The application will then process it and prompt you to confirm any redactions. Please check your terminal To see what is being read and what is considered sensitive information.


Customization

You can adjust the blur's intensity by changing the kernel size in the antidox.py script. The kernel size must be a pair of positive, odd integers (e.g., 51, 99, 101, 299).

Modify the '(101, 101)' parameters in the following line to achieve your desired effect:

roi = cv2.GaussianBlur(roi, (101, 101), 0)

About

AI-powered PII redaction tool that won 1st place at BellHacks. Built with Python, OpenAI, and OpenCV.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages