# thuml/Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization

Repository: https://github.com/thuml/Transfer-Learning-Library
Canonical: https://ross.abutalabs.com/products/transfer-learning-library
Homepage: http://transfer.thuml.ai
Language: Python
License: MIT
License Family: permissive
Topics: domain-adaptation, transfer-learning, finetune, unsupervised-domain-adaptation, image-translation, adversarial-learning, deep-learning, self-training, semi-supervised-learning, dann, out-of-distribution-generalization
Last push: 2024-05-10T06:59:42+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2392, "days_push": 845, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3931, forks 602 (observed 2026-08-28T04:08:29.982083+00:00)

## What it is
TLlib is a PyTorch-based open-source library for transfer learning, covering domain adaptation, task adaptation (finetuning), and domain generalization. It provides modular APIs for alignment, translation, self-training, reweighting, and model selection methods, with example code for classification, detection, segmentation, and more.

## Use cases
- adapt a model trained on one domain to a new unlabeled domain
- finetune pretrained models for a new task
- improve out-of-distribution generalization of my model
- run semi-supervised learning experiments
- implement DANN or adversarial domain adaptation
- select the best pretrained model for transfer
- do domain adaptation for object detection or segmentation

## When to choose
- you need research-grade implementations of domain adaptation and generalization algorithms in PyTorch
- you want a torchvision-consistent API to build new transfer learning methods
- you need examples across many tasks like classification, detection, and keypoint detection

## When to avoid
- you need a production serving or AutoML platform rather than an algorithm library
- you work outside PyTorch or outside vision-centric tasks
- you need turnkey no-code transfer learning

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, image-processing, computer-vision
- domain: machine-learning, deep-learning, computer-vision, artificial-intelligence
- platform: python, cross-platform
- tags: transfer-learning, domain-adaptation, domain-generalization, pytorch, finetuning, self-training, semi-supervised-learning, research, gpu

## Member repositories
- thuml/Transfer-Learning-Library (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:29.982083+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:24:41.402872+00:00, confidence not recorded.
  - readme: https://github.com/thuml/Transfer-Learning-Library (fetched 2026-08-28T04:08:29.982083+00:00, sha 3aaee4e51682)
  - homepage: http://transfer.thuml.ai (fetched 2026-08-29T09:18:32.005117+00:00, sha 44136fa355b3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
