{"id":48400618,"url":"https://github.com/dandona100/safeeyes","last_synced_at":"2026-04-10T06:01:44.676Z","repository":{"id":348900573,"uuid":"1200308674","full_name":"Dandona100/SafeEyes","owner":"Dandona100","description":"│ Real-time NSFW \u0026 harmful content detection as a service ","archived":false,"fork":false,"pushed_at":"2026-04-07T13:45:35.000Z","size":4664,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T04:02:35.960Z","etag":null,"topics":["ai","content-moderation","content-safety","docker","fastapi","image-classification","nsfw","nsfw-detection","python","safety"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dandona100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-03T09:04:21.000Z","updated_at":"2026-04-07T13:45:39.000Z","dependencies_parsed_at":"2026-04-08T04:02:57.574Z","dependency_job_id":null,"html_url":"https://github.com/Dandona100/SafeEyes","commit_stats":null,"previous_names":["dandona100/safeeye","dandona100/safeeyes"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Dandona100/SafeEyes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dandona100%2FSafeEyes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dandona100%2FSafeEyes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dandona100%2FSafeEyes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dandona100%2FSafeEyes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dandona100","download_url":"https://codeload.github.com/Dandona100/SafeEyes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dandona100%2FSafeEyes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31586410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","content-moderation","content-safety","docker","fastapi","image-classification","nsfw","nsfw-detection","python","safety"],"created_at":"2026-04-06T02:00:19.186Z","updated_at":"2026-04-09T05:00:53.295Z","avatar_url":"https://github.com/Dandona100.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡️ SafeEyes\n\n**AI-powered content safety scanner** — 20 providers in parallel, REST API, webhooks, batch processing, and a React dashboard.\n\n\u003e **הקב\"ה ציווה לשמור את העיניים ממראות אסורות. SafeEyes עוזרת.**\n\u003e \n\u003e 🇮🇱 Israeli open-source project. Proudly made in Israel.\n\n[![Demo](https://img.shields.io/badge/Demo-lhflow.com%2FSafeEye-C9A962?style=for-the-badge)](https://lhflow.com/SafeEye/)\n[![Docs](https://img.shields.io/badge/Docs-API%20Reference-1A1A1A?style=for-the-badge)](https://lhflow.com/SafeEye/docs.html)\n\n## What It Does\n\nSafeEyes scans images and videos for **pornography, violence, weapons, drugs, and offensive content** — before they reach your users.\n\n- **20 AI providers** scan simultaneously — local models, pip-installable, and cloud APIs\n- **Smart voting** — majority rules, weighted by provider accuracy\n- **722K+ domain blocklist** — blocks known porn/violence sites before download\n- **Video scanning** — extracts up to 30 random frames with jitter\n- **Webhooks** — get results via HTTP callback, no polling needed\n- **Batch processing** — scan up to 100 URLs in one request\n- **Hebrew \u0026 English** dashboard with warm, premium design\n\n## Available Providers (20)\n\nInstall only what you need — each activates automatically.\n\n### Always Active (no setup)\n| Provider | Detects | Size |\n|----------|---------|------|\n| NudeNet | Nudity (exposed body parts) | 12MB |\n| Deepfake Check | Face consistency in video | 0 (OpenCV) |\n| Audio Check | Audio metadata | 0 (ffprobe) |\n\n### Install to Activate (pip install)\n| Provider | Detects | Install | Size |\n|----------|---------|---------|------|\n| Marqo NSFW | Nudity (fastest, 98.56%) | `pip install timm torch` | 22MB |\n| Falconsai NSFW | Nudity (ViT, 98%) | `pip install transformers torch` | 330MB |\n| Freepik NSFW | 4-level: neutral/low/medium/high | `pip install transformers torch` | 330MB |\n| SigLIP2 | 5-class incl. hentai/anime | `pip install transformers torch` | 400MB |\n| Bumble Private | Lewd content (production-proven) | `pip install tensorflow` | 21MB |\n| NSFWJS | 5-class: porn/sexy/hentai/drawing | `pip install onnxruntime` + model file | 10MB |\n| Deepfake v2 | Real deepfake detection (92%) | `pip install transformers torch` | 330MB |\n| YOLOv8 Weapons | Guns, knives | `pip install ultralytics` + model | 6MB |\n| Detoxify | Text toxicity (6 categories) | `pip install detoxify` | 65MB |\n| Hate Speech | Hate speech in text | `pip install transformers torch` | 440MB |\n\n### API Providers (need API key)\n| Provider | Detects | Config |\n|----------|---------|--------|\n| Sightengine | Nudity, violence, drugs, weapons | `SIGHTENGINE_API_USER/SECRET` |\n| Google Vision | SafeSearch | `GOOGLE_VISION_CREDENTIALS` |\n| Amazon Rekognition | Nudity, violence | `AWS_ACCESS_KEY_ID/SECRET` |\n| Azure Content Safety | Hate, self-harm, sexual, violence | `AZURE_CONTENT_SAFETY_KEY` |\n| PicPurify | Nudity, gore, drugs, weapons | `PICPURIFY_API_KEY` |\n| ModerateContent | Adult, violence | `MODERATECONTENT_API_KEY` |\n| CLIP Search | Zero-shot classification | `HF_API_TOKEN` |\n\n## Quick Start\n\n```bash\ngit clone https://github.com/Dandona100/SafeEye.git\ncd SafeEye\ndocker compose up -d\n```\n\nThat's it. A master token is auto-generated on first run — check the logs with `docker compose logs` to see it.\n\nDashboard: http://localhost:1985/dashboard\nHealth: http://localhost:1985/health\n\n### Create a token\n\n```bash\ncurl -X POST http://localhost:1985/api/v1/admin/tokens \\\n  -H \"Authorization: Bearer YOUR_MASTER_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"my-bot\"}'\n```\n\n### Scan a file\n\n```bash\ncurl -X POST http://localhost:1985/api/v1/scan/file \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -F \"file=@photo.jpg\"\n```\n\n### Async scan with webhook\n\n```bash\ncurl -X POST \"http://localhost:1985/api/v1/scan/async?url=https://example.com/image.jpg\u0026webhook_url=https://myserver.com/callback\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n# Returns immediately: {\"job_id\": \"abc123\", \"status\": \"pending\"}\n# SafeEyes POSTs result to your webhook when done\n```\n\n### Batch scan\n\n```bash\ncurl -X POST http://localhost:1985/api/v1/scan/batch \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"urls\": [\"url1.jpg\", \"url2.jpg\", \"url3.jpg\"], \"webhook_url\": \"https://myserver.com/callback\"}'\n# Returns: {\"batch_id\": \"batch_xyz\", \"total\": 3}\n```\n\n## API Reference\n\n### Scanning\n\n| Method | Endpoint | Auth | Description |\n|--------|----------|------|-------------|\n| POST | `/api/v1/scan/file` | Token | Upload and scan a file (sync) |\n| POST | `/api/v1/scan/url` | Token | Scan a URL (sync) |\n| POST | `/api/v1/scan/async` | Token | Async scan — returns job_id immediately |\n| POST | `/api/v1/scan/batch` | Token | Batch scan — up to 100 URLs |\n| GET | `/api/v1/job/{id}` | Token | Poll async job status |\n| GET | `/api/v1/batch/{id}` | Token | Batch progress + results |\n| POST | `/api/v1/demo/scan` | Public | Demo endpoint (no auth, no persist) |\n\n### Stats \u0026 Feedback\n\n| Method | Endpoint | Auth | Description |\n|--------|----------|------|-------------|\n| GET | `/api/v1/stats` | Token | Overview statistics |\n| GET | `/api/v1/stats/providers` | Token | Per-provider metrics |\n| GET | `/api/v1/stats/history` | Token | Scan history |\n| POST | `/api/v1/feedback/{id}` | Token | Submit accuracy feedback |\n\n### Admin\n\n| Method | Endpoint | Auth | Description |\n|--------|----------|------|-------------|\n| POST | `/api/v1/admin/tokens` | Master | Create API token |\n| DELETE | `/api/v1/admin/tokens/{name}` | Master | Revoke token |\n| GET | `/api/v1/admin/tokens` | Master | List all tokens |\n| GET | `/api/v1/admin/check-update` | Master | Check for new version |\n\n### Community\n\n| Method | Endpoint | Auth | Description |\n|--------|----------|------|-------------|\n| GET | `/api/v1/community` | Public | List bug reports \u0026 feature suggestions |\n| POST | `/api/v1/community` | Public | Submit report (UUID tracked) |\n| POST | `/api/v1/community/{id}/vote` | Public | Vote (one per device) |\n\n## How Voting Works\n\nAll configured providers scan **in parallel**. Results are aggregated:\n\n- **Any provider** flags with confidence ≥ 75% → **NSFW**\n- **2+ providers** flag (any confidence) → **NSFW** (majority vote)\n- **1 provider** flags with \u003c 75% → **Borderline** (caller decides)\n- Confidence = weighted average (NudeNet 1.0, Sightengine 1.2, Google 1.1, Amazon 1.2, Azure 1.2, PicPurify 1.1)\n\n## What It Detects\n\n| Category | Labels | Providers |\n|----------|--------|-----------|\n| 🔞 Nudity \u0026 Pornography | sexual_activity, sexual_display, erotica | NudeNet, Sightengine, Google, Azure |\n| 🔪 Violence \u0026 Gore | gore, serious_injury, corpse | Sightengine, Google, Azure |\n| 🔫 Weapons | weapon_firearm (99%), weapon_knife | Sightengine, PicPurify |\n| 💊 Drugs | recreational_drug, cannabis | Sightengine, PicPurify |\n| 🚫 Offensive | nazi, confederate, hate symbols | Sightengine |\n| 🌐 Domain Blocklist | 722,000+ domains | Built-in |\n\n## Dashboard\n\nAccess at `http://localhost:1985/dashboard`\n\n9 tabs: Dashboard, History, Providers, Tokens, Integrations, API Docs, Domain, Report, About\n\n- **Skeleton loaders** — no more \"Loading...\" text\n- **Stagger animations** — elements fade in sequentially\n- **Progress bars** — see scan status in real-time\n- **Interactive terminal** — test API calls from the browser\n- **Hebrew \u0026 English** — full RTL support\n\n## System Requirements\n\n| Resource | Minimum | Recommended |\n|----------|---------|-------------|\n| CPU | 2 cores | 4 cores |\n| RAM | 512MB | 2GB |\n| Storage | 1GB | 2GB |\n| GPU | Not required | Not required |\n| Docker | Required | Required |\n| Port | 1985 (configurable) | — |\n\nNudeNet runs on CPU. Works offline after first model download.\n\n## Configuration\n\nSee [.env.example](.env.example) for all options:\n\n- `SCAN_API_MASTER_TOKEN` — Admin token (required)\n- `SCAN_PORT` — Server port (default: 1985)\n- `SIGHTENGINE_API_USER/SECRET` — Enable Sightengine\n- `GOOGLE_VISION_CREDENTIALS` — Enable Google Vision\n- `AWS_ACCESS_KEY_ID/SECRET` — Enable Amazon Rekognition\n- `AZURE_CONTENT_SAFETY_KEY/ENDPOINT` — Enable Azure\n- `PICPURIFY_API_KEY` — Enable PicPurify\n- `NSFW_BLOCKLIST_AUTO_UPDATE` — Auto-update domain list\n- `LOG_LEVEL` — Debug verbosity (default: info)\n\n## Contributing\n\nWe welcome contributions! Here's how:\n\n- 🐛 **Report bugs** — [Open an issue](https://github.com/Dandona100/SafeEye/issues/new?labels=bug)\n- 💡 **Suggest features** — [Open an issue](https://github.com/Dandona100/SafeEye/issues/new?labels=enhancement)\n- 🔀 **Submit PRs** — [Pull requests](https://github.com/Dandona100/SafeEye/pulls)\n- ⭐ **Star us** — It helps!\n\n### UI Contributions Welcome! 🎨\n\n\u003e *The UI is functional and warm-themed, but we'd love to see what the community can do with it. PRs for design improvements, animations, mobile optimizations, and accessibility are especially welcome!*\n\nAreas that could use love:\n- Mobile-first responsive improvements\n- Advanced data visualizations (D3.js, recharts)\n- Accessibility (ARIA, keyboard navigation)\n- Dark mode toggle\n- Framer Motion / GSAP animations\n\n## Architecture Note\n\n**SafeEyes does NOT store scanned files.** Files are processed in memory and deleted immediately after scanning. Only scan results (JSON metadata) are persisted in SQLite. This is by design — privacy first.\n\n## New Features\n\n### 🔍 Perceptual Hashing (pHash)\nEvery scan now computes a perceptual hash of the image. This enables detecting edited, cropped, or watermarked versions of the same content.\n\n```bash\n# Scan returns pHash\ncurl -X POST .../api/v1/scan/file -F \"file=@photo.jpg\" -H \"Authorization: Bearer TOKEN\"\n# Response includes: \"phash\": \"ff8fc3e07018040707\"\n\n# Find similar images (hamming distance \u003c 10)\ncurl \".../api/v1/scan/similar?phash=ff8fc3e07018040707\" -H \"Authorization: Bearer TOKEN\"\n```\n\n### 📡 Live Stream Monitoring\nMonitor RTMP/HLS streams in real-time. SafeEyes extracts frames periodically and scans them.\n\n```bash\n# Start monitoring\ncurl -X POST .../api/v1/stream/start -H \"Authorization: Bearer MASTER_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://stream.example.com/live.m3u8\", \"interval\": 10, \"webhook_url\": \"https://myserver.com/alert\"}'\n\n# Check status\ncurl .../api/v1/stream/status -H \"Authorization: Bearer TOKEN\"\n\n# Stop\ncurl -X POST .../api/v1/stream/stop -H \"Authorization: Bearer MASTER_TOKEN\" \\\n  -d '{\"url\": \"https://stream.example.com/live.m3u8\"}'\n```\n\n### 🧩 Browser Extension\nRight-click any image on the web → \"Scan with SafeEyes\". Chrome extension included.\n\n**Install:** `chrome://extensions/` → Developer Mode → Load unpacked → select `nsfw_scanner/extension/`\n\n**Features:**\n- Context menu on all images\n- Badge shows result (green ✓ / red ✗)\n- Toast notification on the page\n- Settings: configure server URL + API token\n- Popup with detailed results + per-provider breakdown\n\n## Roadmap\n\n### Near-term\n- [x] ~~🧩 Browser extension~~ ✅\n- [x] ~~🔍 Perceptual hashing (pHash)~~ ✅\n- [x] ~~📡 Live stream monitoring~~ ✅\n- [ ] 🎭 **Privacy masking** — auto-blur faces and PII before analysis\n- [ ] 📊 **Advanced dashboard analytics** — D3.js visualizations\n\n### Medium-term\n- [ ] 🤖 **Deepfake detection** — pixel consistency analysis between frames\n- [ ] 🔎 **CLIP-based search** — find content by text description\n- [ ] 🔄 **Delta detection** — what changed between two versions\n\n### Long-term\n- [ ] 🧠 **Vector database (Pinecone/Milvus)** — visual similarity search at scale\n- [ ] ⚡ **WASM client-side preprocessing** — hash/analyze in browser before upload\n- [ ] 🗺️ **Command Center UI** — graph view of content propagation\n\n\u003e Want to work on any of these? [Open a PR!](https://github.com/Dandona100/SafeEye/pulls)\n\n## License\n\nMIT\n\n## Author\n\n**DVS Technology** — [@DVS20](https://t.me/DVS20)\n\n🇮🇱 Proudly made in Israel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandona100%2Fsafeeyes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdandona100%2Fsafeeyes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandona100%2Fsafeeyes/lists"}