if i want to use "Learnable Ophthalmology SAM" model, how to edit the json file.
If i want to use train "Learnable Ophthalmology SAM" model on ciiyscape dataset, how to edit the json file? { "init_lr" : 0.01, "momentum" : 0.9, "weight_decay": 5e-4, "root" : "D:\workspace\datasets\segmentation\CamVid\preprocessed", "epochs": 300, "lr_sche": "poly", "image_size": [360, 480], "super_reso": true, "fusion": true, "num_classes": 32, "gpu_index": "0", "model_name": "deeplabv3plus", "backbone": "resnet101", "channel": 3, "upscale_rate": 2, "num_workers": 4, "ckpt_dir": "./ckpt", "dataset": "camvid", "batch_size": 2 }
Thank you for your attention. You need to modify the training script to add the model. We suggest you to modify the scripts/cityscape_train.py.
The following is the script to import the model to the code.
from imed_vision.models.segmentation.learnable_sam import PromptSAM
Then, you need to add the following codes after line 119.
elif model_name == "promptsam":
model = PromptSAM(num_classes=num_classes, model_name=backbone, checkpoint=config['pretrained'])
Note: You need to add the parameter pretrained to the JSON config file.