strands-project / strands_perception_people

long-term detection, tracking and recognition of people
96 stars 70 forks source link

Adding functionality to the DROW detector #189

Closed Pandoro closed 8 years ago

Pandoro commented 8 years ago

This PR adds the detection functionality. @lucasb-eyer and me finally managed to get it running on the robot.

We are fully aware that this package requires a lot of manual fiddling as hopefully described in enough detail in the readme. Sadly we are completely dependant on CUDA, which is not available as a debian package without installing the CUDA toolkit and we need Theano and DeepFried2 both installable from github through pip. If we find a way to do this automatically system wide, we don't need the virtual environment anymore. Until that point it is in a virtual env that needs to be started before launching the node.

The good news is, it just ran at the same frequency as the laser, so the GPUs on the side machines are sufficient! :)

Since we don't have a wheelchair we can only test it with bags. @marc-hanheide mentioned a wheelchair. So this here goes out to @marc-hanheide, @cdondrup, @Jailander and @gestom, asking for general feedback and hoping that one of you could test it on Linda with the wheelchair and also see if our instructions are readable.

Pandoro commented 8 years ago

Lucas and me just realized one more thing, the use_cudnn forces the usage of cudnn when set to true. In the other case, cudnn is still used when available. Since I forgot about this while testing it on the robot, the reported frequency of ~12.8Hz might drop if cudnn is not available. I can't test this right now since I'm at home, but I'll check this tomorrow on Karl.

If anything else comes up let me know!

marc-hanheide commented 8 years ago

I don't get why you need virtualenv... you just want to install to additional pip packages. We can easily debianise those and put them in our repo and depend you package on them. That's easy. The cuda things is more problematic, due to license problems. But in order to package your stuff up it's not needed, right, just to run it (there is no compilation involved I understand)? So, why a virtualenv?

lucasb-eyer commented 8 years ago
  1. Virtualenv because we weren't sure/didn't know how to debianize pip-installable packages. If you could link an example/tuto, I think Alex could give it a try?
  2. Yeah, cuda is just needed for running. Theano does compile cuda code, but that happens at run-time: when run, it generates some c/cuda code, which it compiles using nvcc and then runs.
marc-hanheide commented 8 years ago

I use fpm for this. Done it for several Python packages already. See here: https://github.com/jordansissel/fpm/wiki/ConvertingPython#converting-python-packages

lucasb-eyer commented 8 years ago

Looks good thanks! And I guess the next question will be how do we put them on our (your/strands) server, so we can state them as dependencies here?

marc-hanheide commented 8 years ago

just send me the packages. And then define the rosdep keys in https://github.com/strands-project/rosdistro/blob/strands-devel/rosdep/strands.yaml (just checkout the other python deps there) mapping to the package names and depend your package.xml on the newly added rosdep keys.

Pandoro commented 8 years ago

This almost sounds like black magic to me as it seems so easy! I just checked out both github repos and ran fpm -s python -t rpm <package>/setup.py and got two packages. I'll send them to you and edit the strands.yaml.

The other thing is my comment from yesterday. Without cudnn it is indeed a lot slower, think about ~4fps which is obviously very suboptimal, as it also means the delay between the arrival of a scan and the publishing of our detections is fairly large. Do you have any idea how we could approach this? Clearly everyone registering is not a good solution, but openly distributing cudnn is also not allowed.

marc-hanheide commented 8 years ago

If you could run fpm again with deb as output instead of rpm that would be much appreciated. You know Ubuntu is Debian and not redhat...

lucasb-eyer commented 8 years ago

Clearly everyone registering is not a good solution.

It is only 1 person per site interested in wheelchair detection (so probably only 1 site) and it's the only legal option AFAIK. Even Arch's installer asks the user to register and manually download the archive.

marc-hanheide commented 8 years ago

Agreed with @lucasb-eyer and it's only for those who want to seriously used it ;-) Let's not try to work around a (stpid) legal framework. I hate people not making things open-source...

lucasb-eyer commented 8 years ago

As usual ;-)

marc-hanheide commented 8 years ago

:+1:

marc-hanheide commented 8 years ago

installation with sudo apt-get install python-theano python-deepfried2 works now

marc-hanheide commented 8 years ago

so, now please add your new rosdep keys as run_depend in your package.xml (plus any other dependencies that might be missing) as introduced in https://github.com/strands-project/rosdistro/pull/626

marc-hanheide commented 8 years ago

So, you obviously had also nonstandard versions of other packages installed. Do you need the higher version?

python-theano : Depends: python-six (>= 1.9.0) but 1.5.2-1ubuntu1 is to be installed
lucasb-eyer commented 8 years ago

Looks like Theano depends on it, it's been added in this commit. Alex will have to try if it works when removing the explicit version number. When you try in a virtualenv, make sure to use --system-site-packages so it uses your system's version of six and not a newer one in the venv.

marc-hanheide commented 8 years ago

retest this please

marc-hanheide commented 8 years ago

So... looks good now, I'd say. Could you update the README.md accordingly.

Also put your name in package.xml: <maintainer email="hermans@vision.rwth-aachen.de">hermans</maintainer>

And finally add it to the meta package at https://github.com/strands-project/strands_perception_people/blob/indigo-devel/strands_perception_people/package.xml

Thanks.

Pandoro commented 8 years ago

Great, I hope this fits all your requests! Thank you for all the help and patience in this @marc-hanheide ! I'll buy you a beer next time we meet. Now it would of course still be great if somebody could test this with an actual wheelchair :)