GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lovoo/NSFWDetector: A NSFW (aka porn) detector with CoreML

BranchesTags
Open more actions menu

Latest commit

 

History

40 Commits
40 Commits

Folders and files

NameName
Last commit message
Last commit date
Example
Example
 
 
NSFWDetector/Classes
NSFWDetector/Classes
 
 
assets
assets
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
NSFWDetector.podspec
NSFWDetector.podspec
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 

Repository files navigation

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

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/lovoo/NSFWDetector.git", .upToNextMajor(from: "1.1.2"))
]

Cocoapods

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.

About

A NSFW (aka porn) detector with CoreML

Topics

cocoapodscoremliosios-librarylovoomachine-learningswift

Resources

Readme
BSD-3-Clause license
Activity
Custom properties

Stars

1.7k stars

Watchers

56 watching

Forks

116 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.