Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory: 'model-f46da743.pt' #41

Closed
GregoryBetsey opened this issue Aug 21, 2020 · 7 comments
Closed

No such file or directory: 'model-f46da743.pt' #41

GregoryBetsey opened this issue Aug 21, 2020 · 7 comments

Comments

@GregoryBetsey
Copy link

Hello

I got this error. Did I put the .pt file in wrong location? (see attachment)

initialize
device: cuda
Loading weights: model-f46da743.pt
Using cache found in C:\Users\gregb/.cache\torch\hub\facebookresearch_WSL-Images_master
Traceback (most recent call last):
File "run.py", line 105, in
run(INPUT_PATH, OUTPUT_PATH, MODEL_PATH)
File "run.py", line 29, in run
model = MidasNet(model_path, non_negative=True)
File "C:\Users\gregb\Documents\Python\MiDaS\midas\midas_net.py", line 47, in init
self.load(path)
File "C:\Users\gregb\Documents\Python\MiDaS\midas\base_model.py", line 11, in load
parameters = torch.load(path)
File "C:\Users\gregb\anaconda3\envs\3DP\lib\site-packages\torch\serialization.py", line 525, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\gregb\anaconda3\envs\3DP\lib\site-packages\torch\serialization.py", line 212, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\Users\gregb\anaconda3\envs\3DP\lib\site-packages\torch\serialization.py", line 193, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'model-f46da743.pt'

Untitled

@3dsf
Copy link

3dsf commented Aug 21, 2020

hey, I just came back because I forgot to close my ticket (related). Are you running the command from the MiDaS folder? It is only meant to be run from within the folder as per my ticket. Your location is the same as mine.

@3dsf
Copy link

3dsf commented Aug 21, 2020

Hey, I just noticed your have model-f45... in your folder

@GregoryBetsey
Copy link
Author

I fixed it.

@kjyothiswaroop
Copy link

Hey Gregory, I am getting a similar error, though i am running the code on Ubuntu. what is the fix for the issue?

@3dsf
Copy link

3dsf commented Mar 8, 2021

@kjyothiswaroop

You either have to call the run.py file from the same folder or you have the wrong model present. In the example above, the script was calling a different model than was present.

@Davidesteve1850
Copy link

Hi gregory, I'm trying to "play" with a repository that uses the same weights but the link they provided has been broken and the creator doesn't seem to have updated it. Could you please send me a copy of the pesos?
Thank you

@GregoryBetsey
Copy link
Author

Hi gregory, I'm trying to "play" with a repository that uses the same weights but the link they provided has been broken and the creator doesn't seem to have updated it. Could you please send me a copy of the pesos? Thank you

Hello. Are you asking for model-f46da743.pt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants