Metadata-Version: 2.1
Name: qtdatasetviewer
Version: 0.0.2
Summary: Torch dataset explorer
Home-page: https://github.com/toretak/qtdatasetviewer
License: MIT
Keywords: python,package,torch,dataset,poetry
Author: Toretak
Author-email: toretak@gmail.com
Maintainer: Toretak
Maintainer-email: toretak@gmail.com
Requires-Python: >=3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: pyqt5 (>=5.15)
Requires-Dist: torch (>=1.13.1)
Project-URL: Repository, https://github.com/toretak/qtdatasetviewer
Description-Content-Type: text/markdown

Qt Dataset Viewer
==========


This module is for debugging ML projects. It is PyQt5 based viewer for torch.utils.dataset.



Installation
------------

Use the package manager `pip` to install ``qtdatasetviewer`` from PyPi.

```bash
pip install qtdatasetviewer
```


Usage
-----

```python
    import sys
    from glob import glob
    from dataset import SampleDataset
    from PyQt5.QtWidgets import QApplication

    from PIL import Image
    from qtdatasetviewer.abstract_convert_to_pil import AbstractConvertToPil
    from qtdatasetviewer.qt_dataset_viewer import QtDatasetViewer

    import torchvision.transforms as T


    class Convert(AbstractConvertToPil):

        def convert(self, item) -> Image:
            image, mask = item
            transform = T.ToPILImage()
            return transform(image)


    if __name__ == '__main__':
        the_app = QApplication(sys.argv)
        dataset = SampleDataset(files=glob('data/*.*'))

        imageViewerApp = QtDatasetViewer(Convert(dataset))

        imageViewerApp.show()
        sys.exit(the_app.exec_())
```


Disclaimer
----------

The package and the code is provided "as-is" and there is NO WARRANTY of any kind. 
Use it only if the content and output files make sense to you.


