npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

udt-to-cvat

v0.1.1

Published

Converts files in the [Universal Data Tool format](https://github.com/UniversalDataTool/udt-format) to the YOLOv1.1 format.

Downloads

6

Readme

UDT to YOLO

Converts files in the Universal Data Tool format to the YOLOv1.1 format.

Note: We do a variation on the YOLO format. Each sample gets it's own subdirectory which is a valid YOLO dataset. We may change this in the future.

Usage

udt-to-yolo ./dataset.udt.json -o yolo-dir

YOLOv1.1 Format

There doesn't seem to be a formal spec for the YOLOv1.1 format, but the directory structure is simple enough that we can describe it based on the output of programs like CVAT.

The YOLOv1.1 format is a directory organized like this:

.
├── obj.data                 ini-like file with dataset stats and paths
├── obj.names                labels, each label has new line
├── train.txt                lists all the images
└── obj_train_data           directory containing images and bounding box txt files
    ├── frame_000000.PNG     image
    ├── frame_000000.txt     bounding boxes for image with same name
    ├── frame_000001.PNG     etc.
    ├── frame_000001.txt
    ├── frame_000002.PNG
    ├── frame_000002.txt
    ├── frame_000003.PNG
    └── frame_000003.txt

obj.data

Contains key-value pairs.

| Key | Description | | ------- | ------------------------------------------------------------ | | classes | Number of labels | | train | path to train.txt (relative to "data", the main directory) | | names | path to label names (relative to "data", the main directory) | | backup | ??? |

classes = 3
train = data/train.txt
names = data/obj.names
backup = backup/

obj.names

Each label that appears in the dataset.

label1
label2
label3

train.txt

Paths to every image frame relative to "data" (main directory).

data/obj_train_data/frame_000000.PNG
data/obj_train_data/frame_000001.PNG
data/obj_train_data/frame_000002.PNG
data/obj_train_data/frame_000003.PNG
data/obj_train_data/frame_000004.PNG
data/obj_train_data/frame_000005.PNG

obj_train_data/frame_XXXXXX.PNG

Each frame of the video, or each image of the dataset.

obj_train_data/frame_XXXXXX.txt

Lists all the bounding boxes of the image. Each line is a bounding box. The line represents the <label index (starting at 1)> <leftmost X position> <topmost Y position> <width> <height>.

The unit of the X, Y, Width and Height are all fractions of the image. So for example, if you have an image that is (1000 width, 800 height), and has a bounding box that starts at position (100px from left, 200px from top) with a width of 250 pixels and a height of 300 pixels. Let's say this box uses the second label. You would have the following YOLO line:

2 0.1 0.25 0.25 0.375

Here's the step in-between: 2 100/1000 200/800 250/1000 300/800

1 0.813552 0.562875 0.033875 0.035104
2 0.813552 0.562875 0.033875 0.035104