Coder Social home page Coder Social logo

你好,请问facemask在预测的时候传入的是什么格式的?比如其它特征是64x64的矩阵格式。多谢博主 about eye-tracker HOT 6 CLOSED

hugochan avatar hugochan commented on August 16, 2024
你好,请问facemask在预测的时候传入的是什么格式的?比如其它特征是64x64的矩阵格式。多谢博主

from eye-tracker.

Comments (6)

hugochan avatar hugochan commented on August 16, 2024

@Ar4enal face_mask: 25 x 25 binary matrix.

from eye-tracker.

Ar4enal avatar Ar4enal commented on August 16, 2024

@hugochan 谢谢博主。

还有一个问题,就是在预测时feed_dict里传入参数的时候提示我还需要传入pos的数据,但是这是我要预测的坐标,请问怎么更改代码能得出预测的gaze坐标?或者我这个是错的?十分感谢(^▽^)

a = graph.get_tensor_by_name("eye_left:0")
b = graph.get_tensor_by_name("eye_right:0")
c = graph.get_tensor_by_name("face:0")
d = graph.get_tensor_by_name("face_mask:0")
e = graph.get_tensor_by_name("pos:0")
......
feed_dict = {a:left_eye, b:right_eye, c:face, d:face_grid}
res = sess.run(e,feed_dict)

from eye-tracker.

hugochan avatar hugochan commented on August 16, 2024

@Ar4enal
eye_left, eye_right, face, face_mask, pred = val_ops
pred_pos = session.run(pred, feed_dict={eye_left: batch_val_data[0], eye_right: batch_val_data[1], face: batch_val_data[2], face_mask: batch_val_data[3]})

请参考validate_model 函数

from eye-tracker.

Ar4enal avatar Ar4enal commented on August 16, 2024

@hugochan 因为我预测的是一张图片jpg格式,而不是文中的val_ops,请问pred怎么初始化?其它四个参数我已经处理好了

#pred = graph.get_tensor_by_name("Add_5:0")
#pred = graph.get_tensor_by_name("Variable_13:0")
我试了这几个,但是结果都是有正有负的,类似如下
[array([ 0.14147238, -0.20125845], dtype=float32)]

怎么能得出预测的x,y坐标呢?多谢博主

from eye-tracker.

hugochan avatar hugochan commented on August 16, 2024

@Ar4enal 你可以参考这里,做一个反过程,把network output转化为实际坐标。

from eye-tracker.

Ar4enal avatar Ar4enal commented on August 16, 2024

@hugochan 好的,谢谢,我已经解决了

from eye-tracker.

Related Issues (20)

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.