Skip to main content

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.

Metadata

Release files for tracklet-parser 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracklet-parser 1.1.0
File Size Uploaded
tracklet_parser-1.1.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tracklet-parser 1.1.0
File Interpreter ABI Platform
tracklet_parser-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / tracklet_parser-1.1.0.tar.gz

Download URL tracklet_parser-1.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3b9d0866798d8cb4a4ee6346cdb1c6b1295c2ce6602e3e53f871bf36e978c075
BLAKE2b-256 checksum
How to use checksums
001f484f234beee3e9ce8c64ac341435ac8ac09a5c1ff27f54fd0dad305afb87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / tracklet_parser-1.1.0-py3-none-any.whl

Download URL tracklet_parser-1.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e1ce004258dbcae246ec5dda9f9e727c8ea6809f6e191a51a15d73eee1bfb04
BLAKE2b-256 checksum
How to use checksums
e7973aa38a5e38a1b840931d460d3200601e1dcd80760ea222b1bf05426e5703
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page