hectoranadon / face-expression-and-ethnic-recognition Goto Github PK
View Code? Open in Web Editor NEWTwo image models for face expression recognition and for ethnic classification
Two image models for face expression recognition and for ethnic classification
can you please share the pretrained model?
Hi, can you upload the means_ethnic.npy and weights_ethnic.hdf5 files, so I don't have to retrain your model. Thanks.
Can you please share the following files:
images.h5
means_ethnic.npy
weights_ethnic.hdf5
Could you provide the links to the weights?
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?
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'
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?
Hello,
Can you please share the following files:
means_ethnic.npy
weights_ethnic.hdf5
can you please share your images.h5 file
Hi,
I just want to run the test scripts, but the pre-trained models download link is not working. Can you please fix it.
Thanks and regards.
Vishal
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.