# zhoujiahuan1991/cvpr2024-fcs architecture

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

- Interactive diagram: https://gitdiagram.com/zhoujiahuan1991/cvpr2024-fcs
- Repository: https://github.com/zhoujiahuan1991/cvpr2024-fcs

## Overview

FCS is an implementation of feature calibration and separation for non-exemplar class-incremental learning. The user starts a run with a configuration; training advances through class-increment tasks, evaluates the learned classifier and nearest-mean-of-exemplars (NME) results, and reports accuracy. Data preparation establishes class order and task increments, while the learner trains its network and builds class prototypes. The README documents CIFAR-100, TinyImageNet, and ImageNet experiment configurations. Several implementation excerpts are partial, so the graph omits uncertain internal training and evaluation links rather than inferring them.

Main entry points: [`trainer.py`](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/trainer.py) (Task runner), [`models/fcs.py`](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/models/fcs.py) (FCS learner), [`main.py`](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/main.py) (CLI entry), [`utils/data_manager.py`](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/data_manager.py) (Data manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Run orchestration"]
  node_config["Experiment configs"]
  node_entry["CLI entry<br/>[main.py]"]
  node_trainer["Task runner<br/>[trainer.py]"]
  node_factory["Model factory<br/>[factory.py]"]
end

subgraph group_data["Incremental data"]
  node_manager["Data manager<br/>[data_manager.py]"]
  node_datasets["Dataset loaders<br/>[data.py]"]
end

subgraph group_learning["FCS learning"]
  node_fcs["FCS learner<br/>[fcs.py]"]
  node_base["Learner base<br/>[base.py]"]
end

subgraph group_network["Model and evaluation"]
  node_network["Incremental network<br/>[inc_net.py]"]
  node_backbones["CNN backbones"]
  node_metrics["Accuracy utilities<br/>[toolkit.py]"]
end

node_user(("Experiment user"))
node_dataset[("Image datasets")]
node_results["Task metrics"]

node_user -->|"starts run"| node_entry
node_entry -->|"loads settings"| node_config
node_entry -->|"calls training"| node_trainer
node_trainer -->|"creates tasks"| node_manager
node_manager -->|"loads data"| node_datasets
node_datasets -->|"reads images"| node_dataset
node_trainer -->|"requests model"| node_factory
node_factory -->|"selects learner"| node_fcs
node_trainer -->|"trains and evaluates"| node_fcs
node_fcs -->|"inherits learner"| node_base
node_fcs -->|"uses network"| node_network
node_network -->|"selects backbone"| node_backbones
node_fcs -->|"requests task data"| node_manager
node_trainer -->|"counts parameters"| node_metrics
node_trainer -->|"reports accuracy"| node_results

click node_config "https://github.com/zhoujiahuan1991/cvpr2024-fcs/tree/master/exps/fcs"
click node_entry "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/main.py"
click node_trainer "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/trainer.py"
click node_factory "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/factory.py"
click node_manager "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/data_manager.py"
click node_datasets "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/data.py"
click node_fcs "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/models/fcs.py"
click node_base "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/models/base.py"
click node_network "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/inc_net.py"
click node_backbones "https://github.com/zhoujiahuan1991/cvpr2024-fcs/tree/master/convs"
click node_metrics "https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/toolkit.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_config,node_entry,node_trainer,node_factory,node_user toneBlue
class node_manager,node_datasets,node_dataset toneAmber
class node_fcs,node_base toneMint
class node_network,node_backbones,node_metrics,node_results toneRose
```

## Components

### Run orchestration

- [Experiment configs](https://github.com/zhoujiahuan1991/cvpr2024-fcs/tree/master/exps/fcs): `exps/fcs`
- [CLI entry](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/main.py): `main.py`
- [Task runner](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/trainer.py): `trainer.py`
- [Model factory](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/factory.py): `utils/factory.py`

### Incremental data

- [Data manager](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/data_manager.py): `utils/data_manager.py`
- [Dataset loaders](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/data.py): `utils/data.py`

### FCS learning

- [FCS learner](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/models/fcs.py): `models/fcs.py`
- [Learner base](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/models/base.py): `models/base.py`

### Model and evaluation

- [Incremental network](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/inc_net.py): `utils/inc_net.py`
- [CNN backbones](https://github.com/zhoujiahuan1991/cvpr2024-fcs/tree/master/convs): `convs`
- [Accuracy utilities](https://github.com/zhoujiahuan1991/cvpr2024-fcs/blob/master/utils/toolkit.py): `utils/toolkit.py`

### Other components

- **Experiment user**
- **Image datasets**
- **Task metrics**

## Connections

- Experiment user → CLI entry: starts run
- CLI entry → Experiment configs: loads settings
- CLI entry → Task runner: calls training
- Task runner → Data manager: creates tasks
- Data manager → Dataset loaders: loads data
- Dataset loaders → Image datasets: reads images
- Task runner → Model factory: requests model
- Model factory → FCS learner: selects learner
- Task runner → FCS learner: trains and evaluates
- FCS learner → Learner base: inherits learner
- FCS learner → Incremental network: uses network
- Incremental network → CNN backbones: selects backbone
- FCS learner → Data manager: requests task data
- Task runner → Accuracy utilities: counts parameters
- Task runner → Task metrics: reports accuracy
