Embedding Models

HoneyBee employs state-of-the-art embedding models to transform raw medical data into feature-rich vectors that can be used in various machine learning applications.

Whole Slide Image Embeddings

The TissueDetector and UNI models are used to generate embeddings from WSIs, capturing key visual features critical for oncology research.


from honeybee import TissueDetector, UNI, Slide

tissue_detector = TissueDetector(model_path="path_to_tissue_detector.pt")
slide = Slide("path_to_wsi.svs", tileSize=512, max_patches=100, visualize=False, tissue_detector=tissue_detector)
patches = slide.load_patches_concurrently(target_patch_size=224)

uni = UNI()
embeddings = uni.load_model_and_predict("path_to_embedding_model.bin", patches)
                    

DICOM Embeddings

REMEDIS and other models are used to generate embeddings from DICOM files, capturing spatial features and structural information from radiology scans.


from honeybee import DICOMLoader, EmbeddingGenerator

dicom_loader = DICOMLoader(file_path="path_to_dicom.dcm")
dicom_data = dicom_loader.load()

embedding_generator = EmbeddingGenerator(model_name="Model_for_DICOM")
embeddings = embedding_generator.generate(dicom_data)