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

Wrong predictions #32

Open
markkdev opened this issue Feb 3, 2020 · 17 comments
Open

Wrong predictions #32

markkdev opened this issue Feb 3, 2020 · 17 comments

Comments

@markkdev
Copy link

markkdev commented Feb 3, 2020

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
Copy link
Author

markkdev commented Feb 3, 2020

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
Copy link

xu1718191411 commented Feb 4, 2020

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
Copy link
Author

markkdev commented Feb 4, 2020

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
Copy link
Collaborator

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
Copy link

ldm903 commented Feb 6, 2020

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
Copy link

tantao14 commented Feb 6, 2020

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

@markkdev
Copy link
Author

markkdev commented Feb 6, 2020

@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
Copy link

Did you resolve this issue?

@PhantomKidding
Copy link

@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
Copy link
Author

Never found a solution to this issue.

@liuziwei7
Copy link
Contributor

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

@liuziwei7 liuziwei7 reopened this Mar 30, 2020
@swayam18
Copy link

swayam18 commented Apr 8, 2020

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

@knowlen
Copy link

knowlen commented May 12, 2020

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

@Lytua
Copy link

Lytua commented May 31, 2020

#32 (comment)

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

@gvisniuc
Copy link

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

@Debangshu132
Copy link

wrong predictions all the time :(

@veralauee
Copy link
Collaborator

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.

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