# dirtyharrylyl/hake architecture

> Architecture diagram of the GitHub repository dirtyharrylyl/hake, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dirtyharrylyl/hake
- Repository: https://github.com/dirtyharrylyl/hake

## Overview

#### Purpose and Scope
This repository is a dataset and metadata distribution for HAKE (Human Activity Knowledge Engine), centered on human body part-state (PaSta) annotations for human–object interaction (HOI) understanding. It does not contain the training/inference implementation; model code is delegated to linked HAKE-Action and related repositories.

#### Primary Artifacts and Entry Points
Users begin with the top-level dataset documentation in `README.md`, then select an annotation package under `Annotations/`:
- Image-level HICO HOI recognition: `Annotations/hico-image-level.tar.gz`
- Instance-level HICO-DET HOI detection: `Annotations/hico-det-instance-level.tar.gz`
- HAKE-Large instance-level pretraining: `Annotations/hake_large_annotation.tar.gz`

`Annotations/README.md` is the contract for extracted annotation formats.

#### Annotation Distribution Boundary
Compressed annotation archives are the core deliverables. Extraction produces JSON training labels (as documented by the README), separating label data from images and from downstream model implementations. This makes the repository an offline dataset dependency rather than an executable ML service.
Paths: `Annotations/hico-image-level.tar.gz`, `Annotations/hico-det-instance-level.tar.gz`, `Annotations/hake_large_annotation.tar.gz`.

#### Supported Learning Granularities
HAKE labels support two task boundaries:
- **Image-level**: multi-label classification of the HOIs present in a still image; HICO defines 600 categories.
- **Instance-level**: per-person HOI/action labels, including detection-oriented HICO-DET and pretraining-oriented HAKE-Large.

Part states describe activity across ten body parts and act as fine-grained supervision/features for HOI and action models.

#### Ontology and Compatibility Metadata
`Config/` provides the canonical vocabulary needed to interpret labels and map predictions: HOI categories, objects, verbs, and alternative part-state spaces. `misc/76to55.json` defines a compatibility mapping between part-state taxonomies.
Paths: `Config/hico_hoi_list.txt`, `Config/hico_obj_list.txt`, `Config/hico_verb_list.txt`, `Config/Part_State_76.txt`, `misc/76to55.json`.

#### Image Acquisition Pipeline
Images are intentionally distributed separately from labels. Curated source image lists identify the dataset/image universe, while a Python downloader resolves and downloads images using URL manifests. The shell script is the operational entry point for batch acquisition.
Paths: `Images/download_image/download_dataset.sh`, `Images/download_image/Download_data.py`, `Images/download_image/hcvrd_url.json`, `Images/imagelist/hake_images_20200614.txt`.

#### External Dependencies and Downstream Consumers
Material external sources include HICO/HICO-DET images, image hosting URLs represented in the manifests, and Google Drive-hosted supplemental assets/results. Training, model execution, and evaluation are external: HAKE-Action repositories consume these labels, while HICO evaluation is performed using separately downloaded MATLAB benchmark code. `models/README.md` documents model-related distribution context without model source in this tree.

