You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 things limit the use of the bbox argument for inference.
1: Data type error converting the bbox to col/row index.
Traceback (most recent call last):
File "d:\Travail\AIAAS\geo_inf_ella.py", line 22, in <module>
geo_inference(inference_input=r"D:\Travail\AIAAS\0.tif",
File "D:\conda_envs\geo_inference300\Lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\geo_inference\geo_inference.py", line 158, in __call__
asyncio.run(run_async())
File "D:\conda_envs\geo_inference300\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\asyncio\base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\geo_inference\geo_inference.py", line 144, in run_async
self.mask_layer_name = await self.async_run_inference(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\geo_inference\geo_inference.py", line 371, in async_run_inference
raise e
File "D:\conda_envs\geo_inference300\Lib\site-packages\geo_inference\geo_inference.py", line 298, in async_run_inference
aoi_dask_array = aoi_dask_array[
^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\dataarray.py", line 899, in __getitem__
return self.isel(indexers=self._item_key_to_dict(key))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\dataarray.py", line 1535, in isel
variable = self._variable.isel(indexers, missing_dims=missing_dims)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\variable.py", line 1038, in isel
return self[key]
~~~~^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\variable.py", line 802, in __getitem__
dims, indexer, new_order = self._broadcast_indexes(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\variable.py", line 638, in _broadcast_indexes
return self._broadcast_indexes_basic(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\variable.py", line 668, in _broadcast_indexes_basic
return dims, BasicIndexer(key), None
^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\indexing.py", line 397, in __init__
k = as_integer_slice(k)
^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\indexing.py", line 351, in as_integer_slice
stop = as_integer_or_none(value.stop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\conda_envs\geo_inference300\Lib\site-packages\xarray\core\indexing.py", line 346, in as_integer_or_none
return None if value is None else operator.index(value)
^^^^^^^^^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
In geo_inference.py, converting the col/row offsets to int fixes this issue.
2 : The writen array is not properly placed.
The xy offset is not used to write the mask, when using the bbox parameter. The mask is systematically located in the upper-left corner of the original image.
The text was updated successfully, but these errors were encountered:
2 things limit the use of the bbox argument for inference.
1: Data type error converting the bbox to col/row index.
In geo_inference.py, converting the col/row offsets to int fixes this issue.
2 : The writen array is not properly placed.
The xy offset is not used to write the mask, when using the bbox parameter. The mask is systematically located in the upper-left corner of the original image.
The text was updated successfully, but these errors were encountered: