library_name: transformers
tags: []
OpenPhenom-S/16 模型卡
专为显微图像特征提取设计的通道无关图像编码模型CA-MAE,采用ViT-S/16编码器架构。该模型通过视觉变换器主干网络,利用通道间跨注意力机制对图像块标记进行处理,为每个通道独立生成上下文感知的特征表示。
模型详情
模型描述
本模型是通道无关掩码自编码器,基于以下三个显微图像数据集训练完成:
- RxRx3
- JUMP-CP过表达数据集
- JUMP-CP基因敲除数据集
- 开发/资助/共享方: Recursion制药公司
- 模型类型: 视觉变换器CA-MAE
- 图像模态: 专为CellPainting检测法的显微图像优化
- 许可协议: 非商业终端用户许可协议
模型来源
使用场景
注意:模型嵌入特征通常需要经过标准批校正后处理才能有效提取特征。我们建议至少采用以下PCA-中心缩放
流程,或更优的典型变异归一化方法:
- 在所有对照组图像(若无对照组则使用全部图像)上拟合PCA核
- 用该PCA核转换所有嵌入特征
- 对每个实验批次,在步骤2转换后的对照组嵌入上拟合独立的标准缩放器,再转换该批次其余样本
直接应用
- 生成具有生物学意义的显微图像嵌入
- 创建显微图像各通道的上下文感知嵌入(设置
return_channelwise_embeddings=True
)
- 结合完整MAE编码器-解码器预测缺失的CellPainting通道
下游应用
- 机器学习专家可对编码器进行微调,用于分类等下游任务
不适用场景
- 明场显微图像效果可能欠佳
- 领域外医学图像(如H&E染色图像,可能仅适合作基线模型)
偏差/风险/局限
- 主要局限是嵌入特征在大规模数据中效果更显著。例如仅单板显微图像时,其表现可能不及定制监督模型。
快速入门
以下测试代码演示了模型推理使用方法:
import pytest
import torch
from huggingface_mae import MAEModel
huggingface_modelpath = "recursionpharma/OpenPhenom"
@pytest.fixture
def huggingface_model():
huggingface_model = MAEModel.from_pretrained(huggingface_modelpath)
huggingface_model.eval()
return huggingface_model
@pytest.mark.parametrize("C", [1, 4, 6, 11])
@pytest.mark.parametrize("return_channelwise_embeddings", [True, False])
def test_model_predict(huggingface_model, C, return_channelwise_embeddings):
example_input_array = torch.randint(
low=0,
high=255,
size=(2, C, 256, 256),
dtype=torch.uint8,
device=huggingface_model.device,
)
huggingface_model.return_channelwise_embeddings = return_channelwise_embeddings
embeddings = huggingface_model.predict(example_input_array)
expected_output_dim = 384 * C if return_channelwise_embeddings else 384
assert embeddings.shape == (2, expected_output_dim)
我们还提供了在RxRx3-core数据集上运行的推理示例笔记本。
训练/评估细节
训练参数详见上述论文,主要超参数配置可在对应代码库中查阅。
环境影响
- 硬件类型: NVIDIA H100 Hopper节点
- 训练时长: 400小时
- 云服务商: 私有云
- 碳排放量: 138.24千克二氧化碳(约合汽车从多伦多行驶至蒙特利尔的排放量)
BibTeX引用:
@inproceedings{kraus2024masked,
title={Masked Autoencoders for Microscopy are Scalable Learners of Cellular Biology},
author={Kraus, Oren and Kenyon-Dean, Kian and Saberian, Saber and Fallah, Maryam and McLean, Peter and Leung, Jess and Sharma, Vasudev and Khan, Ayla and Balakrishnan, Jia and Celik, Safiye and others},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={11757--11768},
year={2024}
}
联系信息
- Kian Kenyon-Dean: kian.kd@recursion.com
- Oren Kraus: oren.kraus@recursion.com
- 或联系: info@rxrx.ai