SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.02865 · 2024

VisionUnite: A Vision-Language Foundation Model for Ophthalmology Enhanced with Clinical Knowledge

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2408.02865.json · badge: /api/ran/2408.02865.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
HUANGLIZI/VisionUnite canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
cast_if_src_dtype Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HUANGLIZI/VisionUnite/ImageBind/models/helpers.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/imagebind, is pointer only (licence: NOASSERTION) · get_code("751b1c8ccbe160c4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/imagebind, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fold_dir Ran
ran; our contract draft was wrong, not the code
HUANGLIZI/VisionUnite/fundus_prep.py
code served (permissive licence) · get_code("40c4752510219058")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile

# Create a temporary directory path for testing
temp_dir = tempfile.mkdtemp()
test_folder = os.path.join(temp_dir, "test_folder_that_may_not_exist")

ARGS = {
    "folder": test_folder
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_clip_timepoints Ran
ran, honoured the contract we drafted
HUANGLIZI/VisionUnite/ImageBind/data.py
code served (permissive licence) · get_code("432c312da80537d6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Stand-in clip sampler class that mimics the behavior of a clip sampler
class MockClipSampler:
    def __init__(self, num_clips=3):
        self.num_clips = num_clips
        self.call_count = 0
    
    def __call__(self, end, duration, annotation=None):
        # Returns (start, end, _, _, is_last_clip)
        # The function calls this repeatedly until is_last_clip is True
        clip_duration = duration / self.num_clips
        start = self.call_count * clip_duration
        end = start + clip_duration
        is_last_clip = (self.call_count == self.num_clips - 1)
        
        self.call_count += 1
        
        # Return 5 values: start, end, and three underscores (unused)
        return start, end, None, None, is_last_clip

# Create the clip sampler
clip_sampler = MockClipSampler(num_clips=3)

# Duration in seconds
duration = 10.0

ARGS = {
    "clip_sampler": clip_sampler,
    "duration": duration
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_mask_BZ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HUANGLIZI/VisionUnite/fundus_prep.py
code served (permissive licence) · get_code("4005aa64600585f3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (100, 120) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import cv2

# Create a simple test image
# The function expects either a 3D BGR image or a 2D grayscale image
# Let's create a 3D BGR image with shape (100, 120, 3)
img = np.random.randint(0, 256, (100, 120, 3), dtype=np.uint8)

# Add some structure to make the thresholding meaningful
img[20:80, 30:90, :] = 200  # Bright region
img[40:60, 50:70, :] = 50   # Dark region in the middle

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (100, 120) — shape (100, 120) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_sinusoid_encoding_table Ran
ran, honoured the contract we drafted
HUANGLIZI/VisionUnite/ImageBind/models/multimodal_preprocessors.py
pointer only (licence: MIT); the stored copy get_code serves, from howardzh01/ppma, is pointer only (licence: NOASSERTION) · get_code("35a743e50e17e66d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from howardzh01/ppma, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

imread Ran
ran, honoured the contract we drafted
HUANGLIZI/VisionUnite/fundus_prep.py
code served (permissive licence) · get_code("e76cb068e766a674")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (10, 15, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np
import tempfile
import os

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a small test image (BGR format, as OpenCV uses)
test_image = np.random.randint(0, 256, (10, 15, 3), dtype=np.uint8)
cv2.imwrite(temp_image_path, test_image)

ARGS = {
    "file_path": temp_image_path,
    "c": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (10, 15, 3) — shape (10, 15, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_and_transform_vision_data Ran
ran, honoured the contract we drafted
HUANGLIZI/VisionUnite/gradio_app.py
code served (permissive licence) · get_code("a703fea84ef259af")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 448, 448) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torchvision.transforms as transforms
from PIL import Image
import io

torch.manual_seed(0)

# Create small test images and save them as bytes
def create_test_image():
    """Create a small RGB PIL image and return as file-like object"""
    img = Image.new('RGB', (64, 64), color=(100, 150, 200))
    img_bytes = io.BytesIO()
    img.save(img_bytes, format='PNG')
    img_bytes.seek(0)
    return img_bytes

# Create temporary image files by writing to a mock file object
# We'll create image paths that we can mock-open
class MockFileOpener:
    def __init__(self):
        self.images = {}
    
    def create_image(self, path):
        img = Image.new('RGB', (64, 64), color=(100, 150, 200))
        img_bytes = io.BytesIO()
        img.save(img_bytes, format='PNG')
        img_bytes.seek(0)
        self.images[path] = img_bytes
    
    def open_file(self, path):
        if path not in self.images:
            self.create_image(path)
        self.images[path].seek(0)
        return self.images[path]

mock_opener = MockFileOpener()
mock_opener.create_image("image1.png")
mock_opener.create_image("image2.png")

# Monkey patch open to use our mock
import builtins
original_open = builtins.open

def patched_open(path, mode='r', *args, **kwargs):
    if isinstance(path, str) and path.endswith('.png'):
        return mock_opener.open_file(path)
    return original_open(path, mode, *args, **kwargs)

builtins.open = patched_open

# Define ARGS
ARGS = {
    'image_paths': ["image1.png", "image2.png"],
    'device': torch.device('cpu')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 448, 448) — shape (2, 3, 448, 448) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_and_transform_vision_data Ran
ran, honoured the contract we drafted
HUANGLIZI/VisionUnite/ImageBind/data.py
code served (permissive licence) · get_code("e1e69d9ba9ffcb24")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from PIL import Image
import io

# Create a small dummy image in memory
def create_dummy_image():
    img = Image.new('RGB', (224, 224), color=(73, 109, 137))
    img_bytes = io.BytesIO()
    img.save(img_bytes, format='PNG')
    img_bytes.seek(0)
    return img_bytes.getvalue()

# Create temporary image files (in-memory approach)
import tempfile
import os

# Create a temporary directory and files
temp_dir = tempfile.mkdtemp()
image_paths = []

for i in range(2):
    img_path = os.path.join(temp_dir, f"test_image_{i}.png")
    img = Image.new('RGB', (256, 256), color=(73 + i*10, 109 + i*10, 137 + i*10))
    img.save(img_path)
    image_paths.append(img_path)

device = 'cpu'

ARGS = {
    'image_paths': image_paths,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:ValueError)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
imagebind_huge Not yet run
unverified (harvested, no recorded run)
HUANGLIZI/VisionUnite/ImageBind/models/imagebind_model.py
code served (permissive licence) · get_code("308754348a33628a")
How it ran

no invocation recorded.

interpolate_pos_encoding Not yet run
unverified (harvested, no recorded run)
HUANGLIZI/VisionUnite/ImageBind/models/multimodal_preprocessors.py
code served (permissive licence) · get_code("71227efe6a7df1d2")
How it ran

no invocation recorded.

interpolate_pos_encoding_2d Not yet run
unverified (harvested, no recorded run)
HUANGLIZI/VisionUnite/ImageBind/models/multimodal_preprocessors.py
code served (permissive licence) · get_code("ddd2e52e6b0956b5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 1 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_sinusoid_encoding_table 21 other papers
17 dated earlier, 4 later · 1 only as an assembly brick
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2208.07049 (2022-08)
Self-Supervised Vision Transformers for Malware Detection
2302.14042 (2023-02)
Knowledge-enhanced Visual-Language Pre-training on Chest Radiology Images
and 18 more not named here
get_clip_timepoints 6 other papers
6 dated earlier
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
2310.01852 (2023-10)
LanguageBind: Extending Video-Language Pretraining to N-modality by Language-based Semantic Alignment
and 3 more not named here
cast_if_src_dtype 5 other papers
5 dated earlier
2305.05665 (2023-05)
ImageBind: One Embedding Space To Bind Them All
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
and 2 more not named here
interpolate_pos_encoding 5 other papers
5 dated earlier
2305.05665 (2023-05)
ImageBind: One Embedding Space To Bind Them All
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
and 2 more not named here
interpolate_pos_encoding_2d 5 other papers
5 dated earlier
2305.05665 (2023-05)
ImageBind: One Embedding Space To Bind Them All
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
and 2 more not named here
load_and_transform_vision_data 5 other papers
5 dated earlier
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
2401.10727 (2024-01)
MLLM-Tool: A Multimodal Large Language Model For Tool Agent Learning
and 2 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The need for improved diagnostic methods in ophthalmology is acute, especially in the underdeveloped regions with limited access to specialists and advanced equipment. Therefore, we introduce VisionUnite, a novel vision-language foundation model for ophthalmology enhanced with clinical knowledge. VisionUnite has been pretrained on an extensive dataset comprising 1.24 million image-text pairs, and further refined using our proposed MMFundus dataset, which includes 296,379 high-quality fundus image-text pairs and 889,137 simulated doctor-patient dialogue instances. Our experiments indicate that VisionUnite outperforms existing generative foundation models such as GPT-4V and Gemini Pro. It also demonstrates diagnostic capabilities comparable to junior ophthalmologists. VisionUnite performs well in various clinical scenarios including open-ended multi-disease diagnosis, clinical explanation, and patient interaction, making it a highly versatile tool for initial ophthalmic disease screening. VisionUnite can also serve as an educational aid for junior ophthalmologists, accelerating their acquisition of knowledge regarding both common and underrepresented ophthalmic conditions. VisionUnite represents a significant advancement in ophthalmology, with broad implications for diagnostics, medical education, and understanding of disease mechanisms. The source code is at https://github.com/HUANGLIZI/VisionUnite.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2408.02865")
get_code_for_paper("2408.02865")
have("2408.02865")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2408.02865.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2408.02865.svg)](https://syntology.ai/paper/2408.02865)

Connect an agent — have() is free.