Permalink
Browse files

Moved test data around

  • Loading branch information...
1 parent d136e0f commit 4e3e9303628bd51de4bf8124e7d9322d792bf59d @bwhite committed Jun 6, 2010
View
@@ -31,8 +31,8 @@
from bgsub import Mapper, Reducer
-DATA_FN, SZ = 'pets2006-S1-T1-C-0-499.video_frame_data_small.pkl.gz', (45, 36)
-#DATA_FN, SZ = 'pets2006-S1-T1-C-0-499.video_frame_data.pkl.gz', (720, 576)
+DATA_FN, SZ = 'input/pets2006-S1-T1-C-0-499.video_frame_data_small.pkl.gz', (45, 36)
+#DATA_FN, SZ = 'input/pets2006-S1-T1-C-0-499.video_frame_data.pkl.gz', (720, 576)
class Test(hadoopy.Test):
@@ -44,13 +44,13 @@ def test_mapreduce(self):
# Test data is white cat, black dog, and neither
test_in = []
all_data = {'cat': [], 'dog': [], 'misc': []}
- for fn in sorted(glob.glob('test_data/cat*.jpg')):
+ for fn in sorted(glob.glob('input/classtrain/cat*.jpg')):
image = self._load_image_as_np(fn)
all_data['cat'].append(image)
- for fn in sorted(glob.glob('test_data/dog*.jpg')):
+ for fn in sorted(glob.glob('input/classtrain/dog*.jpg')):
image = self._load_image_as_np(fn)
all_data['dog'].append(image)
- for fn in sorted(glob.glob('test_data/misc*.jpg')):
+ for fn in sorted(glob.glob('input/classtrain/misc*.jpg')):
image = self._load_image_as_np(fn)
all_data['misc'].append(image)
model_ids = ['cat', 'dog']
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
@@ -33,7 +33,7 @@ def __init__(self, *args, **kw):
super(Test, self).__init__(*args, **kw)
def test_mapreduce0(self):
- image = Image.open('test_data/test0.png')
+ image = Image.open('input/slidingwindow/test0.png')
image_size = image.size
image = np.fromstring(image.tostring(), dtype=np.uint8)
image = image.reshape((image_size[1], image_size[0]))
@@ -47,7 +47,7 @@ def test_mapreduce0(self):
self.assertEqual(result, test_out)
def test_mapreduce1(self):
- image = Image.open('test_data/test1.png')
+ image = Image.open('input/slidingwindow/test1.png')
image_size = image.size
image = np.fromstring(image.tostring(), dtype=np.uint8)
image = image.reshape((image_size[1], image_size[0]))

0 comments on commit 4e3e930

Please sign in to comment.