Skip to main content

Read cvat training set

Project description

cvat_reader

Package to read cvat training set zip file into numpy array image and annotations.

The cvat format is usefull because it contains the original video file. The original video file has two main advantage over image files:

  1. The original video file is much better compressed than a bunch of image files.
  2. The image files are re-compressed versions of the video file and therefore lower in quality

Example

import cv2

from cvat_reader import open_cvat


with open_cvat("task.zip") as dataset:
    dataset.seek(100)
    print(dataset.labels)
    dataset.seek_first_annotation()

    for frame in dataset:
        if frame.annotations:
            cv2.imshow('original', frame.image)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cvat_reader-0.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page