amineHorseman / facial-expression-recognition-using-cnn

Deep facial expressions recognition using Opencv and Tensorflow. Recognizing facial expressions from images or camera stream
GNU General Public License v3.0
445 stars 141 forks source link

data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) #29

Open yangqian-qian opened 3 years ago

yangqian-qian commented 3 years ago

when i did 'python train.py --train=yes', code 'data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1)' from data_loader.py reprted a error, which is 'numpy.AxisError: axis 1 is out of bounds for array of dimension 1' ,i do not know how to correct it, i tried to amend axis=1 to axis=0, well , code 'return X[start]' from utils.py showed me a new error ,which is 'index 9006 is out of bounds for axis 0 with size 0' anyway, i want to ask Did anyone run this code successfully,and how should i correct my code, thanks.

yuerunyu commented 3 years ago

when i did 'python train.py --train=yes', code 'data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1)' from data_loader.py reprted a error, which is 'numpy.AxisError: axis 1 is out of bounds for array of dimension 1' ,i do not know how to correct it, i tried to amend axis=1 to axis=0, well , code 'return X[start]' from utils.py showed me a new error ,which is 'index 9006 is out of bounds for axis 0 with size 0' anyway, i want to ask Did anyone run this code successfully,and how should i correct my code, thanks.

Hi,you can check convert_fer2013_to_images_and_landmarks.py,modify "visualise" to "visualize".Then you will get correct landmarks.npy and hog_features.npy.and run"python train.py --train=yes",it will works!

yangqian-qian commented 3 years ago

Hello, I didn't expect someone to reply me. Thank you very much. Your method is really useful

------------------ 原始邮件 ------------------ 发件人: "amineHorseman/facial-expression-recognition-using-cnn" <notifications@github.com>; 发送时间: 2020年8月13日(星期四) 中午1:33 收件人: "amineHorseman/facial-expression-recognition-using-cnn"<facial-expression-recognition-using-cnn@noreply.github.com>; 抄送: "杨倩"<1964897156@qq.com>;"Manual"<manual@noreply.github.com>; 主题: Re: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29)

when i did 'python train.py --train=yes', code 'data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1)' from data_loader.py reprted a error, which is 'numpy.AxisError: axis 1 is out of bounds for array of dimension 1' ,i do not know how to correct it, i tried to amend axis=1 to axis=0, well , code 'return X[start]' from utils.py showed me a new error ,which is 'index 9006 is out of bounds for axis 0 with size 0' anyway, i want to ask Did anyone run this code successfully,and how should i correct my code, thanks.

Hi,you can check convert_fer2013_to_images_and_landmarks.py,modify "visualise" to "visualize".Then you will get correct landmarks.npy and hog_features.npy.and run"python train.py --train=yes",it will works!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

izhimahu commented 3 years ago

convert_fer2013_to_images_and_landmarks.py,modify "visualise" to "visualize.I tried that but it didn't work.Could you tell me how to change it

yangqian-qian commented 3 years ago

I didn't just change one code, but also changed several codes. I can give you my modified code, hope it will help you

------------------ 原始邮件 ------------------ 发件人: "amineHorseman/facial-expression-recognition-using-cnn" <notifications@github.com>; 发送时间: 2020年12月16日(星期三) 下午3:22 收件人: "amineHorseman/facial-expression-recognition-using-cnn"<facial-expression-recognition-using-cnn@noreply.github.com>; 抄送: "yangqian"<1964897156@qq.com>;"Manual"<manual@noreply.github.com>; 主题: Re: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29)

convert_fer2013_to_images_and_landmarks.py,modify "visualise" to "visualize.I tried that but it didn't work.Could you tell me how to change it

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

viitormiiguel commented 3 years ago

Hello, I have the same issue, even adjusting the code. This problem may also be because the landmarks.npy file is empty.

aj7521 commented 3 years ago

Did anyone resolve this issue? I am still getting File "C:\Users\WELCOME\Desktop\FYP\data_loader.py", line 20, in load_data data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) File "<__array_function__ internals>", line 6, in concatenate. ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 20993 and the array at index 1 has size 3438.

18117281Ao commented 2 years ago

我不仅更改了一个代码,还更改了几个代码。我可以给你我修改后的代码,希望它能帮助你 ... ------------------ 原始邮件 ------------------ 发件人 <notifications@github.com:发送时间: 2020年12月16日(星期三) 下午3:22 收件人: "amineHorseman/face-expression-recognition-using-cnn"face-expression-recognition-using-cnn@noreply.github.com;抄送: "阳倩"1964897156@qq.com;手册"manual@noreply.github.com;主题: 回复: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate(((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29) convert_fer2013_to_images_and_landmarks.py,修改 "visualise" to "visualize.我试过了,但它不起作用。你能告诉我如何改变它吗 - 你收到这个,因为你订阅了这个线程。直接回复此电子邮件,在 GitHub 上查看或取消订阅。

