iBOT<T>

Models & Types · AiDotNet.SelfSupervisedLearning

iBOT: Image BERT Pre-Training with Online Tokenizer - combining DINO with masked image modeling.

Inheritance: ModelBase<T, Tensor<T>, Tensor<T>> → SelfSupervisedLearningMethodBase<T> → TeacherStudentSSL<T> → iBOT<T>

For Beginners

iBOT combines the best of DINO (self-distillation) with masked image modeling (like MAE). It masks patches in the student view and predicts both the CLS token (like DINO) and the masked patches (like BERT for images).

How It Works

Key innovations:

Loss formula:

Reference: Zhou et al., “iBOT: Image BERT Pre-Training with Online Tokenizer” (ICLR 2022)

Best for: Combining generative and discriminative approaches.

Pros: Best of both worlds (DINO + MAE-like objectives).

Cons: More complex than pure DINO or MAE.

Constructors

Constructor Summary
iBOT(INeuralNetwork<T> studentEncoder, IMomentumEncoder<T> teacherEncoder, IProjectorHead<T> studentProjector, IProjectorHead<T> teacherProjector, int outputDim, double mimWeight, double maskRatio, SelfSupervisedLearningConfig<T> config) Initializes a new instance of the iBOT class.

Properties

Property Summary
SelfSupervisedLearningMethodCategory Category { get; }
double MIMWeight { get; } Gets the weight for masked image modeling loss.
double MaskRatio { get; } Gets the mask ratio for patches.
string Name { get; }

Methods

Method Summary
iBOT<T> Create(INeuralNetwork<T> encoder, Func<INeuralNetwork<T>, INeuralNetwork<T>> createEncoderCopy, int encoderOutputDim, int outputDim, int hiddenDim, double mimWeight, double maskRatio) Creates an iBOT instance with default configuration.