SafeVision is an advanced, highly customizable pipeline for downloading, managing, and training on NSFW and SFW datasets. Its primary goal is to detect and block NSFW content using machine learning, while offering flexible control over dataset sources, labeling, filtering, and model training.
- π Custom Dataset Collection: Download datasets containing NSFW and SFW images from various sources with fine-grained filters.
- π§ Model Training: Train powerful deep learning models to detect NSFW content.
- βοΈ Highly Configurable: Control sources, categories, labeling rules, preprocessing steps, and model hyperparameters.
- π Content Filtering: Deploy the trained model to scan and block NSFW content in real-time.
- ποΈ Dataset Curator Mode: Review, relabel, or remove samples before training.
# Clone the repository
git clone https://github.com/yourusername/SafeVision.git
cd SafeVision
# (Optional) Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Download datasets with custom filters
python safevision.py download --type nsfw --source danbooru --limit 1000
# Train the detection model
python safevision.py train --epochs 10 --batch-size 32
# Use the model to scan images
python safevision.py detect --input /path/to/imagesFor full list of commands and options, run:
python safevision.py --helpSafeVision is built with modular components:
- Add new data sources
- Plug in custom image augmentations
- Swap out models and loss functions
- Integrate with existing moderation pipelines
Contributions are welcome! If you have suggestions for features or improvements, feel free to open an issue or pull request.
This project is intended strictly for research and moderation purposes. Please use it responsibly and respect privacy, ethics, and legal constraints.
MIT License. See LICENSE for details.