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
Built Distribution
Hashes for episode_segmenter-1.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a55cf5133f3f4de6ca328d66bd043fa77d389a98b504dac5c7047690c6c3b916 |
|
MD5 | 2a73bee6823d979308892b13f2b2bb1f |
|
BLAKE2b-256 | 2fcbeae884e177a26ed182e9b95960513cfc9ab1636efdf5202b390fcd2d42c9 |