voc-dataset

Crates.iovoc-dataset
lib.rsvoc-dataset
version0.3.0
sourcesrc
created_at2019-07-19 13:23:25.082966
updated_at2021-04-01 08:06:03.978138
descriptionSimple data loader for The PASCAL Visual Object Classes (VOC)
homepagehttps://github.com/jerry73204/voc-dataset-rs
repositoryhttps://github.com/jerry73204/voc-dataset-rs
max_upload_size
id150121
size12,393
(jerry73204)

documentation

https://docs.rs/voc-dataset/

README

voc-dataset

docs | crates.io

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.

voc-dataset = "0.2"

Usage

The load() function loads all available samples from VOC dataset directory.

let voc_dir = test_data_dir.join("VOCdevkit").join("VOC2012");
let samples = voc_dataset::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.

use voc_dataset::Annotation;

let xml = std::fs::read_to_string("VOCdevkit/VOC2012/Annotations/2012_001231.xml")?;
let annotation: Annotation = serde_xml_rs::from_str(&xml)?;

License

MIT. See license file.

Commit count: 23

cargo fmt