Skip to content

AbdelrhmanBassiouny/EpisodeSegmenter

Repository files navigation

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.start([15])
segment_pick_up.mp4
event_annotator.mp4

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages