Skip to content

open-pack/openpack-toolkit

Repository files navigation

OpenPack Dataset Toolkit (optk)

OpenPack Dataset Logo

Test API Docs - GitHub Pages

"OpenPack Dataset" is a new large-scale multi-modal dataset of the manual packing process. OpenPack is an open-access logistics dataset for human activity recognition, which contains human movement and package information from 16 distinct subjects. This repository provides utilities to explore our exciting dataset.

Install

# Pip
pip install openpack-toolkit

# Poetry
poetry add  openpack-toolkit

Note that the supported dataset version is >=1.0.0.

Docs

Note: Technical documents of the OpenPack dataset are available at GitHub: openpack-dataset/docs.

OpenPack Dataset

See OpenPack Dataset Homepage or GitHub: openpack-dataset for the details of our dataset. To download our dataset, visit this download instruction page.

Examples

Tutorial

Work Activity Recognition (PyTorch)

PyTorch code samples for the work operation prediction task are available. See openpack-torch for more details.

Timestamp

Each data point is associated with a millisecond-precision unix timestamp. The following is a snippet that converts a timestamp (an int value) into a datatime.datetime() object with timezone.

import datetime


def timestamp_to_datetime(ts: int) -> datetime.datetime:
  """Convert unix timestamp (milli-second precision) into datatime object. """
  timezone_jst = datetime.timezone(datetime.timedelta(hours=9))
  dt = datetime.datetime.fromtimestamp(ts / 1000).replace(tzinfo=timezone_jst)
  return dt

def datetime_to_timestamp(dt: datetime.datetime) -> int:
  """Convert a datetime object into a milli-second precision timestamp."""
  return int(dt.timestamp() * 1000)


ts = 1634885786000

dt_out =  timestamp_to_datetime(ts)
ts_out = datetime_to_timestamp(dt_out)
print(f"datetime: {dt_out}")  # datetime: 2021-10-22 15:56:26+09:00
print(f"timestamp: {ts_out}")  # timestamp: 1634885786000
assert ts_out == ts

Links

License

openpack-toolkit has the MIT license, as found in the LICENSE file.

NOTE: OpenPack Dataset itself is available under Creative Commons Attribution Non Commercial Share Alike 4.0 International license. However, OpenPack Dataset (+RGB) License is applied to "OpenPack Dataset (+RGB)" which includes RGB data.