open-mmlab/mmfashion

missing resnet18 backbone and error for output in test_fashion_recommender.py

dengfeng0729 opened this issue · 1 comments

    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!

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