This project runs a pipeline that:
- starts GraphDB (via Docker),
- creates the repository if needed,
- imports the ontology,
- converts VCD JSON files to RDF (
population_V9.nq), - detects events/actions with SPARQL (
queries_V6.nt), - optionally writes those actions/events back into VCD files.
Edit conf.yaml before running the pipeline if you need to change paths, ports, or repository names.
ontology: base URI, prefix, and the ontology file path.vcd.vcd_path: input VCD folder (source JSON files).paths.output_dir: output folder for VCDs with actions/events.outputs: filenames for generated RDF (.nq) and queries (.nt).database: GraphDB connection (ip/port/repository).endpoint_url: full GraphDB SPARQL endpoint.api: optional class discovery API (used in preload).thresholds: numerical thresholds used for event/action detection.
From the repository root, run:
python .\run_pipeline.pyThe script will:
- start GraphDB (Docker) if needed,
- create the repository if it does not exist,
- import the ontology,
- ask whether to run
preload.pyin multiprocessing or sequential mode, - run
preload.pyand generatepopulation_V9.nq, - pause and ask you to import
population_V9.nqmanually, - run
queries.pyand generatequeries_V6.nt, - pause and ask you to import
queries_V6.ntmanually, - ask if you want to export actions/events back to VCDs.
Before running preload.py, the script asks:
- Multiprocessing (default): faster, but can fail on low RAM.
- Sequential: slower, but more stable.
When the console tells you to import population_V9.nq:
- Open GraphDB Workbench.
- Go to Import -> Server Files.
- Select
population_V9.nqand click Import. - Wait for the import to finish.
When the console tells you to import queries:
- Open Import -> Server Files again.
- Select only
queries_V6.nt. - Do not select
population_V9.nqat this step. - Click Import and wait for it to finish.
At the end, the pipeline asks:
Do you want to export actions/events back to VCDs? [y/N]
If you answer yes, it will create the output files in the folder from:
conf.yaml -> paths.output_dir (default: ./vcd_nuscenes_full_enriched/).
This will read the RDF in GraphDB and write the enriched VCDs into paths.output_dir.
You can skip steps if you only want to repeat a part:
- Re-run only
preload.py(skip ontology + queries):python .\run_pipeline.py --skip-ontology --skip-queries
- Re-run only
queries.py(skip ontology + preload):python .\run_pipeline.py --skip-ontology --skip-preload
- Run without starting Docker (GraphDB already running):
python .\run_pipeline.py --no-docker
- Only export VCDs (no pipeline, just write actions/events):
python .\graphdb_to_vcd_parser.py

