Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yujota/elm-pascal-voc
Elm library for encoding and decoding PASCAL Visual Object Class XML format (http://host.robots.ox.ac.uk/pascal/VOC/)
https://github.com/yujota/elm-pascal-voc
elm pascal-voc
Last synced: 2 days ago
JSON representation
Elm library for encoding and decoding PASCAL Visual Object Class XML format (http://host.robots.ox.ac.uk/pascal/VOC/)
- Host: GitHub
- URL: https://github.com/yujota/elm-pascal-voc
- Owner: yujota
- License: bsd-3-clause
- Created: 2020-04-02T09:06:50.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-11T20:21:04.000Z (almost 5 years ago)
- Last Synced: 2024-11-21T00:59:29.143Z (2 months ago)
- Topics: elm, pascal-voc
- Language: Elm
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-pascal-voc
Elm library for encoding and decoding PASCAL Visual Object Class XML format (http://host.robots.ox.ac.uk/pascal/VOC/).
Supported XML tags in this library are;
- folder
- filename
- path
- source
- size
- object (Annotation)This library may not provide tags which are not used frequently.
## How to use
```elm
import PascalVoc
import PascalVoc.Decode
import PascalVoc.EncodesampleXmlString = """
Train
sample.png
/my/path/Train/sample.png
Unknown
224
224
3
sample-annotation
82
172
88
146
"""
-- Decoding
data = PascalVoc.Decode.decode sampleXmlString
Result.map PascalVoc.filename data == "sample.png"-- Access to an annotation object
Result.map PascalVoc.objects data == [
{ name = "sample-annotation"
, bndBox = { xmin = 82, xmax = 172, ymin = 88, ymax = 146 }
, pose = Nothing
, truncated = Nothing
, difficult = Nothing
}
]-- Encoding
Result.map PascalVoc.Encode.format data
```