Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LFW processing #1

Closed
jakezhaojb opened this issue Dec 20, 2015 · 5 comments
Closed

LFW processing #1

jakezhaojb opened this issue Dec 20, 2015 · 5 comments

Comments

@jakezhaojb
Copy link

Hi,

I can't make your create_dataset.py to work. One sanity check failing: np.array(self.imgs.tolist().getdata()).sum() seems to be zero.

The actual error I got is:

Traceback (most recent call last):
  File "create_datasets.py", line 38, in <module>
    x = create_lfw()
  File "create_datasets.py", line 27, in create_lfw
    imgs = lfw_imgs(alignment='deepfunneled', size=64, crop=50)
  File "create_datasets.py", line 19, in lfw_imgs
    img = img[crop:-crop, crop:-crop]
IndexError: too many indices for array

Thank you,
Jake

@skaae
Copy link
Owner

skaae commented Dec 21, 2015

Hi jake,
I just tried with a fresh repo and it works fine for me. Are you sure the files are downloaded correctly?

@jakezhaojb
Copy link
Author

Hi,

I think I downloaded it right. Can you tell me the version you are using for python and PIL?

@jakezhaojb
Copy link
Author

I think the problem is originated from #L16 of create_dataset.py in which I got an numpy.array carrying a number of PIL image handlers, and #L19 won't allow this object array to be cropped.

So that I suspect if there is a version discrepancy

@andersbll
Copy link
Collaborator

Hi there! Make sure you are using Pillow rather than PIL.

The python script works using a recent version of Anaconda Linux with Pillow 3.

@jakezhaojb
Copy link
Author

Thanks @andersbll
That was exactly the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants