transforms

package
v0.0.0-...-f6d4371 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package transforms provides tools to transform TAR to TFRecords files

  • Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.

Package transforms provides tools to transform TAR to TFRecords files

  • Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const (
	TfOpDecode = "Decode"
	TfOpRotate = "Rotate"
	TfOpResize = "Resize"
	TfOpRename = "Rename"
)

Variables

This section is empty.

Functions

func CreatePipeline

func CreatePipeline(r io.Reader, w io.Writer, isTarGz bool, job *TransformJob) *pipeline.DefaultPipeline

Types

type ConversionMsg

type ConversionMsg struct {
	MsgType string              `json:"type"`
	Key     string              `json:"ext_name"`
	DstSize []int               `json:"dst_size"`
	Renames map[string][]string `json:"renames"`
	Angle   float64             `json:"angle"`
}

func (*ConversionMsg) ToSampleTransformation

func (msg *ConversionMsg) ToSampleTransformation() (transform.SampleTransformation, error)

type DecodeConv

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

Conversions

func (*DecodeConv) TransformSample

func (c *DecodeConv) TransformSample(sample core.Sample) core.Sample

type RenameConv

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

func (*RenameConv) TransformSample

func (c *RenameConv) TransformSample(sample core.Sample) core.Sample

type ResizeConv

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

func (*ResizeConv) TransformSample

func (c *ResizeConv) TransformSample(sample core.Sample) core.Sample

type RotateConv

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

func (*RotateConv) TransformSample

func (c *RotateConv) TransformSample(sample core.Sample) core.Sample

type SampleToTFExampleReader

type SampleToTFExampleReader struct {
	SampleReader core.SampleReader
}

func (*SampleToTFExampleReader) Read

type Select

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

Selections

func (*Select) SelectSample

func (s *Select) SelectSample(sample core.Sample) []string

type SelectionMsg

type SelectionMsg struct {
	Key string `json:"ext_name"` // TODO: support multiple keys in one selection.
}

func (*SelectionMsg) ToSampleSelection

func (msg *SelectionMsg) ToSampleSelection() selection.Sample

type TransformJob

type TransformJob struct {
	Conversions []transform.SampleTransformation
	Selections  []selection.Sample
}

type TransformJobMsg

type TransformJobMsg struct {
	Conversions []ConversionMsg `json:"conversions"`
	Selections  []SelectionMsg  `json:"selections"`
}

func (*TransformJobMsg) ToTransformJob

func (j *TransformJobMsg) ToTransformJob() (*TransformJob, error)

Jump to

Keyboard shortcuts

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