Skip to content

Neon-Kaizen/GDG-SafeNetAI

Repository files navigation

SafeNetAI 🔐🎥

SafeNetAI is an AI-powered safety assistant designed to detect harmful content, deepfakes, and toxic language in real-time. It supports document analysis, speech/text moderation, and live stream monitoring.


🚀 Features

  • 🔎 Deepfake detection
  • 💬 Profanity & hate speech detection
  • 📄 Document scanning (PDF, DOCX, images)
  • 🎙️ Speech transcription & analysis
  • 🧠 Powered by OpenAI, Whisper, Transformers, CLIP, and more

Start server locally

How to use Setup

Prerequisties

  • make sure you have python 3.11.8
  • download ffmpeg and ADD TO PATH in ENVIRONMENT VARIABLES
  • you have latest version of chrome 1.3.7 (settings -> about chrome -> check for updates)

Installation

  • download setup from here
  • click on 'add shortcut in desktop'.
  • ⚠️ you need to explicitly install torch enabled cuda which is compatible for you gpu⚠️
  • navigate to your venv
cd C:\Users\%USERNAME%\AppData\Roaming\SafeNetAI 
  • activate virtual environment
venv\Scripts\activate
  • check for your nvidia driver version
  nvidia-smi

choose correct command to install in your VENV ()

# CUDA 11.8 (Requires NVIDIA driver ≥ 520.61.05)
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118

# CUDA 12.4 (Requires NVIDIA driver ≥ 537.13)
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124

# CUDA 12.6 (Requires NVIDIA driver ≥ 545.23)
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu126

if you dont find your version check here for other versions

dont dos X

  • do not click on cmd interface
  • don not stop the process in between

Usage

  • open the application 'SafeNetAI'
  • on UI click on start to run server locally
  • send requests from our website
  • click on stop to close server connection safely

Troubleshooting

  • If you see any related to 'access denied' , please run the setup as ADMIN
  • If you are seeing this error in CLI
Traceback (most recent call last):
  File "server.py", line 1, in <module>
    import module_name
ModuleNotFoundError: No module named 'module_name'

then run this to install missing modules (module_name is missing module)

cd C:\Users\%USERNAME%\AppData\Roaming\SafeNetAI && venv\Scripts\activate

and replace your module_name with missing modules


🛠️ Setup Project

1. Clone the Repository

git clone https://github.com/Neon-Kaizen/SafeNetAI.git
cd SafeNetAI

2. For Ubuntu/Linux Users

📦 System Dependencies

sudo apt update
sudo apt install ffmpeg tesseract-ocr poppler-utils python3-pip -y

📦 Python Environment Setup

python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m spacy download en_core_web_sm

If requirements.txt is missing, use the manual list below ⬇️

3. For Windows Users

Install Python 3.9+

Install Tesseract OCR and add it to the system path

Install Poppler and add bin to your path

Install dependencies Open PowerShell:

python -m pip install --upgrade pip
python -m spacy download en_core_web_sm
pip install flask flask_cors transformers torch
pip install pytesseract pdf2image docx2txt PyPDF2
pip install git+https://github.com/openai/whisper.git
pip install git+https://github.com/openai/CLIP.git
pip install selenium better_profanity sounddevice soundfile
pip install moviepy==1.0.3 "numpy<2" scikit-image
pip install albumentations==0.5.2 facenet_pytorch mediapipe scikit-learn timm

📲 Flutter Setup (Optional - for frontend) For Linux:

sudo snap install flutter --classic

For Windows: Download Flutter SDK → Extract → Add bin folder to system path

Flutter dependencies

flutter pub get

🗂️ Project Structure

.
├── android/                    # Flutter Android project files
├── assets/                    # Fonts, images, and static resources
├── build/                     # Flutter build output
├── deepfake_detection_server/ # Python backend for deepfake detection
├── devtools_options.yaml      # Flutter DevTools config
├── fonts/                     # Custom fonts used in the app
├── ios/                       # Flutter iOS project files
├── lib/                       # Main Flutter app source code
├── linux/, macos/, windows/   # Platform-specific builds
├── node_modules/              # JavaScript dependencies (used in web interface)
├── package.json               # Node package metadata
├── package-lock.json          # Node dependency lock
├── pubspec.yaml               # Flutter app dependencies
├── pubspec.lock               # Lock file for Flutter dependencies
├── README_flutter.txt         # Flutter-specific instructions
├── README.md                  # Main README file (You are here!)
├── web/                       # Flutter web build files

🧪 Run the Backend (Deepfake Server):

cd deepfake_detection_server
python3 app.py

(Python Server):

cd lib/python
python3 server.py

Run Frontend

flutter run

Other modules follow similar patterns. Start the servers as needed.

🧼 Troubleshooting Module not found? Run pip install for the missing module.

Tesseract path not found? Make sure it’s added to your system environment variables.

Whisper not working? Ensure ffmpeg is installed and accessible via terminal.

📃 License MIT License

🙌 Contributing Pull requests are welcome! Feel free to raise issues or improvements.

About

SafeNetAI is an AI-powered safety assistant designed to detect harmful content, deepfakes, and toxic language in real-time. It supports document analysis, speech/text moderation, and live stream monitoring.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors