NVIDIA / semantic-segmentation

Nvidia Semantic Segmentation monorepo
BSD 3-Clause "New" or "Revised" License
1.76k stars 388 forks source link

Error when Inferencing on cityspace dataset #107

Closed manish0079 closed 3 years ago

manish0079 commented 3 years ago

I'm trying to run inference on my own images by using Docker file

`Torch version: 1.7, 1.7.0a0+8deb4fe n scales [1.0, 2.0] dataset = cityscapes ignore_label = 255 num_classes = 19 711 Traceback (most recent call last): File "train.py", line 601, in main() File "train.py", line 340, in main datasets.setup_loaders(args) File "/home/datasets/init.py", line 157, in setup_loaders eval_folder=args.eval_folder) File "/home/datasets/cityscapes.py", line 133, in init self.fine_cities = cities_cv_split(self.root, mode, cfg.DATASET.CV) File "/home/datasets/cityscapes.py", line 65, in cities_cv_split trn_cities = ['train/' + c for c in os.listdir(trn_path)] FileNotFoundError: [Errno 2] No such file or directory: '/home/HRNet/semantic-segmentation/large_data/data/cityscapes/leftImg8bit_trainvaltest/leftImg8bit/train' Traceback (most recent call last): File "/opt/conda/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/opt/conda/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/opt/conda/lib/python3.6/site-packages/torch/distributed/launch.py", line 261, in main() File "/opt/conda/lib/python3.6/site-packages/torch/distributed/launch.py", line 257, in main cmd=cmd) subprocess.CalledProcessError: Command '['/opt/conda/bin/python3', '-u', 'train.py', '--local_rank=0', '--dataset', 'cityscapes', '--cv', '0', '--bs_val', '1', '--n_scales', '1.0,2.0', '--eval_folder', 'large_data/data/cityscapes/leftImg8bit_trainvaltest/leftImg8bit/test/', '--snapshot', 'large_data/seg_weights/cityscapes_ocrnet.HRNet_Mscale_outstanding-turtle.pth', '--arch', 'ocrnet.HRNet_Mscale', '--result_dir', './save']' returned non-zero exit status 1

I saw the same issue in[ https://github.com/NVIDIA/semantic-segmentation/issues/65]. but it didnt helped mee Is there a way to resolve ? I m using TeslaK80 machine
Pulling this image ->nvcr.io/nvidia/pytorch:20.06-py3 Cuda-1.7

Thank you

karansapra commented 3 years ago

Sorry, just to confirm, so you tried moving that line of code and it didn't work?

Skyrelixa commented 2 years ago

@manish0079 Hello! Can you explain how you solved the issue? I have the same problem, and the solution in /issues/65 did not help me.