mlmed / torchxrayvision

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

PadChest dataset resized images are padded #7

Closed mrtj closed 4 years ago

mrtj commented 4 years ago

Hello, I guess you're maintaining the torrent file of PadChest resized (224x224) images referenced from the dataset.py source code so I decided to open the issue here.

The png files in this torrent are resized to 224x224 pixels, by means of white padding. So effectively the original dimension of these images is lost and you have no (easy) way to separate the padding from the original image and use a different cropping method (eg. center cropping). May I suggest to save these files with:

  1. different resizing options (eg. padding, center cropping)
  2. leaving the smaller dimension of the images to 224 and the other dimension corresponding to the original aspect ratio so the user can choose a resize method of his preference?
ieee8023 commented 4 years ago

I will regenerate the PC dataset. It should have been the same script as for the NIH dataset. I'm not sure what happened.

ieee8023 commented 4 years ago

I made a new torrent with the updated images. Commit: 0428006

The new data is here: https://academictorrents.com/details/96ebb4f92b85929eadfb16761f310a6d04105797