Skip to content

Commit 29a8cb4

Browse files
authored
Update DBCNN.py
1 parent 6f7c00d commit 29a8cb4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

DBCNN.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import torch
44
import torchvision
55
import torch.nn as nn
6-
import LIVEFolder
76
from SCNN import SCNN
87
from PIL import Image
98
from scipy import stats
@@ -163,15 +162,24 @@ def __init__(self, options, path):
163162
])
164163

165164

166-
if self._options['dataset'] == 'live':
165+
if self._options['dataset'] == 'live':
166+
import LIVEFolder
167167
train_data = LIVEFolder.LIVEFolder(
168168
root=self._path['live'], loader = default_loader, index = self._options['train_index'],
169169
transform=train_transforms)
170170
test_data = LIVEFolder.LIVEFolder(
171171
root=self._path['live'], loader = default_loader, index = self._options['test_index'],
172172
transform=test_transforms)
173+
elif self._options['dataset'] == 'livec':
174+
import LIVEChallengeFolder
175+
train_data = LIVEChallengeFolder.LIVEChallengeFolder(
176+
root=self._path['livec'], loader = default_loader, index = self._options['train_index'],
177+
transform=train_transforms)
178+
test_data = LIVEChallengeFolder.LIVEChallengeFolder(
179+
root=self._path['livec'], loader = default_loader, index = self._options['test_index'],
180+
transform=test_transforms)
173181
else:
174-
raise AttributeError('Only support LIVE right now!')
182+
raise AttributeError('Only support LIVE and LIVEC right now!')
175183
self._train_loader = torch.utils.data.DataLoader(
176184
train_data, batch_size=self._options['batch_size'],
177185
shuffle=True, num_workers=0, pin_memory=True)

0 commit comments

Comments
 (0)