Closed byteshiva closed 2 years ago
Does this work without the -a -ae 15
, so backgroundremover -i ./final_sign.jpeg -o final_sig4.png
Did you install python3.8-dev?
I'm unable to get right python3.8-dev for mxlinux? Also how about delivering nadermx / backgroundremover
in Dockerfile.
Does this work without the
-a -ae 15
, sobackgroundremover -i ./final_sign.jpeg -o final_sig4.png
Did you install python3.8-dev?
backgroundremover -i ./final_sign.jpeg -o final_sig4.png
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Failed to import ahead-of-time-compiled modules.
This is expected on first import.
Compiling modules and trying again.
This might take a minute.
Traceback (most recent call last):
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/pymatting_aot/cc.py", line 36, in <module>
import pymatting_aot.aot
ImportError: numpy.core.multiarray failed to import
During handling of the above exception, another exception occurred:
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/pymatting_aot/cc.py", line 36, in <module>
import pymatting_aot.aot
ImportError: numpy.core.multiarray failed to import
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xyz/.asdf/installs/python/3.8.0/bin/backgroundremover", line 5, in <module>
from backgroundremover.cmd.cli import main
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/backgroundremover/cmd/cli.py", line 5, in <module>
from .. import utilities
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/backgroundremover/utilities.py", line 10, in <module>
from .bg import DEVICE, Net, iter_frames, remove_many
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/backgroundremover/bg.py", line 6, in <module>
from pymatting.alpha.estimate_alpha_cf import estimate_alpha_cf
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/pymatting/__init__.py", line 2, in <module>
import pymatting_aot.cc
File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/site-packages/pymatting_aot/cc.py", line 56, in <module>
import pymatting_aot.aot
ImportError: numpy.core.multiarray failed to import
I haven't thought about docker as I don't use it, but over some time I could try and figure it out. I'm seeing this stackoverflow question, https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import
one of the soltuions says
pip install --upgrade pip
pip install -U numpy
It seems it might be a version of either pip or numpy, perhaps try some of those solutions? I've only had the time to test this on ubunutu.
I think its python virtualenv
might reduce the dependency errors.
backgroundremover -i ./final_sign.jpeg -o final_sig4.png << this works now.
but when these attributes -a -ae 15
are added it's throwing error.
The same error?
Please note I had installed rembg and other similar tools, Maybe it had some conflicting libraries. Now it works fine.
$ backgroundremover -i ./tm1.png -a -ae 15 -o oyt.png
oyt.png
[W NNPACK.cpp:80] Could not initialize NNPACK! Reason: Unsupported hardware.
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
$ backgroundremover -i ./final_sign.jpeg -ae 15 -o final_sign_out.png
final_sign_out.png
[W NNPACK.cpp:80] Could not initialize NNPACK! Reason: Unsupported hardware.
Awesome, glad to hear. Yeah virtual enviroment is key for most python projects. I may update the readme to install it in it's own virtual env, just incase. I'll consider this issue closed.
failing out while removing background image