Skip to content

feat: add CAPI imagenet benchmark - #1998

Open
lorinczszabolcs wants to merge 5 commits into
lightly-ai:masterfrom
lorinczszabolcs:capi-benchmark
Open

feat: add CAPI imagenet benchmark#1998
lorinczszabolcs wants to merge 5 commits into
lightly-ai:masterfrom
lorinczszabolcs:capi-benchmark

Conversation

@lorinczszabolcs

@lorinczszabolcs lorinczszabolcs commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Adds the ImageNet benchmark for CAPI (#1985): benchmarks/imagenet/vitb16/capi.py and capi registered in main.py's METHODS. Uses a ViT-B/16 backbone with full-scale settings (K=16384, a 12-block predictor) so it produces real benchmark numbers in the vitb16 harness, plus an OnlineLinearClassifier, AdamW with cosine warmup, and the EMA momentum schedule.

Follows the reference recipe where it matters: 16 register tokens, inverse-block masking (random_inverse_block_mask), a weight-normed student head and a bias teacher head, prediction subsampling (0.05), stochastic depth (0.2) on the student backbone, the clustering head trained at half the backbone learning rate (its own param group), and the predictor mask token excluded from weight decay. LR, weight decay, and momentum follow the shared vitb16 harness rather than CAPI's exact values, for comparability with the other methods.

Script only. I can't run the ImageNet benchmark on my side, so no numbers are filled in yet. Verified that it imports and static checks pass.

Follow up of #1996. Closes #1985.

@lorinczszabolcs
lorinczszabolcs marked this pull request as ready for review July 24, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New SSL method: CAPI (Cluster and Predict Latent Patches)

1 participant