You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Dear pytorch geeks, I got a weird Image Classification result using this ios-demo-app xcodeproject (both HelloWorld and also Pytorch Demo), please figure me out where is the issue. thanks!!!
what i did:
train a dataset (40 classifications) with Pytorch 1.5.0 with Transfer Learning (with resnet18), a traced 'mymodel.pt' is generated. acc=99%
tested with some input images (e.g.FigureA.jpg) with traced 'mymodel.pt' , the image classification is perfect!
issue is coming->?>?>?>?>?>?>?>
replace the original mobilenet v2 .pt and words.txt in the HelloWorld project with my traced 'mymodel.pt' and 'mywords.txt'
the classification result. (e.g. FigureA.jpg) is completely wrong on simulator and iPhone device
However, the classificaiton of FigureA.jpg is correct on my MacOS.
How it is possible ?
this issue blocks me since 1 month ago.
thanks a lot !!
The text was updated successfully, but these errors were encountered:
I have figured out where is the problem.
i double checked the predict output of Desktop and iOS, the torch.max gives the same tensor value(more or less same)
But in iOS, the label.txt should be generated along with PyTorch learning process.
I manually created a label.txt, like:
Class1
Class2
Class3
...
However, during the PyTorch learning process, with the dataloader, the class_name should be shuffled. So, just replace the shuffled label.txt with manually generated label.txt in XCODE project should be fine!
Dear pytorch geeks, I got a weird Image Classification result using this ios-demo-app xcodeproject (both HelloWorld and also Pytorch Demo), please figure me out where is the issue. thanks!!!
what i did:
issue is coming->?>?>?>?>?>?>?>
However, the classificaiton of FigureA.jpg is correct on my MacOS.
How it is possible ?
this issue blocks me since 1 month ago.
thanks a lot !!
The text was updated successfully, but these errors were encountered: