Skip to content

Commit aac460e

Browse files
feat: add support files
1 parent a53957c commit aac460e

File tree

8 files changed

+312
-3
lines changed

8 files changed

+312
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ dist/
2727

2828
# Visual Studio Code
2929
.vscode
30+
.vscode/settings.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO(pneumoniamnist): BibTeX citation

tensorflow_datasets/image_classification/pneumoniamnist/TAGS.txt

Lines changed: 281 additions & 0 deletions
Large diffs are not rendered by default.

tensorflow_datasets/image_classification/pneumoniamnist/__init__.py

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TODO(pneumoniamnist): If your dataset downloads files, then the checksums
2+
# will be automatically added here when running
3+
# `tfds build --register_checksums`.

tensorflow_datasets/image_classification/pneumoniamnist/dummy_data/TODO-add_fake_data_in_this_directory.txt

Whitespace-only changes.

tensorflow_datasets/image_classification/pneumoniamnist/pneumoniamnist_dataset_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ def _info(self) -> tfds.core.DatasetInfo:
1717
return self.dataset_info_from_configs(
1818
features=tfds.features.FeaturesDict({
1919
# These are the features of your dataset like images, labels ...
20-
'image': tfds.features.Image(shape=(None, None, 3)),
21-
'label': tfds.features.ClassLabel(names=['no', 'yes']),
20+
'image': tfds.features.Image(shape=(28, 28, 3)),
21+
'label': tfds.features.ClassLabel(names=['Normal', 'Pneumonia']),
2222
}),
2323
# If there's a common (input, target) tuple from the
2424
# features, specify them here. They'll be used if
2525
# `as_supervised=True` in `builder.as_dataset`.
2626
supervised_keys=('image', 'label'), # Set to `None` to disable
27-
homepage='https://dataset-homepage/',
27+
homepage='https://medmnist.com//',
2828
)
2929

3030
def _split_generators(self, dl_manager: tfds.download.DownloadManager):
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""pneumoniamnist dataset."""
2+
3+
from tensorflow_datasets.image_classification.pneumoniamnist.pneumoniamnist import pneumoniamnist_dataset_builder
4+
import tensorflow_datasets.public_api as tfds
5+
6+
class PneumoniamnistTest(tfds.testing.DatasetBuilderTestCase):
7+
"""Tests for pneumoniamnist dataset."""
8+
# TODO(pneumoniamnist):
9+
DATASET_CLASS = pneumoniamnist_dataset_builder.Builder
10+
SPLITS = {
11+
'train': 3, # Number of fake train example
12+
'test': 1, # Number of fake test example
13+
}
14+
15+
# If you are calling `download/download_and_extract` with a dict, like:
16+
# dl_manager.download({'some_key': 'http://a.org/out.txt', ...})
17+
# then the tests needs to provide the fake output paths relative to the
18+
# fake data directory
19+
# DL_EXTRACT_RESULT = {'some_key': 'output_file1.txt', ...}
20+
21+
22+
if __name__ == '__main__':
23+
tfds.testing.test_main()

0 commit comments

Comments
 (0)