Skip to main content

B.Sc. thesis · Graded 1.4 · 2025

Bachelor Thesis: Spatial Knowledge Graphs

Generating RDF/OWL knowledge graphs automatically from object detection output, so LLMs can answer spatial questions about machinery. Graded 1.4.

  • Python
  • owlready2
  • RDF and OWL
  • DeepSeek, Llama, and Qwen
  • SSD Object Detection
  • Git
1.4
Final Grade
4
LLMs Evaluated

My thesis bridges 2D computer vision and symbolic spatial reasoning. The pipeline takes raw bounding box coordinates from industrial machinery, applies geometric heuristics, and compiles standard-compliant RDF/OWL knowledge graphs. The graph then serves as a structured context layer for LLMs, improving spatial question answering and reducing hallucinations.

Problem

Building domain-specific semantic graphs by hand is slow, and standard text-to-graph pipelines ignore the spatial coordinate data and multi-view imagery that industrial maintenance settings actually produce.

Approach

Designed an extraction pipeline that parses the pixel coordinates of detected objects, translates them into deterministic spatial relations (left of, inside of, above), and populates formal OWL ontologies with owlready2. A multi-view fusion algorithm consolidates 2D geometric inputs from several camera angles into one coherent 3D semantic model.

Outcome

Showed that a deterministic geometric-to-semantic pipeline can match or beat large end-to-end multi-modal models on structured spatial reasoning in industrial contexts. The thesis and its defense received a grade of 1.4.

Architecture

The system processes annotated image data in tabular form. It computes the center of each detected object and applies threshold-based logic to derive spatial relationships, then uses owlready2 to emit standard-compliant RDF triples. The output was evaluated against four LLMs (DeepSeek-R1, DeepSeek-V3, Llama 3.1, and Qwen 2.5) with metrics for correctness and completeness.

Highlights

Geometric Relation Extraction

Algorithms that derive above, below, left-of, and inside-of relations from pixel coordinates.

Multi-Camera Fusion

Merges object detection data from multiple angles into a single consistent knowledge graph.

Semantic Density Variants

Compared graph compactness against semantic completeness for LLM consumption.

Serialization Comparison

Evaluated OWL versus plain triples to find the format LLMs reason over best.

Timeline

  1. Literature and Concept

    Surveyed the state of the art in Semantic Web architectures and object detection.

  2. Pipeline Development

    Built the Python generator and the spatial relationship extraction algorithms.

  3. Evaluation and Submission

    Finished the quantitative LLM evaluation and submitted the thesis at TU Dresden.

  4. Defense

    Defended the thesis at TU Dresden; final grade 1.4.

Gallery