Replies: 1 comment 3 replies
-
DatasetWhen I started the project I was aware of the advantages from the Recently, @TITC has been chipping away at these problems with PRs #150 and #154. They allow them to be used in a more pytorch-like way but underneath it's still the same dataset class. I haven't looked into it in much detail but maybe the batch sampler and How did you solve the problem?
PickleI don't see how this is an improvement. The main advantage of the pickle file is that the information about the image size is connected to each image-text pair. This way the data loading can start right away. |
Beta Was this translation helpful? Give feedback.
-
Necessity
More clear
Now, the Dataset class used was written without extending the torch.utils.data.Dataset, so, many functions was implemented hand by hand, I think the current dataset class is not clear enough. For example, we can use torchvision to read and process image without cv2. (reducing the dependency is also important, which will help deploying to desktop.)
Easy to load
By combining torch.utils.data.Dataset and torch.utils.data.Dataloader, it will be more clear and easy to load data. For example, Pytorch's Dataloader make it easier to parallel load data.
Drop pickle
I think it is not necessary to generate a dataset pickle and then load when we want to train, it is easy to just provide a math.txt which contains latex code and image directory, shown as follow:
0.png
means this image was generated from the 0 line ofmath.txt
In this way, we don't need to regenerate the dataset's pickle file every time we modify the dataset, ie. add new latex code and image.
Beta Was this translation helpful? Give feedback.
All reactions