Skip to content

Commit

Permalink
Moved test data around
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhite committed Jun 6, 2010
1 parent d136e0f commit 4e3e930
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bgsub/bgsub_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions classtrain/classtrain_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
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
4 changes: 2 additions & 2 deletions slidingwindow/slidingwindow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand All @@ -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]))
Expand Down

0 comments on commit 4e3e930

Please sign in to comment.