bob issueshttps://gitlab.idiap.ch/bob/bob/-/issues2019-04-19T22:41:24Zhttps://gitlab.idiap.ch/bob/bob/-/issues/139Documentation improvements2019-04-19T22:41:24ZAndré AnjosDocumentation improvements*Created by: anjos*
> This was a request on #104 that was moved here.
The user guide is already fairly good. I would not say the same about the documentation of the python bindings that show up when using the help() function of pytho...*Created by: anjos*
> This was a request on #104 that was moved here.
The user guide is already fairly good. I would not say the same about the documentation of the python bindings that show up when using the help() function of python. For many functions/classes, this documentation is very limited and unhelpful.
In particular these are some guidelines for constructing documentation (in order of priority)
1. Make sure that your class shows up at the Tutorials. It is the first entry point for most people
2. Make sure the Python reference documentation of your class mentions references and explains what the class is about. De-construct acronyms and insert equations and explanations when it makes sense.
3. Document the header files of your C++ if you have any. These are important for core developers.
4. Document the code itself - these are important for debugging.v2.0https://gitlab.idiap.ch/bob/bob/-/issues/162ISVmachine can't save x2019-04-19T22:41:23ZAndré AnjosISVmachine can't save x*Created by: zongyuange*
while I have trained isv_machine and I use
file = bob.io.HDF5File(argv,'w');
isv_machine.save(file)
isv_machine.z is saved in a hdf5 file ,but isv_machine.x is gone forever. *Created by: zongyuange*
while I have trained isv_machine and I use
file = bob.io.HDF5File(argv,'w');
isv_machine.save(file)
isv_machine.z is saved in a hdf5 file ,but isv_machine.x is gone forever. https://gitlab.idiap.ch/bob/bob/-/issues/144Automatic VM generation after a release2019-02-13T14:33:28ZAndré AnjosAutomatic VM generation after a release*Created by: anjos*
> This request was migrated from #104
The idea is to be able to generated, in a completely unattended manner, a VM everytime we have a new release for Bob and that this VM can be used as a reference for other peop...*Created by: anjos*
> This request was migrated from #104
The idea is to be able to generated, in a completely unattended manner, a VM everytime we have a new release for Bob and that this VM can be used as a reference for other people.
One of the options is to use TinyCore - this distribution is blazing fast and boots quickly:
> To generate a package for the TinyCore distribution:
> http://distro.ibiblio.org/tinycorelinux/downloads.html In particular, it would be nice to
> automatize the process of generating a VirtualBox VDI with bob install, potentially
> based on the tiny linux distribution TinyCore.https://gitlab.idiap.ch/bob/bob/-/issues/117"hides overloaded virtual function [-Woverloaded-virtual]" warnings with llvm...2019-02-13T14:33:28ZAndré Anjos"hides overloaded virtual function [-Woverloaded-virtual]" warnings with llvm/clang*Created by: laurentes*
I've noticed the following warnings when we use the llvm/clang compiler (only on OS X):
```
/Users/buildbot/work/buildbot/macosx-10.8-x86_64-incremental+master/build/include/bob/trainer/IVectorTrainer.h:122:10:...*Created by: laurentes*
I've noticed the following warnings when we use the llvm/clang compiler (only on OS X):
```
/Users/buildbot/work/buildbot/macosx-10.8-x86_64-incremental+master/build/include/bob/trainer/IVectorTrainer.h:122:10: warning: 'bob::trainer::IVectorTrainer::is_similar_to' hides overloaded virtual function [-Woverloaded-virtual]
1 warning generated.
/Users/buildbot/work/buildbot/macosx-10.8-x86_64-incremental+master/build/include/bob/trainer/IVectorTrainer.h:122:10: warning: 'bob::trainer::IVectorTrainer::is_similar_to' hides overloaded virtual function [-Woverloaded-virtual]
1 warning generated.
```
cf. [here](https://www.idiap.ch/software/bob/buildbot/builders/0-macosx-10.8-x86_64-incremental%2Bmaster/builds/465/steps/compile/logs/warnings%20%2819%29)
I don't understand why this is occuring. Does anyone have a clue? The recipe to get rid of them is to change the inline definition in the templated class EMTrainer
```c++
virtual bool is_similar_to(const EMTrainer& b, const double r_epsilon=1e-5, const double a_epsilon=1e-8) const
{
return m_compute_likelihood == b.m_compute_likelihood &&
bob::core::isClose(m_convergence_threshold, b.m_convergence_threshold, r_epsilon, a_epsilon) &&
m_max_iterations == b.m_max_iterations;
}
```
into a single declaration within the EMTrainer class definition
```c++
bool is_similar_to(const IVectorTrainer& b, const double r_epsilon=1e-5, const double a_epsilon=1e-8) const;
```
and a definition of this method outside the class as follows
```c++
template<class T_machine, class T_sampler>
bool bob::trainer::EMTrainer<T_machine,T_sampler>::is_similar_to(const bob::trainer::EMTrainer<T_machine,T_sampler>& b,
const double r_epsilon, const double a_epsilon) const
{
return m_compute_likelihood == b.m_compute_likelihood &&
bob::core::isClose(m_convergence_threshold, b.m_convergence_threshold, r_epsilon, a_epsilon) &&
m_max_iterations == b.m_max_iterations;
}
```
This only happens for is_similar_to method and not for operator==(), which means that the default/optional arguments might be the cause of the problem.v1.2https://gitlab.idiap.ch/bob/bob/-/issues/104Wishes for the next major release (1.2.0)2019-02-13T14:33:28ZAndré AnjosWishes for the next major release (1.2.0)*Created by: laurentes*
I've decided to create a thread to help us to converge towards a better Bob for the next major release. I doubt we will have the time to deal with everything shortly, but there will be at least a trace of it. Fee...*Created by: laurentes*
I've decided to create a thread to help us to converge towards a better Bob for the next major release. I doubt we will have the time to deal with everything shortly, but there will be at least a trace of it. Feel free to update this thread with your thoughts/wishes.
## To consolidate what is already there
1. The user guide is already fairly good. I would not say the same about the documentation of the python bindings that show up when using the `help()` function of python. For many functions/classes, this documentation is very limited and unhelpful.
2. The library is becoming larger. We should have stricter rule when defining class methods that refers to the same concept. For instance, very often, we have a variable related to the input/feature dimensionality. Depending on the class, it might be obtained using a 'getDimD()', 'inputDims()', or whatsoever. I think this is very annoying from a user perspective. Same for the API of the trainers.
3. For many functions, we have two different kinds of python bindings: one kind which follows the C++ API (e.g. void f(const BA& input, BA& output)), and one which is more
'pythonic' (e.g. BA f(const BA& input)). These two bindings often share the same python function name. I don't think this is a good strategy, as these sometimes leads to impossible cases when the C++ API has many overloaded functions. I think the function name should reflect this difference. OpenCV strategy was roughly to used two different namespaces (cv for the C like functions, and cv2 for the pythonic one). We could do something slightly different such as appending the function name with something like '_c' or '_cc' to clearly highlight this fact.
4. ~~As previously discussed, the LBP code could be refactored in a single more generic but parametrized class.~~ (Already done by Manuel)
5. Learning from our previous experiences, I would be in favour of making mandatory a version number to any class that provides a 'save_to_hdf5' method.
6. ~~Add a tutorial for the Audio Processing module~~ (Already done by Elie)
7. Provide is_similar_to(const Object& b, const double epsilon=1e-8) functions for all C++ classes that have double members. The default "==" and "!=" operators are largely useless when we want to provide code that runs on several platforms (i.e., 32 and 64 bit machines).
8. ~~Whenever a C++ class uses some random initialization, make sure that you can seed this randomness.~~ (cf. issue #121 )
## To integrate new features
A. I would be nice that the combination of NumPy/SciPy/Bob roughly provides the same functionalities as the Matlab built-in functions. It would also be good to use similar function names such that it is easy for a user to move accross these platforms. A (too exhaustive) list can be found here: http://www.mathworks.ch/ch/help/matlab/functionlist.html
B. More Machine Learning algorithms:
B.1 In particular to add a Hidden Markov Model implementation, as there was one in late Torch 3.
B.2. To add a deformable and parts-based object recognition system (Felzenszwalb-like)
~~B.3 Integration of the i-vector framework~~ (Already done by Laurent)
C. More Audio Processing features:
C.1 Possibility to ~~compute and~~ plot spectrograms (Already done)
C.2 Audio codec to deal with wav and sphere files
C.3 Provide a bridge to HTK
C.4 Boosted Binary Features (cf. Anindya's thesis)
D. Image Processing Tools
~~D.1 GLCM features (Grey-Level Co-occurence Matrix)~~ (Already done by Ivana)
E. ~~Make compiling C++ bindings on satellite packages easier - we can move most of the functionality currently implemented on those packages like https://github/com/bioidiap/xbob.optflow.liu to the core of Bob.~~ (done by André)
F. New metrics: F1-score, precision and recall; cost versus training set size - This should be simple and an excellent coding exercise. If anyone wants to give it a go, please let me know. More info: http://en.wikipedia.org/wiki/F1_score
G. Better use of optimization library (L-BFGS-B) for NNet backprop implementation - this is a somewhat larger piece of work that goes around revisiting the NNet implementation to separate the optimizer from the trainer.
## To be more widely supported
1. ~~To make the Windows/Cygwin port functional~~ (cf. issue #82 )
2. To generate RPM like package:
* For Fedora: http://koji.fedoraproject.org/koji/
* For Suse: https://build.opensuse.org/
3. To generate a package for the TinyCore distribution: http://distro.ibiblio.org/tinycorelinux/downloads.html
In particular, it would be nice to automatize the process of generating a VirtualBox VDI with bob install, potentially based on the tiny linux distribution TinyCore.v1.2https://gitlab.idiap.ch/bob/bob/-/issues/256New Sphinx erros after Sphinx upgrade2019-01-16T08:31:20ZAmir MOHAMMADINew Sphinx erros after Sphinx upgradeDear @bob developers,
I just upgraded Sphinx from 1.6.3 to 1.7.9 in our CI.
We have been having very weird errors in the CI like https://gitlab.idiap.ch/beat/beat.backend.python/-/jobs/148810
which I have no idea why they are happening...Dear @bob developers,
I just upgraded Sphinx from 1.6.3 to 1.7.9 in our CI.
We have been having very weird errors in the CI like https://gitlab.idiap.ch/beat/beat.backend.python/-/jobs/148810
which I have no idea why they are happening.
A good solution, IMHO, is to upgrade all dependencies to the latest version
to make sure we include all the upstream conda packaging changes in our CI.
However, this Sphinx upgrade is resulting errors in our documentation build process.
One example is here: https://gitlab.idiap.ch/bob/bob.measure/-/jobs/148925
I am opening this issue to keep track of all the Sphinx issues.
If you see a build failing because of Sphinx issues, please open an issue
in the repository of the respective package and point back here so we can
track it.https://gitlab.idiap.ch/bob/bob/-/issues/247Removal of bob packages from MacPorts2018-06-18T14:03:27ZAndré AnjosRemoval of bob packages from MacPortsIt would be good if anyone could handle this... We still receive e-mails from time to time and people are trying to compile it despite the outdated versions.It would be good if anyone could handle this... We still receive e-mails from time to time and people are trying to compile it despite the outdated versions.https://gitlab.idiap.ch/bob/bob/-/issues/224Links to Youtube videos on Starter Course page are dead2018-05-19T14:08:52ZAndré AnjosLinks to Youtube videos on Starter Course page are dead*Created by: pkorshunov*
Links to youtube videos on this page lead to dead videos:
https://github.com/idiap/bob/wiki/Bob-starter-course
Here are the dead links:
* Motivation - [Introduction to the Course](http://www.youtube.com/watch...*Created by: pkorshunov*
Links to youtube videos on this page lead to dead videos:
https://github.com/idiap/bob/wiki/Bob-starter-course
Here are the dead links:
* Motivation - [Introduction to the Course](http://www.youtube.com/watch?v=XjuXOrrWAcA)
* Part I - [Introduction to Python](http://www.youtube.com/watch?v=HpdhwfD9gTw)
* Part II - [Introduction to Bob](http://www.youtube.com/watch?v=yErzyxOY4nY)
* Part III - [Advanced Topics](http://www.youtube.com/watch?v=AH9AQTMSI_w)https://gitlab.idiap.ch/bob/bob/-/issues/223AssertionError: blitz version is not >= `0.10'2018-05-19T14:08:52ZAndré AnjosAssertionError: blitz version is not >= `0.10'*Created by: xiaochao*
version:bob.blitz-2.0.9*Created by: xiaochao*
version:bob.blitz-2.0.9https://gitlab.idiap.ch/bob/bob/-/issues/222Usage of LBP class from bob.ip.base2018-05-19T14:08:52ZAndré AnjosUsage of LBP class from bob.ip.base*Created by: marianapbento*
Hello,
I want to extract the local binary patters from 3D images on python, and found that bob API presents a LBP class, but the input image must be 2D. However, this class presents as one of the input par...*Created by: marianapbento*
Hello,
I want to extract the local binary patters from 3D images on python, and found that bob API presents a LBP class, but the input image must be 2D. However, this class presents as one of the input parameters the number of neighbors (that might be 4,8 or 16). My question is: how a 16-neighbood is defined on 2d images? Is it possible to use LBPTop to computed a LBP from a 3d image?
Thanks in advance.
https://gitlab.idiap.ch/bob/bob/-/issues/221Travis failing frequently2018-05-19T14:08:52ZAndré AnjosTravis failing frequently*Created by: AbdealiJK*
I noticed that travis is frequently failing. In fact last 5 travis builds on master has been failing. Branches for v2.2.0 and 2.0.7 are failing too (Reference: https://travis-ci.org/idiap/bob/branches)
As pypi...*Created by: AbdealiJK*
I noticed that travis is frequently failing. In fact last 5 travis builds on master has been failing. Branches for v2.2.0 and 2.0.7 are failing too (Reference: https://travis-ci.org/idiap/bob/branches)
As pypi uses 2.2.0, it would be encouraging to have travis successful for atleast that branch if not master too.
I checked out the logs, and it seems to be because travis is timing out or something ?https://gitlab.idiap.ch/bob/bob/-/issues/218namespacing __init__.py files should not contain any extra code2018-05-19T14:08:52ZAndré Anjosnamespacing __init__.py files should not contain any extra code*Created by: 183amir*
`bob/bob/__init__.py` This one has some code in it and will probably be replaced when installed.*Created by: 183amir*
`bob/bob/__init__.py` This one has some code in it and will probably be replaced when installed.https://gitlab.idiap.ch/bob/bob/-/issues/217Python 3 Compatibility2018-05-19T14:08:52ZAndré AnjosPython 3 Compatibility*Created by: 183amir*
I am opening this issue to keep track of Python 3 compatibility issues.*Created by: 183amir*
I am opening this issue to keep track of Python 3 compatibility issues.https://gitlab.idiap.ch/bob/bob/-/issues/216Issue with the script get_versions2018-05-19T14:08:52ZAndré AnjosIssue with the script get_versions*Created by: tiagofrepereira2012*
For some reason the script https://github.com/idiap/bob/blob/master/bob/script/get_versions.py ignores the dependency bob.extension.*Created by: tiagofrepereira2012*
For some reason the script https://github.com/idiap/bob/blob/master/bob/script/get_versions.py ignores the dependency bob.extension.Tiago de Freitas PereiraTiago de Freitas Pereirahttps://gitlab.idiap.ch/bob/bob/-/issues/214Licensing mismatch in setup.py2018-05-19T14:08:52ZAndré AnjosLicensing mismatch in setup.py*Created by: ju55i*
Setup.py has a license set as GPL 3 but the classifiers has BSD. Which one is the correct one?*Created by: ju55i*
Setup.py has a license set as GPL 3 but the classifiers has BSD. Which one is the correct one?https://gitlab.idiap.ch/bob/bob/-/issues/213Using Bob at Idiap2018-05-19T14:08:52ZAndré AnjosUsing Bob at Idiap*Created by: 183amir*
The Wiki page is outdated and does not work.
https://github.com/idiap/bob/wiki/Using-Bob-at-Idiap
Where can I find the latest documentation?*Created by: 183amir*
The Wiki page is outdated and does not work.
https://github.com/idiap/bob/wiki/Using-Bob-at-Idiap
Where can I find the latest documentation?https://gitlab.idiap.ch/bob/bob/-/issues/212local and global import of bob modules not possible2018-05-19T14:08:52ZAndré Anjoslocal and global import of bob modules not possible*Created by: siebenkopf*
I am afraid to say that the namespace issue inside bob still seems to be unsolved, at least partially. I just want to verify with you guys that you can reproduce the following issue.
Assume that you have a sc...*Created by: siebenkopf*
I am afraid to say that the namespace issue inside bob still seems to be unsolved, at least partially. I just want to verify with you guys that you can reproduce the following issue.
Assume that you have a script ``example.py`` like follows:
```
import bob.io.base
def main():
# use bob.io.base
h = bob.io.base.HDF5File("xxx.hdf5", 'w')
# import another bob module
import bob.ip.base
if __name__ == '__main__':
main()
```
Now, when I try to execute that script (given that I have the according bob modules installed in my python path):
```
$ python example.py
...
UnboundLocalError: local variable 'bob' referenced before assignment
```
I have traced the issue down to the fact that I am ``import``ing one of the ``bob`` modules after I use another one. When I import both in the beginning of the file, or before I use them the first time, everything is fine. Even if I do a relative import later (e.g., ``from bob.ip.base import LBP``) it works.
I am not sure if this is intended behavior, or if other modules have the same issue. Maybe it has something to do with the fact that the ``site`` package hack, which we have introduced earlier into ``bob.buildout`` to make it work with the old namespace issue, is still in the code?https://gitlab.idiap.ch/bob/bob/-/issues/211In ``PyObject* create_module`` deleting the module in error cases causes a crash2018-05-19T14:08:52ZAndré AnjosIn ``PyObject* create_module`` deleting the module in error cases causes a crash*Created by: siebenkopf*
In all of our C++/python bindings, we are creating a module using:
```
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(BOB_EXT_...*Created by: siebenkopf*
In all of our C++/python bindings, we are creating a module using:
```
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif
if (!m) return 0;
auto m_ = make_safe(m); ///< protects against early returns
```
At least for Python 2 (the ``Py_InitModule3`` case), doing the ``make_safe(m)`` is not a good idea, since in error cases (e.g. when an import of an external module fails later), the ``m`` object will be destroyed. Apparently, it seems that Python keeps track of the modules internally. Hence, it will try to destroy the module itself, which will fail since it is already destroyed.
A simple example could work as follows:
```
static PyObject* create_module (void) {
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif
if (!m) return 0;
auto m_ = make_safe(m); /// THIS IS THE PROBLEM
PyErr_Format(PyExc_ImportError, "Bla"); /// SIGNALS AN ERROR
return 0;
}
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
# if PY_VERSION_HEX >= 0x03000000
return
# endif
create_module();
}
```
If you compile this code, and try to import the module, different things might happen. Sometimes you see the ``ImportError: Bla`` message, but not always. Sometimes you also get ``Fatal Python error: Inconsistent interned string state.`` For sure, at the latest after you close the interpreter, you will observe an ``Aborted (core dumped)``.
This will affect basically all of our bindings. Yet, I am not sure, if we also need to change the code for Python3 (the ``PyModule_Create`` case above), or if we there need to destroy the module in error cases. I will investigate.https://gitlab.idiap.ch/bob/bob/-/issues/210Our packages are running on Travis legacy infrastructure2018-05-19T14:08:52ZAndré AnjosOur packages are running on Travis legacy infrastructure*Created by: tiagofrepereira2012*
Hi,
Some of you noticed the warnings on Travis-ci saying that our packages are running on the legacy infrastructure.
According to the documentation (http://docs.travis-ci.com/user/migrating-from-l...*Created by: tiagofrepereira2012*
Hi,
Some of you noticed the warnings on Travis-ci saying that our packages are running on the legacy infrastructure.
According to the documentation (http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade), the ```sudo``` command is not supported anymore in the new infrastructure for the time being.
They suggest a work around for that. Let's say, if you want to download and install ```cmake``` in your build, "just" add the following lines in the .travis.yml.
```
addons:
apt:
packages:
- cmake
```
So, there is an effort to upgrade our travis.yml files.
I'm creating this issue just to keep track this activity.
https://gitlab.idiap.ch/bob/bob/-/issues/209Add support to python 3.5 on Travis2018-05-19T14:08:52ZAndré AnjosAdd support to python 3.5 on Travis*Created by: tiagofrepereira2012*
Python 3.5 was released on September.
We should consider to add the support to this python version in Travis-CI.
Cheers
Tiago*Created by: tiagofrepereira2012*
Python 3.5 was released on September.
We should consider to add the support to this python version in Travis-CI.
Cheers
Tiago