Skip to content

File not found u2net.pth #5

Description

@chefbennyj1

Hi, I finally got this python project to start loading models.
Realizing that python must be a 64bit version in order to install torch, and many other trial and error. :)

However, now I'm getting a runtime error because I apparently don't have a model u2net.pth.

Traceback (most recent call last): File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python38\Image-Background-Remover-Python-main\__init__.py", line 106, in <module> net.load_state_dict(torch.load(model_dir, map_location='cpu')) File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 594, in load with _open_file_like(f, 'rb') as opened_file: File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 211, in __init__ super(_open_file, self).__init__(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Benjamin\\AppData\\Local\\Programs\\Python\\Python38\\Image-Background-Remover-Python-main\\saved_models\\u2net\\u2net.pth'

How do I build this model?

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions