MendelXu / SAN

Open-vocabulary Semantic Segmentation
https://mendelxu.github.io/SAN/
MIT License
295 stars 27 forks source link

Run issue #20

Closed ygjwd12345 closed 1 year ago

ygjwd12345 commented 1 year ago

Thanks for your wonderful work. When I run your code, I face the bug ''' Traceback (most recent call last): File "/home/gyang/data/SAN/detectron2/detectron2/engine/train_loop.py", line 156, in train self.after_step() File "/home/gyang/data/SAN/detectron2/detectron2/engine/train_loop.py", line 190, in after_step h.after_step() File "/home/gyang/data/SAN/detectron2/detectron2/engine/hooks.py", line 556, in after_step self._do_eval() File "/home/gyang/data/SAN/detectron2/detectron2/engine/hooks.py", line 529, in _do_eval results = self._func() File "/home/gyang/data/SAN/detectron2/detectron2/engine/defaults.py", line 453, in test_and_save_results self._last_eval_results = self.test(self.cfg, self.model) File "/home/gyang/data/SAN/detectron2/detectron2/engine/defaults.py", line 602, in test data_loader = cls.build_test_loader(cfg, dataset_name) File "/home/gyang/data/SAN/train_net.py", line 102, in build_test_loader return build_detection_test_loader(cfg, dataset_name) File "/home/gyang/data/SAN/detectron2/detectron2/config/config.py", line 207, in wrapped explicit_args = _get_args_from_config(from_config, *args, *kwargs) File "/home/gyang/data/SAN/detectron2/detectron2/config/config.py", line 245, in _get_args_from_config ret = from_config_func(args, **kwargs) File "/home/gyang/data/SAN/san/data/build.py", line 268, in _test_loader_from_config dataset = get_detection_dataset_dicts( File "/home/gyang/data/SAN/san/data/build.py", line 129, in get_detection_dataset_dicts assert len(dicts), "Dataset '{}' is empty!".format(dataset_name) AssertionError: Dataset 'pcontext_sem_seg_val' is empty! ''' Would you mind helping me to fix this bug?

MendelXu commented 1 year ago

It seems the program couldn't find the dataset. Did you generate the pcontext dataset?

ygjwd12345 commented 1 year ago

yes, following the guide. But I find the generate file name maybe is not correct. the name something like ''' pcontext -train -val '''

ygjwd12345 commented 1 year ago

I guess it should be ''' pcontext -pcontext_sem_seg_train -pcontext_sem_seg_val ''' something like that?

MendelXu commented 1 year ago

yes, following the guide. But I find the generate file name maybe is not correct. the name something like ''' pcontext -train -val '''

If it was organized like this, there should be no errors . Have you confirmed that the directory is not empty?

image

ygjwd12345 commented 1 year ago

image

ygjwd12345 commented 1 year ago

I follow image to build pcontext dataset. I have confirmed the fold is not empty.

ygjwd12345 commented 1 year ago

I fixed this bug. This issue is due to the file's format. The produced data is not consistent with code requirements.

runhuzhao commented 4 months ago

我修复了这个错误。此问题是由于文件的格式造成的。生成的数据与代码要求不一致。

哥,具体是啥原因啊,我也遇到了这个问题