validate_nudity

package module
v0.0.0-...-3e574d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 11 Imported by: 0

README

validate_nudity

library to validate nudes from any image

Quick Start

package main

import (
	"fmt"
	"github.com/ANDERSON1808/validate_nudity"
	"io/ioutil"
)

func main() {
	data, _ := ioutil.ReadFile("demo.png")
	isNude, err := validate_nudity.IsImageNude(&data)
	if err != nil {
		fmt.Printf("Error %v\n", err)
	}
	fmt.Printf("Img is nude %s",isNude)
}

Installing

go get github.com/ANDERSON1808/validate_nudity

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeImage

func DecodeImage(filePath string) (img image.Image, err error)

func IsImageNude

func IsImageNude(data *[]byte) (r bool, e error)

func IsImageNudeUrl

func IsImageNudeUrl(url string) (r bool, e error)

func NewError

func NewError(msn string, arg interface{}) (err error)

Types

type Detector

type Detector struct {
	SkinRegions Regions
	// contains filtered or unexported fields
}

func (*Detector) Parse

func (d *Detector) Parse() (result bool, err error)

func (*Detector) String

func (d *Detector) String() string

type Pixel

type Pixel struct {
	X int
	Y int

	V float64
	// contains filtered or unexported fields
}

type Region

type Region []*Pixel

type Regions

type Regions []Region

func (Regions) Len

func (r Regions) Len() int

func (Regions) Less

func (r Regions) Less(i, j int) bool

func (Regions) Swap

func (r Regions) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL