How nlab-mpg/cosda-hr works
Project type & purpose (what you’re diagramming)
This repo is research/experimental ML code for continual object recognition with continual open-set domain adaptation (COSDA-HR). It’s not a “service architecture” project; the “system” is primarily a training + evaluation pipeline driven by a single entrypoint (main.py) that orchestrates:
• reading experiment config (config.py, config.yaml)
• loading COSDA-HR dataset + task splits (the sequential_source/* and sequential_target/* lists)
• building a model (net.py)
• training/adapting over sequential tasks (continual learning)
• evaluating results (eval.py, eval/* lists)
• utilities/helpers (lib.py)
Experiment Runner (main.py)
• Responsibilities: load config, set seeds/device, instantiate dataset/dataloaders, build model, train loop over tasks, call eval, save results.
Configuration Layer (config.yaml + config.py)
• Inputs: YAML file (and maybe CLI args)
• Outputs: structured config object consumed by main/data/model/eval
Data Pipeline (data.py)
• Inputs:
• COSDA-HR dataset files on disk
• task split lists: sequential_source/*, sequential_target/*
• eval lists: eval/*
• Outputs:
• train loaders per task (source/target)
• eval loaders
Model / Network (net.py)
• Inputs: batches from Data Pipeline
• Outputs: logits/embeddings; possibly domain outputs
Training Utilities (lib.py)
• Loss functions, metrics, pseudo-labeling, replay/buffer (if used), optimizer/scheduler helpers, checkpointing.
Evaluation (eval.py)
• Inputs: trained model checkpoints / in-memory model, eval loaders, evaluation protocol lists
• Outputs: metrics (accuracy, open-set metrics), logs/results files
Outputs / Artifacts
• Checkpoints (model weights)
• Logs (console / file)
• Result tables / metrics dumps
External dependencies (explicitly call out)
Even if not visible in the tree, it’s almost certainly:
• Python runtime
• Deep learning framework (very likely PyTorch)
• GPU/CUDA (optional but typical)
Continual / sequential task loop
for t in tasks(0..9):
• load task t source split
• load task t target split
• train/adapt model on task t
• evaluate (optional) on cumulative/all tasks
Visually, either:
Domain adaptation (source + target streams)
two parallel input streams into training:
• Source domain labeled data (supervised)
• Target domain unlabeled/weakly labeled (UDA)
Open-set handling
Because the paper is “open set domain adaptation”, the evaluation likely includes:
• known classes accuracy
• unknown detection / rejection performance
This as:
• “Known/Unknown decision” in eval, or
• “Open-set module” in model/loss (if that’s how it’s implemented).
Goal: show how code modules + artifacts interact.
Goal: show the temporal order in continual learning.
Participants: main.py, data.py, net.py, lib.py, eval.py, filesystem (dataset).
Sequence: