#dataset #voc

voc-dataset

Simple data loader for The PASCAL Visual Object Classes (VOC)

6 releases

0.3.0 Apr 1, 2021
0.2.2 Nov 3, 2020
0.2.0 Aug 24, 2020
0.1.1 Oct 15, 2019
0.1.0 Jul 19, 2019

#296 in Science

Download history 1/week @ 2022-03-08 18/week @ 2022-03-15 22/week @ 2022-03-22 1/week @ 2022-03-29 2/week @ 2022-04-05 1/week @ 2022-04-12 1/week @ 2022-04-19 48/week @ 2022-04-26 49/week @ 2022-05-03 91/week @ 2022-05-10 21/week @ 2022-05-17 30/week @ 2022-05-24 54/week @ 2022-05-31 15/week @ 2022-06-07 1/week @ 2022-06-14 3/week @ 2022-06-21

73 downloads per month

MIT license

8KB
150 lines

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.


lib.rs:

Simple loader for the PASCAL Visual Object Classes (VOC)

This crate supports dataset formats from VOC2007 to VOC2012.

Dependencies

~1–1.6MB
~34K SLoC