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

How to convert CK+ dataset to .npy #1

Closed
fitrialif opened this issue Jul 3, 2017 · 14 comments
Closed

How to convert CK+ dataset to .npy #1

fitrialif opened this issue Jul 3, 2017 · 14 comments

Comments

@fitrialif
Copy link

Load data

X = np.load('CKP_X.npy')
Y = np.load('CKP_Y.npy')

@arundasan91
Copy link
Owner

@fitrialif , Hope these helped. Please reopen if you have any queries.

@fitrialif
Copy link
Author

hi @arundasan91 ,
Thank you for the code.
I have ran this code until preproc3.py and the resize image was produce but when I try run utils.py code nothing happen. Still cannot convert to numpy format.

@arundasan91
Copy link
Owner

Hey @fitrialif , Maybe you're missing something. What you'd want to do is to understand what the function filestoTFdata https://github.com/rolanvc/dexpression/blob/master/utils.py#L4-L33 is doing. You've to call that function with a list of filenames (absolute paths). The function is well documented. Let me know how it goes.

Thanks,
Arun

@fitrialif
Copy link
Author

fitrialif commented Nov 29, 2017 via email

@arundasan91
Copy link
Owner

@fitrialif ,

What you are doing is to run the utils.py file with an argument /home/fitrialif/resize. This won't work as:

  1. The function is not expecting any arguments.
  2. The function needs a list of filenames (absolute path).

Also, Line 33 should ring some bells. The function is returning the concatenated array.

If you'd want to save the arrays, add a line after Line 38 to save the variables images and labels to disk. You can use numpy.save to do that.

What you need to do is to create a list of filenames say:

filelist = ['/home/fitrialif/resize/001.jpg', '/home/fitrialif/resize/002.jpg', '/home/fitrialif/resize/003.jpg']

You can use os.listdir or something similar for that. Maybe replace the filelist in Line 37 with the one you create.

Finally, run the code using python utils.py

@fitrialif
Copy link
Author

fitrialif commented Nov 30, 2017 via email

@arundasan91
Copy link
Owner

@fitrialif , I strongly suggest you brush up your Python skills and understand the context in which the code is running. Please refer my previous comment for filelist; it should be a list. If you've a friend who can lend a hand who knows Python, please meet with him/her and discuss this together.

Thanks,
Arun

@NomiMalik0207
Copy link

@fitrialif have you completed this task. I am facing the same problem can you help me??

@christiaan20
Copy link

The links to the files are dead. Can I assume that all 5876 are loaded and resized to 224x224x1 for inputting into the network?

@GaroBozadjian
Copy link

GaroBozadjian commented Dec 6, 2018

The links that you uploaded is not working, can you update them so we can use the CKP dataset please

@edgalsanchez
Copy link

The links are dead, can you update them? Please

@arundasan91
Copy link
Owner

@edgalsanchez , sorry. I checked for the repo, seems it was removed.

@arundasan91
Copy link
Owner

There are many projects which uses CK+ dataset. Unfortunately, since I have used my code in a private project, I cannot share it now. Please search for CK+ dataset in github.

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

6 participants