VIDA-NYU / tile2net

Automated mapping of pedestrian networks from aerial imagery tiles
BSD 3-Clause "New" or "Revised" License
151 stars 24 forks source link

Input_dir failed to parse #25

Closed Jiayingpdf closed 1 year ago

Jiayingpdf commented 1 year ago

Hi, I tried to run the jupyter notebook, using input_dir parameter to read local tiles. But the ValueError always came out:

ValueError: input_dir failed to parse 'C:/Jiaying/tile2net/19/271188/192329.png'

For the format of input_dir parameter, I tried two ways. But both ways triggered the same issue.

  1. input_dir='C:/xxx/tile2net/19/271188/192329.png'
  2. input_dir='C:/xxx/tile2net/19/271188_192329.png'

Thank you :)

dhodcz2 commented 1 year ago

Hello, Please represent the x tile and y tile in the input_dir string as literally 'x' and 'y'. In your case, you would want to try:

  1. input_dir='C:/xxx/tile2net/19/x/y.png'
  2. input_dir='C:/xxx/tile2net/19/x_y.png'
Jiayingpdf commented 1 year ago

Thank you very much.

My images can be inpuuted and processed. I tried with the images in Munich old town, the image segmentation can be generated successfully. But I met an error when running interfenrence:

`CalledProcessError Traceback (most recent call last) Cell In[14], line 1 ----> 1 raster.inference()

File C:\Jiaying\tile2net\src\tile2net\raster\validate.py:31, in validate.call(self, *args, *kwargs) 25 # if self.name == 'generate': 26 # print('Generating') 27 # 28 # if self.name == 'inference': 29 # print('Inference') 30 assert raster.tiles.shape == (raster.width, raster.height) ---> 31 result = self.func(raster, args, **kwargs) 33 # print('Done') 35 return result

File C:\Jiaying\tile2net\src\tile2net\raster\raster.py:835, in Raster.inference(self, eval_folder) 833 if eval_folder: 834 args.extend(['--eval_folder', str(eval_folder)]) --> 835 subprocess.run(args, check=True)

File ~\AppData\Local\Programs\Python\Python310\lib\subprocess.py:526, in run(input, capture_output, timeout, check, *popenargs, **kwargs) 524 retcode = process.poll() 525 if check and retcode: --> 526 raise CalledProcessError(retcode, process.args, 527 output=stdout, stderr=stderr) 528 return CompletedProcess(process.args, retcode, stdout, stderr)

CalledProcessError: Command '['python', 'C:\Jiaying\tile2net\src\tile2net', 'inference', '--city_info', 'C:\Jiaying\Munich Oldtown\tiles\Munich Oldtown_256_info.json']' returned non-zero exit status 1.`

dhodcz2 commented 1 year ago

I have updated the logging to be more expressive. Please switch to the dhodcz2 branch and paste the traceback here once again:

git switch dhodcz2
git fetch
Mary-h86 commented 1 year ago

@Jiayingpdf I wanted to check in with you and see if your issue has been resolved.

Thank you

Jiayingpdf commented 1 year ago

Yes, it works perfectly for me. Thank you!

Mary-h86 commented 1 year ago

@Jiayingpdf Thank you, glad to hear that! I am closing this issue. Feel free to re-open if you need.