{"id":15026889,"url":"https://github.com/lovoo/nsfwdetector","last_synced_at":"2025-05-15T10:07:36.443Z","repository":{"id":37777716,"uuid":"144697829","full_name":"lovoo/NSFWDetector","owner":"lovoo","description":"A NSFW (aka porn) detector with CoreML","archived":false,"fork":false,"pushed_at":"2024-08-29T13:35:18.000Z","size":274,"stargazers_count":1621,"open_issues_count":7,"forks_count":112,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-05-15T10:07:00.520Z","etag":null,"topics":["cocoapods","coreml","ios","ios-library","lovoo","machine-learning","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-14T09:21:41.000Z","updated_at":"2025-05-11T00:07:18.000Z","dependencies_parsed_at":"2024-11-20T06:15:16.670Z","dependency_job_id":null,"html_url":"https://github.com/lovoo/NSFWDetector","commit_stats":{"total_commits":21,"total_committers":6,"mean_commits":3.5,"dds":"0.23809523809523814","last_synced_commit":"ac991111d2a958e2d0e1208bb8049c506c9f765d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2FNSFWDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2FNSFWDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2FNSFWDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2FNSFWDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovoo","download_url":"https://codeload.github.com/lovoo/NSFWDetector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319721,"owners_count":22051074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cocoapods","coreml","ios","ios-library","lovoo","machine-learning","swift"],"created_at":"2024-09-24T20:05:20.513Z","updated_at":"2025-05-15T10:07:31.405Z","avatar_url":"https://github.com/lovoo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![NSFWDetector](https://github.com/lovoo/NSFWDetector/blob/master/assets/header.png?raw=true)\n\n[![Version](https://img.shields.io/cocoapods/v/NSFWDetector.svg?style=flat)](https://cocoapods.org/pods/NSFWDetector)\n[![License](https://img.shields.io/cocoapods/l/NSFWDetector.svg?style=flat)](https://cocoapods.org/pods/NSFWDetector)\n[![Platform](https://img.shields.io/cocoapods/p/NSFWDetector.svg?style=flat)](https://cocoapods.org/pods/NSFWDetector)\n\nNSFWDetector 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.\n\n## Usage\n\n```swift\nguard #available(iOS 12.0, *), let detector = NSFWDetector.shared else {\n    return\n}\n\ndetector.check(image: image, completion: { result in\n    switch result {\n    case let .success(nsfwConfidence: confidence):\n        if confidence \u003e 0.9 {\n            // 😱🙈😏\n        } else {\n            // ¯\\_(ツ)_/¯\n        }\n    default:\n        break\n    }\n})\n```\n\nIf you want to enforce stricter boundaries for your platform, just apply a lower threshold for the confidence.\n\n## Installation\n### Swift Package Manager\n```swift\ndependencies: [\n    .package(url: \"https://github.com/lovoo/NSFWDetector.git\", .upToNextMajor(from: \"1.1.2\"))\n]\n```\n\n### Cocoapods\n```ruby\npod 'NSFWDetector'\n```\n\n⚠️ Because the model was trained with CreateML, you need **Xcode 10** and above to compile the project.\n\n## App Size\n\nThe Machine Learning Model is only **17 kB** in size, so App size won't be affected compared to other libraries using the [yahoo model](https://github.com/yahoo/open_nsfw).\n\n## Using just the Model\n\nIf you don't want to use the Detection Code, you can also just download the MLModel file directly from the latest [Release](https://github.com/lovoo/NSFWDetector/releases).\n\n## Feedback\n\nIf you recognize issues with certain kind of pictures, feel free to reach out via [Mail](mailto:michael.berg@lovoo.com) or [Twitter](https://twitter.com/LOVOOEng).\n\n## Author\n\nMichael Berg, [michael.berg@lovoo.com](mailto:michael.berg@lovoo.com)\n\n## License\n\nNSFWDetector is available under the BSD license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovoo%2Fnsfwdetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovoo%2Fnsfwdetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovoo%2Fnsfwdetector/lists"}