보기 흉한 이미지를 빠르게 식별 할 수 있는 간단한 JavaScript 라이브러리 클라이언트의 브라우저에서 모두. NSFWJS는 완벽하지는 않지만 매우 정확합니다 (15,000 개의 테스트 이미지 테스트 세트에서 ~ 90 %). 그리고 점점 더 정확 해지고 있습니다.
https://github.com/infinitered/nsfwjs
라이브러리는 이미지 확률을 다음 5 가지 클래스로 분류합니다.
모듈 사용법
async/await 지원 :
import * as nsfwjs from 'nsfwjs' const img = document.getElementById('img') // Load model from my S3. // See the section hosting the model files on your site. const model = await nsfwjs.load() // Classify the image const predictions = await model.classify(img) console.log('Predictions: ', predictions)
async/await 지원이 없는 경우 :
import * as nsfwjs from 'nsfwjs' const img = document.getElementById('img') // Load model from my S3. // See the section hosting the model files on your site. nsfwjs.load().then(function(model) { model.classify(img).then(function(predictions) { // Classify the image console.log('Predictions: ', predictions) }) })
등록된 댓글이 없습니다.