zhu-xlab / DOFA

Code for Neural Plasticity-Inspired Foundation Model for Observing the Earth Crossing Modalities
MIT License
84 stars 5 forks source link

Problem running segmentation downstream task #15

Open Minoro opened 1 month ago

Minoro commented 1 month ago

Hello,

I'm try running the SegMunich example. I downloaded the TUM_128.zip and unzipped it to the dofa/downstream_tasks/segmentation/datasets. I changed the top lines of the file dofa/segmentation/configs/dofa_vit_segmunich.py to :

dataset_type = 'SegMunich_Dataset'
data_root = 'datasets/SegMunich'

I also have changed lines 59 and 69 from img_path='img_dir/train' and img_path='img_dir/val' to img_path='train' and img_path='val' . And the line 89 to point to the downloaded DOFA_ViT_base_e100.pth file.

To run the model I use:

export PYTHONPATH=`pwd`:$PYTHONPATH

mim train mmsegmentation configs/dofa_vit_segmunich.py --launcher pytorch --gpus 1

However, I'm getting the following message:

KeyError: 'SegMunich_Dataset is not in the mmseg::dataset registry. Please check whether the value of `SegMunich_Dataset` is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module'

What I'm doing wrong?