`Algorithm.read_probe` should not exist
This is something that I had in mind when designing the Algorithm, but which I postponed far too long by now, and it regularly bites me:
In the Algorithm, the read_probe function should not exist. Instead, the according functions of the Extractor.read_feature or Algorithm.read_feature should be called instead. For model enrollment, this is already done: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/tools/algorithm.py#L247
For probes, I was too lazy to implement this correctly, and added an Algorithm.read_probe function instead. In most cases, this works as expected. But when data structures are more complex, then the algorithm needs to know, how to read the features. For example, in bob.bio.face.algoritm.GaborJet, the read_probe function: https://gitlab.idiap.ch/bob/bob.bio.face/blob/master/bob/bio/face/algorithm/GaborJet.py#L204
is an exact copy of the bob.bio.face.extractor.GridGraph.read_feature function: https://gitlab.idiap.ch/bob/bob.bio.face/blob/master/bob/bio/face/extractor/GridGraph.py#L221
The reason, why I was too lazy to implement it correctly is that during scoring, the probes are read in the innermost function: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/tools/scoring.py#L16 and I didn't want to pass the reader through all the function calls. Stupid me. Since now so many more packages have been written, which use the bad implementation, fixing this is a major issue:
-
Fix the scoring script to use the correct reader -
Remove the read_probefrom theAlgorithmbase class and all derived classes in all packages -
Fix the verify.pyscript and all derived scripts to pass theextractorto the scoring function -
Check all the test cases and assure that Algorithm.read_probeis replaced with the according call toExtractor.read_featureorAlgorithm.read_feature