If you don't want to selfhost it, there's already an instance of this running here
$ git clone https://github.com/Wahyu213/Okaeri_NSFW_Detection
$ cd NSFW_Detection_API
$ pip3 install -U -r requirements.txt
$ python3 -m api
- Hentai - Hentai and pornographic drawings
- Porn - Pornographic images, sexual acts
- Drawings - Safe for work drawings (including anime)
- Neutral - Safe for work neutral images
- Sexy - Sexually explicit images, not pornography
Thanks to GantMan for their model.