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

TypeError: rotate() got an unexpected keyword argument 'center' #33

Closed
handale88 opened this issue Dec 13, 2016 · 1 comment
Closed

Comments

@handale88
Copy link

handale88 commented Dec 13, 2016

Hello, I try to train your code, however I keep getting this error as below.
I have Ubuntu14.04, Cuda8.0, python 2.7. Caffe, and GTX1080.
Is there any solution I can solve this error?


bash shells/train_flic.sh
2016-12-13 14:02:51,960 [INFO] sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0)
2016-12-13 14:02:51,960 [INFO] chainer version: 1.18.0
2016-12-13 14:02:51,971 [INFO] cuda: True, cudnn: True
2016-12-13 14:02:51,971 [INFO] Namespace(adam_alpha=0.001, adam_beta1=0.9, adam_beta2=0.999, adam_eps=1e-08, base_zoom=1.5, batchsize=128, channel=3, coord_normalize=True, epoch=101, fliplr=True, fname_index=0, gcn=True, gpus='0', ignore_label=-1, im_size=220, img_dir='data/FLIC-full/images', joint_index=1, lr=0.01, lr_decay_freq=10, lr_decay_ratio=0.1, min_dim=0, model='models/AlexNet.py', n_joints=7, opt='Adam', resume_model=None, resume_opt=None, resume_param=None, rotate=True, rotate_range=10, seed=1701, show_log_iter=10, snapshot=10, symmetric_joints='[[2, 4], [1, 5], [0, 6]]', test_csv_fn='data/FLIC-full/test_joints.csv', test_freq=10, train_csv_fn='data/FLIC-full/train_joints.csv', translate=True, translate_range=5, valid_freq=5, weight_decay=0.0005, zoom=True, zoom_range=0.2)
2016-12-13 14:06:51,617 [INFO] data/FLIC-full/train_joints.csv is ready
2016-12-13 14:08:53,526 [INFO] data/FLIC-full/test_joints.csv is ready
Traceback (most recent call last):
File "scripts/train.py", line 229, in
trainer.run()
File "/usr/local/lib/python2.7/dist-packages/chainer/training/trainer.py", line 289, in run
update()
File "/usr/local/lib/python2.7/dist-packages/chainer/training/updater.py", line 170, in update
self.update_core()
File "/usr/local/lib/python2.7/dist-packages/chainer/training/updater.py", line 281, in update_core
batch = self.get_iterator('main').next()
File "/usr/local/lib/python2.7/dist-packages/chainer/iterators/multiprocess_iterator.py", line 77, in next
self._invoke_prefetch()
File "/usr/local/lib/python2.7/dist-packages/chainer/iterators/multiprocess_iterator.py", line 173, in _invoke_prefetch
data = self.dataset[index]
File "/usr/local/lib/python2.7/dist-packages/chainer/dataset/dataset_mixin.py", line 31, in getitem
return self.get_example(index)
File "/home/seungheelee/workspace/deeppose-master/scripts/dataset.py", line 169, in get_example
image, joints = self.apply_rotate(image, joints, ignore_joints)
File "/home/seungheelee/workspace/deeppose-master/scripts/dataset.py", line 128, in apply_rotate
image = transform.rotate(image, angle, center=joint_center)
TypeError: rotate() got an unexpected keyword argument 'center'

@handale88
Copy link
Author

I changed it to
image = transform.rotate(image, angle, joint_center)
and it seems like it's working..
However, I've got another error as below when training...


File "/home/seungheelee/download/caffe/scripts/dataset.py", line 169, in get_example
image, joints = self.apply_rotate(image, joints, ignore_joints)
File "/home/seungheelee/download/caffe/scripts/dataset.py", line 133, in apply_rotate
joints = ((rot_mat.dot((joints - joint_center).T)).T) + joint_center
TypeError: Cannot cast array data from dtype('float64') to dtype('<U32') according to the rule 'safe'

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

1 participant