Closed ahmademami97 closed 3 months ago
Hello, could you please copy and paste the exact error output?
sure here it is:
ERROR Command ['python', '-m', 'tile2net', 'inference', '--city_info', '/content/output/test_tile/tiles/test_tile_256_info.json', '--interactive', '--dump_percent', '0'] returned non-zero exit status 1. Stdout: Stderr: INFO NumExpr defaulting to 2 threads. INFO Inferencing. Segmentation results will not be saved. INFO Downloading weights for segmentation, this may take a while... INFO Weights downloaded. INFO Using a single GPU. INFO Using Per Image based weighted loss INFO Using Cross Entropy Loss INFO Loading weights from: checkpoint=/content/tile2net/src/tile2net/raster/resources/assets/weights/satellite_2021.pth INFO init weights from normal distribution INFO loading pretrained model /content/tile2net/src/tile2net/raster/resources/assets/weights/hrnetv2_w48_imagenet_pretrained.pth INFO Trunk: hrnetv2 INFO Model params = 72.1M /usr/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock. self.pid = os.fork() INFO Polygons are generated and saved! INFO Starting network creation...
0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 2828.26it/s]
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:00<00:00, 2686.93it/s]
INFO ..... creating the processed sidewalk network
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/content/tile2net/src/tile2net/main.py", line 6, in
CalledProcessError Traceback (most recent call last)
2 frames /usr/lib/python3.10/subprocess.py 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', '-m', 'tile2net', 'inference', '--city_info', '/content/output/test_tile/tiles/test_tile_256_info.json', '--interactive', '--dump_percent', '0']' returned non-zero exit status 1.
Could you please also pass the command that you ran?
raster1 = Raster( location=[-33.72176969693144, 150.72435381126422,-33.71948521547603, 150.7271003932958], name='test_tile', input_dir='/content/test_tile/x_y.png', output_dir='/content/output', zoom=21, crs=3857
) raster1.generate(2) raster1.inference()
Thank you for using Tile2net. The CRS parameter is intended to be paired with the location parameter, not the geometry which encapsulates its CRS in its metadata. Please leave the CRS to be the default 4326 coordinate system (WGS84). As for the slightly misaligned results, could you please overlay it onto the source imagery by opening a new session where you make sure the base coordinate is 4326?
@ahmademami97 A side note here: Tile2Net works with Slippy Tiles Map system (XYZ system) (read our data preparation guide here). This requires tiles to be in EPSG: 4326, you can use QGIS to re-project your large raster to 4326 and then tile it again according to XYZ to arrive at the most accurate results.
Thank you so much, @Mary-h86 and @dhodcz2, for your notes and help. I fixed the misalignment in my network. There was a small issue with the conversion to the slippy tile system in my code. It's all working fine now.
Perfect! Happy to hear that. I am closing this issue now. Feel free to re-open if you have any other questions.
Hi, I'm currently handling aerial images in CRS 3857. While defining rasters with the generate function and specifying CRS parameters for the module, I'm encountering errors halfway through the inference process on my tiles. What could be triggering these errors? Are there potential oversights on my end? Interestingly, when I omit the CRS parameter and leave it as default, the inference proceeds smoothly, albeit with slightly misaligned results. here is an image of the results i got on a small image in sydney, australia