vott2yolo

1.0.3 • Public • Published

VoTT to YOLO file converter

Convert VoTT JSON exports to YOLO file format.

Install

npm i vott2yolo -g

Command line usage

Convert one file

vott2yolo /path/to/labeled-file.json /path/to/project.vott

Convert multiple files

vott2yolo /path/to/labeled-files/**/*.json /path/to/project.vott

Node.js usage

const { EOL } = require('os');
const fs = require('fs');
const vott2yolo = require('vott2yolo');

// load VoTT file as an object
const vott = JSON.parse(fs.readFileSync('/my/local/path/vott.json', 'utf8'));
// init tag list
const tags = ['tag1', 'tag2', 'tag3'];
// generate YOLO entries and concat them to a single string
const yolo = vott2yolo(vott, tags).join(EOF);
// write YOLO entries to file
fs.writeFileSync('/another/local/path/yolo.txt', yolo, 'utf8');

/vott2yolo/

    Package Sidebar

    Install

    npm i vott2yolo

    Weekly Downloads

    2

    Version

    1.0.3

    License

    none

    Unpacked Size

    4.71 kB

    Total Files

    6

    Last publish

    Collaborators

    • jeanbmar