Code Monkey home page Code Monkey logo

Comments (5)

yangyangkiki avatar yangyangkiki commented on July 23, 2024 2

import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import simps

def AUCError(errors, failureThreshold=0.08, step=0.0001, showCurve=False):
nErrors = len(errors)
xAxis = list(np.arange(0., failureThreshold + step, step))
ced = [float(np.count_nonzero([errors <= x])) / nErrors for x in xAxis]
AUC = simps(ced, x=xAxis) / failureThreshold
failureRate = 1. - ced[-1]
print("AUC @ {0}: {1}".format(failureThreshold, AUC))
print("Failure rate: {0}".format(failureRate))
if showCurve:
plt.plot(xAxis, ced)
plt.show()

from hrnet-facial-landmark-detection.

kshashankrao avatar kshashankrao commented on July 23, 2024

May I know, What does errors denote in this context?
Thank you

from hrnet-facial-landmark-detection.

yangyangkiki avatar yangyangkiki commented on July 23, 2024

@kshashankrao
Hi, errors is a list that save the mean error of each face image. And the mean error is defined as the average Euclidean distance between the predicted facial landmark locations pi,j and their corresponding ground truth facial landmark locations gi,j.
eg. the test size of COFW dataset is 507, so the length of errors of COFW test set is 507.

from hrnet-facial-landmark-detection.

kshashankrao avatar kshashankrao commented on July 23, 2024

Hey, thank you for the information. I believe that euclidean distance is calculated by compute_nme function. Should these values be used for AUC or failure (with threshold)?

from hrnet-facial-landmark-detection.

yangyangkiki avatar yangyangkiki commented on July 23, 2024

@kshashankrao
Hi, you're right. compute_nme function is used to calculate the normalised mean error of a face image. you can save them and then use them to calculate AUC and failure rate (with threshold 0.1 or 0.08).

from hrnet-facial-landmark-detection.

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.