-
Notifications
You must be signed in to change notification settings - Fork 83
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
How to run the demo locally and correctly? #23
Comments
+1 |
1 similar comment
+1 |
@ifsheldon @knightdby |
The problem is that in app.py when loading the glee model, the key does not match and the model is not correctly loaded. Use the following code in L88 in app.py GLEEmodel_r50.load_state_dict({k.replace('glee.', ''): v for k, v in checkpoints_r50.items()}, strict=False) Also in L98 in app.py GLEEmodel_swin.load_state_dict({k.replace('glee.', ''): v for k, v in checkpoints_swin.items()}, strict=False) |
nice |
When testing ori_image = torch.as_tensor(np.ascontiguousarray(copyed_img.transpose(2, 0, 1))) to: ori_image = torch.as_tensor(np.ascontiguousarray(np.transpose(copyed_img, (2, 0, 1)))) This resolves the |
Hi! I've read README and tried to run the demo on my server, but I think there're a lot of code that is out of sync or missing. And the guides are incomplete.
Here are my steps:
INSTALL.md
app.py
in this repoTRAIN.md
and downloaded themapp.py
on lines like(outputs,_) = GLEEmodel(...)
, which should be((outputs, _), _, _) = GLEEmodel(...)
app.py
in this repo again, but the results are just random like below.Did I do anything wrong? Should I just clone the huggingface repo instead?
The text was updated successfully, but these errors were encountered: