Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: Please run python cityscapesscripts/preparation/createPanopticImgs.py to generate label files. #37

Open
vamsikrishna7909 opened this issue Aug 14, 2024 · 0 comments

Comments

@vamsikrishna7909
Copy link

Hi @leiyu-bytedance. @cornettoyu, I have generated using below instructions

https://detectron2.readthedocs.io/en/latest/tutorials/builtin_datasets.html

Install cityscapes scripts by:

pip install git+https://github.com/mcordts/cityscapesScripts.git
Note: to create labelTrainIds.png, first prepare the above structure, then run cityscapesescript with:

CITYSCAPES_DATASET=/path/to/abovementioned/cityscapes python cityscapesscripts/preparation/createTrainIdLabelImgs.py
These files are not needed for instance segmentation.

Note: to generate Cityscapes panoptic dataset, run cityscapesescript with:

CITYSCAPES_DATASET=/path/to/abovementioned/cityscapes python cityscapesscripts/preparation/createPanopticImgs.py

I have successfully executed above required things. When I try to run
>python train_net.py --config-file configs/coco/panoptic-segmentation/fcclip/fcclip_convnext_large_eval_cityscapes.yaml --eval-only MODEL.WEIGHTS FC-CLIP_ConvNeXt-Large/fcclip_cocopan.pth

it's giving me below issue

**backbone.clip_model.{logit_scale, positional_embedding, text_projection}
Traceback (most recent call last):
File "train_net.py", line 340, in
launch(
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/engine/launch.py", line 84, in launch
main_func(*args)
File "train_net.py", line 325, in main
res = Trainer.test(cfg, model)
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/engine/defaults.py", line 606, in test
data_loader = cls.build_test_loader(cfg, dataset_name)
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/engine/defaults.py", line 562, in build_test_loader
return build_detection_test_loader(cfg, dataset_name)
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/config/config.py", line 207, in wrapped
explicit_args = _get_args_from_config(from_config, *args, **kwargs)
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/config/config.py", line 245, in _get_args_from_config
ret = from_config_func(*args, kwargs)
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/data/build.py", line 594, in _test_loader_from_config
dataset = get_detection_dataset_dicts(
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/data/build.py", line 253, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/data/build.py", line 253, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/home/jovyan/shared/fc_clip_vamsi/detectron2/detectron2/data/catalog.py", line 58, in get
return f()
File "/home/jovyan/shared/fc_clip_vamsi/fc-clip/fcclip/data/datasets/register_cityscapes_panoptic.py", line 186, in
key, lambda x=image_dir, y=gt_dir, z=gt_json: load_cityscapes_panoptic(x, y, z, meta)
File "/home/jovyan/shared/fc_clip_vamsi/fc-clip/fcclip/data/datasets/register_cityscapes_panoptic.py", line 88, in load_cityscapes_panoptic
assert os.path.exists(
AssertionError: Please run python cityscapesscripts/preparation/createPanopticImgs.py to generate label files.

Any help will be appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant