# gao-kun-lab/efficient-grounding-dino architecture

> Architecture diagram of the GitHub repository gao-kun-lab/efficient-grounding-dino, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gao-kun-lab/efficient-grounding-dino
- Repository: https://github.com/gao-kun-lab/efficient-grounding-dino

## Overview

This repository presents Efficient Grounding DINO for remote-sensing visual grounding: a user supplies imagery and text, and the model grounds the text in the image with object predictions. The README documents RSVG/RSVG_HR training, augmentation, and fine-tuning; the sampled detector code shows prompt/token preparation, language-model encoding, and prediction. The model is also built on MMDetection. The grounding configs and dataset implementation are not present in the supplied tree, so their wiring is not mapped; the fusion and label-assignment details are documented at a high level rather than verified from source.

Main entry points: [`mmdetection/mmdet/models/detectors/grounding_dino_Lquery.py`](https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/mmdetection/mmdet/models/detectors/grounding_dino_Lquery.py) (Grounding DINO), [`detection_data/tree_datasets.py`](https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/detection_data/tree_datasets.py) (Images and annotations), [`mmdetection/mmdet/apis/det_inferencer.py`](https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/mmdetection/mmdet/apis/det_inferencer.py) (Detection inferencer), [`mmdetection/configs`](https://github.com/gao-kun-lab/efficient-grounding-dino/tree/main/mmdetection/configs) (Training experiments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Remote-sensing data"]
  node_images["Images and annotations<br/>[tree_datasets.py]"]
  node_prompt["Text prompt"]
end

subgraph group_model["Grounding model"]
  node_detector["Grounding DINO"]
  node_language["Language model"]
end

subgraph group_runtime["Inference runtime"]
  node_inferencer["Detection inferencer<br/>[det_inferencer.py]"]
  node_predictions["Grounded predictions"]
  node_training["Training experiments"]
end

node_user(("Researcher"))

node_user -->|"submits inputs"| node_inferencer
node_inferencer -->|"runs inference"| node_detector
node_detector -->|"encodes prompts"| node_language
node_prompt -->|"provides text"| node_detector
node_images -->|"provides imagery"| node_detector
node_detector -->|"returns grounding"| node_predictions
node_images -.->|"training data"| node_training
node_training -.->|"configures experiments"| node_detector

click node_images "https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/detection_data/tree_datasets.py"
click node_inferencer "https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/mmdetection/mmdet/apis/det_inferencer.py"
click node_detector "https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/mmdetection/mmdet/models/detectors/grounding_dino_Lquery.py"
click node_training "https://github.com/gao-kun-lab/efficient-grounding-dino/tree/main/mmdetection/configs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_images,node_prompt toneBlue
class node_detector,node_language toneAmber
class node_inferencer,node_predictions,node_training toneMint
class node_user toneIndigo
```

## Components

### Remote-sensing data

- [Images and annotations](https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/detection_data/tree_datasets.py): `detection_data/tree_datasets.py`
- **Text prompt**

### Grounding model

- [Grounding DINO](https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/mmdetection/mmdet/models/detectors/grounding_dino_Lquery.py): `mmdetection/mmdet/models/detectors/grounding_dino_Lquery.py`
- **Language model**

### Inference runtime

- [Detection inferencer](https://github.com/gao-kun-lab/efficient-grounding-dino/blob/main/mmdetection/mmdet/apis/det_inferencer.py): `mmdetection/mmdet/apis/det_inferencer.py`
- **Grounded predictions**
- [Training experiments](https://github.com/gao-kun-lab/efficient-grounding-dino/tree/main/mmdetection/configs): `mmdetection/configs`

### Other components

- **Researcher**

## Connections

- Researcher → Detection inferencer: submits inputs
- Detection inferencer → Grounding DINO: runs inference
- Grounding DINO → Language model: encodes prompts
- Text prompt → Grounding DINO: provides text
- Images and annotations → Grounding DINO: provides imagery
- Grounding DINO → Grounded predictions: returns grounding
- Images and annotations → Training experiments: training data
- Training experiments → Grounding DINO: configures experiments
