Upload model
Browse files- dataset.py +2 -5
dataset.py
CHANGED
@@ -1,12 +1,9 @@
|
|
1 |
import os
|
2 |
-
import struct
|
3 |
|
4 |
-
import lmdb
|
5 |
-
import numpy as np
|
6 |
import pandas as pd
|
7 |
import torch
|
8 |
from torch.utils.data import Dataset
|
9 |
-
from torchvision.io import
|
10 |
|
11 |
from tools.utils import mimic_cxr_image_path
|
12 |
|
@@ -70,7 +67,7 @@ class StudyIDEDStayIDSubset(Dataset):
|
|
70 |
|
71 |
assert self.extension == 'jpg' or self.extension == 'dcm'
|
72 |
|
73 |
-
if self.dataset_dir is not None
|
74 |
if self.extension == 'jpg':
|
75 |
if 'physionet.org/files/mimic-cxr-jpg/2.0.0/files' not in self.dataset_dir:
|
76 |
self.dataset_dir = os.path.join(self.dataset_dir, 'physionet.org/files/mimic-cxr-jpg/2.0.0/files')
|
|
|
1 |
import os
|
|
|
2 |
|
|
|
|
|
3 |
import pandas as pd
|
4 |
import torch
|
5 |
from torch.utils.data import Dataset
|
6 |
+
from torchvision.io import read_image
|
7 |
|
8 |
from tools.utils import mimic_cxr_image_path
|
9 |
|
|
|
67 |
|
68 |
assert self.extension == 'jpg' or self.extension == 'dcm'
|
69 |
|
70 |
+
if self.dataset_dir is not None:
|
71 |
if self.extension == 'jpg':
|
72 |
if 'physionet.org/files/mimic-cxr-jpg/2.0.0/files' not in self.dataset_dir:
|
73 |
self.dataset_dir = os.path.join(self.dataset_dir, 'physionet.org/files/mimic-cxr-jpg/2.0.0/files')
|