Remove background - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Remove background (/Thread-Remove-background) Pages:
1
2
|
RE: Remove background - nelo - 03-07-2021 python -V or python3 -V tells you RE: Remove background - meetdilip - 03-08-2021 It says Quote:$ python3 -V RE: Remove background - nelo - 03-08-2021 That would be good enough. If you don't want to mess around in your system and like to keep things seperate install anaconda from here: https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh To install: make the file executable, open a terminal in that download dir, type Code: ./Anaconda3-2020.11-Linux-x86_64.sh It will install anaconda (= a separate python 3.8) in your home dir. Towards the end of the installation it'll ask you Quote:Do you wish the installer to initialize Anaconda3 answer yes. Open a new terminal and you'll see there is the word (base) in front of your usual promt. This tells you you're in the environment. That's what you need. Next you can install rembg: Code: pip install rembg if you don't have pip installed it will tell you. ~~~~~ Now that you have rembg installed you can use it. Open a terminal in the dir where you have the photo Write this in there: Code: rembg -o Outputfile-out.png Inputfile.jpg First run compiles stuff which is expected. It takes some minutes until it's done. Now if you do not want to have the anaconda stuff started automatically you can do Code: conda config --set auto_activate_base false But then if you want to use it (with rembg) you have to start it each time like this: Code: conda activate base This is how I have setup my installation and it works fine. Results depend on the input photos of course. RE: Remove background - Zero01 - 03-12-2021 Excellent find nelo! Works very well, you can also remove background from a whole folder, with: Code: rembg -p path/to/inputs Just a note for anyone thinking of using with Python in Windows (10) - if you run into problems trying to install rembg with pip (as I did) simply do a: Code: pip uninstall enum34 this will solve the error, if you need enum34 downgrade it to enum34==1.1.8 |