-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'float' object is not subscriptable during training #94
Comments
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? |
Oh yeah for sure, just had to do some additional investigations. 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. |
Hi James, Recently when I run the code on another project (not detecting crowns but other canopy features with more variability in sizes) I have the same problem. It seems during the tilling process it generated both "Point" and "LineString" geometry types. Not sure why this is happening, but this dataset is not using a manual labelling, the polygons are generated through "Raster to Polygon" function from ArcGIS, it might potentially relate to the issue? |
Hi @yby026 it's difficult to test without the data or code. It could be that the raster to polygon process is outputting some geometries that are not compatible. Would you please share your code (and data if it's easy)? |
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.
The text was updated successfully, but these errors were encountered: