nsfw-filter

🇹🇷 Türkçe 🇬🇧 English

Türkçe

Açık kaynak NSFW (Not Safe For Work) kütüphaneleri kullanılarak hazırlanmış hafif bir içerik filtreleme modülü. Tarayıcı üzerinde çalışır; kamera görüntüsünü gerçek zamanlı olarak analiz eder ve uygunsuz içerik tespit edildiğinde videoyu otomatik olarak bulanıklaştırır.

Kullanım

<script src="https://topluyo.github.io/nsfw-filter/filter.js"></script>

<script>
  // NSFWFilter.scriptDir otomatik ayarlanır.
  // Herhangi bir görüntü veya video öğesinde kullanın:
  NSFWFilter(videoElement).then(predictions => {
    console.log(predictions);
    // [{className: 'Porn', probability: 0.xx}, ...]
  });
</script>

filter.js ilk çağrıda TensorFlow.js, NSFW.js ve modeli otomatik olarak yükler. Sonraki çağrılar önbellekten çalışır.

Dosyalar

Dosya Açıklama
filter.js Ana filtre modülü (bu proje tarafından yazılmıştır)
index.js Demo sayfası (kamera + gerçek zamanlı filtreleme)
tfjs.js TensorFlow.js kütüphanesi (Google LLC)
nsfwjs.min.js NSFW.js kütüphanesi (Infinite Red, Inc.)
model.json + group1-shard1of1 MobileNet v2 tabanlı NSFW sınıflandırma modeli

Üçüncü Taraf Bileşenler ve Atıflar

Bu proje aşağıdaki açık kaynak bileşenleri kullanmaktadır:

TensorFlow.js (tfjs.js)

NSFW.js (nsfwjs.min.js)

MobileNet v2 NSFW Modeli (model.json, group1-shard1of1)

Lisans

Bu projenin kendine özgü kodu (filter.js) Apache License 2.0 ile lisanslanmıştır. Ayrıntılar için LICENSE dosyasına bakın.

Üçüncü taraf bileşenler kendi lisansları altında dağıtılmaktadır (yukarıdaki tabloya bakın).


English

A lightweight browser-based NSFW (Not Safe For Work) content filtering module built on top of open-source libraries. It runs entirely in the browser, analyzes camera input in real time, and automatically blurs the video when inappropriate content is detected.

Usage

<script src="https://topluyo.github.io/nsfw-filter/filter.js"></script>

<script>
  // NSFWFilter.scriptDir is set automatically.
  // Use it with any image or video element:
  NSFWFilter(videoElement).then(predictions => {
    console.log(predictions);
    // [{className: 'Porn', probability: 0.xx}, ...]
  });
</script>

filter.js loads TensorFlow.js, NSFW.js, and the model automatically on the first call. Subsequent calls use the cached model.

Files

File Description
filter.js Core filter module (written by this project)
index.js Demo page (camera + real-time filtering)
tfjs.js TensorFlow.js library (Google LLC)
nsfwjs.min.js NSFW.js library (Infinite Red, Inc.)
model.json + group1-shard1of1 MobileNet v2-based NSFW classification model

Third-Party Components & Attributions

This project uses the following open-source components:

TensorFlow.js (tfjs.js)

NSFW.js (nsfwjs.min.js)

MobileNet v2 NSFW Model (model.json, group1-shard1of1)

License

The original code of this project (filter.js) is licensed under the Apache License 2.0. See the LICENSE file for details.

Third-party components are distributed under their own respective licenses (see the table above).