open-mmlab / mmfashion

Open-source toolbox for visual fashion analysis based on PyTorch
https://open-mmlab.github.io/
Apache License 2.0
1.25k stars 285 forks source link

Wrong predictions #32

Open markkdev opened 4 years ago

markkdev commented 4 years ago

Hi,

I followed the process of setup, downloaded checkpoints for vgg16.pth, latest.pth for global attr.

Anytime I run the demo I get the same output no matter the image.

[ Top3 Prediction ] print lace knit [ Top5 Prediction ] print lace knit sleeve maxi [ Top10 Prediction ] print lace knit sleeve maxi shirt denim chiffon floral striped

Looking for a guide on what I could be doing wrong?

Appreciate it and thanks for you work.

markkdev commented 4 years ago

I also get this error anytime I run attr predict with roi

python3 ./demo/test_predictor.py --input demo/attr_pred_demo1.jpg Traceback (most recent call last): File "./demo/test_predictor.py", line 57, in main() File "./demo/test_predictor.py", line 51, in main attr_prob = model(img_tensor, attr=None, landmark=None, return_loss=False) File "/root/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 539, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.6/dist-packages/mmfashion-0.1.0+aea9b23-py3.6.egg/mmfashion/models/predictor/base.py", line 41, in forward return self.forward_test(img, landmark) File "/usr/local/lib/python3.6/dist-packages/mmfashion-0.1.0+aea9b23-py3.6.egg/mmfashion/models/predictor/base.py", line 29, in forward_test return self.simple_test(img[0], landmark[0]) TypeError: 'NoneType' object is not subscriptable

xu1718191411 commented 4 years ago

For my experience,I remove the mmfashion package by pip uninstall mmfashion and indicate the path of mmfashion by adding the following code at test_predictor.py

import sys
sys.path.append("/home/Source/mmfashion")
markkdev commented 4 years ago

still fails at

mmfashion/models/predictor/base.py", line 29, in forward_test return self.simple_test(img[0], landmark[0]) TypeError: 'NoneType' object is not subscriptable

Thanks for the suggestion though

veralauee commented 4 years ago

Based on your error information, it seems the model uses "roi-pooling" instead of "global pooling", because of "landmark[0]". Would you plz check which config file you used when testing?

ldm903 commented 4 years ago

In

Based on your error information, it seems the model uses "roi-pooling" instead of "global pooling", because of "landmark[0]". Would you plz check which config file you used when testing?

Do you mean it does not support roi resnet in test_predictor.py?

tantao14 commented 4 years ago

maybe it need a input landmark instead of None, but i dont't know how to generate the landmark of single image

markkdev commented 4 years ago

@veralauee When I use checkpoint: 'checkpoint/Predict/resnet/roi/latest.pth' config: 'configs/attribute_predict/roi_predictor_resnet_attr.py' Thats when I got the NoneType error.

When I use checkpoint: 'checkpoint/Predict/resnet/global/latest.pth' config: 'configs/attribute_predict/global_predictor_resnet_attr.py' I get the same predictions for any images.

ashwath98 commented 4 years ago

Did you resolve this issue?

PhantomKidding commented 4 years ago

@markkdev How did you resolve it? I encountered the same. Firstly, I use vgg16 for global and get similar results regardless of images. Then I switch to ROI for landmark and get same error thrown.

markkdev commented 4 years ago

Never found a solution to this issue.

liuziwei7 commented 4 years ago

Thanks for the feedback. We will update the attribute prediction model soon.

swayam18 commented 4 years ago

Yeah, same issue. Would be great to know if there is a timeline for the prediction model to be updated

knowlen commented 4 years ago

also getting the (same) wrong predictions on my own held out images.

Lytua commented 4 years ago

https://github.com/open-mmlab/mmfashion/issues/32#issuecomment-582954019

I got the same problems. @markkdev did you find any solutions?

gvisniuc commented 4 years ago

Same issues, getting the same results for all external images, is there any transform that needs to be applied to the image perhaps?

Debangshu132 commented 4 years ago

wrong predictions all the time :(

veralauee commented 4 years ago

We just updated the attribute-prediction tasks. Please use python test tools/test_cate_attr_predictor.py \ --config configs/category_attribute_predict/roi_predictor_vgg.py \ --checkpoint checkpoint/CateAttrPredict/vgg/roi/latest.pth

Since the prior dataset just implements the coarse labeling, that leads to the wrong prediction. We relabeled a more compact and accurate dataset for attribute prediction.