I need a script to remove the background from ANY image while extracting the foreground. You can check the attached samples with the original and the desired result. Everything should be done automatically without any user interaction. The script should run on linux shell and should take 2 parameters: input and output image. You can use any open source libraries (like matplotlib, opencv...) as long as the result is generated in under 1 second. If heavy libraries have to be loaded on the script start (which will slow it down) it should also run as service. You will have to also provide the source code if you choose a compiled language. Test samples will be provided to the selected freelancer. After the script is ready I will provide a larger set of test images for the final check.
Milestone payments will only be released after the desired output for the test images in the final set is produced by the script.
Automatically bids will be ignored.