Background remover

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

User avatar
xnview
Author of XnView
Posts: 43710
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Background remover

Post by xnview »

Next release will have a background remover plugin, here is some examples
Capture-1.jpg
Capture-2.jpg
Capture-3.jpg
Capture-4.jpg
Capture-5.jpg
Capture-6.jpg
You do not have the required permissions to view the files attached to this post.
Pierre.
Kadet
Posts: 103
Joined: Thu Oct 20, 2022 7:23 pm

Re: Background remover

Post by Kadet »

LOL đź‘Ť
User avatar
XnTriq
Moderator & Librarian
Posts: 6350
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background remover

Post by XnTriq »

This is great news! Can't wait to give it a try :-D
m-a-r-k
Posts: 21
Joined: Sat Oct 31, 2020 4:58 pm
Location: Highland, Scotland

Re: Background remover

Post by m-a-r-k »

Brilliant, well done and thank you - if a long time overdue :D
User avatar
masterjp
Posts: 429
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: Background remover

Post by masterjp »

What a great feature! How does it work? There is no instruction or info about it.
I tried the menu entry 'background remover' but nothing happened.
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XN-View 2.51.5 | XnViewMP 1.6.5 | XnConvert 1.100.1 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net
User avatar
xnview
Author of XnView
Posts: 43710
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Background remover

Post by xnview »

The 'Background remover' is available now. In Tools>Plugins, you can install it.
But there is an issue (i need to search why), the decompressed u2netp.onnx file is not good, please replace with this one https://download.xnview.com/PlugIns/XnV ... _win64.zip
Pierre.
User avatar
masterjp
Posts: 429
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: Background remover

Post by masterjp »

Thank you! Now it works perfect und very fast. :D :D :D
Unbelievable, the results are very good with different portrait photos.
The background remover has only a problem with white objects or clothing in portrait photos,
but this is a difficult task for every AI program. :)
---
I sometimes use xnviewmp as a portable program on usb stick.
Is there a chance to copy the plugin/addon files in the xnviewmp folder to use the plugins?
In XnviewMP folder there is a 'addons' folder.
The install version of xnviewmp use a 'addons' folder in the roaming folder of the user directory.
Do you have a hint?
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XN-View 2.51.5 | XnViewMP 1.6.5 | XnConvert 1.100.1 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net
User avatar
user0
XnThusiast
Posts: 1590
Joined: Sat May 09, 2015 9:37 am

Re: Background remover

Post by user0 »

'Remove Background...'
- this menu item shall be disabled for unsupported formats (audio,video,etc) as app craches
- there shall be no ... in the name, as no dialog is opened

masterjp wrote: ↑Fri Feb 23, 2024 4:20 pm I sometimes use xnviewmp as a portable program on usb stick.
Is there a chance to copy the plugin/addon files in the xnviewmp folder to use the plugins?
In XnviewMP folder there is a 'addons' folder.
The install version of xnviewmp use a 'addons' folder in the roaming folder of the user directory.
Do you have a hint?
guess it depends on 'Folder for other files' setting in Settings>Integration>Paths
if set to 'Program (XnView)' - AddOns suppose to be created in the app folder
User avatar
XnTriq
Moderator & Librarian
Posts: 6350
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background remover

Post by XnTriq »

The add-on crashes on grayscale images :bug:
User avatar
xnview
Author of XnView
Posts: 43710
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Background remover

Post by xnview »

masterjp wrote: ↑Fri Feb 23, 2024 4:20 pm Is there a chance to copy the plugin/addon files in the xnviewmp folder to use the plugins?
In XnviewMP folder there is a 'addons' folder.
The install version of xnviewmp use a 'addons' folder in the roaming folder of the user directory.
Do you have a hint?
you can move the AddOns folder in the app folder
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6350
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background remover

Post by XnTriq »

When you go to Tools → PlugIns… → AddOns and hit the Install button for Background Remover, …
  1. a new sub-directory named AddOns is created,
  2. 4 files are downloaded into this folder,

    Code: Select all

    \XnViewMP\AddOns\BackgroundRemover.dll
    \XnViewMP\AddOns\onnxruntime.dll
    \XnViewMP\AddOns\opencv_world3416.dll
    \XnViewMP\AddOns\u2netp.onnx
  3. and a logfile named install.txt is added:

    Code: Select all

    BackgroundRemover
    	1.0
    	BackgroundRemover.dll
    	onnxruntime.dll
    	opencv_world3416.dll
    	u2netp.onnx
In case you prefer to download and extract this extension manually:
Please note that the files for Background Remover go into the AddOns sub-directory of your MP installation.
exiftool.exe and twain32.exe OTOH belong in the existing AddOn sub-directory.

Related:
User avatar
michel038
XnThusiast
Posts: 1296
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Background remover

Post by michel038 »

It seems that background remover does not work with Win7 .
Even when u2netp.onnx (4468 Ko) is replaced by u2netp.onnx (4468 Ko)
Sologub
Posts: 1
Joined: Mon May 06, 2024 4:37 pm

Install Background remover at Linux.

Post by Sologub »

Linux Mint 21 Vanessa.
XnView MP 1.7.1 64-bit(Linux)-Libformat7.176 ; the latest version.
How can one install this set for linux Mint?
Is this set possible for Windows users only? I have read that some plugins may be converted for linux also.
And I cannot find general installation instruction for XnView plugins. For my version of XnView there is option "Effects" -> Remove background colour.
But when I launch it the window "Background remover" appears with "Please install it by using Tools->Plugins". At Tools menu there isn't Plugins option.
I found at About program-> Plug-in modules, that the directory for plugins is /opt/XnView/Plugins.
I placed the unzipped files from BackRemover_win64.zip at this folder, but it doesn't work for me.