backgroundremover icon indicating copy to clipboard operation
backgroundremover copied to clipboard

Tested on Windows 10: Try decreasing discard_threshold or start with a larger shift

Open 343intact opened this issue 2 years ago • 11 comments

          Hey man, sorry for taking so long to reply. Just ran everything, updated bgremover, reinstalled Pillow, ran Poweshell in admin mode and got the same issue. Same image as the last time and everything's the same:

PS D:\Programs\backgroundremover-main> python -m backgroundremover.cmd.cli -i "D:\Downloads\Telegram\photo_2023-01-11_12-17-09.jpg" -a -ae 15 -o "meow.png" meow.png downloading part 1 of u2net finished downloading part 1 of u2net downloading part 2 of u2net finished downloading part 2 of u2net downloading part 3 of u2net finished downloading part 3 of u2net downloading part 4 of u2net finished downloading part 4 of u2net PERFORMANCE WARNING: Thresholded incomplete Cholesky decomposition failed due to insufficient positive-definiteness of matrix A with parameters: discard_threshold = 1.000000e-04 shift = 0.000000e+00 Try decreasing discard_threshold or start with a larger shift

Originally posted by @343intact in https://github.com/nadermx/backgroundremover/issues/55#issuecomment-1538089276

343intact avatar May 08 '23 09:05 343intact

Can you upload the image here?

nadermx avatar May 08 '23 14:05 nadermx

photo_2023-01-11_12-17-09

343intact avatar May 08 '23 15:05 343intact

I believe that's how it's done, unless there's a way to upload it as a file

343intact avatar May 08 '23 15:05 343intact

Cute cat, I was able to get it to work on the site catremoved I think it may be one of two, either the image is too large for your system to process it, or your system does not meet min requirement specs. Perhaps try shrinking the image and see if it works.

nadermx avatar May 08 '23 15:05 nadermx

Yeah, it works all good on site. Which part processes the image, cpu or gpu? You're right, if I crop it a bit and remove the upper part it works, even though hat gets deleted too. But what limits performance? Also, I've just remembered that I can try to remove bg for videos too, and got this after quick test: python -m backgroundremover.cmd.cli -i "D:\Downloads\Telegram\video_2023-04-19_14-28-14.mp4" -mk -o "vid.mov" D:\Downloads\Telegram\video_2023-04-19_14-28-14.mp4 FRAME RATE DETECTED: 30/1 (if this looks wrong, override the frame rate) FRAME RATE: 30 TOTAL FRAMES: 210 WORKER FRAMERIPPER ONLINE WORKER 0 ONLINE Process Process-3: Traceback (most recent call last): File "C:\Users\aboba\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 314, in _bootstrap self.run() File "C:\Users\aboba\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "D:\Programs\backgroundremover-main\backgroundremover\utilities.py", line 29, in worker net = Net(model_name) File "D:\Programs\backgroundremover-main\backgroundremover\bg.py", line 64, in init utilities.download_downloadfiles_from_github( AttributeError: module 'backgroundremover.utilities' has no attribute 'download_downloadfiles_from_github'

343intact avatar May 08 '23 16:05 343intact

did you upgrade? That seems like an old binary you are using. pip install --upgrade pip since I fixed that typo of the 'download_downloadfiles_from_github'

nadermx avatar May 08 '23 17:05 nadermx

And I mean upgrade backgroundremover, pip install --upgrade backgroundremover

nadermx avatar May 08 '23 17:05 nadermx

Yeah, for some reason it seems it didn't update the first time I've ran the command. Ok, videos are working, images are working until a certain limit, thank you

343intact avatar May 08 '23 18:05 343intact

Perhaps try putting a border around the original image. I will close the issue for now, seems new version fixes it to a point.

nadermx avatar May 08 '23 18:05 nadermx

I'm going to leave it open on second though, in case I figure out how to drop resource use more or some one else does

nadermx avatar May 08 '23 19:05 nadermx

Oke, thank you for your app

343intact avatar May 08 '23 21:05 343intact

Closing this, if some one finds it and wants to reopen jst @ me as in general will keep tying to reduce footprint anyways

nadermx avatar May 16 '23 17:05 nadermx