NsfwSpy 1.0.1
See the version list below for details.
dotnet add package NsfwSpy --version 1.0.1
NuGet\Install-Package NsfwSpy -Version 1.0.1
<PackageReference Include="NsfwSpy" Version="1.0.1" />
paket add NsfwSpy --version 1.0.1
#r "nuget: NsfwSpy, 1.0.1"
// Install NsfwSpy as a Cake Addin #addin nuget:?package=NsfwSpy&version=1.0.1 // Install NsfwSpy as a Cake Tool #tool nuget:?package=NsfwSpy&version=1.0.1
<img src="https://raw.githubusercontent.com/d00ML0rDz/NsfwSpy/main/NsfwSpy-Logo.jpg" alt="NsfwSpy Logo" width="400"/>
Introduction
NsfwSpy is a nudity/pornography image classifier built for .NET to aid in moderating user-generated content for various different application types, written in C#. The ML.NET model has been trained against the ResNet V250 neural net architecture with over 360,000 images, from 5 different categories:
Label | Description |
---|---|
Pornography | Images that depict sexual acts and nudity. |
Sexy | Images of people in their underwear and men who are topless. |
Hentai | Drawings or animations of nudity and sexual acts. |
Neutral | Images that are not sexual in nature. |
Drawing | Drawings or animations that are not sexual in nature. |
Performance
NsfwSpy isn't perfect, but the accuracy should be good enough to detect approximately 96% of Nsfw images, those being images that are classed as pornography, sexy or hentai.
a | Pornography | Sexy | Hentai | Neutral | Drawing |
---|---|---|---|---|---|
IsNsfw <sub><sup>(pornography + sexy + hentai >= 0.5)</sup></sub> | 96.4% | 96.7% | 95.7% | 2.3% | 2.5% |
Correctly Predicted Label | 86.8% | 82.8% | 87.1% | 97.6% | 89.6% |
Quick Start
This project is available as a Nuget package and can be installed with the following commands:
Package Manager
Install-Package NsfwSpy
.NET CLI
dotnet add package NsfwSpy
Classify an Image File
var nsfwSpy = new NsfwSpy();
var result = nsfwSpy.ClassifyImage(@"C:\Users\username\Documents\flower.jpg");
Classify a Web Image
var uri = new Uri("https://raw.githubusercontent.com/d00ML0rDz/NsfwSpy/main/NsfwSpy.Test/Assets/flower.jpg")
var nsfwSpy = new NsfwSpy();
var result = nsfwSpy.ClassifyImage(uri);
Classify Multiple Image Files
var files = Directory.GetFiles(@"C:\Users\username\Pictures")
var nsfwSpy = new NsfwSpy();
nsfwSpy.ClassifyImages(files, (filePath, result) =>
{
Console.WriteLine($"{filePath} - {result.PredictedLabel}");
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.0
- Microsoft.ML (>= 1.6.0)
- Microsoft.ML.Vision (>= 1.6.0)
- SciSharp.TensorFlow.Redist-Windows-GPU (>= 2.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NsfwSpy:
Package | Downloads |
---|---|
Frank.SemanticKernel.Extensions.NsfwSpyDotNet
NSFW detection 'filter' for Semantic Kernel |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on NsfwSpy:
Repository | Stars |
---|---|
Redns/North
一个易于搭建的图床服务
|
Version | Downloads | Last updated | |
---|---|---|---|
3.5.0 | 64,097 | 11/5/2022 | |
3.4.3 | 7,981 | 5/28/2022 | |
3.4.2 | 6,375 | 5/18/2022 | |
3.4.1 | 5,552 | 5/17/2022 | |
3.4.0 | 7,179 | 5/3/2022 | |
3.3.1 | 5,844 | 5/3/2022 | |
3.3.0 | 6,212 | 4/25/2022 | |
3.2.0 | 5,968 | 4/15/2022 | |
3.1.0 | 5,504 | 12/24/2021 | |
3.0.1 | 4,606 | 12/14/2021 | |
3.0.0 | 4,751 | 12/8/2021 | |
2.5.0 | 4,589 | 11/3/2021 | |
2.4.0 | 5,113 | 10/9/2021 | |
2.3.0 | 4,742 | 10/6/2021 | |
2.2.0 | 4,721 | 10/6/2021 | |
2.2.0-beta.1 | 333 | 10/6/2021 | |
2.2.0-alpha | 4,306 | 10/6/2021 | |
2.1.0 | 4,559 | 9/24/2021 | |
2.0.0 | 4,555 | 9/23/2021 | |
1.2.0 | 4,667 | 9/19/2021 | |
1.1.1 | 4,528 | 9/19/2021 | |
1.1.0 | 4,506 | 9/18/2021 | |
1.0.11 | 4,654 | 9/17/2021 | |
1.0.10 | 4,417 | 9/17/2021 | |
1.0.9 | 4,690 | 9/17/2021 | |
1.0.8 | 4,832 | 9/16/2021 | |
1.0.7 | 4,560 | 9/16/2021 | |
1.0.6 | 2,771 | 9/16/2021 | |
1.0.5 | 2,876 | 9/16/2021 | |
1.0.4 | 2,785 | 9/16/2021 | |
1.0.3 | 4,707 | 9/16/2021 | |
1.0.2 | 972 | 9/16/2021 | |
1.0.1 | 1,053 | 9/16/2021 | |
1.0.0 | 944 | 9/16/2021 |