Commit fc7dbff0 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

working on fr-pad -> up to epsc, still drafty though

parent 9af1ffe8
Pipeline #25382 passed with stage
in 1 minute and 3 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
Command line:
['fusion', 'fuse', '-vvv', '-a', 'mean', 'vgg-replay/scores-world', 'vgg-replay/scores-dev', 'vgg-replay/scores-eval', 'iqm-replay/scores-train', 'iqm-replay/scores-dev', 'iqm-replay/scores-eval']
Configuration:
scores: ('vgg-replay/scores-world', 'vgg-replay/scores-dev', 'vgg-replay/scores-eval', 'iqm-replay/scores-train', 'iqm-replay/scores-dev', 'iqm-replay/scores-eval')
algorithm: <class 'bob.fusion.base.algorithm.Weighted_Sum'>(preprocessors=[StandardScaler(copy=True, with_mean=True, with_std=True)])
groups: ('train', 'dev', 'eval')
output_dir: fusion_result
model_file: fusion_result/Model.pkl
skip_check: False
force: False
kwargs: {'verbose': 3}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -128,85 +128,3 @@ def positives_negatives(scores):
return positives, negatives
def plot_scores_distributions_zei_genuine(negatives, positives, title='Score Distribution', n_bins=50, threshold_height=1):
# compute the threshold on the dev set
threshold = bob.measure.eer_threshold(negatives, positives)
pyplot.figure(figsize=(7,5))
pyplot.hist(positives, density=True, color='g', bins=n_bins, label='Genuine')
pyplot.hist(negatives, density=True, color='r', bins=n_bins, alpha=0.4, label='Zero-Effort Impostors')
pyplot.vlines(threshold, 0, threshold_height, colors='r', linestyles='dashed', label='EER Threshold')
pyplot.title('Development set')
pyplot.xlabel("Score Value")
pyplot.ylabel("Probability Density")
pyplot.legend()
def calc_pass_rate(threshold, attacks):
return sum(1 for i in attacks if i >= threshold) / float(attacks.size)
def get_iampr_line(fig, attacks):
ax = fig.get_axes()
x_limits = ax[0].get_xlim()
ntick = 100
step = (x_limits[1] - x_limits[0]) / float(ntick)
thres = [(k * step) + x_limits[0] for k in range(2, ntick - 1)]
mix_prob_y = []
for k in thres:
mix_prob_y.append(100. * calc_pass_rate(k, numpy.array(attacks)))
return thres, mix_prob_y
def plot_scores_distributions_zei_attacks_genuine(negatives, positives, attacks, title='Score Distribution', n_bins=50, threshold_height=1):
# compute the threshold on the dev set
threshold = bob.measure.eer_threshold(negatives, positives)
fig, ax1 = pyplot.subplots(figsize=(7,5))
ax1.hist(positives, density=True, color='g', bins=n_bins, alpha=0.7, label='Genuine')
ax1.hist(negatives, density=True, color='r', bins=n_bins, alpha=0.4, label='Zero-Effort Impostors')
ax1.hist(attacks, density=True, color='gray', bins=n_bins, alpha=0.7, hatch='\\\\', label='Presentation Attacks')
ax1.vlines(threshold, 0, threshold_height, colors='r', linestyles='dashed', label='EER Threshold')
ax1.set_xlabel("Score Value")
ax1.set_ylabel("Probability Density")
ax2 = ax1.twinx()
points, iampr = get_iampr_line(fig, attacks)
ax2.plot(points, iampr, color='b', label ='IAMPR')
ax2.set_ylabel('IAMPR')
ax1.legend(loc=6)
ax2.legend()
pyplot.show()
#f = pyplot.figure(figsize=(7,5))
#pyplot.hist(positives, density=True, color='g', bins=n_bins, alpha=0.7, label='Genuine')
#pyplot.hist(negatives, density=True, color='r', bins=n_bins, alpha=0.4, label='Zero-Effort Impostors')
#pyplot.hist(attacks, density=True, color='gray', bins=n_bins, alpha=0.7, hatch='\\\\', label='Presentation Attacks')
#pyplot.vlines(threshold, 0, threshold_height, colors='r', linestyles='dashed', label='EER Threshold')
#ax = f.get_axes()
#prob_ax = ax[0].twinx()
#points, iampr = get_iampr_line(f, attacks)
#pyplot.plot(points, iampr, color='b')
#pyplot.plot()
#pyplot.title('Development set')
#pyplot.xlabel("Score Value")
#pyplot.ylabel("Probability Density")
#pyplot.legend()
def epsc(scores):
"""
scores: list
licit dev, licit-eval, spoof-dev, spoof-eval
"""
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment