{"id":21142318,"url":"https://github.com/andresribeiro/nsfwjs-docker","last_synced_at":"2025-07-09T05:32:34.390Z","repository":{"id":38372674,"uuid":"367947291","full_name":"andresribeiro/nsfwjs-docker","owner":"andresribeiro","description":"A Docker REST API for NSFW detection","archived":false,"fork":false,"pushed_at":"2023-12-27T17:55:43.000Z","size":19227,"stargazers_count":37,"open_issues_count":3,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-27T18:47:35.775Z","etag":null,"topics":["docker","nodejs","nsfw","nsfwjs","rest-api","tensorflow","tensorflowjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andresribeiro.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}},"created_at":"2021-05-16T17:38:42.000Z","updated_at":"2023-12-12T21:04:46.000Z","dependencies_parsed_at":"2023-02-15T18:16:09.116Z","dependency_job_id":null,"html_url":"https://github.com/andresribeiro/nsfwjs-docker","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresribeiro%2Fnsfwjs-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresribeiro%2Fnsfwjs-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresribeiro%2Fnsfwjs-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresribeiro%2Fnsfwjs-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andresribeiro","download_url":"https://codeload.github.com/andresribeiro/nsfwjs-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225489482,"owners_count":17482378,"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":["docker","nodejs","nsfw","nsfwjs","rest-api","tensorflow","tensorflowjs","typescript"],"created_at":"2024-11-20T07:46:10.924Z","updated_at":"2024-11-20T07:46:11.521Z","avatar_url":"https://github.com/andresribeiro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nsfwjs-docker\n\n### Features ✨\n\n- ℹ️ Return predictions for `Neutral`, `Drawing`, `Sexy`, `Hentai` and `Porn`\n- 🎯 Pretty accurate (~93%)\n- 🖼️ Supports different image formats\n- ⚡ 250ms to make predictions to a single image\n\n### About 🗞️\n\nA Docker REST API for NSFW detection with [NSFWJS](https://github.com/infinitered/nsfwjs). You can find it on the Docker Hub [here](https://hub.docker.com/r/andresribeiroo/nsfwjs). Created for my social network app, [Rybun](https://rybun.com)\n\n### Installation ⚙️\n\n```shell\ndocker run -p 3333:3333 -d --name nsfwjs andresribeiroo/nsfwjs:1.6\n```\n\nIf you are deploying in production, you will probably want to pass the `--restart always` flag to start the container whenever the server restarts\n\n### Usage 🔨\n\n#### One image, multipart/form-data\n\n`POST` request to `/single/multipart-form` sending an image in the `content` field\n\n```\n{\n  \"prediction\": [\n    {\n      \"className\": \"Neutral\",\n      \"probability\": 0.6371303796768188\n    },\n    {\n      \"className\": \"Drawing\",\n      \"probability\": 0.3603636920452118\n    },\n    {\n      \"className\": \"Hentai\",\n      \"probability\": 0.0024505197070538998\n    },\n    {\n      \"className\": \"Sexy\",\n      \"probability\": 0.00003775714503717609\n    },\n    {\n      \"className\": \"Porn\",\n      \"probability\": 0.000017730137187754735\n    }\n  ]\n}\n```\n\n#### Multiple images, multipart/form-data\n\n`POST` request to `/multiple/multipart-form` sending images in the `contents` field\n\n```\n{\n  \"predictions\": [\n    [\n      {\n        \"className\": \"Neutral\",\n        \"probability\": 0.6371303796768188\n      },\n      {\n        \"className\": \"Drawing\",\n        \"probability\": 0.3603636920452118\n      },\n      {\n        \"className\": \"Hentai\",\n        \"probability\": 0.0024505197070538998\n      },\n      {\n        \"className\": \"Sexy\",\n        \"probability\": 0.00003775714503717609\n      },\n      {\n        \"className\": \"Porn\",\n        \"probability\": 0.000017730137187754735\n      }\n    ],\n    [\n      {\n        \"className\": \"Neutral\",\n        \"probability\": 0.9498893618583679\n      },\n      {\n        \"className\": \"Drawing\",\n        \"probability\": 0.04626458138227463\n      },\n      {\n        \"className\": \"Hentai\",\n        \"probability\": 0.00267870188690722\n      },\n      {\n        \"className\": \"Sexy\",\n        \"probability\": 0.0008198379655368626\n      },\n      {\n        \"className\": \"Porn\",\n        \"probability\": 0.0003475486591923982\n      }\n    ]\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresribeiro%2Fnsfwjs-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandresribeiro%2Fnsfwjs-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresribeiro%2Fnsfwjs-docker/lists"}