background removal for face images



hi
i am looking for informtion on background removal of face images(color
or greyscale) .are there any open source libraries in java or python
languages that i can use in my code?I am trying to implement a pre
processing module for a face images collection

i am new to this area and googling didn't help much..if anyone can
point me in the right direction ,i would be most happy!

thanks
W
.