medmnsit shape
- User
medmnsit shape
- Assistant
The MedMNIST datasets are a collection of preprocessed medical image datasets in a standardized format for machine learning, particularly for benchmarking. Here are the shapes for the major datasets in MedMNIST v2:
✅ General Info:
Image size: 28x28 pixels
Number of channels:
Most datasets are grayscale → 1 channel ([1, 28, 28])
Some are RGB → 3 channels ([3, 28, 28])
📦 Shapes per Dataset: XXX[3, 28, 28]39ChestMNISTX-ray[1, 28, 28]114DermaMNISTDermatoscopy[3, 28, 28]37OCTMNISTOCT[1, 28, 28]14PneumoniaMNISTX-ray[1, 28, 28]12RetinaMNISTFundus[3, 28, 28]35BreastMNISTUltrasound[1, 28, 28]12OrganMNIST (Axial, Coronal, Sagittal)MRI[1, 28, 28]111BloodMNISTBlood smear[3, 28, 28]38TissueMNISTMicroscopy[1, 28, 28]18OrganAMNISTMRI[1, 28, 28]111OrganCMNISTMRI[1, 28, 28]111OrganSMNISTMRI[1, 28, 28]111
🧠 Summary:
Most datasets are grayscale → 1 channel.
Some are color → 3 channels (PathMNIST, DermaMNIST, RetinaMNIST, BloodMNIST).
All images are resized to 28x28 pixels.
Format: usually [C, H, W] when using PyTorch.
Let me know if you want code to inspect the shapes programmatically!
- User
for a jsd baed autonecoder, is jsd with trained or just testing, using thresholding to detect adversial example
- Assistant
Great question! Here's a clear breakdown for using Jensen-Shannon Divergence (JSD) in an autoencoder-based adversarial detection system:
⚙️ General Idea:
You train a standard autoencoder (AE) or variational autoencoder (VAE) on clean (non-adversarial) data.
Then, during inference (testing), you:
Pass the input through the AE.
Measure the JSD between latent/reconstructed distributions for:
Different transformations of the same input (e.g., original, rotated, noisy, etc.)
Use the JSD score to detect if the input is adversarial via a threshold.