Skip to main content

Annotates activitiy episodes represented by meshes moving in a 3D environment with the corresponding events, actions and activities.

Project description

EpisodeSegmenter

A python library for segmenting simulation episodes of activities. This is done by detecting physical interactions, and events in the simulation. This library also integrates with NEEMPycramInterface to segment NEEM episodes as a use case.

Installation

pip install episode_segmenter

Example Usage

All below examples assume the neems are located in a 'test' database at 'localhost' which can be accessed by 'newuser' using password 'password'.

Replaying the motions of a NEEM and segmenting it:

This is done by using the PyCRAMNEEMInterface class which provides an easy way to replay the motions of a NEEM, then using the NEEMSegmenter class which implements EpisodeSegmenter to segment the motions into activities, actions, and events.

from neem_pycram_interface import PyCRAMNEEMInterface
from episode_segmenter.neem_segmenter import NEEMSegmenter

from pycram.datastructures.enums import WorldMode
from pycram.worlds.bullet_world import BulletWorld

BulletWorld(WorldMode.GUI)
pni = PyCRAMNEEMInterface('mysql+pymysql://newuser:password@localhost/test')
ns = NEEMSegmenter(pni, annotate_events=True)
ns.run_event_detectors_on_neem([15])

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

episode_segmenter-1.0.11.tar.gz (46.9 kB view hashes)

Uploaded Source

Built Distribution

episode_segmenter-1.0.11-py3-none-any.whl (35.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