Open zeppehpt1 opened 1 year ago
Hi @zeppehpt1 I am glad you could solve your issue. Would you mind sharing some more details about the problem/solution to help other users and possibly allow me to implement a fix that would make the code more robust? Thanks for using the package and feel free to get in touch if you have any more issues/comments.
Oh yeah for sure, just had to do some additional investigations.
So the problem was that the created .geojson
files from the data preparation step (tiling) contained not only 'Polygon' as a geometry type, but also the type 'LineString'. In this particular case, the first index (a[0]) is a float and not a list - so the error occurred. I checked the ground truth file for possible 'LineString' geometries, but there were none.
I temporarily fixed this by checking for the geometry type 'LineString' in the get_tree_dicts()
function. Though, I don't know why this 'LineString' type occured and why it was created in the first place. Strangely this only appeared in the two datasets that I didn't annotated by myself. Perhaps it ultimately depends on having high-quality annotated data.
My temp fix:
for features in img_anns["features"]:
anno = features["geometry"]
if anno['type'] != 'LineString':
Interesting, thanks. I'll aim to get that fixed in the next update.
Hello,
I would like to include four locations for training my model.
Error
Here is the error code:
Code snippet
The following code describes how I register the datasets:
Update:
Ok with a fresh mind, I found that the error message was not misleading and that a sudden float object was the reason for the failure.