Giter Site home page Giter Site logo

alexstaravoitau / kaggle-facial-keypoints-detection Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 25.0 7.14 MB

Kaggle "Facial Keypoints Detection" competition.

Home Page: http://navoshta.com/facial-with-tensorflow/

Jupyter Notebook 100.00%
cnn computer-vision machine-learning regression tensorflow

kaggle-facial-keypoints-detection's People

Contributors

alexstaravoitau 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

Watchers

 avatar  avatar  avatar

kaggle-facial-keypoints-detection's Issues

Use this tutorial for other images

Dear Alex,

I'm trying use this kaggle tutorial to find keypoints on a image: I've followed the tutorial '3con_2fc_b36_e1000_aug_lrdec_mominc_dr'
But i'm trying to use this trained model on a different image.

This first thing that i've tried is to get the first image of the training data is a 'numpy.ndarray' with a image, but this shows a black canvas. This shows a 96x96 black image

print(type(X[0]))
img = X[0].reshape(96, 96)

imgPIL = Image.fromarray(img)
imgPIL.show()

After that i've tried to pass a image to the model

from PIL import Image
..

graph = tf.Graph()

with graph.as_default():
    # Training computation.
    with tf.variable_scope(model_variable_scope):
        img = Image.open("image.jpg")
        image_np = np.array(img.getdata(),np.uint8).reshape(img.size[1], img.size[0],3) # rgb
        model_pass(image_np, False)

This results in this error:

ValueError: cannot reshape array of size 16900 into shape (96,96)

Would you please help me?

With kind regards,
Dion from The Netherlands

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.