objectdetection

package
v0.0.0-...-1eb5c16 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetectionResult

type DetectionResult struct {
	Label      string  `json:"label"`
	Confidence float64 `json:"confidence"`
}

type ImageMeta

type ImageMeta struct {
	PostID    string    `json:"post_id"`
	ActorDID  string    `json:"actor_did"`
	CID       string    `json:"cid"`
	URL       string    `json:"url"`
	MimeType  string    `json:"mime_type"`
	CreatedAt time.Time `json:"created_at"`
}

type ImageProcessor

type ImageProcessor interface {
	ProcessImages([]*ImageMeta) ([]*ImageResult, error)
}

type ImageResult

type ImageResult struct {
	Meta    ImageMeta         `json:"meta"`
	Results []DetectionResult `json:"results"`
}

type ObjectDetectionImpl

type ObjectDetectionImpl struct {
	ObjectDetectionServiceHost string
	Client                     *http.Client
}

func NewObjectDetection

func NewObjectDetection(objectDetectionServiceHost string) *ObjectDetectionImpl

func (*ObjectDetectionImpl) ProcessImages

func (o *ObjectDetectionImpl) ProcessImages(ctx context.Context, imageMetas []*ImageMeta) ([]*ImageResult, error)

Jump to

Keyboard shortcuts

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