https://github.com/momsfriendlyrobotcompany/wernstrom

Python tools for working with KITTI data.

https://github.com/momsfriendlyrobotcompany/wernstrom

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 10 committers (40.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

kitti kitti-dataset robotics visual-odometry
Last synced: 6 months ago · JSON representation

Repository

Python tools for working with KITTI data.

Basic Info
  • Host: GitHub
  • Owner: MomsFriendlyRobotCompany
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 2.89 MB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of utiasSTARS/pykitti
Topics
kitti kitti-dataset robotics visual-odometry
Created over 7 years ago · Last pushed about 3 years ago
Metadata Files
Readme License

README.md

KITTI

GitHub PyPI - Python Version PyPI PyPI - Downloads

wernstrom

So this package is a modification for what I use and a specific set of KITTI data that doesn't appear to follow the standard KITTI format. Use at own risk, your computer might melt or become sentient and take over the world!

This package provides a minimal set of tools for working with the KITTI dataset [1] in Python. So far only the raw datasets and odometry benchmark datasets are supported.

Layout

- Kitti dataset +- calib | +- 0000.txt | +- 00NN.txt +- oxts | +- 0000.txt | +- 00NN.txt +- image_00 (not used) +- image_01 (not used) +- image_02 | +- 0000 | | +- 000000.png | | +- NNNNNN.png | +- 00NN | +- 000000.png | +- NNNNNN.png +- image_03 +- same as image_02

Assumptions

This package assumes that you have also downloaded the calibration data associated with the sequences you want to work on (these are separate files from the sequences themselves).

```python from wernstrom import get_data

download the zip data to current directory ... nothing fancy here!

getdata("image2") ```

Notation

Homogeneous coordinate transformations are provided as 4x4 numpy.array objects and are denoted as T_destinationFrame_originFrame.

Pinhole camera intrinsics for camera N are provided as 3x3 numpy.array objects and are denoted as K_camN. Stereo pair baselines are given in meters as b_gray for the monochrome stereo pair (cam0 and cam1), and b_rgb for the color stereo pair (cam2 and cam3).

Example

Camera data is available via generators for easy sequential access (e.g., for visual odometry), and by indexed getter methods for random access (e.g., for deep learning). Images are loaded as PIL.Image objects using Pillow.

```python import wernstrom as pykitti

basedir = '/your/dataset/dir' sequence = '19'

The 'frames' argument is optional - default: None, which loads the whole dataset.

Calibration, timestamps, and IMU data are read automatically.

Camera and velodyne data are available via properties that create generators

when accessed, or through getter methods that provide random access.

data = pykitti.raw(basedir, sequence, frames=range(0, 50, 5))

dataset.calib: Calibration data are accessible as a named tuple

dataset.timestamps: Timestamps are parsed into a list of datetime objects

dataset.oxts: List of OXTS packets and 6-dof poses as named tuples

dataset.camN: Returns a generator that loads individual images from camera N

dataset.get_camN(idx): Returns the image from camera N at idx

dataset.gray: Returns a generator that loads monochrome stereo pairs (cam0, cam1)

dataset.get_gray(idx): Returns the monochrome stereo pair at idx

dataset.rgb: Returns a generator that loads RGB stereo pairs (cam2, cam3)

dataset.get_rgb(idx): Returns the RGB stereo pair at idx

dataset.position: Returns an array of x,y positions in meters

pointcam0 = data.calib.Tcam0velo.dot(pointvelo)

pointimu = np.array([0,0,0,1]) pointw = [o.Twimu.dot(point_imu) for o in data.oxts]

for cam0_image in data.cam0: # do something pass

cam2image, cam3image = data.get_rgb(3) ```

Transforms T_w_imu

"The Twimu convention refers to the transformation from IMU to the world coordinate system (so notation is TdestinationFrameoriginFrame)." ref

OpenCV

PIL Image data can be converted to an OpenCV-friendly format using numpy and cv2.cvtColor:

python img_np = np.array(img) img_cv2 = cv2.cvtColor(img_np, cv2.COLOR_RGB2BGR)

Note: This package does not actually require that OpenCV be installed on your system, except to run demo_raw_cv2.py.

References

MIT License

Copyright (c) 2020 Kevin J. Walchko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. `

Owner

  • Name: Mom's Friendly Robot Company
  • Login: MomsFriendlyRobotCompany
  • Kind: organization
  • Location: New New York, Earth

Manufacturer of most of the world's robots

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 55
  • Total Committers: 10
  • Avg Commits per committer: 5.5
  • Development Distribution Score (DDS): 0.673
Top Committers
Name Email Commits
Lee Clement c****d@g****m 18
walchko w****o@u****m 15
Lee Clement l****t@r****a 14
Sidney Zhang s****y@u****m 2
Fangchang Ma f****a@m****u 1
Camilo Vejarano c****o@v****m 1
Noah R. Johnson n****3@n****u 1
johannes-graeter j****r@k****u 1
alexandrx m****2@g****m 1
Arpit Aggarwal a****t@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • walchko (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: wernstrom

A minimal set of tools for working with the KITTI dataset in Python

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Dependent packages count: 6.6%
Forks count: 30.5%
Dependent repos count: 30.6%
Average: 31.3%
Stargazers count: 39.1%
Downloads: 49.9%
Maintainers (1)
Last synced: 6 months ago

Dependencies

pyproject.toml pypi
  • pytest * develop
  • numpy *
  • pillow *
  • python >=3.8
  • squaternion *