Hello, can you send me a copy of the code you modified? My email address is2018040299@mail.buct.edu.cn

ou1443989517 commented 2 years ago

我不仅改了一个代码,还改了几个代码。我可以给你我修改过的代码,希望对你有帮助 ------------------ 原始邮件 ------------------ 发件人:“amineHorseman/facial -expression-recognition-using-cnn" notifications@github.com; 时间 2000 年 12 月 16 日发送睡眠 (sp) 下午 2:22 月 16 日下午 3;"使用面部胺法&n&n" github.com>; 抄送: "yangqian"1964897156@qq.com;"Manual"manual@noreply.github.com; 主题: Re: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.) convert_fer2013_to_images_and_landmarks.py,将“visualise”修改为“visualize”。我试过了,但没用。你能告诉我如何更改它吗?你收到这个是因为你订阅了这个线程。直接回复这封电子邮件,在 GitHub 上查看,或取消订阅。

can you send me a copy?thanks mail:1443989517@qq.com

ka0614 commented 1 year ago

I didn't just change one code, but also changed several codes. I can give you my modified code, hope it will help you ------------------ 原始邮件 ------------------ 发件人: "amineHorseman/facial-expression-recognition-using-cnn" <notifications@github.com>; 发送时间: 2020年12月16日(星期三) 下午3:22 收件人: "amineHorseman/facial-expression-recognition-using-cnn"<facial-expression-recognition-using-cnn@noreply.github.com>; 抄送: "yangqian"<1964897156@qq.com>;"Manual"<manual@noreply.github.com>; 主题: Re: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29) convert_fer2013_to_images_and_landmarks.py,modify "visualise" to "visualize.I tried that but it didn't work.Could you tell me how to change it — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Hello, I changed "visualise" to "visualize but got an error. Can you send me a copy of the code you modified? My email address is haming234p@gmail.com

fyhfyhfyh123456 commented 1 year ago

You have solved this problem, and I have encountered the same problem as you. I really need your modification opinions. Thank you very much.

fyhfyhfyh123456 commented 1 year ago

My email is 3164455906@qq.com. Thanks again

ou1443989517 commented 1 year ago

Sorry, I have lost this code

------------------ 原始邮件 ------------------ 发件人: "amineHorseman/facial-expression-recognition-using-cnn" @.>; 发送时间: 2023年2月17日(星期五) 晚上7:24 @.>; @.**@.>; 主题: Re: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29)

You have solved this problem, and I have encountered the same problem as you. I really need your modification opinions. Thank you very much.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

fyhfyhfyh123456 commented 1 year ago

Sorry, I have lost this code ------------------ 原始邮件 ------------------ 发件人: "amineHorseman/facial-expression-recognition-using-cnn" @.>; 发送时间: 2023年2月17日(星期五) 晚上7:24 @.>; @.**@.>; 主题: Re: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29) You have solved this problem, and I have encountered the same problem as you. I really need your modification opinions. Thank you very much. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***> thank you

fyhfyhfyh123456 commented 1 year ago

I didn't just change one code, but also changed several codes. I can give you my modified code, hope it will help you

You have solved this problem, and I have encountered the same problem as you. I really need your modification opinions. Thank you very much.My email is 3164455906@qq.com.

shangguanwt commented 1 year ago

我不仅更改了一个代码,还更改了几个代码。我可以给你我修改后的代码,希望对你有帮助 ... ------------------原始邮件------------------ 发件人: “胺骑士/面部表情识别使用-CNN” notifications@github.com; 发送时间: 2020年12月16日(星期三) 下午3:22 收件人: ”amineHorseman/面部表情识别-使用-CNN“面部表情识别-使用-cnn@noreply.github.com; 抄送: ”杨前“1964897156@qq.com;”手册“manual@noreply.github.com; 主题: 回复: [amineHorseman/facial-expression-recognition-using-cnn] data_dict['X2'] = np.concatenate((data_dict['X2'], np.load(DATASET.train_folder + '/hog_features.npy')), axis=1) (#29) convert_fer2013_to_images_and_landmarks.py,将“可视化”修改为“可视化”。我试过了,但没有用。你能告诉我如何改变它吗 — 您收到此消息是因为您订阅了此线程。 直接回复此电子邮件,在 GitHub 上查看或取消订阅。

You have solved this problem, and I have encountered the same problem as you. I really need your modification opinions. Thank you very much.My email is 3273995899@qq.com