• Stars
    star
    1,584
  • Rank 29,535 (Top 0.6 %)
  • Language
    Swift
  • License
    BSD 3-Clause "New...
  • Created about 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A NSFW (aka porn) detector with CoreML

NSFWDetector

Version License Platform

NSFWDetector is a small (17 kB) CoreML Model to scan images for nudity. It was trained using CreateML to distinguish between porn/nudity and appropriate pictures. With the main focus on distinguishing between instagram model like pictures and porn.

Usage

guard #available(iOS 12.0, *), let detector = NSFWDetector.shared else {
    return
}

detector.check(image: image, completion: { result in
    switch result {
    case let .success(nsfwConfidence: confidence):
        if confidence > 0.9 {
            // 😱🙈😏
        } else {
            // ¯\_(ツ)_/¯
        }
    default:
        break
    }
})

If you want to enforce stricter boundaries for your platform, just apply a lower threshold for the confidence.

Installation

NSFWDetector is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'NSFWDetector'

⚠️ Because the model was trained with CreateML, you need Xcode 10 and above to compile the project.

App Size

The Machine Learning Model is only 17 kB in size, so App size won't be affected compared to other libraries using the yahoo model.

Using just the Model

If you don't want to use the Detection Code, you can also just download the MLModel file directly from the latest Release.

Feedback

If you recognize issues with certain kind of pictures, feel free to reach out via Mail or Twitter.

Author

Michael Berg, [email protected]

License

NSFWDetector is available under the BSD license. See the LICENSE file for more info.

More Repositories

1

goka

Goka is a compact yet powerful distributed stream processing library for Apache Kafka written in Go.
Go
2,356
star
2

jenkins_exporter

Prometheus Metrics exporter for Jenkins
Python
163
star
3

nsq_exporter

Prometheus Metrics exporter for NSQ
Go
94
star
4

ipmi_exporter

IPMI Exporter for prometheus.io, written in Go.
Go
80
star
5

gcloud-opentracing

OpenTracing Tracer implementation for GCloud StackDriver in Go.
Go
45
star
6

nats_exporter

Prometheus Metrics exporter for NATS
Go
43
star
7

grpc-android-demo

A minimal GRPC demo project with automatic generation of GRPC implementations from a proto file. Also includes a minimalistic server implementation. Designed to be a dead simple playground for your first GRPC on Android experiments.
Java
42
star
8

xenstats_exporter

Prometheus exporter for xen (Storage, Host CPUs, Memory usage)
Go
21
star
9

android-tutorial-bubbles

A little ui framework that displays a styled tutorial bubble, which positions and scales itself based on a given anchor view.
Java
19
star
10

LVForgivingAssert

Create unit tests for methods that use NSAssert as pre-condition check.
Objective-C
16
star
11

goka-tools

Goka Tools provides different tools to be used with Goka
Go
11
star
12

android-pickpic

Ready to use library that allows people to select pictures from their device and Facebook account.
Kotlin
11
star
13

Github-action-confluence-sync

Github action for syncing files with confluence pages.
Python
10
star
14

LVModalQueue

This fixes 'NSInternalInconsistencyException's when presentViewController: and dismissViewController: are called, while a transition is already in progress. Transitions are queued for later execution.
Objective-C
9
star
15

cofire

An online Collaborative Filtering system for recommendations
Go
7
star
16

protoc-gen-go-grpcmock

Google protocol buffer compiler plugin to generate Mocks for gRPC Services in Go.
Go
6
star
17

tinycsv

Tiny CSV helper toolkit
Go
6
star
18

RuledScrollView

Android ScrollView implementation with additional Touch-Interception-Rules
Java
5
star
19

mozaik-ext-bitrise

A Mozaik extension for bitrise CI
JavaScript
5
star
20

nscd_exporter

Exports statistics from NSCD (Name service caching daemon) and publishes them for scraping by Prometheus.
Go
4
star
21

careers

Want to work at LOVOO?
2
star
22

tailor

Tailor sews buttons on any Android EditText.
Kotlin
2
star
23

opsgenie-cardiogram

Simple Heartbeat Reporter for Opsgenie
Go
2
star
24

bitrise-step-github-release

Bitrise step for making automated Github releases.
Go
2
star
25

drone-gcr

Drone 0.5 plugin for publishing Docker images to the Google Container Registry.
Go
1
star
26

lastwords

lastwords is a little library written solely in Kotlin which notifies you when your app is terminated - that is all activities are either finishing or have been destroyed.
Kotlin
1
star