The crate provides types and loader for the PASCAL Visual Object Classes (VOC) dataset. It features serde-compatible types.
Add this line to use the crate in your project.
toml
voc-dataset = "0.2"
The load()
function loads all available samples from VOC dataset directory.
```rust let vocdir = testdatadir.join("VOCdevkit").join("VOC2012"); let samples = vocdataset::load(&voc_dir)?;
for sample in samples.iter() { // --snip-- } ```
The annotation types are serde-compatible. You can parse the annotation files with serde_xml_rs.
```rust use voc_dataset::Annotation;
let xml = std::fs::readtostring("VOCdevkit/VOC2012/Annotations/2012001231.xml")?; let annotation: Annotation = serdexmlrs::fromstr(&xml)?; ```
MIT. See license file.