recognition

package
v0.0.0-...-a4f318f Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloudmersive

type Cloudmersive struct {
	CloudmersiveAPIEndpoint string
	CloudmersiveAPIKey      string
	NsfwThreshold           int
	SuggestiveThreshold     int
}

Cloudmersive is a struct containing all the data needed to perform requests to Cloudmersive.com.

func NewCloudmersiveClient

func NewCloudmersiveClient(endpoint string, apikey string, nsfw int, suggestive int) *Cloudmersive

NewCloudmersiveClient starts Cloudmersive and sets some default nsfw and suggestive parameters.

func (*Cloudmersive) EvaluateImage

func (c *Cloudmersive) EvaluateImage(extension string, file io.Reader, decoder decoder.MediaDecoder) *structs.Analysis

EvaluateImage returns the NSFW values of a photo using Cloudmersive's services.

func (*Cloudmersive) EvaluateVideo

func (c *Cloudmersive) EvaluateVideo(extension string, file io.Reader, d decoder.MediaDecoder) *structs.Analysis

EvaluateVideo returns the NSFW values of a video using Cloudmersive's services.

type Provider

type Provider interface {
	EvaluateImage(extension string, reader io.Reader, d decoder.MediaDecoder) *structs.Analysis
	EvaluateVideo(extension string, reader io.Reader, d decoder.MediaDecoder) *structs.Analysis
}

Provider represents a generic NSFW recognition provider.

type Tensorflow

type Tensorflow struct {
	// contains filtered or unexported fields
}

Tensorflow represents a Tensorflow-based NSFW recognition service.

func NewTensorflowInstance

func NewTensorflowInstance(cfg *nStructs.TensorflowConfiguration) (*Tensorflow, error)

NewTensorflowInstance instantiates a Tensorflow-based NSFW recognition service.

func (*Tensorflow) EvaluateImage

func (t *Tensorflow) EvaluateImage(extension string, reader io.Reader, d decoder.MediaDecoder) *structs.Analysis

EvaluateImage perform a NSFW recognition on an image using Tensorflow.

func (*Tensorflow) EvaluateVideo

func (t *Tensorflow) EvaluateVideo(extension string, reader io.Reader, d decoder.MediaDecoder) *structs.Analysis

EvaluateVideo perform a NSFW recognition on a video using Tensorflow.

Jump to

Keyboard shortcuts

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