Commit ddd93aad authored by André Anjos's avatar André Anjos 💬
Browse files

[bob] Lowercase all new datasets (CXR)

parent 2e687939
Pipeline #54361 passed with stage
in 48 minutes and 46 seconds
#!/usr/bin/env python
# coding=utf-8
"""JSRT cross-evaluation dataset
"""
from bob.ip.binseg.configs.datasets.JSRT.default import dataset as _jsrt
from bob.ip.binseg.configs.datasets.MC.default import dataset as _mc
from bob.ip.binseg.configs.datasets.Shenzhen.default import dataset as _shenzhen
dataset = {
"train": _jsrt["train"],
"validation": _jsrt["validation"],
"test": _jsrt["test"],
"MC (train)": _mc["train"],
"MC (validation)": _mc["validation"],
"MC (test)": _mc["test"],
"Shenzhen (train)": _shenzhen["train"],
"Shenzhen (validation)": _shenzhen["validation"],
"Shenzhen (test)": _shenzhen["test"],
}
#!/usr/bin/env python
# coding=utf-8
"""MC cross-evaluation dataset
"""
from bob.ip.binseg.configs.datasets.JSRT.default import dataset as _jsrt
from bob.ip.binseg.configs.datasets.MC.default import dataset as _mc
from bob.ip.binseg.configs.datasets.Shenzhen.default import dataset as _shenzhen
dataset = {
"train": _mc["train"],
"validation": _mc["validation"],
"test": _mc["test"],
"JSRT (train)": _jsrt["train"],
"JSRT (validation)": _jsrt["validation"],
"JSRT (test)": _jsrt["test"],
"Shenzhen (train)": _shenzhen["train"],
"Shenzhen (validation)": _shenzhen["validation"],
"Shenzhen (test)": _shenzhen["test"],
}
#!/usr/bin/env python
# coding=utf-8
def _maker(protocol):
from ....data.Shenzhen import dataset as raw
from ....data.transforms import Resize
from .. import make_dataset as mk
return mk(raw.subsets(protocol), [Resize((512, 512))])
def _maker_256(protocol):
from ....data.Shenzhen import dataset as raw
from ....data.transforms import Resize
from .. import make_dataset as mk
return mk(raw.subsets(protocol), [Resize((256, 256))])
......@@ -4,7 +4,7 @@
def _maker(protocol):
from ....data.JSRT import dataset as raw
from ....data.jsrt import dataset as raw
from ....data.transforms import Resize
from .. import make_dataset as mk
......
......@@ -3,11 +3,11 @@
"""Japanese Society of Radiological Technology dataset for Lung Segmentation (default protocol)
* Split reference: [GAÁL-2020]_
* Split reference: [GAAL-2020]_
* Configuration resolution: 512 x 512
* See :py:mod:`bob.ip.binseg.data.JSRT` for dataset details
* See :py:mod:`bob.ip.binseg.data.jsrt` for dataset details
"""
from bob.ip.binseg.configs.datasets.JSRT import _maker
from bob.ip.binseg.configs.datasets.jsrt import _maker
dataset = _maker("default")
#!/usr/bin/env python
# coding=utf-8
"""JSRT CXR cross-evaluation dataset
"""
from bob.ip.binseg.configs.datasets.jsrt.default import dataset as _jsrt
from bob.ip.binseg.configs.datasets.montgomery.default import dataset as _mc
from bob.ip.binseg.configs.datasets.shenzhen.default import dataset as _shenzhen
dataset = {
"train": _jsrt["train"],
"validation": _jsrt["validation"],
"test": _jsrt["test"],
"montgomery (train)": _mc["train"],
"montgomery (validation)": _mc["validation"],
"montgomery (test)": _mc["test"],
"shenzhen (train)": _shenzhen["train"],
"shenzhen (validation)": _shenzhen["validation"],
"shenzhen (test)": _shenzhen["test"],
}
......@@ -4,7 +4,7 @@
def _maker(protocol):
from ....data.MC import dataset as raw
from ....data.montgomery import dataset as raw
from ....data.transforms import Resize
from .. import make_dataset as mk
......
......@@ -3,11 +3,11 @@
"""Montgomery County dataset for Lung Segmentation (default protocol)
* Split reference: [GAÁL-2020]_
* Split reference: [GAAL-2020]_
* Configuration resolution: 512 x 512
* See :py:mod:`bob.ip.binseg.data.MC` for dataset details
* See :py:mod:`bob.ip.binseg.data.montgomery` for dataset details
"""
from bob.ip.binseg.configs.datasets.MC import _maker
from bob.ip.binseg.configs.datasets.montgomery import _maker
dataset = _maker("default")
#!/usr/bin/env python
# coding=utf-8
"""Montgomery County cross-evaluation dataset
"""
from bob.ip.binseg.configs.datasets.jsrt.default import dataset as _jsrt
from bob.ip.binseg.configs.datasets.montgomery.default import dataset as _mc
from bob.ip.binseg.configs.datasets.shenzhen.default import dataset as _shenzhen
dataset = {
"train": _mc["train"],
"validation": _mc["validation"],
"test": _mc["test"],
"jsrt (train)": _jsrt["train"],
"jsrt (validation)": _jsrt["validation"],
"jsrt (test)": _jsrt["test"],
"shenzhen (train)": _shenzhen["train"],
"shenzhen (validation)": _shenzhen["validation"],
"shenzhen (test)": _shenzhen["test"],
}
#!/usr/bin/env python
# coding=utf-8
def _maker(protocol, n):
from ....data.shenzhen import dataset as raw
from ....data.transforms import Resize
from .. import make_dataset as mk
return mk(raw.subsets(protocol), [Resize((n, n))])
......@@ -3,11 +3,11 @@
"""Shenzhen dataset for Lung Segmentation (default protocol)
* Split reference: [GAÁL-2020]_
* Split reference: [GAAL-2020]_
* Configuration resolution: 512 x 512
* See :py:mod:`bob.ip.binseg.data.Shenzhen` for dataset details
* See :py:mod:`bob.ip.binseg.data.shenzhen` for dataset details
"""
from bob.ip.binseg.configs.datasets.Shenzhen import _maker
from bob.ip.binseg.configs.datasets.shenzhen import _maker
dataset = _maker("default")
dataset = _maker("default", 512)
......@@ -3,11 +3,11 @@
"""Shenzhen dataset for Lung Segmentation (default protocol)
* Split reference: [GAÁL-2020]_
* Configuration resolution: 512 x 512
* See :py:mod:`bob.ip.binseg.data.Shenzhen` for dataset details
* Split reference: [GAAL-2020]_
* Configuration resolution: 256 x 256 pixels
* See :py:mod:`bob.ip.binseg.data.shenzhen` for dataset details
"""
from bob.ip.binseg.configs.datasets.Shenzhen import _maker_256
from bob.ip.binseg.configs.datasets.shenzhen import _maker
dataset = _maker_256("default")
dataset = _maker("default", 256)
......@@ -4,18 +4,18 @@
"""Shenzhen cross-evaluation dataset
"""
from bob.ip.binseg.configs.datasets.JSRT.default import dataset as _jsrt
from bob.ip.binseg.configs.datasets.MC.default import dataset as _mc
from bob.ip.binseg.configs.datasets.Shenzhen.default import dataset as _shenzhen
from bob.ip.binseg.configs.datasets.jsrt.default import dataset as _jsrt
from bob.ip.binseg.configs.datasets.montgomery.default import dataset as _mc
from bob.ip.binseg.configs.datasets.shenzhen.default import dataset as _shenzhen
dataset = {
"train": _shenzhen["train"],
"validation": _shenzhen["validation"],
"test": _shenzhen["test"],
"MC (train)": _mc["train"],
"MC (validation)": _mc["validation"],
"MC (test)": _mc["test"],
"JSRT (train)": _jsrt["train"],
"JSRT (validation)": _jsrt["validation"],
"JSRT (test)": _jsrt["test"],
"montgomery (train)": _mc["train"],
"montgomery (validation)": _mc["validation"],
"montgomery (test)": _mc["test"],
"jsrt (train)": _jsrt["train"],
"jsrt (validation)": _jsrt["validation"],
"jsrt (test)": _jsrt["test"],
}
......@@ -10,7 +10,7 @@ available.
* Reference: [JSRT-2000]_
* Original resolution (height x width): 2048 x 2048
* Configuration resolution: 512 x 512 (after rescaling)
* Split reference: [GAÁL-2020]_
* Split reference: [GAAL-2020]_
* Protocol ``default``:
* Training samples: 172 (including labels)
......@@ -36,7 +36,7 @@ _protocols = [
]
_root_path = bob.extension.rc.get(
"bob.ip.binseg.JSRT.datadir", os.path.realpath(os.curdir)
"bob.ip.binseg.jsrt.datadir", os.path.realpath(os.curdir)
)
......
......@@ -10,7 +10,7 @@ normal cases. It contains a total of 138 resolution of 4020 x 4892, or
* Reference: [MC-2014]_
* Original resolution (height x width): 4020 x 4892, or 4892 x 4020
* Configuration resolution: 512 x 512 (after rescaling)
* Split reference: [GAÁL-2020]_
* Split reference: [GAAL-2020]_
* Protocol ``default``:
* Training samples: 96 (including labels)
......@@ -36,7 +36,7 @@ _protocols = [
]
_root_path = bob.extension.rc.get(
"bob.ip.binseg.MC.datadir", os.path.realpath(os.curdir)
"bob.ip.binseg.montgomery.datadir", os.path.realpath(os.curdir)
)
......
......@@ -11,7 +11,7 @@ available for 566 of the 662 images.
* Reference: [SHENZHEN-2014]_
* Original resolution (height x width): Approximately 3K x 3K (varies)
* Configuration resolution: 512 x 512 (after rescaling)
* Split reference: [GAÁL-2020]_
* Split reference: [GAAL-2020]_
* Protocol ``default``:
* Training samples: 396 (including labels)
......@@ -34,7 +34,7 @@ _protocols = [
]
_root_path = bob.extension.rc.get(
"bob.ip.binseg.Shenzhen.datadir", os.path.realpath(os.curdir)
"bob.ip.binseg.shenzhen.datadir", os.path.realpath(os.curdir)
)
......@@ -55,4 +55,4 @@ dataset = JSONDataset(
protocols=_protocols, fieldnames=("data", "label"), loader=_loader
)
"""Shenzhen dataset object"""
"""Shenzhen CXR dataset object"""
......@@ -7,7 +7,7 @@
import numpy
import pytest
from ..data.JSRT import dataset
from ..data.jsrt import dataset
from .utils import count_bw
......@@ -32,7 +32,7 @@ def test_protocol_consistency():
assert s.key.startswith("JSRT")
@pytest.mark.skip_if_rc_var_not_set("bob.ip.binseg.JSRT.datadir")
@pytest.mark.skip_if_rc_var_not_set("bob.ip.binseg.jsrt.datadir")
def test_loading():
image_size = (2048, 2048)
......@@ -74,6 +74,6 @@ def test_loading():
del proportions # only to satisfy flake8
@pytest.mark.skip_if_rc_var_not_set("bob.ip.binseg.JSRT.datadir")
@pytest.mark.skip_if_rc_var_not_set("bob.ip.binseg.jsrt.datadir")
def test_check():
assert dataset.check() == 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment