MODNet
MODNet copied to clipboard
How to run image background removal on local computer
Hello, Is there a demo code for removing image background which I can run on my local Ubuntu/MacOS system?
Hi, thanks for your attention. Please check and try https://github.com/ZHKKKe/MODNet/blob/master/demo/image_matting/colab/inference.py
I've already tried that, it gives error:
$ python3 main.py Traceback (most recent call last): File "main.py", line 12, in <module> from src.models.modnet import MODNet ModuleNotFoundError: No module named 'src'
you have to check from where are you calling it. I got it running.
@aksthelion you can checkout this repo, create a new file and copy the interference to it. I've done it here: https://gist.github.com/manzke/0a8bec5e13564e1a3f69fbd78e734493
@manzke what is the version of torch and torchvision you used here?
@nahidalam pls find attached. I haven't used conda yet, so it can be that it was overwritten by another test already. 🤦
Name: torch Version: 1.10.1 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration Home-page: https://pytorch.org/ Author: PyTorch Team Author-email: [email protected] License: BSD-3 Location: /usr/local/lib/python3.9/site-packages Requires: typing-extensions Required-by: kornia, labml-helpers, labml-nn, lpips, torchtext, torchvision
Name: torchvision Version: 0.11.2 Summary: image and video datasets and models for torch deep learning Home-page: https://github.com/pytorch/vision Author: PyTorch Core Team Author-email: [email protected] License: BSD Location: /usr/local/lib/python3.9/site-packages Requires: numpy, pillow, torch Required-by: labml-nn, lpips
@aksthelion, I solved this problem by moving modnet.py and the bachbones package to another location. Then I referenced it in from with the new location.