This module provides types related to PascalVoc XML format and getters and setters.
Internal.PascalVoc
Represents Pascal VOC format data.
Internal.PascalVocSource
Represents image source. Corresponding to <annotation><source>
.
PascalVoc.Settings
is providing several setters and getters for it.
{ width : Basics.Int
, height : Basics.Int
, depth : Basics.Int
}
Represents image size. Corresponding to <annotation><size>
.
{ name : String
, bndbox : { xmin : Basics.Float
, ymin : Basics.Float
, xmax : Basics.Float
, ymax : Basics.Float }
, pose : Maybe String
, truncated : Maybe Basics.Int
, difficult : Maybe Basics.Int
}
Represents an annotation object. Corresponding to <annotation><object>
.
pascalVoc : { filename : String, size : Internal.Size, objects : List Internal.Object } -> PascalVoc
Constructor.
size : PascalVoc -> Size
Getter for image size.
setSize : Size -> PascalVoc -> PascalVoc
Setter for image size.
objects : PascalVoc -> List Object
Getter for annotation objects.
setObjects : List Object -> PascalVoc -> PascalVoc
Setter for annotation objects.
filename : PascalVoc -> String
Getter for filename. Corresponding to <annotation><filename>
.
setFilename : String -> PascalVoc -> PascalVoc
Setter for filename. Corresponding to <annotation><filename>
.
folder : PascalVoc -> Maybe String
Getter for folder. This field is optional. Corresponding to <annotation><folder>
.
setFolder : Maybe String -> PascalVoc -> PascalVoc
Setter for folder. This field is optional. Corresponding to <annotation><folder>
.
path : PascalVoc -> Maybe String
Getter for file path. This field is optional. Corresponding to <annotation><path>
.
setPath : Maybe String -> PascalVoc -> PascalVoc
Setter for file path. This field is optional. Corresponding to <annotation><path>
.
segmented : PascalVoc -> Maybe Basics.Int
Getter for segmented
. This field is optional.
Corresponding to <annotation><segmented>
.
In most cases, this value would be 0.
When this XML value cannot be interpreted as Int such as Unspecified
, this function returns Nothing
.
setSegmented : Maybe Basics.Int -> PascalVoc -> PascalVoc
Setter for segmented
. This field is optional.
Corresponding to <annotation><segmented>
.
source : PascalVoc -> Maybe PascalVocSource
Getter for source
. This field is optional.
Corresponding to <annotation><source>
.
See PascalVoc.Settings
to access its child fields.
setSource : Maybe PascalVocSource -> PascalVoc -> PascalVoc
Setter for source
. This field is optional.
Corresponding to <annotation><source>
.