diff --git a/mdata/ILSVRC.py b/mdata/ILSVRC.py index 58d80a8..17e1cf6 100644 --- a/mdata/ILSVRC.py +++ b/mdata/ILSVRC.py @@ -450,7 +450,7 @@ class DataILSVRC(DataDumperBase): for line in tsvfile: hash = line[0] tag = line[-1] - image = os.path.join(self.feat_dir, hash[:3], hash[3:] + '.jpg') + image = os.path.join(self.data_dir, hash[:3], hash[3:] + '.jpg') if image: im = Jpeg(image, key=sample_key) dict_dataset[hash] = (tag, im.getCoefBlocks('Y')) diff --git a/test/test_data.py b/test/test_data.py index cd32261..42b54f7 100755 --- a/test/test_data.py +++ b/test/test_data.py @@ -136,13 +136,14 @@ def test_pipeline(): def test_crop(): # crop.crop_Test() - dil = ILSVRC.DataILSVRC(base_dir='/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val', category='Test_1') - dil.crop() + + # dil = ILSVRC.DataILSVRC(base_dir='/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val', category='Test_1') + # dil.crop() dil2 = ILSVRC.DataILSVRC(base_dir='/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val', category='Test_1_crop_pil') - dil2.format() - dil2.embed(rate=0.2) + # dil2.format() + # dil2.embed(rate=0.2) X,Y = dil2.load_data(mode='local',feattype='coef') print X[0] -- libgit2 0.21.2