-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from KonstantinUshenin/add_miccai_dataset
Toy data from miccai2015 dataset
- Loading branch information
Showing
5 changed files
with
80 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from .acdc import ACDC | ||
from .miccai2015 import MICCAI2015 | ||
from .utils import * | ||
|
||
list_of_datasets = [ | ||
"ACDC", | ||
"MICCAI2015", | ||
] | ||
|
||
source_url = "https://github.com/KonstantinUshenin/nndt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from nndt.datasets.dataset import Dataset | ||
|
||
|
||
class MICCAI2015(Dataset): | ||
def __init__(self, name="left_adrenal_gland_10", to_path=None): | ||
super().__init__(name=name, to_path=to_path) | ||
|
||
self._dict = { | ||
"left_adrenal_gland_10": [ | ||
[ | ||
"https://drive.google.com/file/d/1LFJs5tW-acZOXTVVHh-WpWRNkAgtKaDd/view?usp=sharing", | ||
"https://www.dropbox.com/s/xyarraopmj069de/left_adrenal_gland.7z?raw=1", | ||
], | ||
"03c5f5c7e33a57ed71f497725d6925db", | ||
], | ||
"stomach_10": [ | ||
[ | ||
"https://drive.google.com/file/d/189tTsVX89qUijClkPkZfBiX5hRMupW03/view?usp=sharing", | ||
"https://www.dropbox.com/s/uzhurjucqqnansh/stomach.7z?raw=1", | ||
], | ||
"3a7a817748c43194fa75b1e5ab798d56", | ||
], | ||
"wrong_url_test": [ | ||
[ | ||
"https://drive.google.com/file", | ||
"a", | ||
"b", | ||
"https://a.com", | ||
"https://www.dropbox.com/s/m", | ||
], | ||
"03c5f5c7e33a57ed71f497725d6925db", | ||
], | ||
"wrong_hash_test": [ | ||
[ | ||
"https://drive.google.com/file/d/1UzC2WPkjMQSxzI5sj1rMT47URuZbQhYb/view?usp=sharing", | ||
"https://www.dropbox.com/s/6fomqxbjs0iu79m/ACDC_5.7z?raw=1", | ||
], | ||
"34d007546353673899c73337d38c9c12 ", | ||
], | ||
"dropbox_test": [ | ||
[ | ||
"https://www.dropbox.com/s/xyarraopmj069de/left_adrenal_gland.7z?raw=1" | ||
], | ||
"03c5f5c7e33a57ed71f497725d6925db", | ||
], | ||
} | ||
|
||
if name in self._dict.keys(): | ||
self.name = "MICCAI2015" | ||
self.to_path = to_path | ||
self.urls, self.hash = self._dict[name] | ||
|
||
else: | ||
raise ValueError( | ||
f'name must be in {[key for key in self._dict if "_test" not in key]}' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters