bob.measure issueshttps://gitlab.idiap.ch/bob/bob.measure/-/issues2018-01-16T16:56:34Zhttps://gitlab.idiap.ch/bob/bob.measure/-/issues/26ROC and DET plots are calculated incorrectly sometimes2018-01-16T16:56:34ZAmir MOHAMMADIROC and DET plots are calculated incorrectly sometimesFollowing the discussion here: https://groups.google.com/forum/#!topic/bob-devel/EIp1nvw5-vQ
Looks like we have a corner case where the scores have a very large peak in their distribution:
![hist_data](/uploads/ee0071522224130f9fa7be...Following the discussion here: https://groups.google.com/forum/#!topic/bob-devel/EIp1nvw5-vQ
Looks like we have a corner case where the scores have a very large peak in their distribution:
![hist_data](/uploads/ee0071522224130f9fa7be7b8508f2e4/hist_data.png)
The scores are also available: [fusion_all_200_datatset.npy](/uploads/fa88359dfdb4d66cdbc54f3e4a677149/fusion_all_200_datatset.npy)
To load them:
```python
>>> scores = numpy.load('fusion_all_200_datatset.npy')
... positives = scores[0]
... negatives = scores[1]
# The negatives are mostly 0
>>> sum(negatives < 9e-16)
51911
>>> sum(negatives < 9e-17)
51525
>>> sum(negatives < 9e-18)
51029
>>> sum(negatives < 9e-20)
49675
>>> sum(negatives < 9e-22)
47543
>>> sum(negatives < 9e-30)
27487
>>> sum(negatives < 9e-60)
0
```
@tiago.pereira may be able to provide a set of smaller scores to debug this.
When I calculate the EER, I get `2.7%`:
```python
>>> scores = numpy.load('fusion_all_200_datatset.npy')
... positives = scores[0]
... negatives = scores[1]
...
>>> threshold = bob.measure.eer_threshold(negatives, positives)
... FAR, FRR = bob.measure.farfrr(negatives, positives, threshold)
...
>>> FAR, FRR
(0.02762483029114497, 0.027626084163186636)
>>> negatives.mean(), negatives.std(), positives.mean(), positives.std()
(3.0290521114232657e-06, 0.00067550514259906739, 0.20795613959959214, 0.32512541269459205)
>>> 100*(FAR+FRR)/2
2.76254572271658
>>> bob.measure.plot.roc(negatives, positives, npoints)
[<matplotlib.lines.Line2D object at 0x7f472a8bed10>]
>>> bob.measure.plot.det(negatives, positives, npoints, color=(0,0,0), linestyle='-', label='test')
... bob.measure.plot.det_axis([0.1, 80, 0.1, 80])
...
[-3.090232246772911, 0.8416212348748217, -3.090232246772911, 0.8416212348748217]
# plot the EER point on the DET curve
>>> pyplot.plot(bob.measure.ppndf(FAR), bob.measure.ppndf(FAR), 'ro')
[<matplotlib.lines.Line2D object at 0x7f472a4dc510>]
```
But when I plot the ROC and DET curves, I get curves with EER of `6%` or more than `20%`:
DET CURVE with around `6%` EER:
![wrong_det](/uploads/6c8c93c1c994f0c256ca1b90087a1484/wrong_det.png)
ROC CURVE with more than `20%` EER:
![wrong_roc](/uploads/4730c633a9c7a6ae0ef0d56227e79e41/wrong_roc.png)May 2017 HackathonAmir MOHAMMADIAmir MOHAMMADIhttps://gitlab.idiap.ch/bob/bob.measure/-/issues/25Moving biometrics-related functionality to bob.bio.base2018-10-16T06:34:31ZAndré AnjosMoving biometrics-related functionality to bob.bio.baseAs Bob keeps its trajectory to serve more types of systems, it becomes less and less obvious to keep biometrics-related functionality inside this package. I'm proposing we move those into `bob.bio.base`, which is the place they should ha...As Bob keeps its trajectory to serve more types of systems, it becomes less and less obvious to keep biometrics-related functionality inside this package. I'm proposing we move those into `bob.bio.base`, which is the place they should have been in the first place.
A few things that come to mind:
* All score loading/saving functionality
* OpenBR exchange support
* The scripts, which are tunned for Biometrics-style reporting (and can only load biometric score files)
* Not sure about all the identification stuff, maybe generic enough to keep here?
Thanks for your feedback.May 2017 HackathonGuillaume HEUSCHGuillaume HEUSCHhttps://gitlab.idiap.ch/bob/bob.measure/-/issues/56Limitations of matplotlib's constrained layout are not taken into account2018-08-27T14:55:54ZAmir MOHAMMADILimitations of matplotlib's constrained layout are not taken into accountPlease see: https://matplotlib.org/tutorials/intermediate/constrainedlayout_guide.html#limitations
Basically we should not be using `plt.subplot` and should be using `GridSpec`.
I think this was recently added to the documentation so w...Please see: https://matplotlib.org/tutorials/intermediate/constrainedlayout_guide.html#limitations
Basically we should not be using `plt.subplot` and should be using `GridSpec`.
I think this was recently added to the documentation so we didn't know before.
Another thing that we did not know is that `plt.subplots_adjust` and `plt.tight_layout` should not be used when constrained_layout is True.
In matplotlib 2.2.3 now constrained_layout is automatically is set to False if either of those is used. See: https://github.com/matplotlib/matplotlib/pull/11588/files
I think we should rethink our usage to make sure we don't go out of supported bounds of matplotlib's constrained layout. Probably then, we can remove a lot of hacks that we had to do.Amir MOHAMMADIAmir MOHAMMADIhttps://gitlab.idiap.ch/bob/bob.measure/-/issues/33[bob.measure] raspberry pi compilation fails2017-09-22T15:58:07ZFlavio TARSETTI[bob.measure] raspberry pi compilation failsHi all,
Could someone explain to me how to properly compile bob.measure ? I am stuck.
I have this issue:
```
(/home/pi/3dfv/env3dfv)pi@raspberrypi:~/3dfv $ pip install bob.measure
Collecting bob.measure
Using cached bob.measure-2.4....Hi all,
Could someone explain to me how to properly compile bob.measure ? I am stuck.
I have this issue:
```
(/home/pi/3dfv/env3dfv)pi@raspberrypi:~/3dfv $ pip install bob.measure
Collecting bob.measure
Using cached bob.measure-2.4.1.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-iiw7OE/bob.measure/setup.py", line 48, in <module>
boost_modules = boost_modules,
File "/home/pi/3dfv/env3dfv/lib/python2.7/site-packages/bob/blitz/extension.py", line 52, in __init__
BobExtension.__init__(self, *args, **kwargs)
File "/home/pi/3dfv/env3dfv/lib/python2.7/site-packages/bob/extension/__init__.py", line 301, in __init__
bob_includes, bob_libraries, bob_library_dirs, bob_macros = get_bob_libraries(self.bob_packages)
File "/home/pi/3dfv/env3dfv/lib/python2.7/site-packages/bob/extension/__init__.py", line 193, in get_bob_libraries
pkg = importlib.import_module(package)
File "/home/pi/3dfv/env3dfv/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/pi/3dfv/env3dfv/lib/python2.7/site-packages/bob/math/__init__.py", line 6, in <module>
bob.extension.load_bob_library('bob.math', __file__)
File "/home/pi/3dfv/env3dfv/lib/python2.7/site-packages/bob/extension/__init__.py", line 244, in load_bob_library
ctypes.cdll.LoadLibrary(full_libname)
File "/home/pi/3dfv/env3dfv/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/home/pi/3dfv/env3dfv/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/pi/3dfv/env3dfv/lib/python2.7/site-packages/bob/math/libbob_math.so: undefined symbol: dggsvd3_
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iiw7OE/bob.measure/
```
* I have searched for this dggsvd3_ . It appears to be present only in bob.math in file bob/math/cpp/gsvd.cpp
* Following same request in group https://groups.google.com/forum/#!topic/bob-devel/oYZtVnUaqyM where it's stated that openblas and lapack are required. Both are installed.
* libopenblas-base:
Installed: 0.2.19-3+rpi1
Candidate: 0.2.19-3+rpi1
* libopenblas-dev:
Installed: 0.2.19-3+rpi1
Candidate: 0.2.19-3+rpi1
So could you tell me how to proceed, as this is a blocker right now for me. Thanks in advance.
FlavioAndré AnjosAndré Anjos