Main entry points: [`Annotations/hico-image-level.tar.gz`](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hico-image-level.tar.gz) (HICO image-level labels), [`Annotations/hico-det-instance-level.tar.gz`](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hico-det-instance-level.tar.gz) (HICO-DET instance labels), [`README.md`](https://github.com/dirtyharrylyl/hake/blob/master/README.md) (Dataset guide), [`Annotations/README.md`](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/README.md) (Format contract)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_annotations["Annotation packages"]
  node_annotation_readme["Format contract<br/>documentation<br/>[README.md]"]
  node_hico_image["HICO image-level labels<br/>annotation archive"]
  node_hico_det["HICO-DET instance labels<br/>annotation archive"]
  node_hake_large["HAKE-Large labels<br/>annotation archive"]
end

subgraph group_ontology["Label ontology"]
  node_hoi_vocab["HOI categories<br/>vocabulary<br/>[hico_hoi_list.txt]"]
  node_object_vocab["Object vocabulary<br/>[hico_obj_list.txt]"]
  node_verb_vocab["Verb vocabulary<br/>[hico_verb_list.txt]"]
  node_part_state_76["76-state taxonomy<br/>vocabulary<br/>[Part_State_76.txt]"]
  node_taxonomy_map["76-to-55 mapping<br/>compatibility map<br/>[76to55.json]"]
end

subgraph group_images["Image acquisition"]
  node_image_list["Curated image list<br/>image manifest"]
  node_url_manifest["Image URL manifest<br/>image manifest<br/>[hcvrd_url.json]"]
  node_download_script["Batch download entry point<br/>shell script"]
  node_downloader["Image downloader<br/>Python script<br/>[Download_data.py]"]
  node_source_images[("External source images<br/>external dataset")]
end

subgraph group_consumers["External consumers"]
  node_hake_action["HAKE-Action models<br/>external repository"]
  node_hico_eval["HICO MATLAB evaluation<br/>external benchmark"]
  node_models_readme["Model distribution context<br/>documentation<br/>[README.md]"]
end

node_readme["Dataset guide<br/>documentation<br/>[README.md]"]
node_part_states{{"PaSta supervision<br/>label concept"}}

node_readme -->|"directs users to"| node_annotation_readme
node_readme -->|"selects"| node_hico_image
node_readme -->|"selects"| node_hico_det
node_readme -->|"selects"| node_hake_large
node_annotation_readme -->|"defines extracted format"| node_hico_image
node_annotation_readme -->|"defines extracted format"| node_hico_det
node_annotation_readme -->|"defines extracted format"| node_hake_large
node_hico_image -->|"uses labels from"| node_hoi_vocab
node_hico_image -->|"uses"| node_object_vocab
node_hico_image -->|"uses"| node_verb_vocab
node_hico_det -->|"includes"| node_part_states
node_hake_large -->|"supervises"| node_part_states
node_part_states -->|"canonicalized by"| node_part_state_76
node_part_state_76 -->|"converted through"| node_taxonomy_map
node_download_script -->|"runs"| node_downloader
node_downloader -->|"reads URLs"| node_url_manifest
node_image_list -->|"identifies required images"| node_source_images
node_url_manifest -->|"resolves downloads from"| node_source_images
node_source_images -.->|"kept separate from labels"| node_hico_image
node_source_images -.->|"kept separate from labels"| node_hico_det
node_hico_image -->|"training input"| node_hake_action
node_hico_det -->|"training input"| node_hake_action
node_hake_large -->|"pretraining input"| node_hake_action
node_hico_det -.->|"evaluated by"| node_hico_eval
node_models_readme -.->|"links context for"| node_hake_action

click node_readme "https://github.com/dirtyharrylyl/hake/blob/master/README.md"
click node_annotation_readme "https://github.com/dirtyharrylyl/hake/blob/master/Annotations/README.md"
click node_hico_image "https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hico-image-level.tar.gz"
click node_hico_det "https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hico-det-instance-level.tar.gz"
click node_hake_large "https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hake_large_annotation.tar.gz"
click node_hoi_vocab "https://github.com/dirtyharrylyl/hake/blob/master/Config/hico_hoi_list.txt"
click node_object_vocab "https://github.com/dirtyharrylyl/hake/blob/master/Config/hico_obj_list.txt"
click node_verb_vocab "https://github.com/dirtyharrylyl/hake/blob/master/Config/hico_verb_list.txt"
click node_part_state_76 "https://github.com/dirtyharrylyl/hake/blob/master/Config/Part_State_76.txt"
click node_taxonomy_map "https://github.com/dirtyharrylyl/hake/blob/master/misc/76to55.json"
click node_image_list "https://github.com/dirtyharrylyl/hake/blob/master/Images/imagelist/hake_images_20200614.txt"
click node_url_manifest "https://github.com/dirtyharrylyl/hake/blob/master/Images/download_image/hcvrd_url.json"
click node_download_script "https://github.com/dirtyharrylyl/hake/blob/master/Images/download_image/download_dataset.sh"
click node_downloader "https://github.com/dirtyharrylyl/hake/blob/master/Images/download_image/Download_data.py"
click node_models_readme "https://github.com/dirtyharrylyl/hake/blob/master/models/README.md"

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_annotation_readme,node_hico_image,node_hico_det,node_hake_large toneBlue
class node_hoi_vocab,node_object_vocab,node_verb_vocab,node_part_state_76,node_taxonomy_map toneAmber
class node_image_list,node_url_manifest,node_download_script,node_downloader,node_source_images toneMint
class node_hake_action,node_hico_eval,node_models_readme toneRose
class node_readme,node_part_states toneNeutral
```

## Components

### Annotation packages

Compressed labels distributed independently of images.

- [Format contract](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/README.md): documentation · Documents extracted JSON annotation formats. · `Annotations/README.md`
- [HICO image-level labels](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hico-image-level.tar.gz): annotation archive · Multi-label annotations for 600 image-level HOI categories. · `Annotations/hico-image-level.tar.gz`
- [HICO-DET instance labels](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hico-det-instance-level.tar.gz): annotation archive · Per-person detection-oriented HOI labels. · `Annotations/hico-det-instance-level.tar.gz`
- [HAKE-Large labels](https://github.com/dirtyharrylyl/hake/blob/master/Annotations/hake_large_annotation.tar.gz): annotation archive · Instance-level pretraining annotations. · `Annotations/hake_large_annotation.tar.gz`

### Label ontology

Canonical vocabularies and taxonomy compatibility.

- [HOI categories](https://github.com/dirtyharrylyl/hake/blob/master/Config/hico_hoi_list.txt): vocabulary · `Config/hico_hoi_list.txt`
- [Object vocabulary](https://github.com/dirtyharrylyl/hake/blob/master/Config/hico_obj_list.txt): vocabulary · `Config/hico_obj_list.txt`
- [Verb vocabulary](https://github.com/dirtyharrylyl/hake/blob/master/Config/hico_verb_list.txt): vocabulary · `Config/hico_verb_list.txt`
- [76-state taxonomy](https://github.com/dirtyharrylyl/hake/blob/master/Config/Part_State_76.txt): vocabulary · `Config/Part_State_76.txt`
- [76-to-55 mapping](https://github.com/dirtyharrylyl/hake/blob/master/misc/76to55.json): compatibility map · Maps alternative part-state spaces. · `misc/76to55.json`

### Image acquisition

Image manifests and batch download tooling.

- [Curated image list](https://github.com/dirtyharrylyl/hake/blob/master/Images/imagelist/hake_images_20200614.txt): image manifest · Defines the HAKE image universe. · `Images/imagelist/hake_images_20200614.txt`
- [Image URL manifest](https://github.com/dirtyharrylyl/hake/blob/master/Images/download_image/hcvrd_url.json): image manifest · `Images/download_image/hcvrd_url.json`
- [Batch download entry point](https://github.com/dirtyharrylyl/hake/blob/master/Images/download_image/download_dataset.sh): shell script · `Images/download_image/download_dataset.sh`
- [Image downloader](https://github.com/dirtyharrylyl/hake/blob/master/Images/download_image/Download_data.py): Python script · Resolves manifests and downloads source images. · `Images/download_image/Download_data.py`
- **External source images**: external dataset · HICO and HICO-DET images are obtained separately.

### External consumers

Model execution and benchmark evaluation live outside this repository.

- **HAKE-Action models**: external repository · Consumes annotations for training and inference.
- **HICO MATLAB evaluation**: external benchmark · Separately downloaded evaluation code.
- [Model distribution context](https://github.com/dirtyharrylyl/hake/blob/master/models/README.md): documentation · Documents linked model-related resources without model source. · `models/README.md`

### Other components

- [Dataset guide](https://github.com/dirtyharrylyl/hake/blob/master/README.md): documentation · Starting point for selecting data packages. · `README.md`
- **PaSta supervision**: label concept · Fine-grained activity states across ten body parts.

## Connections

- Dataset guide → Format contract: directs users to
- Dataset guide → HICO image-level labels: selects
- Dataset guide → HICO-DET instance labels: selects
- Dataset guide → HAKE-Large labels: selects
- Format contract → HICO image-level labels: defines extracted format
- Format contract → HICO-DET instance labels: defines extracted format
- Format contract → HAKE-Large labels: defines extracted format
- HICO image-level labels → HOI categories: uses labels from
- HICO image-level labels → Object vocabulary: uses
- HICO image-level labels → Verb vocabulary: uses
- HICO-DET instance labels → PaSta supervision: includes
- HAKE-Large labels → PaSta supervision: supervises
- PaSta supervision → 76-state taxonomy: canonicalized by
- 76-state taxonomy → 76-to-55 mapping: converted through
- Batch download entry point → Image downloader: runs
- Image downloader → Image URL manifest: reads URLs
- Curated image list → External source images: identifies required images
- Image URL manifest → External source images: resolves downloads from
- External source images → HICO image-level labels: kept separate from labels
- External source images → HICO-DET instance labels: kept separate from labels
- HICO image-level labels → HAKE-Action models: training input
- HICO-DET instance labels → HAKE-Action models: training input
- HAKE-Large labels → HAKE-Action models: pretraining input
- HICO-DET instance labels → HICO MATLAB evaluation: evaluated by
- Model distribution context → HAKE-Action models: links context for
