Giter Club home page Giter Club logo

face-recognition-keras's People

Contributors

mjdelta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

face-recognition-keras's Issues

ValueError: cannot reshape array of

Hello,
I downloaded the LFW dataset, and placed it in the directory, and when I run train.py I get this error:

File "/scratch/gits/face-recognition-keras/data_utils.py", line 100, in flow
ans,pos,nes,anchors_names,positives_names,negatives_names=self.get_triplet(values,names)
File "/scratch/gits/face-recognition-keras/data_utils.py", line 74, in get_triplet
choosed_faces_values=choosed_faces_values.reshape((len(choosed_faces_values),96,96,3))
ValueError: cannot reshape array of size 431812500 into shape (2303,96,96,3)

RuntimeError: Unable to open models/landmarks.dat


RuntimeError Traceback (most recent call last)
in ()
10 img_path=os.path.join(dir_,d,f)
11 size=96
---> 12 img=align_face(img_path,size)
13 if np.sum(img)==-1:
14 continue

in align_face(img_path, size)
4 if np.sum(bb)==-1:
5 return -1
----> 6 landmarks=get_face_shape(img,bb)
7
8 landmarksindices=np.array(OUTER_EYES_AND_NOSE)

in get_face_shape(img, bb)
11 def get_face_shape(img,bb):##return 68 keypoints of face
12 model_path="models/landmarks.dat"
---> 13 predictor=dlib.shape_predictor(model_path)
14 pnts=predictor(img,bb)
15 return np.float32(list(map(lambda p:(p.x,p.y),pnts.parts())))

RuntimeError: Unable to open models/landmarks.dat

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.