openpose_train icon indicating copy to clipboard operation
openpose_train copied to clipboard

the error with body_25 d_setLayers.py

Open jpbillzhou opened this issue 5 years ago • 5 comments

Traceback (most recent call last): File "d_setLayers.py", line 368, in isFinalModel, numberIterations, maximumPafStage, sUsePReLU, extraGT, sFootParts, sFootPAFs) File "/media/billzhou/Data/openpose_train/body25_training/generateProtoTxt.py", line 24, in generateProtoTxt usePReLU, extraGT, footParts, footPAFs) File "/media/billzhou/Data/openpose_train/body25_training/generateProtoTxt.py", line 1196, in setLayersTwoBranches return str(caffeNet.to_proto()) File "/home/billzhou/deeplearning/openpose_caffe_train/python/caffe/net_spec.py", line 193, in to_proto top._to_proto(layers, names, autonames) File "/home/billzhou/deeplearning/openpose_caffe_train/python/caffe/net_spec.py", line 97, in _to_proto return self.fn._to_proto(layers, names, autonames) File "/home/billzhou/deeplearning/openpose_caffe_train/python/caffe/net_spec.py", line 156, in _to_proto assign_proto(layer, k, v) File "/home/billzhou/deeplearning/openpose_caffe_train/python/caffe/net_spec.py", line 77, in assign_proto assign_proto(getattr(proto, name), k, v) File "/home/billzhou/deeplearning/openpose_caffe_train/python/caffe/net_spec.py", line 79, in assign_proto setattr(proto, name, val) TypeError: 2 has type int, but expected one of: bytes, unicode

jpbillzhou avatar Oct 23 '19 16:10 jpbillzhou

I encounter the same issue on Ubuntu 16.04 with Python 2.7.12. Is it issue from the pretrained VGG-19 caffe model that the document referenced https://gist.github.com/ksimonyan/3785162f95cd2d5fee77? Does anybody have suggestion on how to solve it? Thanks!

ting3000 avatar Dec 19 '19 20:12 ting3000

After I edited the d_setLayers.py from the example under training directory, then run from there, the issue is resolved. I think the issue was cased by that it was run from experimental_models/.... directory, which loaded a different caffe model.

ting3000 avatar Dec 22 '19 17:12 ting3000

I have the same issue as this. How do you fix it?please help @tingz2004 @tingz2004

MikeEnvi avatar Feb 11 '20 13:02 MikeEnvi

rename d_setLayers.py.example under training directory to be d_setLayers.py correct the value of sCaffeFolder to point according to your system run "python d_setLayers.py" under training directory

ting3000 avatar Feb 21 '20 20:02 ting3000

I want to train hand-detector with hand dataset-lmdb separately, but there are following lines in d_setLayers.py :

"if sAddHands: if len(sLmdbFolders) != 6: print('Not prepared for this case') assert(False)"

And there are following lines in the training/README.md:

"Set sAddFoot to 1 or 0 to enable/disable combined body-foot. Set sAddMpii, sAddFace and sAddHands to 1 or 0 to enable/disable boyd mpii/face/hands (if 1, then all the above must be also 1)."

How can I realize my needs?

TonightGo avatar Jun 22 '20 02:06 TonightGo