Comments (6)
checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar
是得到的kd后的模型,我用这个模型进行evaluation的时候先是使用了mpii_kd.py运行以下命令:
python mpii_kd.py -a hg --stacks 2 --blocks 1 --checkpoint checkpoint/mpii_hg_s2_b1_mobile_fpd/ --resume checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar -e
但是得到了error:
mpii_kd.py: error: argument --teacher_checkpoint is required
然后试着使用mpii.py,换用命令:
python mpii.py -a hg --stacks 2 --blocks 1 --checkpoint checkpoint/mpii_hg_s2_b1_mobile_fpd/ --resume checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar -e
这次没有error,但是在evaluation过程中一直是Loss: inf | Acc: 0.0000,如下:
Processing |################################| (493/493) Data: 0.268434s | Batch: 0.888s | Total: 0:07:17 | ETA: 0:00:01 | Loss: inf | Acc: 0.0000
对得到的evaluation结果我又进行了PCKh的计算,运行代码:
python tools/eval_PCKh.py --matfile checkpoint/mpii_hg_s2_b1_mobile_fpd/preds_valid.mat
得到的结果是:
Model, Head, Shoulder, Elbow, Wrist, Hip , Knee , Ankle , Mean
hg 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00
感觉这三步应该是同一个地方出了问题,但是不知道问题在哪?
from fast_human_pose_estimation_pytorch.
To eval student network, --mobile
need to be set as True. Otherwise, the network created does not match the weights checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar
you passed.
Everything works for me in my side. Please check log below.
$ python example/mpii.py -a hg --stacks 2 --blocks 1 --resume checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar -e --mobile True --checkpoint checkpoint/mpii_hg_s2_b1_mobile_fpd/
==> creating model 'hg', stacks=2, blocks=1
=> loading checkpoint 'checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar'
=> loaded checkpoint 'checkpoint/mpii_hg_s2_b1_mobile_fpd/model_best.pth.tar' (epoch 90)
Total params: 2.31M
Mean: 0.4404, 0.4440, 0.4327
Std: 0.2458, 0.2410, 0.2468
Evaluation only
example/mpii.py:229: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
input_var = torch.autograd.Variable(inputs.cuda(), volatile=True)
example/mpii.py:230: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
target_var = torch.autograd.Variable(target, volatile=True)
Processing |################################| (493/493) Data: 0.618189s | Batch: 0.685s | Total: 0:05:37 | ETA: 0:00:01 | Loss: 0.0008 | Acc: 0.8228
from fast_human_pose_estimation_pytorch.
Problem solved by your methods! Thank you! I missed the --mobile
.
from fast_human_pose_estimation_pytorch.
I ran the evaluation again and got this, the acc is pretty low and obviously incorrect.
python mpii.py -a hg --stacks 2 --blocks 1 --checkpoint checkpoint/hg_s2_b1_mobile_fpd/ --resume checkpoint/hg_s2_b1_mobile_fpd/model_best.pth.tar -e --mobile True
==> creating model 'hg', stacks=2, blocks=1
=> no checkpoint found at 'checkpoint/hg_s2_b1_mobile_fpd/model_best.pth.tar'
Total params: 2.31M
Mean: 0.4404, 0.4440, 0.4327
Std: 0.2458, 0.2410, 0.2468
Evaluation only
mpii.py:232: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
input_var = torch.autograd.Variable(inputs.cuda(), volatile=True)
mpii.py:233: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
target_var = torch.autograd.Variable(target, volatile=True)
Processing |################################| (493/493) Data: 0.248658s | Batch: 1.010s | Total: 0:08:17 | ETA: 0:00:02 | Loss: 0.0305 | Acc: 0.0060
Then I check the number of labels in data/mpii/mpii_annotations.json
and find it's 25204. However,the number in mpii_human_pose_v1_u12_1.mat
is 24987. So have you add your data in the dataset and is it the reason of the acc error?
Looking forward for your help~
from fast_human_pose_estimation_pytorch.
no, don't do anything to add new data into mpii. From your log, looks like the ckpt not loaded correctly.
=> no checkpoint found at 'checkpoint/hg_s2_b1_mobile_fpd/model_best.pth.tar'
from fast_human_pose_estimation_pytorch.
Yes, you are right! Thank you so much! But I am still confused with the images' number……but it doesn't matter now……
from fast_human_pose_estimation_pytorch.
Related Issues (20)
- hi, does it support multi-person pose estimation? HOT 1
- A simple question about the paper HOT 1
- requeset.txt need pip install torch, but i use conda ,use pytorch canot run?who use conda to run this/ HOT 1
- Leeds jason file?
- Student model overfits really early training HOT 4
- train at mpii,acc so small HOT 8
- where is the code of teacher to student?? HOT 5
- Why the accuracy differs a lot in the experiment and paper? HOT 1
- License HOT 2
- check the result of demo with the image sample.jpg
- python example/mpii_kd.py -a hg --stacks 2 --blocks 1 --checkpoint checkpoint/hg_s2_b1_mobile/ mobile=True --teacher_stack 8 --teacher_checkpoint HOT 1
- Training another student model(s4b2/s4b1) will drop just several epoches HOT 6
- train my dataset HOT 1
- unlabel dataset HOT 3
- loss function HOT 3
- 有个问题,试了下其他类型图片,效果并不好,是否只适用于mpii数据集上图片? HOT 2
- RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same HOT 1
- mobile=false HOT 3
- Unable to export to onnx HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_human_pose_estimation_pytorch.