Downloads · 30 days
37
19% of all-time downloads
Willie999/Anidane
Anidane is a image-text-to-text model from Willie999. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Anidane is a fine-tuned, multimodal vision-language model optimized for the analysis and diagnostic assessment of ophthalmic imagery, specifically fundus and retinal photography. Built on top of the google/medgemma-1.…
Downloads · 30 days
37
19% of all-time downloads
All-time downloads
193
Public
Repo size
169 MB
Likes
0
Public
Click a slice to open those files.
.safetensors131 MB · 77%
From the Hugging Face model README
Anidane is a fine-tuned, multimodal vision-language model optimized for the analysis and diagnostic assessment of ophthalmic imagery, specifically fundus and retinal photography. Built on top of the google/medgemma-1.5-4b-it architecture and accelerated using Unsloth, Anidane bridges the gap in clinical accessibility by enabling parameter-efficient interpretation of localized eye pathologies and structural abnormalities.
google/medgemma-1.5-4b-it (Gemma 3 / MedSigLIP Core)smrndmdude/eye-diseases-datasetThe model was fine-tuned using the following configurations:
adamw_8bitDuring fine-tuning, the model displayed highly stable convergence characteristics, with training loss scaling down seamlessly as follows:
You can load and query Anidane using the Hugging Face transformers library or via unsloth for accelerated inference.
import torch
from PIL import Image
from transformers import AutoProcessor
from unsloth import FastVisionModel # Import FastVisionModel
model_id = "Willie999/Anidane"
processor = AutoProcessor.from_pretrained(model_id)
# Use FastVisionModel for loading the model, consistent with training
# FastVisionModel.from_pretrained returns a tuple (model, processor), so we unpack it.
model, _ = FastVisionModel.from_pretrained(
model_name = model_id, # Use model_name for FastVisionModel
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Load a target retinal image
image = Image.open("/content/red-eye-disease.jpg").convert("RGB")
messages = [
{
"role": "user",
"content": [
{"type": "image"},
{"type": "text", "text": "Analyze this fundus/eye photograph. Provide a clear diagnostic assessment focusing on localized anomalies."}
]
}
]
prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device)
with torch.no_grad():
generated_ids = model.generate(
input_ids=inputs["input_ids"],
pixel_values=inputs["pixel_values"], # Explicitly pass pixel_values
max_new_tokens=256,
do_sample=False
)
response = processor.batch_decode(
generated_ids[:, inputs["input_ids"].shape[1]:],
skip_special_tokens=True
)[0]
print("Anidane Analysis:", response)