model

package
v0.0.0-...-d3496f7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCOCOAnnotationsFromCreateMLFile

func ReadCOCOAnnotationsFromCreateMLFile(annotations *COCOAnnotations, path string) error

func ReadCOCOAnnotationsFromFile

func ReadCOCOAnnotationsFromFile(annotations *COCOAnnotations, path string) error

func ReadCOCOAnnotationsFromPascalVOCDir

func ReadCOCOAnnotationsFromPascalVOCDir(annotations *COCOAnnotations, path string) error

func ReadCreateMLAnnotationsFromCOCOFile

func ReadCreateMLAnnotationsFromCOCOFile(annotations *CreateMLAnnotations, path string) error

func ReadCreateMLAnnotationsFromFile

func ReadCreateMLAnnotationsFromFile(annotations *CreateMLAnnotations, path string) error

func ReadCreateMLAnnotationsFromPascalVOCDir

func ReadCreateMLAnnotationsFromPascalVOCDir(annotations *CreateMLAnnotations, path string) error

func ReadVOCAnnotationFromDir

func ReadVOCAnnotationFromDir(annotations *VOCAnnotations, path string) error

func ReadVOCAnnotationFromFile

func ReadVOCAnnotationFromFile(annotation *VOCAnnotation, path string) error

func ReadVOCAnnotationsFromCOCOFile

func ReadVOCAnnotationsFromCOCOFile(annotations *VOCAnnotations, path string) error

func ReadVOCAnnotationsFromCreateMLFile

func ReadVOCAnnotationsFromCreateMLFile(annotations *VOCAnnotations, path string) error

func WriteCOCOAnnotationsToFile

func WriteCOCOAnnotationsToFile(annotations *COCOAnnotations, path string) error

func WriteCreateMLAnnotationsToFile

func WriteCreateMLAnnotationsToFile(annotations *CreateMLAnnotations, path string) error

func WriteVOCAnnotationsToFile

func WriteVOCAnnotationsToFile(annotations *VOCAnnotations, path string) error

Types

type COCOAnnotation

type COCOAnnotation struct {
	ID           int       `json:"id"`
	ImageID      int       `json:"image_id"`
	CategoryID   int       `json:"category_id"`
	BBox         []float32 `json:"bbox"`
	Area         float32   `json:"area"`
	Segmentation []float32 `json:"segmentation"`
	IsCrowd      int       `json:"iscrowd"`
}

type COCOAnnotations

type COCOAnnotations struct {
	Info        COCOInfo         `json:"info"`
	Licenses    []COCOLicense    `json:"licenses"`
	Categories  []COCOCategory   `json:"categories"`
	Images      []COCOImage      `json:"images"`
	Annotations []COCOAnnotation `json:"annotations"`
}

type COCOCategory

type COCOCategory struct {
	ID            int    `json:"id"`
	Name          string `json:"name"`
	SuperCategory string `json:"supercategory"`
}

type COCOImage

type COCOImage struct {
	ID           int    `json:"id"`
	License      int    `json:"license"`
	FileName     string `json:"file_name"`
	Height       int    `json:"height"`
	Width        int    `json:"width"`
	DateCaptured string `json:"date_captured"`
}

type COCOInfo

type COCOInfo struct {
	Year        string `json:"year"`
	Version     string `json:"version"`
	Description string `json:"description"`
	Contributor string `json:"contributor"`
	URL         string `json:"url"`
	DateCreated string `json:"date_created"`
}

type COCOLicense

type COCOLicense struct {
	ID   int    `json:"id"`
	URL  string `json:"url"`
	Name string `json:"name"`
}

type CreateMLAnnotation

type CreateMLAnnotation struct {
	Image       string                   `json:"image"`
	Annotations []CreateMLAnnotationItem `json:"annotations"`
}

type CreateMLAnnotationItem

type CreateMLAnnotationItem struct {
	Label       string              `json:"label"`
	Coordinates CreateMLCoordinates `json:"coordinates"`
}

type CreateMLAnnotations

type CreateMLAnnotations []CreateMLAnnotation

type CreateMLCoordinates

type CreateMLCoordinates struct {
	X      float32 `json:"x"`
	Y      float32 `json:"y"`
	Width  float32 `json:"width"`
	Height float32 `json:"Height"`
}

type VOCAnnotation

type VOCAnnotation struct {
	XMLName   xml.Name            `xml:"annotation"`
	Folder    string              `xml:"folder"`
	Filename  string              `xml:"filename"`
	Path      string              `xml:"path"`
	Source    VOCDataSource       `xml:"source"`
	Size      VOCImageSize        `xml:"size"`
	Segmented int                 `xml:"segmented"`
	Object    []VOCAnnotationItem `xml:"object"`
}

type VOCAnnotationItem

type VOCAnnotationItem struct {
	Name      string    `xml:"name"`
	Pose      VOCPose   `xml:"pose"`
	Truncated int       `xml:"truncated"`
	Difficult int       `xml:"difficult"`
	Occluded  int       `xml:"occluded"`
	Bndbox    VOCBndbox `xml:"bndbox"`
}

type VOCAnnotations

type VOCAnnotations []VOCAnnotation

type VOCBndbox

type VOCBndbox struct {
	Xmin int `xml:"xmin"`
	Xmax int `xml:"xmax"`
	Ymin int `xml:"ymin"`
	Ymax int `xml:"ymax"`
}

type VOCDataSource

type VOCDataSource struct {
	Database   string `xml:"database"`
	Annotation string `xml:"annotation"`
	Image      string `xml:"image"`
}

type VOCImageSize

type VOCImageSize struct {
	Width  int `xml:"width"`
	Height int `xml:"height"`
	Depth  int `xml:"depth"`
}

type VOCOwner

type VOCOwner struct {
	Name string `xml:"name"`
}

type VOCPose

type VOCPose string
const (
	Front       VOCPose = "front"
	Rear        VOCPose = "rear"
	Left        VOCPose = "left"
	Right       VOCPose = "right"
	Unspecified VOCPose = "unspecified"
)

Jump to

Keyboard shortcuts

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