mmfashion icon indicating copy to clipboard operation
mmfashion copied to clipboard

Wrong predictions

Open markkdev opened this issue 5 years ago • 17 comments

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 avatar Feb 03 '20 08:02 markkdev

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

markkdev avatar Feb 03 '20 08:02 markkdev

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")

xu1718191411 avatar Feb 04 '20 14:02 xu1718191411

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

markkdev avatar Feb 04 '20 17:02 markkdev

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?

veralauee avatar Feb 06 '20 02:02 veralauee

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?

ldm903 avatar Feb 06 '20 12:02 ldm903

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

tantao14 avatar Feb 06 '20 12:02 tantao14

@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.

markkdev avatar Feb 06 '20 15:02 markkdev

Did you resolve this issue?

ashwath98 avatar Mar 16 '20 12:03 ashwath98

@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.

PhantomKidding avatar Mar 26 '20 07:03 PhantomKidding

Never found a solution to this issue.

markkdev avatar Mar 26 '20 14:03 markkdev

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

liuziwei7 avatar Mar 30 '20 09:03 liuziwei7

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

swayam18 avatar Apr 08 '20 20:04 swayam18

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

knowlen avatar May 12 '20 16:05 knowlen

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

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

Lytua avatar May 31 '20 01:05 Lytua

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

gvisniuc avatar Jul 12 '20 11:07 gvisniuc

wrong predictions all the time :(

Debangshu132 avatar Aug 31 '20 16:08 Debangshu132

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.

veralauee avatar Aug 31 '20 16:08 veralauee