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

missing resnet18 backbone and error for output in test_fashion_recommender.py #159

Open
dengfeng0729 opened this issue Nov 8, 2023 · 1 comment

Comments

@dengfeng0729
Copy link

    I am currently doing some work related to clothing recommendation, and I am very glad to find this work. I have made some attempts and met some problems. 
    When I tested "test_fashion_recommener.py", the readme file did not provide the backbone of resnet18. I download from this "https://download.pytorch.org/models/resnet18-5c106cde.pth", and then download model_zoo inside the first model test, I run "python test_fashion_recommender.py  --input_dir demo/imgs/fashion_compatibility/set2"

but in the final output results come when you least expect them to:

“The model and loaded state dict do not match exactly unexpected key in source state_dict: fc.weight, fc.bias

load checkpoint from: checkpoint/epoch_16.pth
Traceback (most recent call last):
File "/data/jupyterlab/xushuai/cloth_match/mmfashion/fashion_recommendation.py", line 91, in < module>
main()
File "/data/jupyterlab/xushuai/cloth_match/mmfashion/fashion_recommendation.py", line 85, in main
score = dataset.get_single_compatibility_score(embeds, item_ids, metric,
File "/data/jupyterlab/xushuai/cloth_match/mmfashion/mmfashion/datasets/Polyvore_outfit.py", line 218, in get_single_compatibility_score
type1 = self.item2category[item1_id]
KeyError: '143849042'”

so my problem are:

  1. Is my above operation wrong?
  2. Why can't my demo run and an error occurs?

I saw many issue about this project, but my problem still not deal, looking forward to your reply, thank you!

@mariuswong
Copy link

may i know if anyone got to know where to get resnet18 ? thanks a lot

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

2 participants