Skip to main content

A parser for tracklet labels in KITTI Raw Format 1.0 created by the Computer Vision Annotation Tool (CVAT).

Project description

Tracklet Parser

license python black

A parser for tracklet labels in KITTI Raw Format 1.0 created by the Computer Vision Annotation Tool (CVAT).

Table of Contents

Installation

Install the package directly using pip from PyPI:

pip install tracklet-parser

Usage

To use the tracklet-parser, you need a tracklet_labels.xml file and, optionally, a frame_list.txt file that maps frame indices to point cloud file names. The parser generates one KITTI format label file per frame, storing them in the specified output directory.

Creating KITTI format label files from tracklet data is straightforward with the tracklet-parser. Each output file corresponds to a single frame and contains labeling information for all detected objects in that frame (e.g., Car, Pedestrian, etc.).

Here is an example script demonstrating how to parse a tracklet_labels.xml file and convert the tracklet data into KITTI format label files:

from tracklet_parser.tracklet import Tracklet
from tracklet_parser.tracklet_parser import TrackletParser

def main():
    tracklet_labels: str = "path/to/tracklet_labels.xml"
    frame_list: str = "path/to/frame_list.txt"
    output_dir: str = "path/to/output_dir"

    tracklets: List[Tracklet] = TrackletParser.parse_tracklet_xml(tracklet_labels)
    # Create n label text files in path/to/output_dir for n (labeled) recordings in KITTI format
    TrackletParser.convert_tracklets_to_kitti(tracklets, frame_list, output_dir)

if __name__ == "__main__":
    main()

Testing

To run the tests, use the following command:

python -m unittest discover tests

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Submit a pull request with a clear description of your changes.

Please ensure your code adheres to the Black coding style.

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

tracklet_parser-1.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracklet_parser-1.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file tracklet_parser-1.1.0.tar.gz.

File metadata

  • Download URL: tracklet_parser-1.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for tracklet_parser-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3b9d0866798d8cb4a4ee6346cdb1c6b1295c2ce6602e3e53f871bf36e978c075
MD5 09d05378294308732c8808f8c8eb0fee
BLAKE2b-256 001f484f234beee3e9ce8c64ac341435ac8ac09a5c1ff27f54fd0dad305afb87

See more details on using hashes here.

File details

Details for the file tracklet_parser-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tracklet_parser-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e1ce004258dbcae246ec5dda9f9e727c8ea6809f6e191a51a15d73eee1bfb04
MD5 ecb2c6b7ef87a4e59915434aa7457da2
BLAKE2b-256 e7973aa38a5e38a1b840931d460d3200601e1dcd80760ea222b1bf05426e5703

See more details on using hashes here.

Supported by

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