This is a Python application that allows users to create and manage Knowledge Graph for a video file.
Before following the instruction below, please make sure to install Python 3 on your environment.
Set up Python3 virtual environment to install dependencies.
knowledge-graph-builder$ python3 -m venv ./env
Activate your virtual environment for Python.
knowledge-graph-builder$ source ./env/bin/activate
Install Python dependencies.
(env)knowledge-graph-builder$ pip install -r requirements.txt
Initialize your database with the script.
(env)knowledge-graph-builder$ python init_db.py
Provide label data as lines of JSON objects
via standard input to add_data.py
script.
Input data should follow the rules denoted in the knowledge-graph-input repository.
(env)knowledge-graph-builder$ python add_data.py < input_data.jsonl
Process similar items by running merge_items
script.
(env)knowledge-graph-builder$ python merge_items.py
Extract the knowledge graph as lines of JSON objects using
dump.py
script.
(env)knowledge-graph-builder$ python dump.py > output_graph.jsonl
This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIT) (2017-0-01780, The technology development for event recognition/relational reasoning and learning knowledge based system for video understanding)