| Crates.io | cocotools |
| lib.rs | cocotools |
| version | 0.0.7 |
| created_at | 2023-03-09 05:40:41.776819+00 |
| updated_at | 2023-05-25 15:53:17.004547+00 |
| description | Package providing functionalities to work with COCO format datasets. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 805363 |
| size | 135,264 |
The cocotools crate provides tools to load, manipulate/convert and visualize COCO format datasets.
Get the crate from crates.io.
You can find the documentation here.
use std::path::PathBuf;
use cocotools::COCO;
let annotations_file_path = PathBuf::from("../data_samples/coco_25k/annotations.json");
let image_folder_path = PathBuf::from("../data_samples/coco_25k/images");
let coco_dataset = COCO::new(&annotations_file_path, &image_folder_path)?;
let file_name = dataset.get_img(17627)?.file_name;
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