Instructions to use ZihengWang/ControlGlaucoma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ZihengWang/ControlGlaucoma with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("ZihengWang/ControlGlaucoma") pipe = StableDiffusionControlNetPipeline.from_pretrained( "fill-in-base-model", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
rename folders to public names
Browse files- ControlGlaucoma_1208_base_v_prediction_noema/config.json +0 -57
- ControlGlaucoma_1208_base_v_prediction_noema/diffusion_pytorch_model.safetensors +0 -3
- README.md +0 -41
- {ControlGlaucoma_epsilon_seed42_ema → controlglaucoma_eps}/config.json +0 -0
- {ControlGlaucoma_epsilon_seed42_ema → controlglaucoma_eps}/diffusion_pytorch_model.safetensors +0 -0
- {ControlGlaucoma_v_prediction_seed42_ema → controlglaucoma_vpred}/config.json +0 -0
- {ControlGlaucoma_v_prediction_seed42_ema → controlglaucoma_vpred}/diffusion_pytorch_model.safetensors +0 -0
- {ControlGlaucoma_1208_base_v_prediction_ema → controlglaucoma_vpred_base}/config.json +0 -0
- {ControlGlaucoma_1208_base_v_prediction_ema → controlglaucoma_vpred_base}/diffusion_pytorch_model.safetensors +0 -0
- {SegMAN_b_ade → segman_b}/best_mIoU_iter_72000.pth +0 -0
- {SegMAN_b_ade → segman_b}/segman_b_ade.py +0 -0
ControlGlaucoma_1208_base_v_prediction_noema/config.json
DELETED
|
@@ -1,57 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_class_name": "ControlNetModel",
|
| 3 |
-
"_diffusers_version": "0.31.0",
|
| 4 |
-
"_name_or_path": "/root/cloud/work_dirs/reward_model/10k/1128_v_prediction_8cja_fixed_timestep_segman/checkpoint-8000",
|
| 5 |
-
"act_fn": "silu",
|
| 6 |
-
"addition_embed_type": null,
|
| 7 |
-
"addition_embed_type_num_heads": 64,
|
| 8 |
-
"addition_time_embed_dim": null,
|
| 9 |
-
"attention_head_dim": [
|
| 10 |
-
5,
|
| 11 |
-
10,
|
| 12 |
-
20,
|
| 13 |
-
20
|
| 14 |
-
],
|
| 15 |
-
"block_out_channels": [
|
| 16 |
-
320,
|
| 17 |
-
640,
|
| 18 |
-
1280,
|
| 19 |
-
1280
|
| 20 |
-
],
|
| 21 |
-
"class_embed_type": null,
|
| 22 |
-
"conditioning_channels": 3,
|
| 23 |
-
"conditioning_embedding_out_channels": [
|
| 24 |
-
16,
|
| 25 |
-
32,
|
| 26 |
-
96,
|
| 27 |
-
256
|
| 28 |
-
],
|
| 29 |
-
"controlnet_conditioning_channel_order": "rgb",
|
| 30 |
-
"cross_attention_dim": 1024,
|
| 31 |
-
"down_block_types": [
|
| 32 |
-
"CrossAttnDownBlock2D",
|
| 33 |
-
"CrossAttnDownBlock2D",
|
| 34 |
-
"CrossAttnDownBlock2D",
|
| 35 |
-
"DownBlock2D"
|
| 36 |
-
],
|
| 37 |
-
"downsample_padding": 1,
|
| 38 |
-
"encoder_hid_dim": null,
|
| 39 |
-
"encoder_hid_dim_type": null,
|
| 40 |
-
"flip_sin_to_cos": true,
|
| 41 |
-
"freq_shift": 0,
|
| 42 |
-
"global_pool_conditions": false,
|
| 43 |
-
"in_channels": 4,
|
| 44 |
-
"layers_per_block": 2,
|
| 45 |
-
"mid_block_scale_factor": 1,
|
| 46 |
-
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 47 |
-
"norm_eps": 1e-05,
|
| 48 |
-
"norm_num_groups": 32,
|
| 49 |
-
"num_attention_heads": null,
|
| 50 |
-
"num_class_embeds": null,
|
| 51 |
-
"only_cross_attention": false,
|
| 52 |
-
"projection_class_embeddings_input_dim": null,
|
| 53 |
-
"resnet_time_scale_shift": "default",
|
| 54 |
-
"transformer_layers_per_block": 1,
|
| 55 |
-
"upcast_attention": true,
|
| 56 |
-
"use_linear_projection": true
|
| 57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ControlGlaucoma_1208_base_v_prediction_noema/diffusion_pytorch_model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:69e69878599d7de163261f85b5da26fa5c532c3b3e2903b19cb2e690719dfb97
|
| 3 |
-
size 1456953560
|
|
|
|
|
|
|
|
|
|
|
|
README.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
# ControlGlaucoma Paper Checkpoint Backup
|
| 2 |
-
|
| 3 |
-
All weights are ControlNetModel (StableDiffusion 2.1, v-prediction or epsilon).
|
| 4 |
-
|
| 5 |
-
## Files
|
| 6 |
-
|
| 7 |
-
### Generation used in paper (downstream classification)
|
| 8 |
-
|
| 9 |
-
`ControlGlaucoma_v_prediction_seed42_ema/`
|
| 10 |
-
- Used to generate the 1296-image synth pool (paper Section 4.5 augmentation)
|
| 11 |
-
- Fine-tuned from `ControlGlaucoma_1208_base_v_prediction_ema` with CE-cup loss
|
| 12 |
-
- Trained 2026-04-18 with seed=42
|
| 13 |
-
- SD base: stabilityai/stable-diffusion-2-1 (v-prediction 768)
|
| 14 |
-
- Source: /root/cloud/work_dirs/reward_model/10k/4月新实验生成/
|
| 15 |
-
cecup_vp_seed42__0418_v_prediction_ulrj_reward_loss_cup_disc_loss1.1_fixed_timestep_segman_ema/
|
| 16 |
-
|
| 17 |
-
### Intermediate base (for full lineage reproducibility)
|
| 18 |
-
|
| 19 |
-
`ControlGlaucoma_1208_base_v_prediction_ema/`
|
| 20 |
-
- The initial ControlNet trained 2025-12-08, ID 5hf6
|
| 21 |
-
- Losses: reward + uncertainty + cup_disc_loss1.1 + fixed_timestep + SegMAN
|
| 22 |
-
- This is the starting point for the cecup_vp fine-tune above
|
| 23 |
-
- Source: /root/cloud/1208_v_prediction_5hf6_*_ema/
|
| 24 |
-
|
| 25 |
-
### ε-prediction ablation variant
|
| 26 |
-
|
| 27 |
-
`ControlGlaucoma_epsilon_seed42_ema/`
|
| 28 |
-
- ε-prediction version of CG, used for ablation in paper (Section 3 v vs ε)
|
| 29 |
-
- Same loss config as v-prediction
|
| 30 |
-
- Source: /root/cloud/work_dirs/reward_model/10k/4月新实验生成/
|
| 31 |
-
cecup_eps_mask_seed42__0421_epsilon_xf5e_reward_loss_cup_disc_loss1.1_fixed_timestep_segman_ema/
|
| 32 |
-
|
| 33 |
-
## Generation workflow
|
| 34 |
-
|
| 35 |
-
1. Load v-prediction CG ControlNet (cecup_vp_seed42_ema)
|
| 36 |
-
2. Load SD 2.1 base (stock HuggingFace stabilityai/stable-diffusion-2-1)
|
| 37 |
-
3. For each of 1296 healthy FairSeg images, generate multiple synth at different vCDR target scales
|
| 38 |
-
4. Use SegMAN to estimate vCDR on each synth
|
| 39 |
-
5. Split: vCDR > 0.6 → synth_glaucoma pool (2862 imgs)
|
| 40 |
-
vCDR < 0.6 → synth_health pool (7237 imgs)
|
| 41 |
-
6. Use synth_glaucoma as positive-class augmentation in FairVLMed classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ControlGlaucoma_epsilon_seed42_ema → controlglaucoma_eps}/config.json
RENAMED
|
File without changes
|
{ControlGlaucoma_epsilon_seed42_ema → controlglaucoma_eps}/diffusion_pytorch_model.safetensors
RENAMED
|
File without changes
|
{ControlGlaucoma_v_prediction_seed42_ema → controlglaucoma_vpred}/config.json
RENAMED
|
File without changes
|
{ControlGlaucoma_v_prediction_seed42_ema → controlglaucoma_vpred}/diffusion_pytorch_model.safetensors
RENAMED
|
File without changes
|
{ControlGlaucoma_1208_base_v_prediction_ema → controlglaucoma_vpred_base}/config.json
RENAMED
|
File without changes
|
{ControlGlaucoma_1208_base_v_prediction_ema → controlglaucoma_vpred_base}/diffusion_pytorch_model.safetensors
RENAMED
|
File without changes
|
{SegMAN_b_ade → segman_b}/best_mIoU_iter_72000.pth
RENAMED
|
File without changes
|
{SegMAN_b_ade → segman_b}/segman_b_ade.py
RENAMED
|
File without changes
|