Skip to content

NSFW Detector AI

Updated: at 06:54 AM

My NSFW Detector AI Journey

Creating the NSFW Detector AI has been a rewarding and challenging experience. This project, built using C# and ML.NET, is designed to classify NSFW images with high accuracy. Here’s a glimpse into the development process and the results achieved: Result on a nsfw image!

Test on a pixel art NSFW Image - Amazing results

Project Overview

The NSFW Detector AI is a powerful image classification model capable of detecting various types of NSFW content. The model includes the following labels:

Development Process

The model was trained on a dataset of 14,000 images, achieving an accuracy score of 83.98%. The training process took less than two hours, thanks to the efficiency of the I9 13980HX processor. The final model is less than 100MB in size and is stored in the .mlnet format.

Technical Details

The development involved several key steps:

  1. Data Collection: Using a dataset from Huggingface, I selected a diverse range of images to ensure comprehensive training.
  2. Model Training: Leveraging ML.NET, I trained the model using C#. The process was optimized for speed and accuracy, resulting in a robust model.
  3. Implementation: The model is designed to be easily integrated into various applications through an API, supporting multiple programming languages.

Challenges and Achievements

One of the main challenges was ensuring the model’s accuracy across different types of NSFW content. For some reason, training with a GPU will make the model less accurate than training using a CPU but I managed to achieve a reliable and efficient classifier.

Feel free to check out the NSFW Detector AI on GitHub for more details and stay safe!