mhamilton723 / STEGO

Unsupervised Semantic Segmentation by Distilling Feature Correspondences
MIT License
724 stars 147 forks source link

Help for evaluating cityscapes dataset #26

Closed Eric-L-Manibardo closed 1 year ago

Eric-L-Manibardo commented 2 years ago

Hello, I am new to Pytorch, Pytorch-lightning and Hydra so perhaps my issue comes from my incompetence.

At eval_segmentation.py I can not load the cityscapes_vit_base_1.ckpt. The failure is at line 67:

for model_path in cfg.model_paths:
        model = LitUnsupervisedSegmenter.load_from_checkpoint(model_path)

I do not know why the model.ckpt is not properly loaded, so the script automatically loads pretrained DINO weights :

Since no pretrained weights have been provided, we load the reference pretrained DINO weights.
output_root: //marhamil_object_discovery_datastore_3
pytorch_data_dir: //marhamil_pytorch_datastore_3
experiment_name: exp1
log_dir: hyperdrive_benchmark_cityscapes_2
azureml_logging: true
submitting_to_aml: true
num_workers: 24
max_steps: 7000
num_neighbors: 7
batch_size: 32
dataset_name: cityscapes
crop_type: five
crop_ratio: 0.5
res: 224
loader_crop_type: center
extra_clusters: 0
use_true_labels: false
use_recalibrator: false
model_type: vit_base
arch: dino
use_fit_model: false
dino_feat_type: feat
projection_type: nonlinear
dino_patch_size: 8
granularity: 1
continuous: true
dim: 100
dropout: true
lr: 0.0005
pretrained_weights: null
use_salience: false
stabalize: false
stop_at_zero: true
pointwise: false
feature_samples: 11
neg_samples: 5
aug_alignment_weight: 0.0
correspondence_weight: 1.0
neg_inter_weight: 0.9058762625226623
pos_inter_weight: 0.577453483136995
pos_intra_weight: 1
neg_inter_shift: 0.31361241889448443
pos_inter_shift: 0.1754346515479633
pos_intra_shift: 0.45828472207
rec_weight: 0.0
repulsion_weight: 0.0
crf_weight: 0.0
alpha: 0.5
beta: 0.15
gamma: 0.05
w1: 10.0
w2: 3.0
shift: 0.0
crf_samples: 1000
color_space: rgb
reset_probe_steps: null
n_images: 5
scalar_log_freq: 10
checkpoint_freq: 50
val_freq: 100
hist_freq: 100
full_name: hyperdrive_benchmark_cityscapes_2/cityscapes_exp1
fkmajiji commented 1 year ago

Hello, have you solved this problem? I met a similar problem.

Eric-L-Manibardo commented 1 year ago

Kind off, it seems that it is the normal output that you will expect. As it is saying: you have not provided a set of pretrained weights so those from DINO backbone are loaded instead.

On a side note let me tell you in advance that my research changed its goals so I do not need anymore to evaluate cityscapes. Therefore perhaps I can not help you any further. Feel free to ask for more advice anyway!