Skip to content

Releases: AbolfazlZarei-dev/moxra

Release list

Moxra v1.0.0

Choose a tag to compare

@AbolfazlZarei-dev AbolfazlZarei-dev released this 10 Aug 11:20
e70e96e

🚀 Moxra v1.0.0 - Initial Release

Professional NSFW Content Detection Library for Images, GIFs, and Videos


📖 About This Release

Welcome to the first stable release of Moxra! A powerful, lightweight, and production-ready library for detecting inappropriate content in images, GIFs, and videos. Built with deep learning and ONNX Runtime, Moxra delivers 95%+ accuracy with lightning-fast inference speed.


✨ Features

Core Features

  • Blazing Fast - Detection in under 0.5 seconds
  • 🎯 95%+ Accuracy - Trained on millions of labeled images
  • 🖼️ Multi-format Support - Images, GIFs, and Videos
  • 🕊️ Smart Veil Detection - Automatic hijab detection for Islamic content
  • 🔒 Privacy First - 100% local processing, no data storage

Developer Experience

  • 🌐 Public REST API - No authentication required
  • 🎨 Modern Web UI - Interactive playground with dark/light mode
  • 💻 Full CLI Tool - Command-line interface for batch processing
  • 🐍 Python Library - Simple import and use
  • Async Support - Concurrent processing capabilities

Technical Excellence

  • 🔌 Multi-model Support - Choose from 3 optimized models
  • 💾 GPU Acceleration - CUDA and TensorRT support
  • 📦 Automatic Model Download - No manual setup needed
  • 🧹 Smart Memory Management - Automatic cache cleanup
  • 🌍 Mirror Support - For users in China

📦 Model Files

These model files are required for detection. Please download them from the releases page:

Model Description Size Download
moxra_model.onnx Default MobileNet V2 Model 14 MB Download
moxra_m2model.onnx Optimized MobileNet V2 Model 14 MB Download
moxra_i3model.onnx High-Accuracy Inception V3 Model 92 MB Download

📥 Installation

From PyPI (Recommended)

pip install moxra

With GPU Support

pip install moxra[gpu]

From Source

git clone https://github.com/moxra/moxra.git
cd moxra
pip install -e .

🚀 Quick Start

Python Library

from moxra import MoxraDetector

# Initialize detector
detector = MoxraDetector()

# Classify image with veil detection
result = detector.classify_with_veil("image.jpg")

# Check results
print(f"NSFW: {result['is_nsfw']}")
print(f"NSFW Score: {result['adjusted_nsfw_score']:.2%}")
print(f"Predictions: {result['predictions']}")

REST API Server

# Start the server
python -m moxra.api.app

# Or with uvicorn
uvicorn moxra.api.app:create_app --host 0.0.0.0 --port 8000

CLI Tool

# Basic usage
moxra -i image.jpg

# Advanced options
moxra -i video.mp4 --sample-rate 0.05 --max-frames 200 --format json --output result.json

📊 Detection Categories

Category Description Color
🟢 neutral Safe and normal content Green
🟡 sexy Sexually suggestive content Yellow
🔴 porn Explicit pornographic content Red
🟣 hentai Anime explicit content Purple
🔵 drawing Artistic drawings and illustrations Blue

🌐 API Endpoints

All endpoints are public - No authentication required!

Method Endpoint Description
POST /api/v1/classify-img Upload image (JPG, PNG, WEBP, BMP)
POST /api/v1/classify-gif Upload GIF animation
POST /api/v1/classify-video Upload video (MP4, AVI, MOV, MKV)
POST /api/v1/classify-url Analyze via URL
GET /api/v1/health Service health check
POST /api/v1/cleanup Memory cache cleanup

🖥️ CLI Options

Option Description
-i, --input Input file path (required)
-t, --type Model type: d, m2, i3
-d, --device Execution device: cpu, cuda, tensorrt
-s, --sample-rate Video sampling rate (0 to 1)
-f, --max-frames Maximum video frames
--format Output format: json, pretty, simple
-o, --output Save output to file
-v, --verbose Verbose output

📁 Project Structure

moxra/
├── moxra/                    # Core package
│   ├── api/                  # REST API
│   ├── core/                 # Detection engine
│   ├── processors/           # Media processors
│   └── cli/                  # CLI interface
├── moxra_model/              # Model files
├── static/                   # Static assets
├── templates/                # HTML templates
├── run.py                    # Server launcher
├── setup.py                  # Package installer
└── README.md                 # Documentation

🔧 Requirements

  • Python 3.8+
  • ONNX Runtime 1.12+
  • OpenCV 4.5+
  • Pillow 9.0+
  • NumPy 1.21+
  • FastAPI 0.100+ (optional)
  • Uvicorn 0.20+ (optional)

📊 Performance Benchmark

Format Average Time Max Size
Image (CPU) 0.3-0.5s 20 MB
Image (GPU) 0.1-0.2s 20 MB
GIF (100 frames) 2-3s 20 MB
Video (100 frames) 3-5s 100 MB
Video (GPU) 1-2s 100 MB

🕊️ Veil Detection

Moxra includes automatic veil (hijab) detection:

  • 🔍 Automatic Detection - Identifies content with hijab
  • 📊 Error Reduction - Up to 30% reduction in false positives
  • 🎯 Confidence Score - Provides confidence level for veil detection
  • 🎨 Multiple Methods - Uses color analysis for accurate detection
result = detector.classify_with_veil("image.jpg")
print(f"Veil detected: {result['veil']['has_veil']}")
print(f"Confidence: {result['veil']['confidence']}")

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests
  5. Submit a pull request
# Development setup
pip install -e ".[dev]"

# Run tests
pytest tests/

# Format code
black moxra/
isort moxra/

📄 License

MIT License - Free for personal and commercial use. See the LICENSE file for details.


👨‍💻 Developer

Abolfazl Zarei

GitHub
Telegram
Rubika
Website


⭐ Support

If you find this project useful, please consider:

  • Starring the repository
  • 📢 Sharing with others
  • 🐛 Reporting issues
  • 🔧 Contributing to the code

📣 Social Media

Platform Link
📱 Telegram Channel @Ninja_Code
📱 Telegram ID @Abolfazl_PGR
🟣 Rubika Channel @Ninja_Code
🟣 Rubika ID @NinjaCode
🐙 GitHub AbolfazlZarei-dev
🌐 Website abolfazlzarei.sbs
📧 Email ninjacode.ir@gmail.com

Made with ❤️ by Abolfazl Zarei

Built with passion for the open-source community