Comments (1)
Do you mean calculating the NME?
You can use this function to test NME normalized by inter-ocular distance:
def calculate_NME(self, logits, labels):
logits = tf.cast(logits,tf.float32)
labels = tf.cast(labels,tf.float32)
subtract_square_distance = tf.square(tf.subtract(logits, labels))
mean_distance = tf.reduce_mean([tf.sqrt(tf.add(subtract_square_distance[:, column],
subtract_square_distance[:, column+1])) for column in range(0, 136, 2)], axis=0)
outer_eye_x = tf.square(tf.subtract(labels[:, 72], labels[:, 90]))
outer_eye_y = tf.square(tf.subtract(labels[:, 73], labels[:, 91]))
inter_ocular_distance = tf.sqrt(tf.add(outer_eye_x, outer_eye_y))
normalized_mean_error = tf.divide(mean_distance, inter_ocular_distance,
name='normalized_mean_error')
loss_ = tf.reduce_mean(normalized_mean_error)
return loss_
from stylealign.
Related Issues (14)
- 《make a face》problems HOT 1
- When will the Pytorch version be released? HOT 1
- Why the perfomance of AVS(SAN) model is not good? HOT 13
- Hi!some question about re-training your pytorch code. HOT 2
- Hello! Could you share the checkpoint file that you used in the paper?
- Perfomance on CPU and GPU
- Is there a pretrained model?
- Question about the performance
- AFLW with new 68-point annotation HOT 2
- pretrained checkpoint for testing? HOT 1
- datasets HOT 4
- Loss function in this repo is different from paper HOT 5
- Four autoregressively modeled groups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylealign.