mlmed / torchxrayvision

TorchXRayVision: A library of chest X-ray datasets and models. Classifiers, segmentation, and autoencoders.
https://mlmed.org/torchxrayvision
Apache License 2.0
885 stars 212 forks source link

does this support custom dataset? #157

Open hnyll opened 1 month ago

hnyll commented 1 month ago

does this support custom dataset? if yes how can i make it?

ieee8023 commented 1 month ago

If you want to process your own images then you can just use this script: https://github.com/mlmed/torchxrayvision/blob/master/scripts/process_image.py

The interface for dataset is here: https://mlmed.org/torchxrayvision/datasets.html#torchxrayvision.datasets.Dataset

And here is the code you can copy to make your own dataset: https://github.com/mlmed/torchxrayvision/blob/master/torchxrayvision/datasets.py

hnyll commented 1 month ago

thanks for the quick response and thank you for pointing me in the right direction.

i also want to ask if the labels, pathologies, and csv are absolutely necessary for making a custom dataset since i wont be using this for chest x-rays. i just want to know what they do to see how i can modify it to fit my use case.

i just need to do binary classification with ground truths and corresponding images as my data. just 1 class.

in the meantime ill try and see if i can figure something out