# gouba2333/boxingweb architecture

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

- Interactive diagram: https://gitdiagram.com/gouba2333/boxingweb
- Repository: https://github.com/gouba2333/boxingweb

## Overview

BoxingWeb prepares boxing-video datasets and trains a multimodal punch-classification model. The principal workflow is an engineer launching training, which loads mixed training data and a YouTube test dataset, constructs the fusion model, optionally loads pretrained I3D weights, then trains and evaluates it. The model combines video and pose encoders and can use mixture-of-experts task heads. README capabilities describe dataset download/preparation and pretrained-weight setup; unsampled dataset implementations and training details limit what can be connected confidently.

Main entry points: [`train.py`](https://github.com/gouba2333/boxingweb/blob/main/train.py) (Train and evaluate), [`model/mfusion.py`](https://github.com/gouba2333/boxingweb/blob/main/model/mfusion.py) (Multimodal fusion), [`model/pose_encoder.py`](https://github.com/gouba2333/boxingweb/blob/main/model/pose_encoder.py) (Pose encoders), [`dataset/dataset_youtube.py`](https://github.com/gouba2333/boxingweb/blob/main/dataset/dataset_youtube.py) (YouTube dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Dataset ingestion"]
  node_mixed_dataset["Mixed dataset<br/>[dataset_mixed.py]"]
  node_youtube_dataset["YouTube dataset<br/>[dataset_youtube.py]"]
end

subgraph group_model["Model architecture"]
  node_mfusion["Multimodal fusion<br/>[mfusion.py]"]
  node_i3d["I3D video encoder<br/>[i3d.py]"]
  node_pose_encoder["Pose encoders<br/>[pose_encoder.py]"]
  node_st_gcn["ST-GCN blocks<br/>[st_gcn.py]"]
  node_deformable_decoder["Deformable decoder"]
  node_deformable_attention["Deformable attention<br/>[ms_deform_attn.py]"]
  node_moe["Expert routing<br/>[moe.py]"]
end

subgraph group_training["Training workflow"]
  node_training["Train and evaluate<br/>[train.py]"]
end

node_engineer(("Engineer"))
node_boxing_data[("BoxingWeb data")]
node_pretrained_weights[("I3D pretrained weights")]

node_engineer -->|"launches"| node_training
node_training -->|"constructs"| node_mixed_dataset
node_training -->|"constructs"| node_youtube_dataset
node_boxing_data -->|"reads videos"| node_youtube_dataset
node_mixed_dataset -->|"wraps dataset"| node_youtube_dataset
node_training -->|"constructs"| node_mfusion
node_training -->|"loads weights"| node_pretrained_weights
node_mfusion -->|"invokes encoder"| node_i3d
node_mfusion -->|"invokes encoder"| node_pose_encoder
node_mfusion -->|"invokes experts"| node_moe
node_pose_encoder -->|"uses blocks"| node_st_gcn
node_pose_encoder -->|"uses decoder"| node_deformable_decoder
node_deformable_decoder -->|"uses attention"| node_deformable_attention

click node_mixed_dataset "https://github.com/gouba2333/boxingweb/blob/main/dataset/dataset_mixed.py"
click node_youtube_dataset "https://github.com/gouba2333/boxingweb/blob/main/dataset/dataset_youtube.py"
click node_mfusion "https://github.com/gouba2333/boxingweb/blob/main/model/mfusion.py"
click node_i3d "https://github.com/gouba2333/boxingweb/blob/main/model/i3d.py"
click node_pose_encoder "https://github.com/gouba2333/boxingweb/blob/main/model/pose_encoder.py"
click node_st_gcn "https://github.com/gouba2333/boxingweb/blob/main/model/st_gcn.py"
click node_deformable_decoder "https://github.com/gouba2333/boxingweb/blob/main/model/transformer_deformable.py"
click node_deformable_attention "https://github.com/gouba2333/boxingweb/blob/main/model/ms_deform_attn.py"
click node_moe "https://github.com/gouba2333/boxingweb/blob/main/model/moe.py"
click node_training "https://github.com/gouba2333/boxingweb/blob/main/train.py"

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_mixed_dataset,node_youtube_dataset toneBlue
class node_mfusion,node_i3d,node_pose_encoder,node_st_gcn,node_deformable_decoder,node_deformable_attention,node_moe,node_boxing_data,node_pretrained_weights toneAmber
class node_training toneMint
class node_engineer toneIndigo
```

## Components

### Dataset ingestion

- [Mixed dataset](https://github.com/gouba2333/boxingweb/blob/main/dataset/dataset_mixed.py): `dataset/dataset_mixed.py`
- [YouTube dataset](https://github.com/gouba2333/boxingweb/blob/main/dataset/dataset_youtube.py): `dataset/dataset_youtube.py`

### Model architecture

- [Multimodal fusion](https://github.com/gouba2333/boxingweb/blob/main/model/mfusion.py): `model/mfusion.py`
- [I3D video encoder](https://github.com/gouba2333/boxingweb/blob/main/model/i3d.py): `model/i3d.py`
- [Pose encoders](https://github.com/gouba2333/boxingweb/blob/main/model/pose_encoder.py): `model/pose_encoder.py`
- [ST-GCN blocks](https://github.com/gouba2333/boxingweb/blob/main/model/st_gcn.py): `model/st_gcn.py`
- [Deformable decoder](https://github.com/gouba2333/boxingweb/blob/main/model/transformer_deformable.py): `model/transformer_deformable.py`
- [Deformable attention](https://github.com/gouba2333/boxingweb/blob/main/model/ms_deform_attn.py): `model/ms_deform_attn.py`
- [Expert routing](https://github.com/gouba2333/boxingweb/blob/main/model/moe.py): `model/moe.py`

### Training workflow

- [Train and evaluate](https://github.com/gouba2333/boxingweb/blob/main/train.py): `train.py`

### Other components

- **Engineer**
- **BoxingWeb data**
- **I3D pretrained weights**

## Connections

- Engineer → Train and evaluate: launches (evidence: `README.md`)
- Train and evaluate → Mixed dataset: constructs (evidence: `train.py`)
- Train and evaluate → YouTube dataset: constructs (evidence: `train.py`)
- BoxingWeb data → YouTube dataset: reads videos (evidence: `dataset/dataset_youtube.py`)
- Mixed dataset → YouTube dataset: wraps dataset (evidence: `dataset/dataset_mixed.py`)
- Train and evaluate → Multimodal fusion: constructs (evidence: `train.py`)
- Train and evaluate → I3D pretrained weights: loads weights (evidence: `train.py`)
- Multimodal fusion → I3D video encoder: invokes encoder (evidence: `model/mfusion.py`)
- Multimodal fusion → Pose encoders: invokes encoder (evidence: `model/mfusion.py`)
- Multimodal fusion → Expert routing: invokes experts (evidence: `model/mfusion.py`)
- Pose encoders → ST-GCN blocks: uses blocks (evidence: `model/pose_encoder.py`)
- Pose encoders → Deformable decoder: uses decoder (evidence: `model/pose_encoder.py`)
- Deformable decoder → Deformable attention: uses attention (evidence: `model/transformer_deformable.py`)
