Skip to main content

Pure Python viewer / renderer / visualizer and loader for the INTERACTION dataset

Project description

Interaction Viz.

A no-nonsense, pure Python, renderer / visualizer and loader for the INTERACTION dataset.

Demo

Quickstart

If you have Python >= 3.7.5, just use

$ pip install interactionviz

(probably it's best to run this inside of an activated virtualenv of some kind)

To view a scene, you can use

$ interactionviz --root-dir </root/of/interaction/dataset> --dataset DR_USA_Intersection_EP0 --session 1

This will open the experimental web viewer.

If you have an older version of Python, you can use pyenv to install a more recent version.

🧪 Experimental Feature: 3D Web viewer

An experimental feature is provided to support rendering the tracks in a webviewer using THREE.js. To try this out, run the following command and navigate to http://localhost:8000/viewer.

$ interactionviz --viewer-kind web --root-dir </root/of/interaction/dataset>

Rendering gifs

When using the interaction dataset for training models, it's useful to be able to write gifs, which may be logged to Tensorboard. See the built-in function write_gif, to render gifs directly.

Using this as a library

The code is modular and easy to extend. Beware this is an early version and the API might change unexpectedly in future versions.

Here's an example of importing and using this viewer in your own code.

from interactionviz.maps import load_map_xml
from interactionviz.tracks import load_tracks_files
from interactionviz.viewers import ArcadeViewer
# Note: You can use the following to render in 3D in a web browser,
#   from interactionviz.viewers import WebViewer

interaction_map = load_map_xml("<path/to/map.osm_xy>")
tracks = load_tracks_files("<path/to/vehicle_tracks_000.csv>")
viewer = ArcadeViewer(interaction_map, tracks)

viewer.run()

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

interactionviz-0.3.0.tar.gz (152.9 kB view hashes)

Uploaded Source

Built Distribution

interactionviz-0.3.0-py3-none-any.whl (154.6 kB view hashes)

Uploaded Python 3

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