Transformers
ONNX
Safetensors
swinv2_segmenter
retinal-fundus
artery-vein-segmentation
medical-imaging
ophthalmology
swinv2
custom_code
Instructions to use JonathanFhima/RLAD-SwinV2-Large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JonathanFhima/RLAD-SwinV2-Large with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JonathanFhima/RLAD-SwinV2-Large", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
Yesterday
-
Drop the image-segmentation tag too - HF was inferring pipeline_tag back from it, which drove the misleading pipeline() snippet and task-specific Colab/Kaggle notebook templates (both assume single-label argmax output, which this multi-label model does not produce). artery-vein-segmentation tag already covers discoverability.
Verified signaturecf1f116 -
Remove pipeline_tag: the model is genuinely multi-label (artery/vein channels overlap), so forcing HF image-segmentation pipeline compatibility (argmax-based post_process_semantic_segmentation) would silently produce wrong results. Kept image-segmentation as a plain tag for discoverability.
Verified signature153cae0 -
Quickstart: fully self-contained AutoModel + AutoImageProcessor snippet, no hf_hub_download needed
Verified signature5344068 -
Delegate preprocess_image to the new Swinv2SegmenterImageProcessor instead of inline torchvision transforms
Verified signature6392fc6 -
Register AutoImageProcessor in auto_map
Verified signature69be905 -
Add preprocessor_config.json so AutoImageProcessor.from_pretrained works
Verified signature59f2657 -
Add Swinv2SegmenterImageProcessor (standard BaseImageProcessor) - verified bit-identical output to the old manual preprocess_image
Verified signaturea627c2e -
Add library_name: transformers (enables the Use this model button), give a full runnable inference snippet instead of just pointing at infer.py
Verified signatureafc81b2 -
Remove config.yaml - superseded by config.json
Verified signature5fa111c -
Remove weights/model.safetensors - moved to root as model.safetensors
Verified signaturec71348b -
Drop pyyaml - no longer used now that config is plain JSON
Verified signature2e94e7b -
Document the standard AutoModel(trust_remote_code=True) loading path; update weights path reference
Verified signatureba54a19 -
Simplify load_model: use Swinv2Segmenter.from_pretrained() directly (local dir or repo id), no more separate weights-dir/config-path plumbing
Verified signaturef80cf3d -
Move checkpoint to repo root as model.safetensors (standard from_pretrained layout, was weights/model.safetensors)
Verified signature04a3e05 -
Add config.json (replaces config.yaml) with auto_map for AutoConfig/AutoModel
Verified signaturec4ac2c8 -
Convert Swinv2Segmenter to a real transformers.PreTrainedModel (PretrainedConfig + PreTrainedModel), enabling standard from_pretrained()/save_pretrained() and AutoModel with trust_remote_code=True
Verified signature305d9bd -
Remove weights/model.yaml - superseded by the single root config.yaml
Verified signature284a8d9 -
Load the model config from the single root config.yaml instead of weights/model.yaml
Verified signature16882cd -
Trim dead training-only code paths (loss-alpha bookkeeping, unused random-init branch, dead pre_load_model checkpoint-surgery block, unused imports) - none of it executes for inference; verified via strict safetensors load + identical forward-pass output
Verified signature8e3e4ca -
Replace AV-WIDE example with a better-lit source image (the old one was nearly black, vessels looked like they were floating on nothing)
Verified signaturec0483dd -
Add root-level config.yaml so HF Hub counts downloads (its default download-tracker only watches config.json/config.yaml/etc. at repo root)
Verified signature711ddbe -
Link the RLAD + PVBM end-to-end tutorial
Verified signature6817c98 -
Note bfloat16 inference precision in Quickstart
Verified signature95ec695 -
Load and run inference in bfloat16 (the precision the model was trained in)
Verified signature2f18a01 -
Fix: model output is already at content size (1444), crop_padding was incorrectly double-cropping it to 1416 and misaligning the mask
Verified signature69f5882 -
Rehost PVBM optic-disc-segmenter weights (Google Drive link was broken/rate-limited)
Verified signature2a2c8c6
2 days ago
-
Link both RLAD and REYIA in the intro sentence
Verified signature10e691d -
Reorder: intro, qualitative examples, quickstart, example, results, ablations, license, citation
Verified signature653de4c -
Add explanatory sentence before Table 1
Verified signaturea19c20a -
Condense intro and qualitative-figure section to one sentence each
Verified signaturea8c0afb -
Move qualitative figure right after intro, remove How it works section
Verified signaturee976b35 -
Regenerate example with higher mask alpha
Verified signaturecf43740 -
Add mBRSET, reorder with AV-WIDE last, higher mask alpha, native aspect ratios throughout
Verified signature1faecea -
Fix overlay to preserve native aspect ratio instead of stretching to square; raise mask alpha
Verified signature65265df -
AV-WIDE: show at native aspect ratio instead of stretched to square
Verified signature1afd7f3 -
LES2 is ENRICH; link UZLF to KU Leuven RDR, others to REYIA's own license detail
Verified signatureddacb59 -
Add Tables 3-4, stop asserting UZLF's release status without evidence
Verified signaturecdd735f -
Add Table 4 (pretraining/generation ablation)
Verified signature2b8bee0 -
Add Table 3 (dataset ablation)
Verified signaturea10499e -
Punch up the intro
Verified signature4e81616 -
Add benchmark example predictions section
Verified signatured654a73 -
Add benchmark dataset example predictions
Verified signature835498d -
Lead with paper title, add results table, concrete license statuses, trim to match REYIA's voice
Verified signatureca42171 -
Fix naming: RLAD + SwinV2-Large is primary, LUNetV2 is the internal alias
Verified signature10d3de4 -
Initial release: LUNetv2 SwinV2-Large retinal AV segmentation, RLAD-augmented
Verified signature7677375 -
initial commit
Verified signature3b0f214