torchgeo
torchgeo copied to clipboard
Assertion `t >= 0 && t < n_classes` in Chesapeake13
Description
When training on Chesapeake13 with num_classes=14 and ignore_index=0, an assertion error ‘t >= 0 && t < n_classes’ occurs. This indicates that there are more class indices in the Chesapeake label imagery than the specified num_classes. However, when running gdalinfo Baywide_13Class_20132014.tif Min=1.000 Max=12.000 Minimum=1.000, Maximum=12.000,
Could there be a problem with computing indices from Chesapeake13? I am using RandomBatchGeoSampler, so this error could randomly appear when there is a patch with a false class ID.”
Steps to reproduce
Training on Chesaspeake13
Version
0.4.1
I also noticed this here: https://github.com/microsoft/torchgeo/pull/1368#issuecomment-1565705950
@calebrob6 can you look into this?
Sure
Any luck @calebrob6?