AgML is a centralized framework for agricultural machine learning. AgML provides access to public agricultural datasets for common agricultural deep learning tasks, with standard benchmarks and pretrained models, as well the ability to generate synthetic data and annotations.
Apache License 2.0
185
stars
28
forks
source link
Selecting data from PyTorch Dataset leads to dimension mismatch error #2
After converting an AgML dataset to a Torch dataset, selecting data gives an error. It seems like this error comes from the conversion between numpy arrays and torch tensors in tftorch:
In the case of the apple flower segmentation dataset, the traceback suggests that the issue is with the annotation array, perhaps because it's a 2D array?
In the case of the bean disease and apple detection datasets (I wanted to try classification and object detection examples), it seems like I'm getting the issue with the image itself.
After converting an AgML dataset to a Torch dataset, selecting data gives an error. It seems like this error comes from the conversion between numpy arrays and torch tensors in tftorch:
https://github.com/plant-ai-biophysics-lab/AgML/blob/8fff70422885fe31a4849f150fa2c584bcb721a5/agml/backend/tftorch.py#L144
In the case of the apple flower segmentation dataset, the traceback suggests that the issue is with the annotation array, perhaps because it's a 2D array?
In the case of the bean disease and apple detection datasets (I wanted to try classification and object detection examples), it seems like I'm getting the issue with the image itself.
Bean disease:
Apple Detection: