Code Monkey home page Code Monkey logo

face-expression-and-ethnic-recognition's People

Contributors

hectoranadon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

face-expression-and-ethnic-recognition's Issues

No means_ethnic.npy

Hi, can you upload the means_ethnic.npy and weights_ethnic.hdf5 files, so I don't have to retrain your model. Thanks.

Dataset

Can you please share the following files:

images.h5
means_ethnic.npy
weights_ethnic.hdf5

How to hardcode the test_ethnic file

Hello,

I am trying to use the test_ethnic algorithm as part of a for loop of images in another python script. I'd like to hard code the args_parse arguments so that I don't need to parse each image through the command line.

I modified this code from the test_ethnic.py file:
if name == "main":
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to test image")
args = vars(ap.parse_args())

to this:
if name == "main":
args = {"image": "filepathto.jpg"}

However, I'm getting this traceback:
File "test_ethnic.py", line 28, in
result = predict_ethnic(args["image"])
File "test_ethnic.py", line 16, in predict_ethnic
im = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.2.0) /Users/travis/build/skvark/opencv-python/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Not sure what I did wrong in trying to convert to the hardcore path, any ideas?

Cannot run the code

Thank you very much for providing this great code. I am trying to run " python test_emotions.py -i", however, I get the following error. Could you please help solve the code so make it up-to-date?

/Users/yuyang01/miniconda3/envs/py37/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.svm.classes module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.svm. Anything that cannot be imported from sklearn.svm is now part of the private API. warnings.warn(message, FutureWarning) /Users/yuyang01/miniconda3/envs/py37/lib/python3.7/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator SVC from version 0.18.1 when using version 0.22.1. This might lead to breaking code or invalid results. Use at your own risk. UserWarning) Traceback (most recent call last): File "test_emotions.py", line 53, in <module> result = predict_emotion(args["image"]) File "test_emotions.py", line 45, in predict_emotion return clf.predict(np.array([poi])) File "/Users/yuyang01/miniconda3/envs/py37/lib/python3.7/site-packages/sklearn/svm/_base.py", line 585, in predict if self.break_ties and self.decision_function_shape == 'ovo': AttributeError: 'SVC' object has no attribute 'break_ties'

Error in face_network.py

Hi,

I'm new to python so forgive any ignorance. I am using tensorflow 2.1.1 and kerras 2.3.1 and can't run the lines:

from keras.engine import Model
from keras.layers import Flatten, Dense, Input

Any idea why this might be?

Support Files

Hello,

Can you please share the following files:
means_ethnic.npy
weights_ethnic.hdf5

Python, Tensorflow, Keras Version

Can you give the information about python version?

I used python 3.6.15, Tensorflow 1.3.0, Keras 2.0.8.
But I can't run 'test_ethnic.py'.

This is my error message.

Traceback (most recent call last):
File "test_ethnic.py", line 32, in
result = predict_ethnic(args["image"])
File "test_ethnic.py", line 12, in predict_ethnic
model = create_face_network(nb_class=4, hidden_dim=512, shape=(224, 224, 3))
File "/home/aislab719/Project/minyoung/face_aging/ethnic_classification/Face-expression-and-ethnic-recognition/face_network.py", line 10, in create_face_network
model = VGGFace(include_top=False, input_shape=shape)
File "/home/aislab719/Project/minyoung/face_aging/ethnic_classification/Face-expression-and-ethnic-recognition/ethnic_cf_venv/lib/python3.6/site-packages/keras_vggface/vggface.py", line 84, in VGGFace
include_top=include_top)
TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'

How can I run this code?
I need your python, tensorflow, and keras version.

Thank you.

hm

image
[[ 0.43056369 0.15632604 0.34506661 0.06804359]]
Asian

image
[[ 0.14197519 0.22913459 0.37832692 0.25056329]]
African

image
[[ 0.296579 0.12358417 0.25668547 0.32315144]]
Hispanic

Weights emotions

Hi,

Could you provide a link to the emotion weights in .hdf5 file?

Same as this one, but this one it just has the ethnic ones.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.