Comments (19)
Do you have the cohn kanade dataset ???
Want seems to be the problem.
Have you checked
https://github.com/mahakal/FacialEmotionRecognition#usage
https://github.com/mahakal/FacialEmotionRecognition/blob/master/pickle_dataset.py#L123
from facialemotionrecognition.
HI
Thanks for replying .
Yes I have the extended CK data which is arranged as several folders and inside each folder there is
types of emotions as some of them has labels and others not.
How should I make the pickle_dataset.py to read through these folders and then use cnn.py ?
from facialemotionrecognition.
https://github.com/mahakal/FacialEmotionRecognition/blob/master/pickle_dataset.py#L119 => put the absolute path of CK dataset.
open python terminal in the repo
from pickle_dataset import PickleData
p = PickleData()
p.start_pickling()
I might refactor the code so it takes care of the directory path, threshold, error handling, etc. But then again it's just pickling the data.
from facialemotionrecognition.
Hi
Images bath is : C:/Users/sarmad/Documents/CK/cohn-kanade-images/
where all folders are . I put this path in pickle_dataset.py and run the code in python terminal.
there is a file saved as .p but when I run cnn.py ,
Using TensorFlow backend. Traceback (most recent call last): File "cnn.py", line 34, in <module> X_train = X_train.reshape(X_train.shape[0], img_rows, img_cols, 1) ValueError: cannot reshape array of size 0 into shape (8,100,100,1)
from facialemotionrecognition.
https://github.com/mahakal/FacialEmotionRecognition/blob/master/cnn.py#L25
Replace the name with the generated file.
I'm gonna rewrite it.
from facialemotionrecognition.
I renamed and replaced the file name but I get errors I showed in last message . I think there is some problems with reading images from the folders
from facialemotionrecognition.
When I load and print pickle file this is the output :
((array([], shape=(8, 0), dtype=float64), array([], shape=(0, 1), dtype=int8)), (array([], shape=(8, 0), dtype=float64), array([], shape=(0, 1), dtype=int8)), (array([], shape=(8, 0), dtype=float64), array([], shape=(0, 1), dtype=int8)))
from facialemotionrecognition.
@sarmadm Yeah, I'm rewriting the script making it more user-friendly. I'll be done by tomorrow.
from facialemotionrecognition.
Thanks , I tried running pickle.py is shows this error
pickle_dataset.py: error: the following arguments are required: C:/Users/Documents/CK/cohn-kanade-images
This the folder that contains all the folders with images as shown in above image , how should I wrtire the path ?
from facialemotionrecognition.
Hi
I run the code again shows this error :
X_train = X_train.reshape(X_train.shape[0], img_rows, img_cols, 1) ValueError: cannot reshape array of size 0 into shape (8,100,100,1)
is that the case with you ?
from facialemotionrecognition.
There were some typos, try it again.
For Help:
python pickle_dataset.py -h
python cnn.py -h
Let me know whether it works or not.
And can you tell me, for which purpose are you using the repository.
from facialemotionrecognition.
It shows same error , is it problem with ck data folder structure ?
(keras_v) C:\Users\Documents\CK>python cnn.py C:\Users\Documents\CK\ck_dataset.pickle Using TensorFlow backend. Traceback (most recent call last): File "cnn.py", line 55, in <module> X_train = X_train.reshape(X_train.shape[0], img_rows, img_cols, 1) ValueError: cannot reshape array of size 0 into shape (8,100,100,1)
from facialemotionrecognition.
The pickle file seems to be empty. Delete the previous pickle.py file.
Run, python pickle_dataset.py C:/Users/Documents/CK/cohn-kanade-images --crop
The pickle would be created in repo directory.
Then run, python cnn.py ck_dataset.pickle
Let me know whether it works or not.
And can you tell me, for which purpose are you using the repository.
from facialemotionrecognition.
I deteted the previous pickle file , and run :
(keras_v) C:\Users\Documents\CK>python pickle_dataset.py C:\Users\Documents\CK\cohn-kanade-images
C:\Users\Documents\CK\cohn-kanade-images folder contains imaged sequence folders
pickle file is saved and then I run :
(keras_v) C:\Users\Documents\CK>python cnn.py C:\Users\Documents\CK\ck_dataset.pickle Using TensorFlow backend. Traceback (most recent call last): File "cnn.py", line 55, in <module> X_train = X_train.reshape(X_train.shape[0], img_rows, img_cols, 1) ValueError: cannot reshape array of size 0 into shape (8,100,100,1)
from facialemotionrecognition.
Any idea ??
from facialemotionrecognition.
There was a bug in the code, fetch the latest and check.
And also, to check the pickle file you could
import pickle
o = pickle.load(open('name_of_the_file.pickle' 'rb'))
o.keys()
print(o)
from facialemotionrecognition.
It shows same error and this is ck_dataset.pickle output :
dict_keys(['training_data', 'validation_data', 'test_data', 'img_dim']) print(o)
{training_data': [array([], shape=(8, 0), dtype=float64), array([], shape=(0, 1), dtype=int8)], 'validation_data': [array([], shape=(8, 0), dtype=float64), array([], shape=(0, 1), dtype=int8)], 'test_data': [array([], shape=(8, 0), dtype=float64), array([], shape=(0, 1), dtype=int8)], 'img_dim': {'width': 100, 'height': 100}}
from facialemotionrecognition.
Are you using CK database or Extended CK database???
Try again, there was a bug now the script works for CK database.
from facialemotionrecognition.
I'm using Extended CK database , is the code will not work for it ?
from facialemotionrecognition.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facialemotionrecognition.