Skip to content

afaq-ahmed07/SafeScroll

Repository files navigation

SafeScroll - Image Blur Detection System

A system that detects potentially harmful or inappropriate images and applies blurring to them. image

image

Extension_Signup_Login.mp4
Extension.mp4

Features

  • Detects potentially harmful or inappropriate content in images
  • Uses deep learning models for image and text analysis
  • Provides real-time image processing
  • Easy to integrate into existing applications

Prerequisites

  • Python 3.8 or higher
  • Node.js (for frontend development)
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/afaq-ahmed07/SafeScroll.git
cd SafeScroll
  1. Install Python dependencies:
# Navigate to python-model directory
cd python-model
pip install -r requirements.txt
  1. Set up environment variables:
cd ..
# Create a .env file (example provided in .env.example)
touch .env
  1. Build the frontend:
# Navigate to public directory
cd public
npm install
npm run build

Running the Application

  1. Start the Python backend:
cd python-model
python app.py

The backend will run on http://localhost:5000

  1. Start the frontend (optional):
cd ../public
npm start

The frontend will run on http://localhost:3000

API Endpoints

Image Prediction

POST /predict

Request Body:

{
    "image_url": "URL_TO_IMAGE"
}

Response:

{
    "prediction": 0,  # 0 for safe, 1 for unsafe
    "confidence": 0.95
}

Project Structure

SafeScroll/
├── python-model/          # Backend Python code
│   ├── app.py           # Flask server
│   ├── predict_DualBranch.py  # Prediction model
│   ├── fe.py            # Feature extraction
│   └── requirements.txt  # Python dependencies
├── public/              # Frontend code
│   ├── background.js    # Browser extension background script
│   └── content.js       # Browser extension content script
└── .env                 # Environment variables

Usage

  1. The system can be used as a standalone API service
  2. It can be integrated into browser extensions
  3. It can be used to process images in batch mode

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A system that detects potentially harmful or inappropriate images and applies blurring to them.

Topics

Resources

Stars

Watchers

Forks