Cocotools

cocotools ci Crate Minimum rustc 1.64 Documentation

The cocotools crate provides tools to load, manipulate/convert and visualize COCO format datasets.

Setup

Get the crate from crates.io.

API Usage

You can find the documentation here.

Example

``` use std::path::PathBuf; use cocotools::COCO;

let annotationsfilepath = PathBuf::from("../datasamples/coco25k/annotations.json"); let imagefolderpath = PathBuf::from("../datasamples/coco25k/images"); let cocodataset = COCO::new(&annotationsfilepath, &imagefolderpath)?; let filename = dataset.getimg(17627)?.filename; ```

Program Usage

cargo run -- visualize ../data_samples/coco_25k/annotations.json ../data_samples/coco_25k/images -s 000000017627 cargo run -- convert-segmentation ../data_samples/coco_25k/annotations.json rle -o annotations_rle.json

Future features