Make Export Training Data's output independent from OS decimal delimiter setting

594
0
08-06-2020 01:47 AM
Status: Open
Labels (1)
by Anonymous User
Not applicable

In certain Windows10 localisations (german for instance) the decimal delimiter is  set to comma instead of point by default.  Unfortunately this parameter controls how the Export Training Data tool exports labelled objects for deep learning. Floats in the xml-metadate for the image chips will be written as, say either 14,3 or 14.3 throughout, depending on the OS settings. 

Attempts to execute the Train Deep Learning Model  tool using training data generated with the decima delimiter set to comma will fail with an error message of this type: 

 

File "C:\Program Files\ArcGIS\Pro_beta\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\_data.py", line 141, in _get_bbox_classes
xmin, ymin, xmax, ymax = float(bnd_box.find('xmin').text), \
ValueError: could not convert string to float: '0,00'
Failed to execute (TrainDeepLearningModel).

 

This is easily fixed by changing the decimal delimiter to point and re-exporting the training dataset. But the solution isn't at all obvious and the setting responsible for exporting unusable training data is buried 3-4 submenus deep in windows' settings. Users unaware of the relevance of this obscure parameter will most likely erroneously conclude the deep learning workflow is somehow broken.  

 

The export of metadata for labelled objects should produce usable results for the next tool in the deep learning workflow regardless of decimal delimiter settings in Windows10.