OValery16 / gender-age-classification

gender/age classification
Mozilla Public License 2.0
49 stars 24 forks source link

Not work in Windows 10 with "bad marshal data" #2

Open wkdhkr opened 6 years ago

wkdhkr commented 6 years ago

Thank you for a wonderful code. I confirmed the operation in the following environment. All model data has been set up.

When executing the source code, the following error is displayed.

     code = marshal.loads (raw_code)
ValueError: bad marshal data (unknown type code)

I tried deleting the pyc file, but it made no sense.

I want to know the version of Keras and Python used by this repository.

OValery16 commented 6 years ago

I used Keras 2.0.4 and Tensorflow 1.1.0.

I tried to reproduce your problem without success. It seems that the problem might come from Keras itself. The model version doesn't match with the Keras version you use.

Please, try this:

pip install --upgrade tensorflow pip install --upgrade keras

After, can you post a comment to confirm (or not) that this solution worked fine (in order to help others that might encounter the same problem in the futur) ?

If you like you like this project, feel free to leave a star. (it is my only reward ^^)

wkdhkr commented 6 years ago

@OValery16 Currently I use following versions. It is latest version. hmm, I will try same versions that you mentioned.

Keras                     2.1.3                     <pip>
tensorflow-gpu            1.5.0                     <pip>

Python version is 3.x?

I gave a star. :)

jeanbverroken commented 6 years ago

I encounter the same problem with windows 7

OValery16 commented 6 years ago

I am gonna check that, and I will come back to you (I did all my work on Ubuntu ^^)

eviling commented 6 years ago

same problem with windows 10

xjdeng commented 6 years ago

I upgraded to tensorflow-gpu 1.8.0 on Windows 10 and still am getting this error.

AlexBlack2202 commented 6 years ago

It work with python 2.7 in ubuntu, it cannot work in python 3.x

AlexBlack2202 commented 6 years ago

It just a modal to reg face in image, you can use another CNN (dlib, ....) or use open_cv instead of it.

OValery16 commented 6 years ago

Sorry for the late reply. I got really busy recently.

Thanks AlexBlack2202 for your comments. I will react with few points:

  1. As AlexBlack2202 mentioned it, the project was implemented on Ubuntu with python 2.7. I used Keras 2.0.4 and Tensorflow 1.1.0. I am not quite sure, but it seems that there is a version incompatibility. Please check: https://stackoverflow.com/questions/45624414/python-keras-compatibility-between-windows-and-linux

  2. In this project we stack two CNN: (1) for the face recognition, (2) for the age/gender identification. For the first part (as AlexBlack2202 mentioned it) you can also us other computer vision library such as OpenCV (OpenCV implementation is based on HOG). However if you want to do face recognition in real time (for example in a video), you cannot use these approaches which would be slow. Instead you can use YOLO model (used in this project), which is much fast.

If you like you like this project, feel free to leave a star. (it is my only reward ^^)