BscanFound
BscanFound is a domain-specific visual foundation model pretrained on ocular B-scan ultrasound data using Masked Autoencoding (MAE).
The released checkpoint uses a ViT-Base/16 encoder and is intended to provide transferable representations for downstream ocular-ultrasound tasks.
Important: This model is a research representation model. It is not a standalone clinical diagnostic system and has not been validated for autonomous clinical use.
Model Summary
| Item | Value |
|---|---|
| Architecture | ViT-Base/16 (vit_base_patch16) |
| Pretraining objective | Masked Autoencoding (MAE) |
| Mask ratio | 75% |
| Pretraining epochs | 400 |
| Effective batch size | 256 |
| Training precision | BF16 |
| Training hardware | 4 × NVIDIA GeForce RTX 4090 |
| Total training time | 5.96 hours |
| Best validation loss | 0.400514 |
| Final validation loss | 0.401418 |
The released checkpoint_best.pth corresponds to the checkpoint with the lowest validation reconstruction loss during pretraining.
Pretraining Data
BscanFound was pretrained using two ocular B-scan ultrasound datasets: ERDES and Oculo.
ERDES
ERDES is a video-based ocular ultrasound dataset. To reduce temporal redundancy, videos were sparsely sampled before MAE pretraining.
- Sampling rate: 2 FPS
- Maximum sampled frames per video: 12
- Official ERDES train/validation partitions were retained.
- The official ERDES test set was excluded from MAE pretraining to preserve it for downstream evaluation.
| ERDES split | Samples used for MAE |
|---|---|
| Train | 26,057 frames |
| Validation | 2,841 frames |
Oculo
Oculo contains static ocular B-scan images. Diagnostic labels were not used during MAE pretraining.
The images were randomly divided into an 80% training / 20% validation split.
| Oculo split | Samples used for MAE |
|---|---|
| Train | 1,304 images |
| Validation | 326 images |
Combined Pretraining Corpus
| Split | Total samples |
|---|---|
| Train | 27,361 |
| Validation | 3,167 |
ERDES contributes approximately 95.2% of the training samples, so the current representation is predominantly shaped by the ERDES ultrasound domain.
Training
The model was pretrained from ocular B-scan images using the standard MAE formulation:
- Each input image is divided into non-overlapping ViT patches.
- 75% of patches are randomly masked.
- The ViT encoder processes only the visible patches.
- A lightweight MAE decoder reconstructs the masked image patches.
- Reconstruction loss is optimized only over masked patches.
Training completed all 400 epochs without instability.
Training Loss
The training reconstruction loss decreased continuously throughout pretraining, with a slower but persistent improvement during the later epochs.
Validation Loss
Validation loss decreased rapidly during early training and gradually approached a plateau near 0.40. The best validation loss was 0.400514, while the final validation loss was 0.401418, only about 0.23% higher than the best value.
This behavior suggests that the MAE reconstruction objective had largely converged by the end of the 400-epoch schedule, with only mild late-stage saturation.
Intended Use
BscanFound is intended primarily as a pretrained visual backbone for research on ocular B-scan ultrasound.
Potential downstream applications include:
- ocular B-scan image classification;
- retinal detachment recognition;
- posterior vitreous detachment recognition;
- macular status classification;
- multi-label ultrasound finding recognition;
- feature extraction and linear probing;
- fine-tuning for other ocular ultrasound datasets;
- initialization for multimodal or vision-language models using ocular B-scan images.
The checkpoint is expected to be most useful when fine-tuned or probed on task-specific labeled data.
Limitations
Several limitations should be considered when using this checkpoint.
- Dataset imbalance: ERDES accounts for approximately 95.2% of the training samples.
- Temporal correlation: Multiple training images can originate from the same ultrasound video and are therefore not statistically independent.
- Limited domain diversity: The current pretraining corpus contains two ocular B-scan datasets and should not be assumed to represent all devices, institutions, acquisition protocols, or patient populations.
- MAE loss is not a clinical metric: Lower reconstruction loss does not directly imply better diagnostic accuracy. Downstream evaluation is required.
- No autonomous clinical validation: The model should not be used as a standalone diagnostic system.
Checkpoint
The main released model file is:
checkpoint_best.pth
This checkpoint was selected according to the lowest validation MAE reconstruction loss observed during the 400-epoch pretraining run.
Because the checkpoint follows the custom BscanFound MAE implementation, users should instantiate the corresponding vit_base_patch16 MAE architecture before loading the weights.
Recommended Evaluation
For downstream experiments, we recommend comparing BscanFound against at least:
- the same ViT-B/16 architecture initialized randomly;
- a general-domain ImageNet-pretrained ViT-B/16;
- BscanFound MAE-pretrained ViT-B/16.
This comparison can determine whether ocular B-scan-specific self-supervised pretraining provides transferable benefit beyond generic visual pretraining.
Training Run Summary
{
"model": "vit_base_patch16",
"epochs_completed": 400,
"train_samples": 27361,
"val_samples": 3167,
"train_source_counts": {
"ERDES": 26057,
"Oculo": 1304
},
"effective_batch_size": 256,
"best_val_loss": 0.40051395024615105,
"last_val_loss": 0.40141790307531455,
"amp_dtype": "bf16",
"total_hours": 5.96448813021183
}
Citation
A formal citation for BscanFound will be added when the corresponding work is released.

